Public API#
- sire.units.angle(angle)[source]#
Convert the passed argument into an angle. This will return ‘angle’ if it is already an angle, or will convert it into an angle with default units if this is a float or something that can be converted to a float
- sire.units.convert((float)val, (TempBase)from_units, (TempBase)to_units) float : #
- C++ signature :
double convert(double,SireUnits::Dimension::TempBase,SireUnits::Dimension::TempBase)
convert( (float)val, (Unit)from_units, (TempBase)to_units) -> float :
- C++ signature :
double convert(double,SireUnits::Dimension::Unit,SireUnits::Dimension::TempBase)
convert( (float)val, (Unit)from_units, (Unit)to_units) -> float :
- C++ signature :
double convert(double,SireUnits::Dimension::Unit,SireUnits::Dimension::Unit)
convert( (float)val, (TempBase)to_units) -> float :
- C++ signature :
double convert(double,SireUnits::Dimension::TempBase)
convert( (float)val, (Unit)to_units) -> float :
- C++ signature :
double convert(double,SireUnits::Dimension::Unit)
- sire.units.length(length)[source]#
Convert the passed argument into a length. This will return
length
if it is already a length, or it will convert it into a length with default units if this is a float or something that can be converted to a float
- sire.units.set_energy_unit(energy, name: str | None = None)[source]#
Set the default energy unit to be used for output and default conversions
- sire.units.set_internal_units()[source]#
Switch over to using default (AKMA-style) units for output and default conversions.
This uses:
mass: gram (g) energy: kilocalorie (kcal) length: angstrom time: picosecond quantity: mole charge: mod_electron charges
- sire.units.set_length_unit(length, name: str | None = None)[source]#
Set the default length unit to be used for output and default conversions
- sire.units.set_mass_unit(mass, name: str | None = None)[source]#
Set the default mass unit to be used for output and default conversions
- sire.units.set_quantity_unit(q, name: str | None = None)[source]#
Set the default quantity unit to be used for output and default conversions
- sire.units.set_si_units()[source]#
Switch over to using SI units for output and default conversions
This uses:
mass: gram (g) energy: kilojoule (kJ) length: nanometer time: picosecond quantity: mole charge: mod_electron charges
- sire.units.set_time_unit(time, name: str | None = None)[source]#
Set the default time unit to be used for output and default conversions
- sire.units.angstrom Angstrom (length) unit#
- sire.units.picometer picometer (length) unit#