eon.structure

Structure storage for the eOn Python server.

Canonical on-disk form is readcon.ConFrame (.con via the readcon package). In-memory working form is :class:Structure: contiguous numpy arrays for geometry algorithms (PBC, neighbor lists, displacements). This replaces the historical aselite-era mini-Atoms type without requiring ASE.

Atoms is an alias of :class:Structure for call-site compatibility.

Module Contents

Classes

Structure

Mutable atomic configuration (numpy-backed).

Functions

structure_to_ase

Optional ASE export (requires ase + pyeonclient.ase_bridge).

ase_to_structure

Optional ASE import (requires ase + pyeonclient.ase_bridge).

Data

API

class eon.structure.Structure(n_atoms: int = 0)

Mutable atomic configuration (numpy-backed).

Attributes

r : (N, 3) float Cartesian positions. free : (N,) float 1.0 if free to move, 0.0 if fixed (eOn convention). box : (3, 3) float Cell matrix with lattice vectors as rows (ASE/vesin convention). names : list[str] Chemical symbols, length N. mass : (N,) float Atomic masses.

Initialization

copy() eon.structure.Structure
free_r() numpy.ndarray

Positions of free (unfixed) atoms only.

free_mask() numpy.ndarray
fixed_mask() numpy.ndarray
append(r, free, name, mass) None
classmethod from_conframe(frame: readcon.ConFrame) eon.structure.Structure

Build a Structure from a readcon ConFrame (live API).

to_conframe(prebox_header: Optional[Sequence[str]] = None, postbox_header: Optional[Sequence[str]] = None) readcon.ConFrame

Convert to a readcon ConFrame for writing.

eon.structure.Atoms

None

eon.structure.structure_to_ase(structure: eon.structure.Structure, *, pbc: bool = True)

Optional ASE export (requires ase + pyeonclient.ase_bridge).

eon.structure.ase_to_structure(atoms)

Optional ASE import (requires ase + pyeonclient.ase_bridge).