GOMC icon indicating copy to clipboard operation
GOMC copied to clipboard

GOMC should detect Forcefield files with duplicate dihedral definitions with the same periodicity

Open LSchwiebert opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

GOMC produces incorrect intrabond energies if the forcefield file includes duplicate dihedral entries (the same atoms) with the same periodicity (value of n). Since all of these entries are used in the energy calculation, duplicate energy changes are made, so the energy calculation is incorrect.

Describe the solution you'd like

GOMC should generate an informative error message and terminate.

Describe alternatives you've considered

N/A. The result is incorrect, but that may not be obvious, so better to terminate with an error so the force field file can be corrected.

Additional context

None.

LSchwiebert avatar Aug 05 '24 20:08 LSchwiebert

Instead of terminating with an error, the patch will remove the duplicates and generate a warning. This way, the user knows that a modification has been made to do something other than what the forcefield input file requested.

LSchwiebert avatar Aug 06 '24 01:08 LSchwiebert