crystal

Prepare ordered periodic crystal geometry from CIF.

Summary

Functions:

prepare_crystal

Read an ordered CIF and build a centered periodic supercell.

Reference

prepare_crystal(
filename: str,
repeats: tuple[int, int, int] = (1, 1, 1),
*,
block: str | None = None,
max_atoms: int = 100000,
) → AtomicSystem[source]

Read an ordered CIF and build a centered periodic supercell.

Parameters:
  • filename (str) – Input CIF path.

  • repeats (tuple of int) – Positive replication counts along the three lattice vectors.

  • block (str or None) – CIF data block name without the data_ prefix. Required when there is more than one structure block.

  • max_atoms (int) – Maximum atom count after symmetry expansion and replication.

Returns:

Geometry only, in angstroms and in the PQ cell convention.

Return type:

AtomicSystem

Raises:
  • ValueError – If block selection is ambiguous, the geometry is invalid, sites are disordered or coincident, or the atom budget is exceeded.

  • ImportError – If ASE is not installed.