opan.const¶
Defines objects bearing assorted constants for Open Anharmonic.
Module-Level Members¶
Classes¶
Overview¶
Constants Classes¶
CIC – Application-internal code information constants
DEF – Default values for parameters intended to be
user-adjustable
PHYS – Physical constants
PRM – Internal computation parameters, intended to be
non-user-adjustable
UNITS – Functions returning text strings of
units descriptions
Enumeration Classes¶
EnumIterMeta – Metaclass for iterable enumerations
supporting membership testing with in
OpanEnum – Superclass for enumerations
Plain Enumerations
EnumCheckGeomMismatch– Mismatch type found duringcheck_geom()comparison checks of two geometries.
EnumDispDirection– Displacement direction along a particular mode
EnumFileType– Various file types relevant to the software packages
EnumMassPertType– Type of atomic mass perturbation being applied
EnumSoftware– Implemented computational software packages
EnumTopType– Molecular top classificationAnharmonic (VPT2) HDF5 Repository Enumerations
EnumAnharmRepoData– Displacement-specific values
EnumAnharmRepoParam– Displacement-nonspecific valuesUnits Enumerations
Units implemented for numerical conversions for various physical quantities.
EnumUnitsRotConst– Rotational constants
API¶
-
class
opan.const.CIC¶ Bases:
objectContainer for application-internal code information constants
These may need expansion into dictionaries keyed by
EnumSoftwareenum values, depending on the atoms supported by various software packages. They may also require adjustment to accommodate ‘special’ atom types such as ghost atoms and point charges.Members
-
class
opan.const.DEF¶ Bases:
objectContainer for default parameter values (possibly user-adjustable)
-
FILE_EXTS= {'ORCA': {'GRAD': 'engrad', 'HESS': 'hess', 'INPUTFILE': 'txt', 'OUTPUT': 'out', 'XYZ': 'XYZ'}}¶ dictofdict– Dictionary of dictionaries of file extensions for geometry, gradient, hessian, etc. files from the various software suites.Access as
FILE_EXTS[EnumSoftware][EnumFileType]
-
-
class
opan.const.EnumAnharmRepoData¶ Bases:
opan.const.OpanEnumEnumeration class for datatypes in VPT2 HDF5 repository.
Contains enumeration parameters to indicate the type of data to be retrieved from the on-disk HDF5 repository in the VPT2 anharmonic calculations of the
opan.vpt2submodule.Enum Values
-
ENERGY= 'ENERGY'¶ Energy value at the given displacement
-
GEOM= 'GEOM'¶ Geometry at the given displacement (max precision available)
-
GRAD= 'GRAD'¶ Cartesian gradient vector
-
HESS= 'HESS'¶ Cartesian Hessian matrix
-
-
class
opan.const.EnumAnharmRepoParam¶ Bases:
opan.const.OpanEnumEnumeration class for parameters in VPT2 HDF5 repository.
Contains enumeration parameters to indicate the parameter value to be retrieved from the on-disk HDF5 repository in the VPT2 anharmonic calculations of the
opan.vpt2submodule.Enum Values
-
ATOMS= 'ATOMS'¶ Length-N vector of all-caps atomic symbols
-
CTR_MASS= 'CTR_MASS'¶ Cartesian center of mass of system, with perturbations applied, if any
-
INCREMENT= 'INCREMENT'¶ Displacement increment in \(\mathrm{B}\,\mathrm{u^{1/2}}\). Note that these are not atomic units, which would instead be \(\mathrm{B}\,\mathrm{m_e^{1/2}}\).
-
PERT_MODE= 'PERT_MODE'¶ opan.const.EnumMassPertTypeindicating perturbation type
-
PERT_VEC= 'PERT_VEC'¶ Length-3*N vector of perturbation factors (all should be ~1)
-
REF_MASSES= 'REF_MASSES'¶ Reference values of atomic masses (unperturbed)
-
-
class
opan.const.EnumCheckGeomMismatch¶ Bases:
opan.const.OpanEnumEnumeration for mismatch types in
check_geom()Only mismatches of validly constructed coordinates and atoms vector combinations are represented here; other mismatches/misconfigurations result in raised Exceptions.
Enum Values
-
ATOMS= 'ATOMS'¶ Mismatch in individual atom(s)
-
COORDS= 'COORDS'¶ Mismatch in individual coordinate(s)
-
DIMENSION= 'DIMENSION'¶ Mismatch in dimensions of the two geometries
-
-
class
opan.const.EnumDispDirection¶ Bases:
opan.const.OpanEnumEnumeration class for displacement directions.
Contains enumeration parameters to indicate the displacement of the molecular geometry associated with a gradient, hessian or other object.
Enum Values
-
NEGATIVE= 'NEGATIVE'¶ Negative displacement along a particular normal mode
-
NO_DISP= 'NO_DISP'¶ Non-displaced geometry
-
POSITIVE= 'POSITIVE'¶ Positive displacement along a particular normal mode
-
-
class
opan.const.EnumFileType¶ Bases:
opan.const.OpanEnumEnumeration class for the file types generated by computational codes.
Enum Values
-
GRAD= 'GRAD'¶ Files containing nuclear gradient information
-
HESS= 'HESS'¶ Files containing nuclear Hessian information
-
INPUTFILE= 'INPUTFILE'¶ Input files for defining computations
-
OUTPUT= 'OUTPUT'¶ Files containing computational output
-
XYZ= 'XYZ'¶ XYZ atomic coordinates, assumed to follow the Open Babel XYZ specification
-
-
class
opan.const.EnumIterMeta¶ Bases:
typeMetaclass for enumeration types allowing in membership testing.
-
__iter__()¶ Iterate over all defined enumeration values.
Generator iterating over all class variables whose names match their contents. For a properly constructed
OpanEnumsubclass, these are identical to the enumeration values.Example:
>>> [val for val in sorted(opan.const.EnumDispDirection)] ['NEGATIVE', 'NO_DISP', 'POSITIVE']
-
-
class
opan.const.EnumMassPertType¶ Bases:
opan.const.OpanEnumEnumeration class for atom mass perturbation types.
Contains enumeration parameters to indicate the type of mass perturbation to be applied to the various atoms of a geometry, in order to: (a) break inertial degeneracy sufficiently to allow VPT2 computation using a lower- symmetry formalism; and (b), in the case of linear molecules, introduce an artificial ‘directional preference’ to the masses of the atoms (
BY_COORDenum value) to break the intrinsic degeneracy of the bending modes.Enum Values
-
BY_ATOM= 'BY_ATOM'¶ Atomic masses are perturbed atom-by-atom in an isotropic fashion
-
BY_COORD= 'BY_COORD'¶ Atomic masses are perturbed anisotropically, where the perturbation factor for each atom’s mass varies slightly in the x-, y-, and z-directions
-
NO_PERTURB= 'NO_PERTURB'¶ Atomic masses are used without modification
-
-
class
opan.const.EnumSoftware¶ Bases:
opan.const.OpanEnumEnumeration class for identifying computational chemistry packages.
This enum will be expanded if/when support for additional packages is implemented.
Enum Values
-
class
opan.const.EnumTopType¶ Bases:
opan.const.OpanEnumEnumeration class for classifying types of molecular tops.
Contains enumeration parameters to indicate the type of molecular top associated with a particular geometry.
Inertial moments with magnitudes less than
opan.const.PRM.ZERO_MOMENT_TOLare taken as zero. Nonzero moments by this metric are considered to be equal if their ratio differs from unity by less thanopan.const.PRM.EQUAL_MOMENT_TOL. Seeopan.utils.inertia.principals()and the other functions defined inopan.utils.inertiafor more details.Enum Values
-
ASYMM= 'ASYMM'¶ Three unique non-zero moments
-
ATOM= 'ATOM'¶ Three zero principal inertial moments
-
LINEAR= 'LINEAR'¶ One zero and two equal non-zero moments
-
SPHERICAL= 'SPHERICAL'¶ Three equal, non-zero moments
-
SYMM_OBL= 'SYMM_OBL'¶ Three non-zero moments; smallest two equal
-
SYMM_PROL= 'SYMM_PROL'¶ Three non-zero moments; largest two equal
-
-
class
opan.const.EnumUnitsRotConst¶ Bases:
opan.const.OpanEnumUnits Enumeration class for rotational constants.
Contains enumeration parameters to indicate the associated/desired units of interpretation/display of a rotational constant.
String expressions of these units are provided in
UNITS.rot_const.Todo
Add link to exposition(?) of how RotConst expression is developed, once written.
Enum Values
-
ANGFREQ_SECS= 'ANGFREQ_SECS'¶ Angular frequency in SI units, \(\frac{1}{\mathrm s}\) (NOT \(\mathrm{Hz}\)!)
-
CYCFREQ_ATOMIC= 'CYCFREQ_ATOMIC'¶ Cyclic frequency in atomic units, \(\frac{\mathrm{cyc}}{\mathrm{T_a}}\)
-
CYCFREQ_HZ= 'CYCFREQ_HZ'¶ Cyclic frequency in \(\mathrm{Hz}\), \(\frac{\mathrm{cyc}}{\mathrm s}\)
-
CYCFREQ_MHZ= 'CYCFREQ_MHZ'¶ Cyclic frequency in \(\mathrm{MHz}\), millions of \(\frac{\mathrm{cyc}}{\mathrm s}\)
-
INV_INERTIA= 'INV_INERTIA'¶ Inverse moment of inertia, \(\frac{1}{\mathrm{u\,B^2}}\). Note that the mass units here are not atomic units, which would require \(\frac{1}{\mathrm{m_e\,B^2}}\).
-
WAVENUM_CM= 'WAVENUM_CM'¶ Wavenumbers in conventional units, \(\frac{\mathrm{cyc}}{\mathrm{cm}}\)
-
-
class
opan.const.OpanEnum¶ Bases:
objectSuperclass for enumeration objects.
Metaclassed with
EnumIterMetato allow direct iteration and membership testing of enumeration values on the subclass type.
-
class
opan.const.PHYS¶ Bases:
objectContainer for physical constants
Members
-
LIGHT_SPEED= 137.036¶ float– Speed of light in atomic units, \(\frac{B}{T_a}\). Calculated from the NISTvalue for the speed of light in vacuum, \(2.99792458e8\ \frac{m}{s}\), using
ANG_PER_BOHRandSEC_PER_TAas conversion factors
-
PLANCK= 6.283185307179586¶ float– Standard Planck constant, equal to \(2\pi\) in atomic units of \(\frac{\mathrm{E_h\,T_a}}{\mathrm{cyc}}\)
-
-
class
opan.const.PRM¶ Bases:
objectContainer for internal computation parameters (not user-adjustable)
Members
-
EQUAL_MOMENT_TOL= 0.001¶ float– Minimum deviation-ratio from unity below which two principal inertial moments are considered equal
-
MAX_SANE_DIPDER= 100.0¶ float– Trap value for aberrantly large dipole derivative values in ORCA if dipoles are not calculated in a NUMFREQ run
-
NON_PARALLEL_TOL= 0.001¶ float– Minimum angle deviation (degrees) required for two vectors to be considered non-parallel
-
-
class
opan.const.UNITS¶ Bases:
objectContainer for dicts providing strings describing the various display units available for physical quantities.
Dictionary keys are the enum values provided in the corresponding
EnumUnits[...]class in this module (opan.const).Dictionary Enum Physical Quantity rot_constEnumUnitsRotConstRotational constant