ASEConstraint

class narupatools.ase.constraints.constraint.ASEConstraint(*args, **kwargs)

Protocol describing an ASE Constraint, as ASE uses duck typing.

Inheritance

Inheritance diagram of ASEConstraint

Methods

__init__

Initialize self.

adjust_forces

Adjust the forces in-place for an ASE Atoms object.

adjust_positions

Adjust the positions in-place for an ASE Atoms object.

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

abstract adjust_forces(atoms: ase.atoms.Atoms, forces: numpy.ndarray, /)None

Adjust the forces in-place for an ASE Atoms object.

Parameters
  • atoms – The ASE Atoms object this constraint applies to.

  • forces – The forces to be modified by this constraint, in eV per nm.

abstract adjust_positions(atoms: ase.atoms.Atoms, positions: numpy.ndarray, /)None

Adjust the positions in-place for an ASE Atoms object.

Parameters
  • atoms – The ASE Atoms object this constraint applies to.

  • positions – The positions to be modified by this constraint, in angstrom.