hernanchavezthielemann / GRO2LAM

Gromacs to Lammps simulation converter
MIT License
65 stars 19 forks source link

Gro2LAM: What about gromacs files that have no dihedrals or impropers? #58

Open Bellsthescientist opened 1 year ago

Bellsthescientist commented 1 year ago

I have a Force field file that has no angle types or dihedral types defined. I put 0 under [angletypes] and [dihedraltypes] so it passes the check, But I get stuck with the error attached below when I try to run convert:

Screen Shot 2023-04-28 at 1 27 27 AM

Does Gro2Lam require these types?

hernanchavezthielemann commented 1 year ago

Hi @Bellsthescientist,

In short, it does not, But depends what do you want to get, I can think in a couple of different outcomes at least. As example if you just want atoms and bonds without charge, or else with the charges. The ideal would be that you have the complete force field, and you don't have to modify those files, then you can decide with the atom type selector what type of LAMMPS input do you want.

The classic directives are: '[ moleculetype ]', '[ atoms ]', '[ bonds ]', '[ pairs ]','[ angles ]', '[ dihedrals ]', '[ system ]', '[ molecules ]' and GRO2LAM allows you to continue, with some warnings even if if some of the following are missing: '[ bonds ]', '[ pairs ]', '[ angles ]', '[ dihedrals ]' .

Anyway to solve what you mention, if your force field does not have the directives for angles and dihedrals, I think the easiest is to just leave it like that, go through the warnings/error, and then at the end check if there is an error in the data file generated, most likely at the very end there is an " Angles" text that you have to remove manually.

Since Ive already looked at it, I think I will implement a short correction, so the final manual step is not needed (int he python3 version).

best, Hernan.