chemistry_tools.constants

Scientific constants.

Classes:

Constant(name, value, unit[, symbol])

Represents a scientific constant.

Data:

atomic_mass_constant

The atomic mass constant.

avogadro_number

Avogadro’s constant (Avogadro’s number)

boltzmann_constant

Boltzmann constant

electron_radius

Electron Radius

faraday_constant

Faraday constant

molar_gas_constant

Molar gas constant

neutron_mass

Neutron mass

plancks_constant

Planck’s constant

prefixes

Numerical IUPAC prefixes (e.g.

speed_of_light

The speed of light in a vacuum.

vacuum_permittivity

Vacuum permittivity

class Constant(name, value, unit, symbol=None)[source]

Bases: tuple

Represents a scientific constant.

Methods:

__float__()

Returns the constant as a float (without the unit).

__int__()

Returns the constant as an integer (without the unit).

__repr__()

Return a nicely formatted representation string

as_quantity()

Returns the constant as a quantities.quantity.Quantity object.

Attributes:

name

The name of the constant.

symbol

An optional symbol for the constant.

unit

The constant’s unit.

value

The value of the constant.

__float__()[source]

Returns the constant as a float (without the unit).

Return type

float

__int__()[source]

Returns the constant as an integer (without the unit).

Return type

int

__repr__()

Return a nicely formatted representation string

as_quantity()[source]

Returns the constant as a quantities.quantity.Quantity object.

Return type

Quantity

name

Type:    str

The name of the constant.

symbol

Type:    Optional[str]

An optional symbol for the constant. Default None.

unit

Type:    Quantity

The constant’s unit.

value

Type:    float

The value of the constant.

atomic_mass_constant

Type:    float

The atomic mass constant.

avogadro_number

Type:    Constant

Avogadro’s constant (Avogadro’s number)

boltzmann_constant

Type:    Constant

Boltzmann constant

electron_radius

Type:    Constant

Electron Radius

faraday_constant

Type:    Constant

Faraday constant

molar_gas_constant

Type:    Constant

Molar gas constant

neutron_mass

Type:    Constant

Neutron mass

plancks_constant

Type:    Constant

Planck’s constant

prefixes = {1: 'mono', 2: 'di', 3: 'tri', 4: 'tetra', 5: 'penta', 6: 'hexa', 7: 'hepta', 8: 'octa', 9: 'nona', 10: 'deca', 11: 'undeca', 12: 'dodeca', 13: 'trideca', 14: 'tetradeca', 15: 'pentadeca', 16: 'hexadeca', 17: 'heptadeca', 18: 'octadeca', 19: 'nonadeca', 20: 'icosa', 21: 'henicosa', 22: 'docosa', 23: 'tricosa', 30: 'triaconta', 31: 'hentriaconta', 32: 'dotriaconta', 40: 'tetraconta', 50: 'pentaconta', 60: 'hexaconta', 70: 'heptaconta', 80: 'octaconta', 90: 'nonaconta', 100: 'hecta', 200: 'dicta', 300: 'tricta', 400: 'tetracta', 500: 'pentacta', 600: 'hexacta', 700: 'heptacta', 800: 'octacta', 900: 'nonacta', 1000: 'kilia', 2000: 'dilia', 3000: 'trilia', 4000: 'tetralia', 5000: 'pentalia', 6000: 'hexalia', 7000: 'heptalia', 8000: 'octalia', 9000: 'nonalia'}

Type:    Dict[int, str]

Numerical IUPAC prefixes (e.g. mono-).

speed_of_light

Type:    Constant

The speed of light in a vacuum.

vacuum_permittivity

Type:    Constant

Vacuum permittivity