GROMACS version: 2024.2
GROMACS modification: No
Hi all,
I wanted to check if I had some misunderstanding of the selection syntax rules as I get a Segmentation fault in a specific use case of group selections. Here is a simplified version of when I get this error and some minor trouble shooting.
-
System context: Membrane system with a few peptides on it.
-
Simplified command:
gmx pairdist -f md.xtc -s md.tpr -o test_pairdist.xvg -b 750000 -e 750000 -pbc yes -
I simplified the commands to test against potential issues with my created index files or trajectory conversions. I used 1 frame for testing purposes but it happens with more as well.
Segmentation fault producing selection
ref selection:
x_pos = x of cog of group “Protein”;
cog of (group “Other” and (x < (1+x_pos)));
sel selection:
cog of group “Protein”;
Fails with output: Segmentation fault (core dumped)
- So I performed three other test cases to check that arithmetic can be performed on numerical expressions and variables that should evaluate to numerical expressions.
Testing for arithmetic between numerical expressions
ref selection:
cog of (group "Other" and (x < (1+1)));
sel selection:
cog of group “Protein";
computes normally
Testing for arithmetic between a numerical expression and a variable that evaluates to one
ref selection:
x_pos = 1;
cog of (group "Other" and (x < (1+x_pos)));
sel selection:
cog of group “Protein";
computes normally
Testing for comparison between a numerical expression and a variable that evaluates to a numerical expression
ref selection:
x_pos = x of cog of group "Protein";
cog of (group "Other" and (x < (x_pos)));
sel selection:
cog of group “Protein";
computes normally
Am I misunderstanding how to add and evaluate numerical expressions? Or does the expression x of cog of group "Protein" not evaluate to a numerical expression like I think it does? I thought the selections documentation was fairly clear but I wanted to make sure before considering this an issue with gromacs.
Here is the raw input/output for the failed selections:
/home/delmore/gromacs_gpu/bin/gmx pairdist -f md.xtc -s md.tpr -o better_dist_pair.xvg -b 750000 -e 750000 -pbc yes
:-) GROMACS - gmx pairdist, 2024.2 (-:
Executable: /home/delmore/gromacs_gpu/bin/gmx
Data prefix: /home/delmore/gromacs_gpu
Working dir: /home/zh106/wt_sim6
Command line:
gmx pairdist -f md.xtc -s md.tpr -o better_dist_pair.xvg -b 750000 -e 750000 -pbc yes
Reading file md.tpr, VERSION 2024.2 (single precision)
Reading file md.tpr, VERSION 2024.2 (single precision)
Available static index groups:
Group 0 "System" (38158 atoms)
Group 1 "Protein" (1464 atoms)
Group 2 "Protein-H" (700 atoms)
Group 3 "C-alpha" (84 atoms)
Group 4 "Backbone" (252 atoms)
Group 5 "MainChain" (332 atoms)
Group 6 "MainChain+Cb" (408 atoms)
Group 7 "MainChain+H" (420 atoms)
Group 8 "SideChain" (1044 atoms)
Group 9 "SideChain-H" (368 atoms)
Group 10 "Prot-Masses" (1464 atoms)
Group 11 "non-Protein" (36694 atoms)
Group 12 "Other" (16064 atoms)
Group 13 "POPG" (4064 atoms)
Group 14 "POPE" (12000 atoms)
Group 15 "NA" (20 atoms)
Group 16 "CL" (12 atoms)
Group 17 "Water" (20598 atoms)
Group 18 "SOL" (20598 atoms)
Group 19 "non-Water" (17560 atoms)
Group 20 "Ion" (32 atoms)
Group 21 "Water_and_ions" (20630 atoms)
Specify a selection for option 'ref'
(Reference positions to calculate distances from):
(one per line, <enter> for status/groups, 'help' for help)
> x_pos = x of cog of group "Protein";
Variable 'x_pos = x of cog of group "Protein"' parsed
> cog of (group "Other" and (x < (1+x_pos)));
Selection 'cog of (group "Other" and (x < (1+x_pos)))' parsed
Available static index groups:
Group 0 "System" (38158 atoms)
Group 1 "Protein" (1464 atoms)
Group 2 "Protein-H" (700 atoms)
Group 3 "C-alpha" (84 atoms)
Group 4 "Backbone" (252 atoms)
Group 5 "MainChain" (332 atoms)
Group 6 "MainChain+Cb" (408 atoms)
Group 7 "MainChain+H" (420 atoms)
Group 8 "SideChain" (1044 atoms)
Group 9 "SideChain-H" (368 atoms)
Group 10 "Prot-Masses" (1464 atoms)
Group 11 "non-Protein" (36694 atoms)
Group 12 "Other" (16064 atoms)
Group 13 "POPG" (4064 atoms)
Group 14 "POPE" (12000 atoms)
Group 15 "NA" (20 atoms)
Group 16 "CL" (12 atoms)
Group 17 "Water" (20598 atoms)
Group 18 "SOL" (20598 atoms)
Group 19 "non-Water" (17560 atoms)
Group 20 "Ion" (32 atoms)
Group 21 "Water_and_ions" (20630 atoms)
Specify any number of selections for option 'sel'
(Positions to calculate distances for):
(one per line, <enter> for status/groups, 'help' for help, Ctrl-D to end)
> cog of group "Protein";
Selection 'cog of group "Protein"' parsed
> Segmentation fault (core dumped)
Thanks in advance