qrunch.chemistry.molecule.coordinates

3D-coordinates that can be used for defining positions of atoms in a molecule.

Classes

Coordinates

3D-coordinates with a unit.

class Coordinates

Bases: HasMetadataHashMethod

3D-coordinates with a unit.

All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:
  • x – x-coordinate

  • y – y-coordinate

  • z – z-coordinate

__init__(x: float, y: float, z: float) None
Parameters:
  • x (float)

  • y (float)

  • z (float)

Return type:

None

convert_between_units(*, old_unit: Unit[Length], new_unit: Unit[Length]) Coordinates

Translate coordinates from unit old_unit to unit new_unit.

Parameters:
  • old_unit (Unit[Length]) – The unit to convert from.

  • new_unit (Unit[Length]) – The unit to convert to.

Return type:

Coordinates

to_tuple() tuple[float, float, float]

Get coordinate values tuple in the desired unit.

Return type:

tuple[float, float, float]

x: float
y: float
z: float