make_ndx "AND" keyword seems broken - Redmine #1976
Archive from user: Chris Neale I have tried using the ‘AND’ keyword, which is noted in the gmx make\_ndx -h output. Indeed, the word “AND” replaces the ampersand in the index group in this case. However, the selection seems broken to me. Details are below. Specifically, with the ‘&’ between selection of one atom name and one residue number, I get one atom in the group, as expected. However, when I use the ‘AND’ keyword, “r” seems to get promoted to “R” and then (for this or other reasons) the selection of one particular residue is not honored. NOTE: same behaviour if using “AND” or “and” In the following, note that there are 128 lipids and that each lipid has a single atom names C316. Therefore selecting a single residue and a name of C316 should give a single atom. $ echo -e "aC316 AND r1 \n aC316 & r1 \n q \n" | gmx make_ndx -f start.gro -o rdf.ndx :-) GROMACS - gmx make_ndx, 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 make_ndx, 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 make_ndx -f start.gro -o rdf.ndx Reading structure file Going to read 0 old index file(s) Analysing residue names: There are: 128 Other residues There are: 6396 Water residues There are: 34 Ion residues Analysing residues not classified as Protein/DNA/RNA/Water and splitting into groups... Analysing residues not classified as Protein/DNA/RNA/Water and splitting into groups... 0 System : 35862 atoms 1 Other : 16640 atoms 2 DPPC : 16640 atoms 3 K : 17 atoms 4 CL : 17 atoms 5 Water : 19188 atoms 6 SOL : 19188 atoms 7 non-Water : 16674 atoms 8 Ion : 34 atoms 9 DPPC : 16640 atoms 10 K : 17 atoms 11 CL : 17 atoms 12 Water_and_ions : 19222 atoms nr : group ! 'name' nr name 'splitch' nr Enter: list groups 'a': atom & 'del' nr 'splitres' nr 'l': list residues 't': atom type | 'keep' nr 'splitat' nr 'h': help 'r': residue 'res' nr 'chain' char "name": group 'case': case sensitive 'q': save and quit 'ri': residue index > Found 128 atoms with names C316 AND R1 13 C316_AND_R1 : 128 atoms > Found 128 atoms with name C316 Merged two groups with AND: 128 130 -> 1 14 C316_&_r_1 : 1 atoms > ### I did not test the “NOT” or OR" keywords, but they are probably suspect as well. Thank you, Chris. *(from redmine: issue id 1976, created on 2016-05-31 by gmxdefault, closed on 2016-06-02)* * Changesets: * Revision 13e0dc7121d4b16eac44e1029a5dc28ef577fcc1 by Teemu Murtola on 2016-05-31T19:27:48Z: ``` Improve make_ndx help text Clarify the use of boolean operators. The old help text could incorrectly hint that AND, OR, and NOT would work as keywords. Add a reference to gmx select that in most cases can serve as a replacement. Fixes #1976. Change-Id: I0284c849c398e5b09569453d7d0f19b9639a6d0c ```
issue