to_dict#

Occupant.to_dict(
self: Occupant,
frac: bool = False,
lattice: Lattice | None = None,
) json#

Represent the Occupant as a Python dict

The Prim reference documents the Occupant / Molecule format.

Parameters:
  • frac (bool = False) – If True, write fractional coordinates.

  • lattice (Optional[Lattice] = None) – The lattice, required if frac is True.

Returns:

data – The Occupant as a Python dict.

Return type:

dict