GROMACS version: 2020
GROMACS modification: NO
Here post your question
How to use template.cpp for gmx_2020 version
I want to access x y z coordinate of particular atom having atom name resid and index. for each time frame
input file tpr and xtc
Can anyone please let me know how to use template for same
The example in template.cpp shows how to use the coordinates obtained from a selection provided on the command line. That’s likely more usable than any attempt to index by ids.
Also, check out Gromacs: Using GROMACS as a library for a walk-through of how to think about writing such code.
I got solution for my older version c template pre 4. version now can be used here
For C code, you can use gmx_run_cmain() to wrap an existing C main method. The only constraint on the provided main method is that it should use parse_common_args() for argument processing. This approach should allow you to convert existing C tools written against pre-5.0 GROMACS (e.g., using the analysis template from 4.0 or earlier) to the new version.