riigid.convergence package
riigid.convergence.criterion module
- class riigid.convergence.criterion.Compound_Criterion(cc1, cc2, operator)[source]
Bases:
CriterionCompound convergence criterion.
Logical combination of two convergence criteria.
- is_converged
Whether or not the convergence criterion is fulfilled.
- Type:
bool
- cc1, cc2
The two convergence criteria to combine.
- Type:
riigid.convergence.Criterion
- operator
How shall the two convergence criteria be combined?
- Type:
str, options: “and”, “or”
- check(optimization_history)[source]
Check if the convergence criterion is fulfilled
If yes, self.is_converged is set to True.
- Parameters:
optimization_history (list of riigid.Optimization_Step) – The history of the optimization, which shall be checked for convergence. (The optimization history is an attribute of the optimizer.)
- class riigid.convergence.criterion.Criterion[source]
Bases:
objectBase class for RIIGID convergence criteria
- is_converged
Whether or not the convergence criterion is fulfilled.
- Type:
bool
- check(optimization_history)[source]
Check if the convergence criterion is fulfilled
If yes, self.is_converged is set to True.
- Parameters:
optimization_history (list of riigid.Optimization_Step) – The history of the optimization, which shall be checked for convergence. (The optimization history is an attribute of the optimizer.)
riigid.convergence.displacement module
- class riigid.convergence.displacement.Criterion_Displacement(cutoff=0.001)[source]
Bases:
CriterionRIIGID convergence criterion: Displacement
If all atoms move less than cutoff, the criterion is fulfilled.
Note
This criterion could theoretically be fulfilled, even if the calculation is not actually converged. This is, because the displacement of the atoms not only depends on the force and torque acting on each fragment, but also on the stepsize. If the stepsize is very small, the atoms may move only very little, even though the forces and torques are still large. If you set the stepsize by hand, make sure not to choose a too small value, or use a different/additional convergence criterion. If you use an optimizer with automatic stepsize, the optimizer should prevent this from happening.
- is_converged
Whether or not the convergence criterion is fulfilled.
- Type:
bool
- cutoff
If all atoms move less than cutoff, the criterion is fulfilled; [Å]
- Type:
number
- check(optimization_history)[source]
Check if the convergence criterion is fulfilled.
If yes, self.is_converged is set to True.
- Parameters:
optimization_history (list of riigid.Optimization_Step) – The history of the optimization, which shall be checked for convergence. (The optimization history is an attribute of the optimizer.)