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

Question on the Velocity Verlet implementation #5

Open
lfkrapp opened this issue Sep 26, 2024 · 0 comments
Open

Question on the Velocity Verlet implementation #5

lfkrapp opened this issue Sep 26, 2024 · 0 comments

Comments

@lfkrapp
Copy link

lfkrapp commented Sep 26, 2024

Hi,

Maybe it is a stupid question but I was reading on Velocity Verlet and how to implement it. I was wondering if the v_step_full at line 38 of mdgrad/torchmd/solvers.py should be:

v_step_full =  y[0] + v_step_half + 0.5 * a_dt * dt

Here is the link to the file + line:

v_step_full = v_step_half + 0.5 * a_dt * dt

If I'm not wrong, the algorithm should be something like this:

v[i] = v[i-1] + 0.5 * dt * a
x[i] = x[i-1] + dt * v[i]
a = f(x[i])
v[i] = v[i] + 0.5 * dt * a

best,
Lucien

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

No branches or pull requests

1 participant