shirtsgroup / InterMol

Conversion tool for molecular simulations
MIT License
185 stars 53 forks source link

LAMMPS dihedral_style multi/harmonic coefficients mismatch #318

Open b-v opened 7 years ago

b-v commented 7 years ago

According to http://lammps.sandia.gov/doc/dihedral_multi_harmonic.html the LAMMPS dihedral_style multi/harmonic has only 5 coefficients. However, the conversion of this dihedral from a LAMMPS data file triggers the convert_dihedral_from_RB_to_trig() routine in convert_dihedrals.py, where it is expected that there are at least 6 coefficients C0..C5.

One way of resolving the problem seems to be doing a similar construction with C5 as with C6 in convert_dihedral_from_RB_to_trig().

jkrajniak commented 7 years ago

How about dihedral/nharmonic ? (http://lammps.sandia.gov/doc/dihedral_nharmonic.html)

mrshirts commented 7 years ago

Can you upload a sample file would cause a crash (or incorrect energy) in LAMMPS (i.e. whatever caused you to notice this?) Our goal is to make sure that every supported energy term is translated into a correct implementation in the target code, but it could be any correct representation.

b-v commented 7 years ago

See attachments for a test. I've added .txt as an extension to the files, otherwise GitHub wouldn't accept it. The example is actually from the test suite and converted to LAMMPS, with slight modifications re the non-bonded interactions. The error occurs when the files are converted back to, e.g., GROMACS, using InterMol's convert.py.

dihedral9_vacuum_converted.input.txt dihedral9_vacuum_converted.lmp.txt

yel21 commented 3 years ago

Dear developers,

if there is any chance to solve the problem with converting dihedral multi/harmonic from LAMMPS to GROMACS?