topo_metrics.io.lmp#
Attributes#
Ring-local link: |
|
Global link: |
Classes#
Functions#
|
|
|
Assign LAMMPS atom types so that each (ring_index, element_symbol) is a |
|
|
|
Packs a sequence of RingGeometry into a single ASE Atoms object. |
|
Mutates packed.atoms in-place and returns it. |
|
Returns PackedRings for debugging (atom ordering, ring index ranges). |
Module Contents#
- topo_metrics.io.lmp.RingLocalLink[source]#
Ring-local link:
(ri, li, rj, lj, bond_type)
where ri, rj are ring indices (0-based), li, lj are local indices within the rings (0-based), and bond_type is the LAMMPS bond type integer.
- topo_metrics.io.lmp.GlobalLink[source]#
Global link:
(gi, gj, bond_type)
where gi, gj are global atom indices (0-based), and bond_type is the LAMMPS bond type integer.
- topo_metrics.io.lmp.set_types_by_ring_and_element(packed: PackedRings) dict[tuple[int, str], int][source]#
Assign LAMMPS atom types so that each (ring_index, element_symbol) is a unique type.
- Returns:
mapping[(ring_idx, symbol)] = type_id (type_id is 1-based)
- topo_metrics.io.lmp.adjacency_to_ase_bonds_array(neigh: list[list[tuple[int, int]]]) numpy.ndarray[source]#
- topo_metrics.io.lmp.pack_rings_to_ase(rings: Sequence, *, cell: numpy.ndarray | None = None, pbc: bool | tuple[bool, bool, bool] = False, images: numpy.ndarray | None = None, image_convention: str = 'subtract') PackedRings[source]#
Packs a sequence of RingGeometry into a single ASE Atoms object.
- topo_metrics.io.lmp.add_ring_bonds_for_lammps_full(packed: PackedRings, *, ring_bond_type: int | Sequence[int] = 1, links_ring_local: Iterable[RingLocalLink] = (), links_global: Iterable[GlobalLink] = (), mol_ids: Sequence[int] | None = None, charges: Sequence[float] | None = None) ase.Atoms[source]#
Mutates packed.atoms in-place and returns it.
- topo_metrics.io.lmp.write_rings_lammps_full(rings: Sequence, filepath: str, *, cell: numpy.ndarray | None = None, pbc: bool | tuple[bool, bool, bool] = False, images: numpy.ndarray | None = None, image_convention: str = 'subtract', ring_bond_type: int | Sequence[int] = 1, links_ring_local: Iterable[RingLocalLink] = (), links_global: Iterable[GlobalLink] = (), masses: bool = True) PackedRings[source]#
Returns PackedRings for debugging (atom ordering, ring index ranges).