Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running IntraBond energy not being maintained in some cases #473

Closed
LSchwiebert opened this issue Nov 6, 2022 · 0 comments · Fixed by #474
Closed

Running IntraBond energy not being maintained in some cases #473

LSchwiebert opened this issue Nov 6, 2022 · 0 comments · Fixed by #474
Assignees
Labels

Comments

@LSchwiebert
Copy link
Collaborator

Describe the bug

For some moves, such as the GEMC system in issue #441, the running intraBond energy is not being updated. Although the angle, bond, and dihedral energies are correct, the intraBond energy, which is the total of them, is not. The value of intraBond is now checked in Simulation::RecalculateAndCheck() and a warning message is generated that "Warning: Updated energy differs from Recalculated Energy!"

Note that the code is also currently printing the wrong value for the recalculated intraBond energy. It is printing the running value, not the recalculated value. I.e., printing system->potential.totalEnergy.intraBond instead of pot.totalEnergy.intraBond on line 215 of Simulation.cpp.

To Reproduce

You can see this by running the system that was submitted in issue #441.

Expected behavior

The code should not be generating a warning that the running energy and recalculated energy don't match if they are the same. So, no warning should be produced.

Screenshots

N/A

Input files

Use the mp_crash test files in issue #441.

Please complete the following information:

  • OS: CentOS
  • Ensemble: GEMC
  • Code version: Latest development branch. Probably in version 2.75 as well.

Additional context

Need to dig into the code further to figure out which moves aren't updating intraBond energy properly when one or more of the components (angle, bond, or dihedral) change. A better fix would be to make these data members private and then the updating could be handled properly in the EnergyTypes.h classes, but that is a more significant patch.

@LSchwiebert LSchwiebert added the bug label Nov 6, 2022
@LSchwiebert LSchwiebert self-assigned this Nov 6, 2022
@GregorySchwing GregorySchwing linked a pull request Nov 7, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant