Default index groups and selections - Redmine #921
Archive from user: Teemu Murtola
When the selection code was originally integrated into Gromacs, Berk expressed a wish that it would not use hard-coded default index groups like Gromacs currently uses. So I implemented a mechanism where the default index groups for selections are created from a defselections.dat file: selections in this file are parsed, and an index group is generated from each selection that evaluates to a non-zero number of atoms. I believe that the default index group generation code has been updated since, but the defselections.dat file has not. It would be best to unify the handling of the default groups for 5.0.
Questions to address:
- Is the defselections.dat the way to go forward for selections?
- Is something extra needed, e.g., in the form of selection methods, to express the current default groups as selections? Note that groups based on residue names do not need to be generated as it is trivial to select them using selections. Also note that regex-based selections (which the current defselections.dat uses) are not currently easily available on Windows.
- Should all default index group generation code be replaced with this approach? This requires some handling for the residue name based groups.
- It could also be possible to take variables declared in defselections.dat and make those available to user selections, e.g., to allow defining a “protein” keyword by simply adding such a variable to this file. This requires some implementation work, but should be doable.
(from redmine: issue id 921, created on 2012-04-15 by gmxdefault)
- Relations:
- relates #1323 (closed)
- Changesets:
- Revision 30ceea84 by Teemu Murtola on 2013-12-30T14:29:27Z:
Initialize default index groups for C++ tools
If an index file is not explicitly provided, initialize default
index groups using the old analyse() method for the new C++ tools.
This is better than nothing, and keeps the default groups in sync.
Also some clean-up for related code in
TrajectoryAnalysisCommandLineRunner.
Temporary fix for #921.
Change-Id: I4f9d2586a0446302ce0a2d9326d2fd4c85b02ef0