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

Enable freezing the position of certain atoms #295

Open
Alexsp32 opened this issue May 31, 2023 · 1 comment
Open

Enable freezing the position of certain atoms #295

Alexsp32 opened this issue May 31, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Alexsp32
Copy link
Member

Similar to #244. Currently, the only way of freezing certain atoms in a simulation in place (at least that I'm aware of) is by using an ase calculator which outputs 0 forces on the respective atoms. However, this alone doesn't work for methods where random noise is applied, such as Langevin dynamics.

In conjunction with #244 , it might be best to allow specifying frozen atoms when defining a Simulation, which makes the necessary modifications to methods. (ignoring initial velocities from DynamicalDistributions, position/velocity updates, random noise, ...)

@Alexsp32 Alexsp32 added the enhancement New feature or request label May 31, 2023
@Alexsp32 Alexsp32 self-assigned this May 31, 2023
@jamesgardner1421
Copy link
Member

It's currently possible to define frozen atoms for individual models by implementing NQCModels.mobileatoms that should return the indices of the atoms that are not frozen. Though this is not used everywhere in the code so there are some cases where this won't work yet. I like the idea of attaching the constraints to the model because I think it makes logical sense and the model is available everywhere that the Simulation is so I think the current implementation should be good for most scenarios. It's just a case of checking NQCModels.mobileatoms whenever an atom is about to be moved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants