Molecules

The Molecule class holds a list of Atom objects, a total charge, and a spin multiplicity.

from vibeqc import Atom, Molecule

mol = Molecule(
    atoms=[
        Atom(8, [0.0,  0.0,  0.0]),      # positions in bohr
        Atom(1, [0.0,  1.43, -0.98]),
        Atom(1, [0.0, -1.43, -0.98]),
    ],
    charge=0,
    multiplicity=1,
)

Reading from files

XYZ coordinates (positions in Ångström are auto-converted to bohr):

from vibeqc import from_xyz
mol = from_xyz("examples/h2o.xyz")
mol = from_xyz("examples/oh.xyz", charge=-1)

Anything ASE reads — CIF, PDB, POSCAR, Gaussian inputs, etc.:

from ase.io import read
atoms = read("crystal.cif")
# Convert to a vibe-qc Molecule (for molecules) or build a
# PeriodicSystem (for solids) — see the ASE integration page.

Programmatic construction

Atom(Z, xyz) takes the atomic number and a Cartesian position in bohr. The position can be a list, tuple, or NumPy array. The underlying molecule API exposes:

mol.atoms()             # list[Atom]
mol.charge()            # int
mol.multiplicity()      # int
mol.n_electrons()       # int, derived from atomic numbers − charge
mol.nuclear_repulsion() # Σ_{A<B} Z_A Z_B / R_AB  (Hartree)