ASEStressConstraint

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

Protocol for a constraint that modifies stresses.

Inheritance

Inheritance diagram of ASEStressConstraint

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_stress

Adjust the stress 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.

abstract adjust_stress(atoms: ase.atoms.Atoms, stress: numpy.ndarray, /)None

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

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

  • stress – Either a 6x1 (in Voigt order) or 3x3 NumPy array representing the symmetric stress tensor, in electronvolts per nanometers cubed.