qrunch.chemistry.molecule.molecule
Module with definition of a molecule.
Classes
Molecule object which stores information on constituent atoms, coordinates, and units. |
- class Molecule
Bases:
HasMetadataHashMethodMolecule object which stores information on constituent atoms, coordinates, and units.
- __init__(atoms: list[tuple[~qrunch.chemistry.molecule.atom.Atom, ~qrunch.chemistry.molecule.coordinates.Coordinates]], *, unit: ~qrunch.common.units._base.Unit[~qrunch.common.units.length.Length] = <class 'qrunch.common.units.length.Angstrom'>) None
Initialize instance of
moleculeclass.- Parameters:
atoms (list[tuple[Atom, Coordinates]]) – List of tuple of atoms and their coordinates.
unit (Unit[Length]) – The unit of the coordinates. Defaults to Ångström.
- Raises:
ValueError – If one or more coordinates of the atoms overlap.
- Return type:
None
- property atom_positions: list[Coordinates]
Get the position of each atom in the molecule.
- atom_subset_string(atom_subset: Iterable[int]) str
Provide a human-readable string representation for the embedded atoms.
- Parameters:
atom_subset (Iterable[int]) – Iterable of atom indexes.
- Return type:
str
- classmethod from_builtins(atom_data: ~collections.abc.Sequence[tuple[str | int, float, float, float]], unit: ~qrunch.common.units._base.Unit[~qrunch.common.units.length.Length] = <class 'qrunch.common.units.length.Angstrom'>) Molecule
Create a Molecule instance from a sequence of atom data written using simple Python builtins.
- property number_of_atoms: int
The number of atoms.