Skip to content

Geo Handler

ReaxFF geometry structure (geo) file handler.

This module provides a handler for parsing ReaxFF .geo structure files in XTLGRF format, which define atomic coordinates, optional periodic cell parameters, and descriptive metadata for a system.

Typical use cases include:

  • loading initial or relaxed geometries
  • extracting atomic coordinates for analysis or visualization
  • accessing unit cell parameters for periodic systems

GeoHandler

Bases: BaseHandler

Parser for ReaxFF geometry structure files (.geo / XTLGRF format).

This class parses .geo files and exposes atomic coordinates and associated structural metadata as structured Python objects.

Parsed Data

Atom table One row per atom, returned by dataframe(), with columns: ["atom_id", "atom_type", "x", "y", "z"]

Metadata Returned by metadata(), containing: { "descriptor": str | None, # from DESCRP line "remark": str | None, # concatenated REMARK lines "cell_lengths": { # from CRYSTX (a, b, c) "a": float, "b": float, "c": float, } | None, "cell_angles": { # from CRYSTX (alpha, beta, gamma) "alpha": float, "beta": float, "gamma": float, } | None, "n_atoms": int, }

Notes
  • Only ATOM and HETATM records are parsed into the atom table.
  • Cell parameters are optional and may be absent for non-periodic systems.
  • Non-structural lines (e.g. XTLGRF, FORMAT) are ignored.
  • This handler is not frame-based; the file represents a single structure.

cell()

Return a flat dict with cell parameters:

{
    "a": ...,
    "b": ...,
    "c": ...,
    "alpha": ...,
    "beta": ...,
    "gamma": ...,
}

Values may be None if CRYSTX was missing or malformed.

coordinates()

Return a copy of the atom table (id, type, x, y, z).

This is just a convenience wrapper around .dataframe() to make the intent explicit.

n_atoms()

Return the number of atoms in the .geo file.