OptimizeGeometryParameters

class OptimizeGeometryParameters(max_forces=None, max_stress=None, max_steps=None, max_step_length=None, constraints=None, trajectory_filename=None, disable_stress=None, optimizer_method=None, target_stress=None, pre_step_hook=None, post_step_hook=None, constrain_bravais_lattice=None, trajectory_interval=None, restart_strategy=None)

Class for parameters used in optimizing the geometry of a configuration.

Parameters:
  • max_forces (PhysicalQuantity of type force) – The maximum forces determining that the optimization should stop.
    Default: 0.05*eV/Ang
  • max_stress (PhysicalQuantity of type pressure) – The maximum stress determining that the optimization should stop.
    Default: 0.1*GPa
  • max_steps (A positive integer.) – The maximum number of steps.
    Default: 200
  • max_step_length (PhysicalQuantity of type length) – The maximum step length the optimizer may take.
    Default: 0.2*Ang
  • constraints (A list of integers and Constraints objects.) – A list of indices of the atom with fixed positions, and Constraints objects.
    Default: []
  • trajectory_filename (unicode.) – The filename of the file to be used for storing the trajectory in.
  • disable_stress (bool.) – Disable the stress for device and bulk calculations.
    Default: False for BulkConfigurations otherwise True
  • optimizer_method (QuasiNewton | FIRE | LBFGS.) – The optimizer to use for optimizing the structure.
    Default: LBFGS
  • target_stress – The target stress under which the cell should be optimized. Must be given as a single pressure value, or a stress vector in Voigt or matrix notation.
    Default: 0*GPa
  • pre_step_hook (A callable function or method) – An optional user-defined function which will be called just before each optimization step. The signature of the function requires the arguments (step, configuration). The return status is ignored. Unhandled exceptions will abort the optimization.
    Default: No hook.
  • post_step_hook (A callable function or method) – An optional user-defined function which will be called just after each optimization step. The signature of the function requires the arguments (step, configuration). The return status is ignored. Unhandled exceptions will abort the optimization.
    Default: No hook.
  • constrain_bravais_lattice (bool) – Enable preserving the Bravais lattice symmetry of the configuration.
    Default: True if the target_stress is commensurate with the lattice symmetries
  • trajectory_interval (int | PhysicalQuantity of type time) – The resolution used in saving steps to a trajectory file. This can either be given as an integer (a value of 1 results in all steps being saved; a value of 2 results in every second step being saved; etc.) or as a time interval.
    Default: 1
  • restart_strategy (NoRestart | RestartFromTrajectory) – The restart mechanism based on trajectory data saved in a given file.
    Default: RestartFromTrajectory()
constrainBravaisLattice()

Query method for the constrain_bravais_lattice parameter.

constraints()

Query method for the constraints.

disableStress()

Query method for the disable stress.

maxForces()

Query method for the max forces.

maxStepLength()

Query method for the max step length.

maxSteps()

Query method for the max steps.

maxStress()

Query method for the max stress.

optimizerMethod()

Query method for the optimizer method.

postStepHook()

Query method for the post-step hook.

preStepHook()

Query method for the pre-step hook.

restartStrategy()

Query method for the restart_strategy parameter.

setConstrainBravaisLattice(constrain_bravais_lattice)

Method for setting the constrain_bravais_lattice parameter.

setConstraints(constraints)

Method for setting the constraints.

setDisableStress(disable_stress)

Method for setting the disable_stress.

setMaxForces(max_forces)

Method for setting the max forces.

setMaxStepLength(max_step_length)

Method for setting the max step length.

setMaxSteps(max_steps)

Method for setting the max steps.

setMaxStress(max_stress)

Method for setting the max stress.

setOptimizerMethod(optimizer_method)

Method for setting the optimizer method.

setPostStepHook(post_step_hook)

Method for setting the post-step hook.

setPreStepHook(pre_step_hook)

Method for setting the pre-step hook.

setRestartStrategy(restart_strategy)

Method for setting the restart_strategy parameter.

setTargetStress(target_stress)

Method for setting the target stress tensor.

setTrajectoryFilename(trajectory_filename)

Method for setting the trajectory filename.

setTrajectoryInterval(trajectory_interval)

Method for setting the trajectory_interval parameter.

targetStress()

Query method for the target stress tensor.

trajectoryFilename()

Query method for the trajectory filename.

trajectoryInterval()

Query method for the trajectory_interval parameter.