Source code for scm.input_classes.engines.reaxff

from __future__ import annotations
from pathlib import Path
from typing import Iterable, Literal, Sequence
from scm.pisa.block import DriverBlock,EngineBlock,FixedBlock,FreeBlock,InputBlock
from scm.pisa.key import BoolKey,FloatKey,FloatListKey,IntKey,IntListKey,MultipleChoiceKey,PathStringKey,StringKey,BoolType

[docs]class ReaxFF(EngineBlock): r""" :ivar BondDistanceCutoff: Maximum distance between two atoms to be considered when searching for possible bonds. :vartype BondDistanceCutoff: float | FloatKey :ivar BondOrderCutoff: Minimum bond order required for a bond to be considered during the evaluation of the 3- and 4-body potentials. :vartype BondOrderCutoff: float | FloatKey :ivar ComputeAtomicPressure: Compute the virial part of the atomic pressure (the kinetic part cannot be computed by the engine). :vartype ComputeAtomicPressure: BoolType | BoolKey :ivar FeDimerCorrection: Add a special correction term for Fe-Fe dimers. :vartype FeDimerCorrection: BoolType | BoolKey :ivar ForceField: Path to the force field parameter file. The path can be absolute or relative. Relative paths starting with ./ are considered relative to the directory in which the calculation is started, otherwise they are considered relative to $AMSRESOURCES/ForceFields/ReaxFF. :vartype ForceField: str | Path | StringKey :ivar FurmanTorsions: Use (sin(Theta_ijk)*sin(Theta_jkl))^3 instead of sin(Theta_ijk)*sin(Theta_jkl) in the torsion energy term to remove discontinuity in the corresponding force. :vartype FurmanTorsions: BoolType | BoolKey :ivar NonReactive: Enable the non-reactive mode. Bonds are determined only once at the beginning and subsequent steps only update their bond orders. Thus, no new bonds can form during the simulation, but existing bonds can still stretch and dissociate. :vartype NonReactive: BoolType | BoolKey :ivar RemapSkin: Thickness of region around the unit cell into which atoms are allowed to move before being internally remapped back into the unit cell.\Defaults to VerletListSkin if not set. Should never be smaller than VerletListSkin. :vartype RemapSkin: float | FloatKey :ivar ReturnCorrectedBonds: When enabled, the bonds returned to the driver are based on the final bond orders that include valence-dependent correction terms. Disable this if you want to see the raw uncorrected bond orders instead. :vartype ReturnCorrectedBonds: BoolType | BoolKey :ivar StrongBondCutoff: Minimum bond order required for a bond to be returned to the driver for bonding analysis and molecule detection. Bonds below this threshold are only used to evaluate the potential and not written to result files. :vartype StrongBondCutoff: float | FloatKey :ivar TaperBO: Use tapered bond orders by Furman & Wales (DOI: 10.1021/acs.jpclett.9b02810). :vartype TaperBO: BoolType | BoolKey :ivar Torsions: Version of the torsion potential expression. :vartype Torsions: Literal["Original", "2013"] :ivar VerletListSkin: Thickness of the buffer region added to the force-field-defined non-bonded cutoff radius when building the Verlet list. :vartype VerletListSkin: float | FloatKey :ivar Charges: Settings for the polarizable charge model. :vartype Charges: ReaxFF._Charges """
[docs] class _Charges(FixedBlock): r""" Settings for the polarizable charge model. :ivar AllowSmallCellACKS2: EXPERIMENTAL: Let ACKS2 run even with a periodic cell thinner than the bond softness cutoff. :vartype AllowSmallCellACKS2: BoolType | BoolKey :ivar DisableChecks: Disable checks for suspicious or unphysical charges. :vartype DisableChecks: BoolType | BoolKey :ivar Fix: REB: Fix certain atom charges, if those atoms are specified with MOLCHARGE (not yet possible with AMS-REAXFF :vartype Fix: BoolType | BoolKey :ivar Solver: Algorithm used to solve the charge equilibration equations. :vartype Solver: Literal["Direct", "CG", "MINRESQLP", "SparseCG", "None"] :ivar Constraint: Constrain the net charge of a given region. :vartype Constraint: ReaxFF._Charges._Constraint :ivar Converge: Controls the convergence criteria for charge equilibration. :vartype Converge: ReaxFF._Charges._Converge :ivar Predictor: Settings for the prediction of new charges before running the solver. :vartype Predictor: ReaxFF._Charges._Predictor """
[docs] class _Constraint(FixedBlock): r""" Constrain the net charge of a given region. :ivar Charge: Desired net charge of the region. :vartype Charge: float | FloatKey :ivar Region: Name of the region to be constrained. :vartype Region: str | StringKey """ def __post_init__(self): self.Charge: float | FloatKey = FloatKey(name='Charge', comment='Desired net charge of the region.', default=0.0) self.Region: str | StringKey = StringKey(name='Region', comment='Name of the region to be constrained.', gui_type='region')
[docs] class _Converge(FixedBlock): r""" Controls the convergence criteria for charge equilibration. :ivar Charge: Requested upper bound on the sum of squared charge residuals. :vartype Charge: float | FloatKey """ def __post_init__(self): self.Charge: float | FloatKey = FloatKey(name='Charge', comment='Requested upper bound on the sum of squared charge residuals.', default=1e-06)
[docs] class _Predictor(FixedBlock): r""" Settings for the prediction of new charges before running the solver. :ivar Method: Method used to predict the charges. :vartype Method: Literal["None", "Simple"] """ def __post_init__(self): self.Method: Literal["None", "Simple"] = MultipleChoiceKey(name='Method', comment='Method used to predict the charges.', default='Simple', choices=['None', 'Simple'])
def __post_init__(self): self.AllowSmallCellACKS2: BoolType | BoolKey = BoolKey(name='AllowSmallCellACKS2', comment='EXPERIMENTAL: Let ACKS2 run even with a periodic cell thinner than the bond softness cutoff.', hidden=True, default=False) self.DisableChecks: BoolType | BoolKey = BoolKey(name='DisableChecks', comment='Disable checks for suspicious or unphysical charges.', default=False) self.Fix: BoolType | BoolKey = BoolKey(name='Fix', comment='REB: Fix certain atom charges, if those atoms are specified with MOLCHARGE (not yet possible with AMS-REAXFF', hidden=True, default=False) self.Solver: Literal["Direct", "CG", "MINRESQLP", "SparseCG", "None"] = MultipleChoiceKey(name='Solver', comment='Algorithm used to solve the charge equilibration equations.', default='SparseCG', choices=['Direct', 'CG', 'MINRESQLP', 'SparseCG', 'None']) self.Constraint: ReaxFF._Charges._Constraint = self._Constraint(name='Constraint', comment='Constrain the net charge of a given region.', unique=False) self.Converge: ReaxFF._Charges._Converge = self._Converge(name='Converge', comment='Controls the convergence criteria for charge equilibration.') self.Predictor: ReaxFF._Charges._Predictor = self._Predictor(name='Predictor', comment='Settings for the prediction of new charges before running the solver.')
def __post_init__(self): self.BondDistanceCutoff: float | FloatKey = FloatKey(name='BondDistanceCutoff', comment='Maximum distance between two atoms to be considered when searching for possible bonds.', default=5.0, unit='Angstrom') self.BondOrderCutoff: float | FloatKey = FloatKey(name='BondOrderCutoff', comment='Minimum bond order required for a bond to be considered during the evaluation of the 3- and 4-body potentials.', default=0.001) self.ComputeAtomicPressure: BoolType | BoolKey = BoolKey(name='ComputeAtomicPressure', comment='Compute the virial part of the atomic pressure (the kinetic part cannot be computed by the engine).', default=False) self.FeDimerCorrection: BoolType | BoolKey = BoolKey(name='FeDimerCorrection', comment='Add a special correction term for Fe-Fe dimers.', default=False) self.ForceField: str | Path | StringKey = PathStringKey(name='ForceField', comment='Path to the force field parameter file. The path can be absolute or relative. Relative paths starting with ./ are considered relative to the directory in which the calculation is started, otherwise they are considered relative to $AMSRESOURCES/ForceFields/ReaxFF.', ispath=True, rootdir='ForceFields/ReaxFF') self.FurmanTorsions: BoolType | BoolKey = BoolKey(name='FurmanTorsions', comment='Use (sin(Theta_ijk)*sin(Theta_jkl))^3 instead of sin(Theta_ijk)*sin(Theta_jkl) in the torsion energy term to remove discontinuity in the corresponding force.', default=False) self.NonReactive: BoolType | BoolKey = BoolKey(name='NonReactive', comment='Enable the non-reactive mode. Bonds are determined only once at the beginning and subsequent steps only update their bond orders. Thus, no new bonds can form during the simulation, but existing bonds can still stretch and dissociate.', gui_name='Non-reactive:', default=False) self.RemapSkin: float | FloatKey = FloatKey(name='RemapSkin', comment='Thickness of region around the unit cell into which atoms are allowed to move before being internally remapped back into the unit cell.\\Defaults to VerletListSkin if not set. Should never be smaller than VerletListSkin.', hidden=True, unit='Angstrom') self.ReturnCorrectedBonds: BoolType | BoolKey = BoolKey(name='ReturnCorrectedBonds', comment='When enabled, the bonds returned to the driver are based on the final bond orders that include valence-dependent correction terms. Disable this if you want to see the raw uncorrected bond orders instead.', default=True) self.StrongBondCutoff: float | FloatKey = FloatKey(name='StrongBondCutoff', comment='Minimum bond order required for a bond to be returned to the driver for bonding analysis and molecule detection. Bonds below this threshold are only used to evaluate the potential and not written to result files.', default=0.3) self.TaperBO: BoolType | BoolKey = BoolKey(name='TaperBO', comment='Use tapered bond orders by Furman & Wales (DOI: 10.1021/acs.jpclett.9b02810).', gui_name='Taper bond orders:', default=False) self.Torsions: Literal["Original", "2013"] = MultipleChoiceKey(name='Torsions', comment='Version of the torsion potential expression.', default='Original', choices=['Original', '2013']) self.VerletListSkin: float | FloatKey = FloatKey(name='VerletListSkin', comment='Thickness of the buffer region added to the force-field-defined non-bonded cutoff radius when building the Verlet list.', default=2.5, unit='Angstrom') self.Charges: ReaxFF._Charges = self._Charges(name='Charges', comment='Settings for the polarizable charge model.')