Bases: pylada.dftcrystal.optgeom.ExclAttrBlock
Geometry Optimization block.
Defines the input block for geometry optimization. Geometry optimization must be explicitely enabled:
>>> functional.optgeom.enabled = True
It is disabled by default. When enabled, other sub-blocks within CRYSTAL‘s first input block are automatically disabled (e.g. freqcalc [*]). The full set of geometry optimization parameters can be accessed by the user within the optgeom attribute of an Functional instance:
>>> functional.optgeom.fulloptg = True
>>> functional.optgeom.maxcycle = 300
>>> functional.optgeom.enabled = True
The above would set the optimization method to FULLOPTG and the number of geometry optimization to 300. The third line would enable the block so that the geomtry optimization can happen.
Note
Inner keywords can be modified when the block is disabled. However, the block will not appear in the input until is is explicitely enabled.
[*] | Currently, Functional only contains the optgeom attribute. If implemented, other sub-blocks should derive from ExclAttrBlock. |
Creates a new parameter. The parameter will appear in the input within the OPTGEOM block. If value is None or True, then it will result in the following input:
OPTGEOMNAMEEND OPTGEOM
The name is automatically in capital letters. Other keywords from the block were removed for clarity. If value is a string, then it is printed as is:
>>> functional.optgeom.add_keyword('hello')
>>> functional.optgeom.hello = "This\nis\na string"
The above will create the formatted output:
OPTGEOMHELLOTHISISA STRINGEND OPTGEOM
By formatting a string, any input, however complex, can be given. However, simple cases such as an integer, are handled sensibly:
>>> functional.optgeom.hello = 2*5
OPTGEOMHELLO10END OPTGEOM
Floating point numbers, and mixed lists of integers, floating points, and strings are also handled sensibly.
This function makes it easy to add new keywords to the OPTGEOM block.
Optimization of all degrees of freedom: volume, cell-shape, ionic positions.
This is an instance of GeometryOpt. It excludes cellonly, itatocell, interdun.
>>> functional.optgeom.fulloptg = True
>>> functional.optgeom.cellonly, functional.optgeom.itatocell, functional.optgeom.interdun
False, False, False
It can also be made to optimize at constant volume if cvolopt is True.
Optimization of cell-shape at constant atomic-position.
This is an instance of GeometryOpt. It excludes fulloptg, itatocell, interdun.
>>> functional.optgeom.cellonly = True
>>> functional.optgeom.fulloptg, functional.optgeom.itatocell, functional.optgeom.interdun
False, False, False
It can also be made to optimize at constant volume if cvolopt is True.
Iterative optimization of cell-shape <–> atomic positions.
This is an instance of GeometryOpt. It excludes cellonly, fulloptg, interdun.
>>> functional.optgeom.itatocell = True
>>> functional.optgeom.fulloptg, functional.optgeom.cellonly, functional.optgeom.interdun
False, False, False
If True, turns on constrained optimization. See CRYSTAL manual.
This is an instance of GeometryOpt. It excludes cellonly, fulloptg, interdun.
>>> functional.optgeom.itatocell = True
>>> functional.optgeom.fulloptg, functional.optgeom.cellonly, functional.optgeom.interdun
False, False, False
If True and if one of fulloptg or cellonly is True, then performs constant volume optimization.
Bohr radius as defined by CRYSTAL
Whether to keep or break symmetries.
This value can be True, False, or None. If True, then symmetries will be broken. If False, symmetries will be kept during the minimization. By default, symmetries are broken.
Constant volume optimization keyword.
Only appears if FULLOPTG or CELLONLY exist.
True if this block is enabled.
Hydrostatic pressure in \(\frac{\text{hartree}}{\text{bohr}^{3}}\).
Sets the hydrostatic pressure for which an structural relaxation is performed.
External stress in \(\frac{\text{hartree}}{\text{bohr}^{3}}\).
Sets the stress for which a structural relaxation is performed.
Constant volume optimization keyword.
When used in conjunction with intredun optimization method, keeps the cell-external degrees of freedom constant. Only appears for intredun relaxations.
Constrained optimization.
Relaxes the strain energy by optimizing a complete and redundant set of chemically intuitive parameters, such as bond-length and bond-angles. This option is not compatible with other optimization methods.
>>> functional.optgeom.intredun = True
>>> functional.fulloptg, functional.itatocell
False, False
CRYSTAL input keyword (class-attribute)
Maxium number of iterations in geometry optimization loop.
Whether to print symmetry operations at the end of optimization.
Whether to print cartesian coordinates at the end of optimization.
Whether to print electronic minimization at each geometry step.
The electronic minimization steps can be printed to the same file as the geometry optimization step (e.g. the standard output). By default, Pylada prefers to print to the same file, in contrast to CRYSTAL‘s default.
Whether to print forces at the end of optimization.
Whether to print Hessian at the end of optimization.
Whether to print extended optimization information.
Electronic structure minimization convergence criteria.
The criteria is with respect to the total energy. It is logarithmic and should be an integer: \(|\Delta E| < 10^{-\mathrm{toldee}}\).
Structural relaxation convergence criteria.
Convergence criteria for the root mean square gradient of the total energy with respect to the displacements. Should be a floating point.
Structural relaxation convergence criteria.
Convergence criteria as the root mean square of the displacements during structural relaxation. Should be a floating point.
Verbose printint.
Bases: pylada.dftcrystal.input.AttrBlock
An attribute block set up to exclude others.
Expects both “keyword” and “excludegroup” attributes (or class attributes) to exist in derived instances. This class makes it convenient to describe mutually exclusive blocks such as optgeom and freqcalc.
Groups of blocks of which only one should be enabled.