HookeanRepulsion#
- class autoplex.data.rss.utils.HookeanRepulsion(a1, a2, k, rt=None)[source]#
Bases:
FixConstraint
Constrain atoms softly to a minimum separation.
Intended to avoid early iterations of potentials causing crashes due to overlapping atoms.
It is recommended to calibrate the spring constant for your system dependent on the potential and the atomic species used. It is not guaranteed that the constraint will be either soft enough (e.g. non-exploding in MD) or strong enough (to avoid overlaps) for all spring constants and distances.
Adapted from: * Title: ASE constraints package at at ase/ase/constraints.py * Author: Ask Hjorth Larsen * Copyright 2024, ASE-developers. * Date 07/10/2024 * Code version: 3.23.0 * Availability: ase/ * License: LGPLv2.1+
- Parameters:
a1 (int) –
a2 (int | tuple[float, float, float] | tuple[float, float, float, float] | Literal['cell']) –
k (float) –
rt (float | None) –
- property todict#
Convert constraint to dictionary.
- adjust_positions(atoms, newpositions)[source]#
Adjust positions to match the constraints.
Do nothing for this constraint.
- adjust_momenta(atoms, momenta)[source]#
Adjust momenta to match the constraints.
Do nothing for this constraint.