Tools
Helper routines for MPI communication, atomic-structure utilities, fast lookups, and symmetry.
MPI
Quoll.split_work — Method
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.
Atoms
Quoll.get_frac_positions — Method
get_frac_positions(atoms) -> MatrixReturn atom positions in fractional coordinates (unitless). Each column is one atom.
Quoll.get_images — Method
get_images(atoms) -> MatrixReturn periodic images to which each atom belongs. Each column is one atom.
Quoll.get_real_lattice — Method
get_real_lattice(atoms) -> MatrixReturn the real-space lattice as a matrix with basis vectors as columns.
Quoll.get_recip_lattice — Method
get_recip_lattice(atoms_or_real_lattice) -> MatrixReturn the reciprocal-space lattice satisfying AᵀB = 2πI, with basis vectors as columns.
Quoll.get_species2atom — Method
get_species2atom(atoms) -> DictionaryReturn a dictionary mapping each unique ChemicalSpecies to the vector of atom indices of that species.
Quoll.recentre — Method
recentre(atoms) -> AbstractSystemWrap 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.
Fast lookup
Quoll.convert_to_atomarray — Method
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.
Symmetry
Quoll.get_spglib_cell — Method
get_spglib_cell(atoms) -> Spglib.CellConvert an AbstractSystem to an Spglib Cell for symmetry analysis.
Quoll.get_symmetry_rotations — Method
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.