NQCDynamics.jl icon indicating copy to clipboard operation
NQCDynamics.jl copied to clipboard

Consider constraints when sampling velocities

Open jamesgardner1421 opened this issue 3 years ago • 1 comments

Currently we do not provide at all for constrained atoms in our simulations. However, when using an ase calculator with constraints, the forces are correctly set to 0, but the velocities may incorrectly have nonzero values if the distribution is not set up correctly.

To avoid this scenario we can add an extra DynamicalDistribution(...; fix=1:10) keyword that will ensure the specified atoms have their initial velocities set to 0.

In the future we might want to think about a more formal way of including constraints throughout the code but this is a simple fix that'll work for a lot of cases.

jamesgardner1421 avatar Jan 24 '22 16:01 jamesgardner1421