JobType
classes#
various job types for Theory() instances
- AaronTools.theory.job_types.job_from_string(name, **kwargs)#
get a job name given a simple name
- Parameters:
name (str) –
“opt” or “conf” with “.ts”, “.transition_state”, “.change”, and “.con” extensions
.ts and .transition_state indicate a transition state optimization
.con indicates a constrained optimization - “constraints” should be in kwargs and the value should be a dictionary conformable with the keyword of OptimizationJob
”freq” with “.num” extensions
.num indicates a numerical frequnecy, as does kwargs[“numerical”] = True kwargs can also have a “temperature” key
”sp” or “energy” or “single-point”
”force” or “gradient” with a “.num” extension
.num indicates a numerical frequnecy, as does kwargs[“numerical”] = True
- Returns:
job types for the given string
- class AaronTools.theory.job_types.JobType#
parent class of all job types initialization keywords should be the same as attribute names
- __init__()#
- get_gaussian()#
overwrite to return dict with GAUSSIAN_* keys
- get_orca()#
overwrite to return dict with ORCA_* keys
- get_psi4()#
overwrite to return dict with PSI4_* keys
- get_sqm()#
overwrite to return a dict with SQM_* keys
- get_qchem()#
overwrite to return a dict with QCHEM_* keys
- get_xtb()#
overwrite to return a dict with XTB_* keys
- static resolve_error(error, theory, exec_type, geometry=None)#
returns a copy of theory or modifies theory to attempt to resolve an error
theory will be modified if it is not possible for the current theory to work for any job
if the error is specific to the molecule and settings, theory will be copied, modified, and returned raises NotImplementedError if this job type has no fix for the error code
- class AaronTools.theory.job_types.OptimizationJob(transition_state=False, constraints=None, geometry=None)#
optimization job
- __init__(transition_state=False, constraints=None, geometry=None)#
- Parameters:
transition_state (bool) – request a transition state optimization
constraints (dict) –
keys are
available for ORCA, Gaussian, and Psi4
’atoms’ - atom identifiers/finders - atoms to constrain
’bonds’ - list(atom idenifiers/finders) - distances to constrain each atom identifier in the list should result in exactly 2 atoms
’angles’ - list(atom idenifiers/finders) - 1-3 angles to constrain each atom identifier should result in exactly 3 atoms
’torsions’ - list(atom identifiers/finders) - constrained dihedral angles each atom identifier should result in exactly 4 atoms
available for Gaussian and Psi4
’x’ - list(atom identifiers/finders) - constrain the x coordinate of these atoms. Similarly, ‘y’ and ‘z’ are also accepted.
’xgroup’ - list(tuple(list(atom idenifiers), x_val, hold)) - constrain the x coordinate of these atoms to be the same
x_val - set x-coordinate to this value
hold - hold this value constant during the optimization if ‘hold’ is omitted, the value will not be held constant during the optimization
e.g. ‘xgroup’:[(“1-6”, 0, False), (“13-24”, 3.25, False)]
this will keep atoms 1-6 and 13-24 in parallel planes, while also allowing those planes to move
’ygroup’ and ‘zgroup’ are also available, with analagous options
NOTE
for Gaussian, ‘bonds’, ‘angles’, and ‘torsions’ constraints cannot be mixed with ‘x’, ‘y’, ‘z’, ‘xgroup’, ‘ygroup’, or ‘zgroup’ constraints
geometry (Geometry) – will be set when using an AaronTools FileWriter
- get_gaussian()#
returns a dict with keys: GAUSSIAN_ROUTE, GAUSSIAN_CONSTRAINTS
- get_orca()#
returns a dict with keys: ORCA_ROUTE, ORCA_BLOCKS
- get_psi4()#
returns a dict with keys: PSI4_JOB, PSI4_OPTKING, PSI4_BEFORE_GEOM
- get_xtb()#
Generates xcontrol file constraints
Returns: dict(fix, constrain, metadyn, cli)
- get_sqm()#
returns a dict(), warnings for optimization jobs
- get_qchem()#
overwrite to return a dict with QCHEM_* keys
- static resolve_error(error, theory, exec_type, geometry=None)#
resolves optimization-specific errors errors resolved by JobType take priority
- class AaronTools.theory.job_types.FrequencyJob(numerical=False, temperature=None)#
frequnecy job
- __init__(numerical=False, temperature=None)#
temperature in K for thermochem info, defaults to 298.15 K
- get_gaussian()#
returns a dict with keys: GAUSSIAN_ROUTE
- get_orca()#
returns a dict with keys: ORCA_ROUTE
- get_psi4()#
returns a dict with keys: PSI4_JOB
- get_sqm()#
overwrite to return a dict with SQM_* keys
- get_qchem()#
overwrite to return a dict with QCHEM_* keys
- get_xtb()#
overwrite to return a dict with XTB_* keys
- static resolve_error(error, theory, exec_type, geometry=None)#
resolves frequnecy-specific errors errors resolved by JobType take priority
- class AaronTools.theory.job_types.SinglePointJob#
single point energy
- get_gaussian()#
returns a dict with keys: GAUSSIAN_ROUTE
- get_orca()#
returns a dict with keys: ORCA_ROUTE
- get_psi4()#
returns a dict with keys: PSI4_JOB
- get_sqm()#
returns a dict with keys: SQM_QMMM
- get_qchem()#
overwrite to return a dict with QCHEM_* keys
- class AaronTools.theory.job_types.ForceJob(numerical=False)#
force/gradient job
- __init__(numerical=False)#
- get_gaussian()#
returns a dict with keys: GAUSSIAN_ROUTE
- get_orca()#
returns a dict with keys: ORCA_ROUTE
- get_psi4()#
returns a dict with keys: PSI4_JOB
- get_qchem()#
overwrite to return a dict with QCHEM_* keys
- get_xtb()#
overwrite to return a dict with XTB_* keys
- class AaronTools.theory.job_types.ConformerSearchJob(constraints=None, geometry=None)#
conformer search (basically only for crest)
- __init__(constraints=None, geometry=None)#
- Parameters:
constraints (dict) –
valid keys are:
’atoms’ - atom identifiers/finders - atoms to constrain
’bonds’ - list(atom idenifiers/finders) - distances to constrain each atom identifier in the list should result in exactly 2 atoms
’angles’ - list(atom idenifiers/finders) - 1-3 angles to constrain each atom identifier should result in exactly 3 atoms
- ’torsions’ - list(atom identifiers/finders) - constrained dihedral angles
each atom identifier should result in exactly 4 atoms
geometry (Geometry) – will be set when using an AaronTools FileWriter
- class AaronTools.theory.job_types.TDDFTJob(roots, root_of_interest=0, compute_nacmes=False)#
TD-DFT job
- __init__(roots, root_of_interest=0, compute_nacmes=False)#
- Parameters:
roots (int) – number of roots
root_of_interest (int) – root for further computations (e.g. forces)
compute_nacmes (bool) – request nonadiabatic coupling matrix elements
- get_gaussian()#
overwrite to return dict with GAUSSIAN_* keys
- get_orca()#
overwrite to return dict with ORCA_* keys
- get_psi4()#
overwrite to return dict with PSI4_* keys
- get_qchem()#
overwrite to return a dict with QCHEM_* keys