michellab / Sire

Sire Molecular Simulations Framework
http://siremol.org
GNU General Public License v3.0
95 stars 26 forks source link

AmberPrm uses incorrect NATYP pointer #333

Closed lohedges closed 3 years ago

lohedges commented 3 years ago

NATYP should be the total number of atom types, not the number of unique types, which is currently used. This means that the FLAG SOLTY section has an incorrect number of entries. While this FLAG isn't currently used it means that our prm7 files can't currently be read by tools such as ParmEd, which expect the FLAG to have the correct number of entries.

ppxasjsm commented 3 years ago

I have encountered this exact issue very recently. A fix would be greatly appreciated.

lohedges commented 3 years ago

I believe that I've fixed it locally, but currently can't rebuild Sire due to a conda bug. Hopefully I'll fix both things tomorrow!

lohedges commented 3 years ago

This is now fixed. However, if you are the system that you are writing to AMBER format contains water molecules with virtual sites then things still won't work (assuming you have solvated with BioSimSpace). See here for details. I've solved this by converting to the expected AMBER water topology on write, but haven't pushed the change yet.