Tools

Helper routines for MPI communication, atomic-structure utilities, fast lookups, and symmetry.

MPI

Quoll.split_workMethod
split_work(N, comm, split_method)
split_work(N, N_comm, my_rank, split_method)

Distribute N work items across MPI ranks. Returns a vector of indices assigned to this rank. Available strategies:

  • DefaultSplit() — balanced distribution with remainder spread across the first ranks.
  • FHIaimsLAPACKSplit() — round-robin distribution matching FHI-aims' LAPACK work split.
source

Atoms

Quoll.get_frac_positionsMethod
get_frac_positions(atoms) -> Matrix

Return atom positions in fractional coordinates (unitless). Each column is one atom.

source
Quoll.get_imagesMethod
get_images(atoms) -> Matrix

Return periodic images to which each atom belongs. Each column is one atom.

source
Quoll.get_real_latticeMethod
get_real_lattice(atoms) -> Matrix

Return the real-space lattice as a matrix with basis vectors as columns.

source
Quoll.get_recip_latticeMethod
get_recip_lattice(atoms_or_real_lattice) -> Matrix

Return the reciprocal-space lattice satisfying AᵀB = 2πI, with basis vectors as columns.

source
Quoll.get_species2atomMethod
get_species2atom(atoms) -> Dictionary

Return a dictionary mapping each unique ChemicalSpecies to the vector of atom indices of that species.

source
Quoll.recentreMethod
recentre(atoms) -> AbstractSystem

Wrap atom positions into the unit cell centred at [0.5, 0.5, 0.5] in fractional coordinates. Only supports fully periodic systems. Returns a new system with recentred positions.

source

Fast lookup

Quoll.convert_to_atomarrayMethod
convert_to_atomarray(dict, atom2species_or_natoms)

Convert a species-keyed or atom-pair-keyed dictionary to a flat array (or matrix) indexed by atom index. Missing entries are filled with a sentinel value. Used to convert dictionary lookups to array indexing in performance-critical loops.

source

Symmetry

Quoll.get_spglib_cellMethod
get_spglib_cell(atoms) -> Spglib.Cell

Convert an AbstractSystem to an Spglib Cell for symmetry analysis.

source
Quoll.get_symmetry_rotationsMethod
get_symmetry_rotations(spglib_cell; crystal_symmetry=false, symprec=1e-5)

Return point-group rotation matrices. If crystal_symmetry=false, returns only the identity. Otherwise, queries Spglib for the full set of crystal symmetry rotations.

source