assyst.relax

Relaxation step of ASSYST.

class assyst.relax.CellRelax(max_steps: int = 100, force_tolerance: float = 0.001, algorithm: Literal['LBFGS', 'BFGS'] = '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.relax.FullRelax(max_steps: int = 100, force_tolerance: float = 0.001, algorithm: Literal['LBFGS', 'BFGS'] = '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.relax.Relax(max_steps: int = 100, force_tolerance: float = 0.001, algorithm: Literal['LBFGS', 'BFGS'] = 'LBFGS')[source]

Bases: object

Minimize energy with respect to internal positions.

Also used as a base class for all other relaxation.

algorithm: Literal['LBFGS', 'BFGS'] = '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.relax.SymmetryRelax(max_steps: int = 100, force_tolerance: float = 0.001, algorithm: Literal['LBFGS', 'BFGS'] = '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.relax.VolumeRelax(max_steps: int = 100, force_tolerance: float = 0.001, algorithm: Literal['LBFGS', 'BFGS'] = '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.relax.relax(settings: Relax, calculator: AseCalculatorConfig | Calculator, structure: Iterable[Atoms]) 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