force-h2020 / force-bdss-plugin-gromacs

Gromacs BDSS data sources, as well as a stand-alone wrappers around Gromacs tools.
MIT License
0 stars 0 forks source link

GromacsCoordinateReader Regex rules incorrect for loading trajectories #15

Closed flongford closed 4 years ago

flongford commented 4 years ago

The GromacsCoordinateReader was not correctly loading information on molecular fragments with symbols containing decimals, i.e: PS1.

This is because trajectory files label multiple fragments in a simulation box by adding a numerical index to the beginning of the fragment symbol, i.e: 1PS1, 2PS1....

The regex rules for extracting the basic molecular symbol from these strings stripped out all decimals (1PS1 --> PS), rather than just at the beginning (1PS1 --> PS1).

Therefore the regex rules for stripping out atom indices have been updated accordingly, as well as any affected unit tests.