BravaisLatticeConstraint

class BravaisLatticeConstraint

This constraint preserves the bravais lattice in constant stress simulations or optimization.

frozenDegreesOfFreedom(local_atoms=None)
Parameters:local_atoms (list of int | None) – The group of atoms from which the frozen degrees of freedom should be calculated, e.g. a thermalized group of atoms.
Default: All atoms.
Returns:The number of degrees of freedom that are frozen by this constraint object.
Return type:int

Usage Examples

Run a geometry optimization of a rutile crystal with the Bravais lattice type fixed.

constraints = [BravaisLatticeConstraint()]

bulk_configuration = OptimizeGeometry(
    bulk_configuration,
    max_forces=0.05*eV/Ang,
    max_stress=0.1*GPa,
    max_steps=200,
    max_step_length=0.2*Ang,
    constraints=constraints,
    trajectory_filename=None,
    optimizer_method=LBFGS(),
)

bravais_lattice_constraint.py

Notes

  • BravaisLatticeConstraint can be used in OptimizeGeometry to constrain the Bravais lattice type. This means that the stress is symmetrized according to the lattice type. The lattice vectors will still be optimized, but the lattice type will not change.