ASEEnergyConstraint

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

Protocol for a constraint that modifies potential energy.

Inheritance

Inheritance diagram of ASEEnergyConstraint

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.

adjust_potential_energy

Get the difference in potential energy due to this constraint.

__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.

abstract adjust_potential_energy(atoms: ase.atoms.Atoms, /)float

Get the difference in potential energy due to this constraint.

Parameters

atoms – The ASE Atoms object this constraint applies to.

Returns

The difference in potential energy, in eV.