Sire icon indicating copy to clipboard operation
Sire copied to clipboard

Unable to read GROMACS amber14sb topology

Open lohedges opened this issue 3 years ago • 2 comments

Related to #411, we are unable to read another amber14sb related gromacs topology. This was generated in the same way as the topology in the other thread and will need additional amber14sb related files (included in the archive) in order to load. (Copy these into your GROMACS data directory.) In this case, the error message is a little less helpful:

from sire.legacy.IO import GroTop

GroTop("topol.top")
gro_top.toSystem()

This fails with:

KeyError: 'SireMol::missing_atom: There is no atom with the number "4650" in the layout "{c83805bd-64cb-4331-89af-4f208cb33f6d}". (call sire.error.get_last_error_details() for more info)'

Parsing the lines, we find that this atom number is present:

for line in gro_top.lines():
    if "4650" in line:
        print(line)

Which gives:

  4650         H1   1177A   NME   HH31   4650     0.0976      1.008
 4649  4650     1
 4645  4650     1
 4648  4650     1
 4647  4649  4650     1
 4650  4649  4651     1
 4650  4649  4652     1
 4645  4647  4649  4650     9
 4648  4647  4649  4650     9

These are:

  • The atom record.
  • A bond record.
  • Two pairs records.
  • Three angles records.
  • Two dihedrals records.

I note that the topology (topol.top) file contains two dihedrals sections for the first molecule type. I'm not sure what would happen here, are they combined, or does one overwrite the other?

lohedges avatar Nov 04 '22 16:11 lohedges

I note that the topology (topol.top) file contains two dihedrals sections for the first molecule type. I'm not sure what would happen here, are they combined, or does one overwrite the other?

They are combined, usually one for proper dihedral and another for improper.

xiki-tempula avatar Nov 04 '22 16:11 xiki-tempula

Ah yes, I forgot about the function type for GROMACS dihedrals, that makes sense.

lohedges avatar Nov 04 '22 16:11 lohedges