arc.level¶
A module for working with levels of theory.
- class arc.level.Level(repr: Optional[Union[str, dict, Level]] = None, method: Optional[str] = None, basis: Optional[str] = None, auxiliary_basis: Optional[str] = None, dispersion: Optional[str] = None, cabs: Optional[str] = None, method_type: Optional[str] = None, software: Optional[str] = None, software_version: Optional[Union[int, float, str]] = None, compatible_ess: Optional[List[str]] = None, solvation_method: Optional[str] = None, solvent: Optional[str] = None, solvation_scheme_level: Optional[Level] = None, args: Optional[Union[Dict[str, str], Iterable, str]] = None)[source]¶
Uniquely defines the settings used for a quantum calculation level of theory. Either
repr
ormethod
must be specified.- Parameters:
repr (str, dict, Level optional) – A dictionary or a simple string representation of the level of theory, e.g. “wb97xd/def2-tzvp”, or {‘method’: ‘b3lyp’, ‘basis’: ‘6-31g’}. Not in
LevelOfTheory
.method (str, optional) – Quantum chemistry method.
basis (str, optional) – Basis set.
auxiliary_basis (str, optional) – Auxiliary basis set for correlated methods.
dispersion (str, optional) – The DFT dispersion info (if not already included in method).
cabs (str, optional) – Complementary auxiliary basis set for F12 calculations.
method_type (str, optional) – The level of theory method type (DFT, wavefunction, force field, semi-empirical, or composite). Not in
LevelOfTheory
.software (str, optional) – Quantum chemistry software.
software_version (Union[int, float, str], optional) – Quantum chemistry software version.
solvation_method (str, optional) – Solvation method.
solvent (str, optional) – The solvent. Values are strings of “known” solvents, see https://gaussian.com/scrf/.
solvation_scheme_level (Level, optional) – A Level class representing the level of theory to calculate a solvation energy correction at. Not in
LevelOfTheory
.args (Dict[Dict[str, str]], optional) – Additional arguments provided to the software. Different than the
args
inLevelOfTheory
.compatible_ess (list, optional) – Entries are names of compatible ESS. Not in
LevelOfTheory
.
- as_dict() dict [source]¶
Returns a minimal dictionary representation from which the object can be reconstructed. Useful for ARC restart files.
- build()[source]¶
Assign object attributes from a dictionary representation of the object or a simple string (“method/basis”). Useful for ARC restart files.
- copy()[source]¶
A method to create a copy of the object.
- Returns:
A copy of the object.
- Return type:
- deduce_method_type()[source]¶
Determine the type of a model chemistry: DFT, wavefunction, force field, semi-empirical, or composite
- deduce_software(job_type: Optional[str] = None)[source]¶
Deduce the ESS to be used for a given level of theory. Populates the .software attribute.
- Parameters:
job_type (str, optional) – An ARC job type, assists in determining the software.
- simple() str [source]¶
Return a simple humane-readable string representation of the object.
- Returns:
The simple level of theory string representation.
- Return type:
str
- to_arkane_level_of_theory(variant: Optional[str] = None, bac_type: str = 'p', comprehensive: bool = False, raise_error: bool = False, warn: bool = True) Optional[LevelOfTheory] [source]¶
Convert
Level
to an ArkaneLevelOfTheory
instance.- Parameters:
variant (str, optional) – Return a variant of the Arkane
LevelOfTheory
that matches an Arkane query. Allowed values are'freq'
,'AEC'
,'BEC'
. ReturnsNone
if no functioning variant was found.bac_type (str, optional) – The BAC type (‘p’ or ‘m’) to use when searching for a
LevelOfTheory
variant for BAC.comprehensive (bool, optional) – Whether to consider all relevant arguments if not looking for a variant.
raise_error (bool, optional) – Whether to raise an error if an AEC variant could not be found.
warn (bool, optional) – Whether to output a warning if an AEC variant could not be found.
- Returns:
The respective Arkane
LevelOfTheory
object- Return type:
Optional[LevelOfTheory]
- arc.level.assign_frequency_scale_factor(level: Union[str, Level]) Optional[int] [source]¶
Assign a frequency scaling factor to a level of theory.
- Parameters:
level (Union[str, Level]) – The level of theory.
- Returns:
The frequency scaling factor.
- Return type:
Optional[int]
- arc.level.get_params_from_arkane_level_of_theory_as_str(arkane_level: str) Dict[str, str] [source]¶
Get the method, basis set, and software (if any) of an str representation of an Arkane LevelOfTheory object instance.
- Parameters:
arkane_level (str) – The Arkane level.
- Returns:
Keys are ‘method’, ‘basis’, ‘software’.
- Return type:
Dict[str, str]