Atoms
Atoms is Atomli’s central data object. It stores chemical identities,
Cartesian positions, the simulation cell, periodic boundary flags, arrays,
constraints, and an attached calculator.
Construct atoms
Section titled “Construct atoms”from atomli import Atoms
water = Atoms( "H2O", positions=[ [0.96, 0.00, 0.00], [-0.24, 0.93, 0.00], [0.00, 0.00, 0.00], ],)Chemical formulas use ASE-style grammar. Positions are Cartesian coordinates in angstrom.
Periodic systems
Section titled “Periodic systems”silicon = Atoms( "Si2", positions=[[0, 0, 0], [1.3575, 1.3575, 1.3575]], cell=[5.43, 5.43, 5.43], pbc=True,)pbc accepts one Boolean or a three-axis mask.
Geometry and arrays
Section titled “Geometry and arrays”Use familiar methods such as get_positions(), set_positions(),
get_cell(), get_atomic_numbers(), get_chemical_symbols(), and
get_chemical_formula(). Unsupported ASE behavior raises
NotImplementedError instead of returning an approximate or silently wrong
value.
Attach a calculator
Section titled “Attach a calculator”from atomli.calculators.xtb import XTB
water.calc = XTB(method="gfn2")print(water.get_potential_energy())An ASE Python calculator assigned to Atomli Atoms is adapted internally.