assyst.relaxations

Relaxation step of ASSYST.

class assyst.relaxations.CellRelax(max_steps: int = 100, force_tolerance: float = 0.001, algorithm: Literal['LBFGS', 'BFGS', 'FIRE'] = 'LBFGS')[source]

Bases: Relax

Minimize energy while keeping relative positions and volume constant.

apply_filter_and_constraints(structure: Atoms)[source]

Hook to allow subclasses to add filters and constraints.

class assyst.relaxations.FullRelax(max_steps: int = 100, force_tolerance: float = 0.001, algorithm: Literal['LBFGS', 'BFGS', 'FIRE'] = 'LBFGS', pressure: float = 0.0)[source]

Bases: Relax

Minimize energy with respect to internal positions and cell without constraints.

apply_filter_and_constraints(structure: Atoms)[source]

Hook to allow subclasses to add filters and constraints.

pressure: float = 0.0
class assyst.relaxations.Relax(max_steps: int = 100, force_tolerance: float = 0.001, algorithm: Literal['LBFGS', 'BFGS', 'FIRE'] = 'LBFGS')[source]

Bases: object

Minimize energy with respect to internal positions.

Also used as a base class for all other relaxation classes.

algorithm: Literal['LBFGS', 'BFGS', 'FIRE'] = 'LBFGS'
apply_filter_and_constraints(structure: Atoms)[source]

Hook to allow subclasses to add filters and constraints.

force_tolerance: float = 0.001
max_steps: int = 100
relax(structure: Atoms) Atoms[source]

Relax a structure and return result.

Structure must have a calculator attached. Returned structure will have a SinglePointCalculator with the final energy, forces and stresses attached.

Parameters:

structure (ase.Atoms) – structure to relax

Returns:

relaxed structure with attached single point calculator.

Return type:

ase.Atoms

class assyst.relaxations.SymmetryRelax(max_steps: int = 100, force_tolerance: float = 0.001, algorithm: Literal['LBFGS', 'BFGS', 'FIRE'] = 'LBFGS', pressure: float = 0.0)[source]

Bases: Relax

Minimize energy with respect to internal positions and cell, while keeping space group fixed.

apply_filter_and_constraints(structure: Atoms)[source]

Hook to allow subclasses to add filters and constraints.

pressure: float = 0.0
class assyst.relaxations.VolumeRelax(max_steps: int = 100, force_tolerance: float = 0.001, algorithm: Literal['LBFGS', 'BFGS', 'FIRE'] = 'LBFGS', pressure: float = 0.0)[source]

Bases: Relax

Minimize energy while keeping relative positions and cell shape constant.

apply_filter_and_constraints(structure: Atoms)[source]

Hook to allow subclasses to add filters and constraints.

pressure: float = 0.0
assyst.relaxations.relax(structures: Iterable[Atoms], settings: Relax, calculator: AseCalculatorConfig | Calculator) Iterator[Atoms][source]

Relax structures according the given relaxation settings.

Output structures have the final energy and force attached as ase’s SinglePointCalculator.

Parameters:
Yields:

ase.Atoms – the corresponding relaxed configuration to each input structure