-
Notifications
You must be signed in to change notification settings - Fork 4
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
Computing virial and pressure #96
Comments
Have you checked the positions? Are you sure you don't have particles overlapping? |
To generate the initial coordinates you might be interested in this function: https://m3g.github.io/Packmol.jl/stable/#Packmol.pack_monoatomic! |
Hello, thanks for the quick response. I have checked my initial configuration and no overlaps exist. Furthermore, the energy seems to be accumulated throughout the integration steps and keeps increasing constantly and large values of the energy are obtained. On the virial computation, it seems that I get the expected values inside the |
The problem of the energy calculation was solved by removing an
to the following
By removing the |
I have fixed the issue, and updated the code in the gist in case anyone find this useful. In the end, the fixes were the following:
Thanks for the help, @lmiq ! |
It seems reasonable that you needed to update the energy and the viral in the reducer/reset functions as well. I don't think the A small note: Here: if d < cutoff
(uij, fij) = pseudohs(d)
sumies = @. fij * r / d if the |
Hello, thanks for the great package!
This is my second attempt at building something with this package.
I have a very simple code for doing Brownian Dynamics using a continuous pseudo hard-sphere potential in 3D.
This is the code in a gist
However, when the energy and virial get updated in the
energy_and_forces!
function, which is summarized hereI always get very large values for energies and the virial. I have been trying to understand what the problem is here, but I don't know where to look into further. Any help is extremely appreciated.
The text was updated successfully, but these errors were encountered: