qrunch.common.units.length
Available length units.
Functions
|
Convert a string or Unit to a Length Unit. |
Classes
Length unit type for Angstrom. |
|
Length unit type for Bohr radius. |
|
Length unit type for centimeter. |
|
alias of |
|
Unit annotated float for length that holds the unit information and the actual float value. |
|
Length unit type for meter. |
|
Length unit type for micrometer. |
|
Length unit type for millimeter. |
|
Length unit type for nanometer. |
- class Angstrom
Bases:
objectLength unit type for Angstrom.
- si_conversion: float = 1e-10
- unit_string: str = 'Å'
- class Bohr
Bases:
objectLength unit type for Bohr radius.
- si_conversion: float = 5.2917721054482e-11
- unit_string: str = 'Bohr'
- class Centimeter
Bases:
objectLength unit type for centimeter.
- si_conversion: float = 0.01
- unit_string: str = 'cm'
- class Length
Bases:
FloatWithUnitUnit annotated float for length that holds the unit information and the actual float value.
- __init__(unit: Unit[Any], value: float) None
- Parameters:
unit (Unit[Any])
value (float)
- Return type:
None
- to_unit(new_unit: Unit[T]) T
- Parameters:
new_unit (Unit[T])
- Return type:
T
- unit: Unit[Any]
- value: float
- class Meter
Bases:
objectLength unit type for meter.
- si_conversion: float = 1.0
- unit_string: str = 'm'
- class Micrometer
Bases:
objectLength unit type for micrometer.
- si_conversion: float = 1e-06
- unit_string: str = 'µm'
- class Millimeter
Bases:
objectLength unit type for millimeter.
- si_conversion: float = 0.001
- unit_string: str = 'mm'
- class Nanometer
Bases:
objectLength unit type for nanometer.
- si_conversion: float = 1e-09
- unit_string: str = 'nm'
- to_length_unit(unit: Literal['angstrom', 'bohr', 'nanometer', 'meter'] | Unit[Length]) Unit[Length]
Convert a string or Unit to a Length Unit.
- Parameters:
unit (Literal['angstrom', 'bohr', 'nanometer', 'meter'] | ~qrunch.common.units._base.Unit[~qrunch.common.units.length.Length])
- Return type:
Unit[Length]