arc.level

A module for working with levels of theory.

class arc.level.Level(repr: str | dict | Level | None = None, method: str | None = None, basis: str | None = None, auxiliary_basis: str | None = None, dispersion: str | None = None, cabs: str | None = None, method_type: str | None = None, software: str | None = None, software_version: int | float | str | None = None, compatible_ess: List[str] | None = None, solvation_method: str | None = None, solvent: str | None = None, solvation_scheme_level: Level | None = None, args: Dict[str, str] | Iterable | str | None = 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 model chemistry type: DFT, wavefunction, force field, semi-empirical, or composite

deduce_software(job_type: str | None = 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

arc.level.assign_frequency_scale_factor(level: str | Level) int | None[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]