ASECellConstraint

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

Protocol for a constraint that modifies the unit cell.

Inheritance

Inheritance diagram of ASECellConstraint

Methods

__init__

Initialize self.

adjust_cell

Adjust the unit cell in-place for an ASE Atoms object.

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_cell(atoms: ase.atoms.Atoms, cell: numpy.ndarray, /)None

Adjust the unit cell in-place for an ASE Atoms object.

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

  • cell – 3x3 NumPy array of cell vectors, in angstrom.

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.