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

Consider constraints when sampling velocities #244

Open
jamesgardner1421 opened this issue Jan 24, 2022 · 1 comment
Open

Consider constraints when sampling velocities #244

jamesgardner1421 opened this issue Jan 24, 2022 · 1 comment
Assignees
Milestone

Comments

@jamesgardner1421
Copy link
Member

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.

@Alexsp32
Copy link
Member

Alexsp32 commented Oct 2, 2024

I think this would be easy to include in a "formal" way by creating constructors for DynamicalDistributions that take an AbstractSimulation subtype as input.
That way, we could check NQCModels.mobileatoms() for any frozen atoms, as well as throw errors if there's a size mismatch.

I've effectively done this for VelocityBoltzmann in #332 and NQCD/NQCDistributions.jl#12 already, so should be a quick addition.

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

2 participants