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

Use the molecular definition of virial for rigid molecules #253

Merged
merged 7 commits into from
Sep 20, 2018

Conversation

Luthaf
Copy link
Member

@Luthaf Luthaf commented Sep 18, 2018

Fix #79
Fix #103

Adds tests for #58

So this should be the end of the story \o/. Basically, for the pressure to converge to the target pressure in NPT MC simulations of rigid molecules, one needs to use the molecular definition of the virial.

The problem is that constraining the molecules to be rigid is equivalent to having some extra forces acting on the atoms, and these forces can not be computed in the generic case. These forces do not appear in the molecular definition of the virial.

A problem occurs in lumol because we have both code for MD (where the atomic definition of the virial makes more sense) and MC with rigid molecules (where the molecular definition makes sense). To work around this, I dynamically select which virial definition to use based on the number of simulated degrees of freedom, introduced in #225.

@Luthaf Luthaf merged commit e0f5d45 into lumol-org:master Sep 20, 2018
@Luthaf Luthaf deleted the molecular-virial branch September 20, 2018 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant