Constraints
Constraints modify how positions and forces are handled by optimizers and molecular dynamics drivers.
Fix atoms
Section titled “Fix atoms”from atomli.constraints import FixAtoms
atoms.set_constraint(FixAtoms(indices=[0, 1]))Bond constraints
Section titled “Bond constraints”Atomli also exposes FixBondLength, FixBondLengths,
FixLinearTriatomic, and Hookean.
Set constraints before creating the optimizer or dynamics driver. Confirm that the attached calculator and selected driver support the constrained workflow.