topo_metrics.io.cgd#
Functions#
|
Parses a CGD file and extracts lattice, atoms, and edges. |
|
Processes edges and determines node connectivity. |
Module Contents#
- topo_metrics.io.cgd.parse_cgd(filename: pathlib.Path | str) tuple[pymatgen.core.lattice.Lattice, list[str], numpy.typing.NDArray[numpy.floating] | None, list[list[Any]]][source]#
Parses a CGD file and extracts lattice, atoms, and edges.
- Parameters:
filename – The path to the CGD file.
- Returns:
- lattice (The lattice of the network.)
- atom_labels (The labels of the atoms.)
- all_coords (The fractional coordinates of the atoms.)
- edges (The list of edges in the network.)
- topo_metrics.io.cgd.process_neighbour_list(edges: list[list[Any]], atom_frac_coords: numpy.typing.NDArray[numpy.floating] | None, atom_labels: list[str]) numpy.typing.NDArray[numpy.int_][source]#
Processes edges and determines node connectivity.
- Parameters:
edges – The list of edges in the network.
atom_frac_coords – The fractional coordinates of the atoms.
atom_labels – The labels of the atoms.
- Returns:
The neighbour list of the network, where each row corresponds to a pair of
connected nodes and the applied image shift to the second node.