qrunch.common.units.time

Available time units.

Classes

AtomicUnitTime

Time unit type for atomic time unit.

Hour

Time unit type for hour.

Microsecond

Time unit type for microsecond.

Millisecond

Time unit type for millisecond.

Minute

Time unit type for minute.

Second

Time unit type for second.

Time

Unit annotated float for time that holds the unit information and the actual float value.

class AtomicUnitTime

Bases: object

Time unit type for atomic time unit.

float_with_unit_type

alias of Time

si_conversion: float = 2.4188843265864e-17
unit_string: str = 'AU time'
class Hour

Bases: object

Time unit type for hour.

float_with_unit_type

alias of Time

si_conversion: float = 3600
unit_string: str = 'hour'
class Microsecond

Bases: object

Time unit type for microsecond.

float_with_unit_type

alias of Time

si_conversion: float = 1e-06
unit_string: str = 'µs'
class Millisecond

Bases: object

Time unit type for millisecond.

float_with_unit_type

alias of Time

si_conversion: float = 0.001
unit_string: str = 'ms'
class Minute

Bases: object

Time unit type for minute.

float_with_unit_type

alias of Time

si_conversion: float = 60
unit_string: str = 'min'
class Second

Bases: object

Time unit type for second.

float_with_unit_type

alias of Time

si_conversion: float = 1.0
unit_string: str = 's'
class Time

Bases: FloatWithUnit

Unit annotated float for time 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_au() Time

Return time unit annotated float to the atomic unit (AU).

Return type:

Time

to_si() Time

Return time unit annotated float to the SI unit Second.

Return type:

Time

to_unit(new_unit: Unit[T]) T
Parameters:

new_unit (Unit[T])

Return type:

T

unit: Unit[Any]
value: float