PhysicalConstantsContext
- class qcelemental.PhysicalConstantsContext(context='CODATA2014')[source]
Bases:
object
CODATA physical constants set from NIST.
- Parameters:
context (str) – {‘CODATA2014’, ‘CODATA2018’} Origin of loaded data.
- pc
Each physical constant is an entry in pc, where key is the lowercased string of the NIST name (or any alias) and the value is a Datum object with lbl the exact NIST name string, units, data value as Decimal object, and any uncertainty in the comment field.
Attributes Summary
Returns the internal Pint units registry.
Methods Summary
Quantity
(data)Returns a Pint Quantity.
conversion_factor
(base_unit, conv_unit)Provides the conversion factor from one unit to another.
get
(physical_constant[, return_tuple])Access a physical constant, physical_constant.
Print name, value, and units of all physical constants.
Attributes Documentation
- ureg
Returns the internal Pint units registry.
- Returns:
The pint context
- Return type:
UnitRegistry
Methods Documentation
- conversion_factor(base_unit, conv_unit)[source]
Provides the conversion factor from one unit to another.
The conversion factor is based on the current contexts CODATA.
- Parameters:
- Return type:
Examples
>>> conversion_factor("meter", "picometer") 1e-12
>>> conversion_factor("feet", "meter") 0.30479999999999996
>>> conversion_factor(10 * ureg.feet, "meter") 3.0479999999999996