Tools

aimstools.structuretools.tools.clean_matrix(matrix, eps=1e-09)[source]

clean from small values

aimstools.structuretools.tools.find_fragments(atoms, scale=1.0) → list[source]

Finds unconnected structural fragments by constructing the first-neighbor topology matrix and the resulting graph of connected vertices.

Parameters:
  • atomsAtoms or Structure.
  • scale – Scaling factor for covalent radii.

Note

Requires networkx library.

Returns:list – NamedTuple with indices and atoms object.
aimstools.structuretools.tools.find_periodic_axes(atoms) → dict[source]

Evaluates if given structure is qualitatively periodic along certain lattice directions.

Parameters:atoms – ase.atoms.Atoms object.

Note

A criterion is a vacuum space of more than 25.0 Anström.

Returns:dict – Axis : Bool pairs.
aimstools.structuretools.tools.hexagonal_to_rectangular(atoms) → ase.atoms.Atoms[source]

Changes hexagonal / trigonal unit cell to equivalent rectangular representation.

Cell must be in standard form.

Parameters:atoms – ase.atoms.Atoms object
Returns:atoms – ase.atoms.Atoms object