Skip to content

Units

Almost all values in model attributes are stored in atomic units. Attributes that represent dimensioned quantities can be specified as a string with units attached for ease of use:

from sierra.inputs import CoordinateConstraint

print(CoordinateConstraint(indices=[0, 1], value=2.0).value)
#> 2.0
print(CoordinateConstraint(indices=[0, 1], value="2.0 bohr").value)
#> 2.0
print(CoordinateConstraint(indices=[0, 1], value="1.0583 angstrom").value)
#> 1.99989715769145
print(CoordinateConstraint(indices=[0, 1], value="0.10583 nanometers").value)
#> 1.99989715769145

Reference units

Sierra follows Hartree atomic units for all quantities except:

  • ArcQuantity - degree
  • MassQuantity - amu
  • TemperatureQuantity - kelvin

Standard atomic unit Quantity types:

  • LengthQuantity - bohr
  • EnergyQuantity - hartree
  • TimeQuantity - au_time
  • ChargeQuantity - au_charge

Derived atomic unit Quantity types:

  • DensityQuantity
  • PressureQuantity
  • EntropyQuantity
  • DipoleMomentQuantity

Conversion

Unit conversion can be accomplished by using Sierra's conversion functions:

from sierra import constants

print(constants.cf("bohr", "Angstrom"))
#> 0.529177210903
print(constants.cf("hartree", "kcal / mol"))
#> 627.5094740630558