Report GROMACS Per. Imp. Dih. energy contribution#404
Conversation
ctk3b
left a comment
There was a problem hiding this comment.
This makes sense to me! Thanks for the contribution
|
Thank you for merging so quickly. However, I am worried that the newly added line InterMol/intermol/gromacs/__init__.py Line 29 in e53e633 InterMol/intermol/gromacs/__init__.py Line 28 in e53e633 I think it would be better to either introduce a mechanism to add both GROMACS-reported contributions to and then go through the code and modify reporting logic where necessary. What would be your preferred way? |
|
Ah apologies for missing this. You're absolutely right. Reverted for the time being: #405 My preference would be to not introduce new categories, i.e. lumping them both into I won't have time to implement this but happy to review a PR if you do! |
|
Looking at the energy summing logic in Lines 67 to 75 in 7125764 I realize InterMol already does the lumping together of energy terms with the same canonical label. I wasn't aware of that, my apologies. The same already happens for other energy contributions, e.g. InterMol/intermol/gromacs/__init__.py Lines 26 to 27 in 7125764 Hence, I think the initially added single line is fine. If you agree, please revert the revert. Thank you. |
The GROMACS dihedral type 4 (periodic improper dihedral, see table in https://manual.gromacs.org/documentation/2024.2/reference-manual/topologies/topology-file-formats.html and https://manual.gromacs.org/documentation/current/reference-manual/functions/bonded-interactions.html#improper-dihedrals-periodic-type) produces its own energy contribution named "Per. Imp. Dih." in the
energy.xvg. The single line added in this PR would evaluate this contribution, but likely override the other "Improper Dih." energy contribution. What would be the desired way of reporting this energy contribution?A standard InterMol GROMAC -> LAMMPS conversion energy report would look like this
while the report with this additional line looks like this,
You see that the GROMACS
proper+impropercontributions now add up to the LAMMPSproperdihedral contribution. This is expected as InterMol converts GROMACS type 4 periodic improper dihedrals to LAMMPS multi/nharmonic proper dihedrals.