Skip to content

atomli.atoms

Generated from the public Python surface of Atomli 0.1.18.

Atoms(symbols=None, positions=None, cell=None, pbc=None, charge=None, unpaired=None)

Section titled “Atoms(symbols=None, positions=None, cell=None, pbc=None, charge=None, unpaired=None)”

A collection of atoms. ASE method surface (properties via Python).

Center atoms (in place). Optional vacuum in angstrom along axes.

vacuum: Vacuum padding in angstrom, or None. axis: Which axes to center; True/False or length-3 sequence.

Angle in degrees formed by three atoms a0 - a1 - a2 (vertex at a1).

Angles in degrees for a list of (a0, a1, a2) index triplets.

Center of mass in angstrom, shape (3,).

Hill-system chemical formula string (e.g. "H2O").

get_dihedral(self, /, a0, a1, a2, a3, mic=False)

Section titled “get_dihedral(self, /, a0, a1, a2, a3, mic=False)”

Dihedral angle in degrees in [0, 360) for four atoms a0 - a1 - a2 - a3.

get_dihedrals(self, /, indices, mic=False)

Section titled “get_dihedrals(self, /, indices, mic=False)”

Dihedral angles in degrees in [0, 360) for a list of (a0, a1, a2, a3) quadruplets.

Distance between two atoms in angstrom.

a0: First atom index. a1: Second atom index. mic: Use minimum-image convention when True.

get_forces(self, /, apply_constraint=True, md=False)

Section titled “get_forces(self, /, apply_constraint=True, md=False)”

Momenta as mass times ASE velocity units, shape (n, 3).

Numerically identical to ASE Atoms.get_momenta().

get_potential_energy(self, /, force_consistent=False, apply_constraint=True)

Section titled “get_potential_energy(self, /, force_consistent=False, apply_constraint=True)”

Fractional (scaled) positions, shape (n, 3). Needs a cell.

wrap: Wrap into the cell along the periodic directions. ASE defaults to True, so atomli does too: without it a periodic structure silently reports coordinates outside [0, 1).

get_stress(self, /, voigt=True, apply_constraint=True, include_ideal_gas=False)

Section titled “get_stress(self, /, voigt=True, apply_constraint=True, include_ideal_gas=False)”

Integer tags per atom, shape (n,).

Unit-cell volume in angstrom^3.

Matches ASE: with fewer than three lattice vectors the volume is not defined and this raises ValueError. Returning zero instead would turn the error into a silent division by zero downstream.

set_cell(self, /, cell, scale_atoms=False, apply_constraint=True, *, pbc=None)

Section titled “set_cell(self, /, cell, scale_atoms=False, apply_constraint=True, *, pbc=None)”

set_initial_magnetic_moments(self, /, moments)

Section titled “set_initial_magnetic_moments(self, /, moments)”

Set ASE-compatible momenta; updates velocities.

Set fractional positions (requires a cell).

Replace integer tags (length n).

Wrap positions into the unit cell (in place). Needs PBC cell.