molsysmt.topology.get_covalent_paths#
- molsysmt.topology.get_covalent_paths(molecular_system, path=None, selection='all', syntax='MolSysMT')[source]#
Finding paths of covalently bonded atoms matching an ordered pattern.
Every returned path is a walk along covalent bonds whose n-th atom satisfies the n-th selection of path. Typical uses are locating the atom quartets that define a dihedral angle, or the donor-hydrogen pairs of a hydrogen bond.
- Parameters:
molecular_system (molecular system) – Molecular system in any supported MolSysMT format.
path (list, tuple, or numpy.ndarray, or None, default=None) – Ordered atom indices defining the covalent path to evaluate.
selection (str, list, tuple, or numpy.ndarray, default='all') – Selection string or boolean/integer array specifying elements.
syntax (str, default='MolSysMT') – Selection syntax used to evaluate selection (e.g., ‘MolSysMT’, ‘MDTraj’).
- Returns:
Array of shape (n_paths, len(path)) with the atom indices of every path found. Order within a path follows the pattern; paths are not deduplicated by reversal.
- Return type:
numpy.ndarray
Notes
“Path” is used in the graph sense: a walk over the covalent bond graph. It is unrelated to the chain element of a molecular system, which is a polymer chain. To work with those, use
molsysmt.basic.get()with element=’chain’.Only covalent bonds are traversed. See
molsysmt.topology.get_bondgraph()for the graph itself.
See also
molsysmt.topology.get_covalent_blocks()Sets of atoms mutually connected through covalent bonds, optionally after removing bonds.
Added in version 1.0.0.