[gmx-users] Invalid selection near '&' syntax error -- easy way to avoid?
Christopher Neale
chris.neale at alum.utoronto.ca
Sat May 21 01:03:23 CEST 2016
Thanks Justin and Mark.
I avoid numbers at all costs in selections for robustness, though I can see that it would probably be OK in most cases. I'll look into gmx select.
Thank you,
Chris.
________________________________________
From: gromacs.org_gmx-users-bounces at maillist.sys.kth.se <gromacs.org_gmx-users-bounces at maillist.sys.kth.se> on behalf of Mark Abraham <mark.j.abraham at gmail.com>
Sent: 20 May 2016 18:18:11
To: gmx-users at gromacs.org
Subject: Re: [gmx-users] Invalid selection near '&' syntax error -- easy way to avoid?
Hi,
Roughly speaking, if gmx make_ndx doesn't immediately do want you want,
then gmx select is much more powerful. The former is not going to get
enhanced given that the latter exists.
Mark
On Sat, 21 May 2016 00:14 Justin Lemkul <jalemkul at vt.edu> wrote:
>
>
> On 5/20/16 5:54 PM, Christopher Neale wrote:
> > Dear Users:
> >
> > I find that gmx make_ndx will create groups with names that have
> ampersands in them and that this complicates piping the group name back
> into an analysis tool. I have included an example below. There is an
> obvious solution with sed to rename the group in the .ndx file after
> creation (this is what I am doing now). However, I'm thinking about posting
> a redmine feature request since ideally I think the tool will not require
> an external step for name-based selection and I wanted to ask here first
> just in case I am missing something.
> >
>
> Groups can be renamed within make_ndx itself. This does require you to
> know the
> group numbers ("name X mygroup", if you know X), but it's what I usually
> use
> since the number of default groups is predictable.
>
> -Justin
>
> > ### commands
> >
> > {
> > echo "aC316 C216"
> > echo "aC316 C216 & r1-64"
> > echo "aC316 C216 & r65-128"
> > echo q
> > } | gmx make_ndx -f start.gro -o rdf.ndx
> > echo -e 'C316_C216_&_r_65-128\nC316_C216_&_r_65-128\n' | gmx rdf -f
> MD.xtc -n rdf.ndx -s MD.tpr
> >
> >
> > ### output from gmx rdf:
> >
> > :-) GROMACS - gmx rdf, VERSION 5.1.2 (-:
> >
> > GROMACS is written by:
> > Emile Apol Rossen Apostolov Herman J.C. Berendsen Par
> Bjelkmar
> > Aldert van Buuren Rudi van Drunen Anton Feenstra Sebastian
> Fritsch
> > Gerrit Groenhof Christoph Junghans Anca Hamuraru Vincent
> Hindriksen
> > Dimitrios Karkoulis Peter Kasson Jiri Kraus Carsten
> Kutzner
> > Per Larsson Justin A. Lemkul Magnus Lundborg Pieter
> Meulenhoff
> > Erik Marklund Teemu Murtola Szilard Pall Sander Pronk
> > Roland Schulz Alexey Shvetsov Michael Shirts Alfons
> Sijbers
> > Peter Tieleman Teemu Virolainen Christian Wennberg Maarten Wolf
> > and the project leaders:
> > Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel
> >
> > Copyright (c) 1991-2000, University of Groningen, The Netherlands.
> > Copyright (c) 2001-2015, The GROMACS development team at
> > Uppsala University, Stockholm University and
> > the Royal Institute of Technology, Sweden.
> > check out http://www.gromacs.org for more information.
> >
> > GROMACS is free software; you can redistribute it and/or modify it
> > under the terms of the GNU Lesser General Public License
> > as published by the Free Software Foundation; either version 2.1
> > of the License, or (at your option) any later version.
> >
> > GROMACS: gmx rdf, VERSION 5.1.2
> > Executable: /home/cneale/exec/GROMACS/exec/gromacs-5.1.2/serial/bin/gmx
> > Data prefix: /home/cneale/exec/GROMACS/exec/gromacs-5.1.2/serial
> > Command line:
> > gmx rdf -f MD.xtc -n rdf.ndx -s MD.tpr
> >
> >
> > -------------------------------------------------------
> > Program: gmx rdf, VERSION 5.1.2
> >
> > Error in user input:
> > Invalid selection 'C316_C216_&_r_65-128 '
> > Near '&'
> > syntax error
> >
> > For more information and tips for troubleshooting, please check the
> GROMACS
> > website at http://www.gromacs.org/Documentation/Errors
> >
>
> --
> ==================================================
>
> Justin A. Lemkul, Ph.D.
> Ruth L. Kirschstein NRSA Postdoctoral Fellow
>
> Department of Pharmaceutical Sciences
> School of Pharmacy
> Health Sciences Facility II, Room 629
> University of Maryland, Baltimore
> 20 Penn St.
> Baltimore, MD 21201
>
> jalemkul at outerbanks.umaryland.edu | (410) 706-7441
> http://mackerell.umaryland.edu/~jalemkul
>
> ==================================================
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>
--
Gromacs Users mailing list
* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-request at gromacs.org.
More information about the gromacs.org_gmx-users
mailing list