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 or method 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 in LevelOfTheory.

  • 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

Level

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.

determine_compatible_ess()[source]

Determine compatible ESS.

lower()[source]

Set arguments to lowercase.

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[arkane.modelchem.LevelOfTheory][source]

Convert Level to an Arkane LevelOfTheory instance.

Parameters
  • variant (str, optional) – Return a variant of the Arkane LevelOfTheory that matches an Arkane query. Allowed values are 'freq', 'AEC', 'BEC'. Returns None 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

LevelOfTheory