bharurn / mimicpy

Python based tools for preparing MiMiC QM/MM simulations
GNU General Public License v3.0
1 stars 0 forks source link

Selection fixes #22

Closed bharurn closed 4 years ago

bharurn commented 4 years ago

After the MPT format was changed, I went ahead and tried to fix the ResID problem. I made the following main changes in the way the selection language works:

I've tried to put comments for clarity. We will discuss about this pull request anyway. Please go through this branch and test it well, only then we'll merge it.

fschackert commented 4 years ago

Errors while testing on AMPA calcium multisite topology

bharurn commented 4 years ago

Looks like there was an error in the regex of the getSection function. The regex finds text between [ section ] and the next '['. But, in cam.itp the [ atoms ] section was followed by a [ bonds ] section in which the [ bonds ] string was not at the starting of the line (there were spaces before it). This tripped up the regex in getSection(), and it did not return any text. So, the code happily skipped that molecule without raise a warning/error.

I have fixed the regex now, hopefully it should work.

fschackert commented 4 years ago

Fixes #16