shirtsgroup / InterMol

Conversion tool for molecular simulations
MIT License
191 stars 55 forks source link

Gromacs input files not being parsed #48

Closed zhonge closed 10 years ago

zhonge commented 10 years ago

I'm under the impression that we have gotten Gromacs input files to convert properly, however, when I run

$ python convert.py --gro_in Inputs/Gromacs/2PPN/topol.top Inputs/Gromacs/2PPN/conf.gro --gromacs -e
Performing InterMol conversion...
System initialized

Reading in Gromacs topology 'Inputs/Gromacs/2PPN/topol.top'...
Local instance of topology file 'Inputs/Gromacs/2PPN/topol.top' used
version in GMXLIB = /usr/local/gromacs/share/gromacs/top used for topology file 'oplsaa.ff/forcefield.itp'
version in /usr/local/gromacs/share/gromacs/top/oplsaa.ff used for topology file '/usr/local/gromacs/share/gromacs/top/oplsaa.ff/ffnonbonded.itp'
version in /usr/local/gromacs/share/gromacs/top/oplsaa.ff used for topology file '/usr/local/gromacs/share/gromacs/top/oplsaa.ff/ffbonded.itp'
version in /usr/local/gromacs/share/gromacs/top/oplsaa.ff used for topology file '/usr/local/gromacs/share/gromacs/top/oplsaa.ff/gbsa.itp'
version in GMXLIB = /usr/local/gromacs/share/gromacs/top used for topology file 'oplsaa.ff/tip3p.itp'
Traceback (most recent call last):
  File "convert.py", line 184, in <module>
    main()
  File "convert.py", line 128, in main
    Driver.load(*files)
  File "/home/edz3fz/InterMol/intermol/Driver.py", line 39, in load
    GromacsTopologyParser._GroTopParser.parseTopology(filename)
  File "/home/edz3fz/InterMol/intermol/GromacsExt/GromacsTopologyParser.py", line 58, in parseTopology
    self.readTopology(lines, verbose)
  File "/home/edz3fz/InterMol/intermol/GromacsExt/GromacsTopologyParser.py", line 1011, in readTopology
    split[5],
IndexError: list index out of range

Line 1011 in GromacsTopologyParser deals with parsing RBDihedrals. A similar error occurs when converting Inputs/Gromacs/dihedral2 files.

Does this happen to anyone else? Or is something be wrong with my ff files (running this on Helium).

ctk3b commented 10 years ago

The issue is because the dihedraltype lookup fails and doesn't end up adding anything to split. There should be an error or warning here since we assume that split will contain the full parameters by this point in the code.

mrshirts commented 10 years ago

Possibly was introduced by a fix somewhere else? I'll take a look. BTW, this is why its vital for us to get a good regression test going; so we always see what a new bug fix might do to other code.

mrshirts commented 10 years ago

Looks like it's a dihedral type that is not defined for whatever reason:

opls_224B-opls_140- opls_145-opls_145

Perhaps not getting caught by wildcards?

mrshirts commented 10 years ago

Whoops.

opls_224B-opls_149- opls_145-opls_145

CT_2 CT CA CA

This should be caught by the rule

CA CA CT X 3 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000

But it isn't. I'll check.

mrshirts commented 10 years ago

This should be working now.