Re: [AMBER] Paths with spaces in cpptraj

From: Carlos Simmerling via AMBER <amber.ambermd.org>
Date: Tue, 29 Aug 2023 16:16:42 -0400

is there any way to replace the space in the workflow (perhaps using a tool
like sed) ? Using ? does work for me in cpptraj.
Of course Dan might be able to alter cpptraj to support spaces, but this
could provide an immediate workaround:

CPPTRAJ: Trajectory Analysis. V6.4.4 (AmberTools)
    ___ ___ ___ ___
     | \/ | \/ | \/ |
    _|_/\_|_/\_|_/\_|_

| Date/time: 08/29/23 16:13:25
| Available memory: 169.935 MB

INPUT: Reading input from 'CPPtraj.in'
  [parm ./prmtop.parm7]
        Reading './prmtop.parm7' as Amber Topology
        Radius Set: modified Bondi radii (mbondi)
  [trajin 10?md.nc]
        Reading '10 md.nc' as Amber NetCDF
...
INPUT TRAJECTORIES (1 total):
 0: '10 md.nc' is a NetCDF AMBER trajectory with coordinates, velocities,
time, box, Parm prmtop.parm7 (Truncated octahedron box) (reading 10586 of
10586)
  Coordinate processing will occur on 10586 frames.



On Tue, Aug 29, 2023 at 12:32 PM Mark Mackey <mark.mackey.cresset-group.com>
wrote:

> Hi Carlos,
>
>
>
> The problem is that we are using cpptraj as part of an automated workflow,
> and some of our users (on Windows) have a space in their username. As a
> result, pretty much any file they create is going to be in “C:\Users\name
> with space\” and I’ve found it impossible to load the resulting files into
> cpptraj either by specifying them on the command line or via giving their
> path in a script. This looks to me to be a bug in cpptraj’s parser.
>
>
>
> Regards,
>
> Mark
>
>
>
> *Mark Mackey*
>
> *Chief Scientific Officer *
> *Cresset *New Cambridge House, Bassingbourn Road, Litlington,
> Cambridgeshire, SG8 0SS, UK
> Tel: +44 (0)1223 858890 Mobile: +44 (0)7595099165
> Email: mark.mackey.cresset-group.com Web: www.cresset-group.com
>
>
>
> *From:* Carlos Simmerling <carlos.simmerling.gmail.com>
> *Sent:* Friday, August 25, 2023 9:53 PM
> *To:* Mark Mackey <mark.mackey.cresset-group.com>; AMBER Mailing List <
> amber.ambermd.org>
> *Subject:* Re: [AMBER] Paths with spaces in cpptraj
>
>
>
> could you use a question mark to replace the space?
>
> I try to avoid spaces in any unix file names or paths... even on the
> command line you can't use a space directly.
>
>
>
> On Fri, Aug 25, 2023 at 12:41 PM Mark Mackey via AMBER <amber.ambermd.org>
> wrote:
>
> Dear AMBER developers,
>
> I've been trying to use cpptraj with some files with a space in the path
> name. I've been unable to get this to work at all:
>
> > parm /tmp/path space/acetone.prmtop
> [parm /tmp/path space/acetone.prmtop]
> Error: '/tmp/path': No such file or directory
> Error: Could not open topology '/tmp/path'
>
> > parm "/tmp/path space/acetone.prmtop"
> [parm "/tmp/path space/acetone.prmtop"]
> Error: '/tmp/path': No such file or directory
> Error: Could not open topology '/tmp/path'
> Error: 'space/acetone.prmtop': No such file or directory
> Error: Could not open topology 'space/acetone.prmtop'
>
> > parm /tmp/path\ space/acetone.prmtop
> [parm /tmp/path\ space/acetone.prmtop]
> Error: Bad syntax (unbalanced parentheses, unmatched quotes.
> Error: '/tmp/path\' corresponds to no files.
>
> > parm /tmp/path\\ space/acetone.prmtop
> [parm /tmp/path\\ space/acetone.prmtop]
> Error: '/tmp/path\': No such file or directory
> Error: Could not open topology '/tmp/path\'
>
> > parm "/tmp/path\ space/acetone.prmtop"
> [parm "/tmp/path\ space/acetone.prmtop"]
> Reading '/tmp/path space/acetone.prmtop' as Amber Topology
> Error reading topology file '/tmp/path space/acetone.prmtop'
> Error: Could not open topology '/tmp/path space/acetone.prmtop'
>
> The last one looks like it nearly worked, but not quite! Any suggestions?
> If this can't be done, can I please add this as a feature request?
>
> Regards,
> Mark
>
> Mark Mackey
> Chief Scientific Officer
> Cresset
> New Cambridge House, Bassingbourn Road, Litlington, Cambridgeshire, SG8
> 0SS, UK
> Tel: +44 (0)1223 858890 Mobile: +44 (0)7595099165
> Email: mark.mackey.cresset-group.com<mailto:mark.mackey.cresset-group.com>
> Web: www.cresset-group.com<http://www.cresset-group.com/>
> [cid:image001.png.01D9D77B.3BDBF380]<
> https://www.linkedin.com/company/cresset> [
> cid:image002.png.01D9D77B.3BDBF380] <https://www.twitter.com/cressetgroup>
> [Email Signature 412 x 165px (002).png] <
> https://www.cresset-group.com/subscribe/>
>
>
>
> This email has been sent from Cresset BioMolecular Discovery Limited,
> registered in England and Wales, Company Number: 04151475. The information
> in this email and any attachments are confidential and may be privileged.
> It is intended solely for the addressee and access to this email by anyone
> else is unauthorised. If an addressing or transmission error has
> misdirected this email, please notify the author by replying to this email.
> If you are not the intended recipient you must not use, disclose,
> distribute, store or copy the information in any medium. Although this
> e-mail and any attachments are believed to be free from any virus or other
> defect which might affect any system into which they are opened or
> received, it is the responsibility of the recipient to check that they are
> virus-free and that they will in no way affect systems and data. No
> responsibility is accepted by Cresset BioMolecular Discovery Limited for
> any loss or damage arising in any way from their receipt, opening or use.
> Privacy notice<https://www.cresset-group.com/privacy/>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Aug 29 2023 - 13:30:02 PDT
Custom Search