molsysmt.topology.get_rotatable_bonds#

molsysmt.topology.get_rotatable_bonds(molecular_system, selection='all', structure_indices='all', chemical_state='reference', method='conjugation_restricted', syntax='MolSysMT', skip_digestion=False)[source]#

Classifying acyclic torsion candidates before filtering source bonds.

Parameters:
  • molecular_system (molecular system) – Any supported form supplying elements, complete covalent connectivity and supported bond orders. This graph criterion does not certify valence.

  • selection (str, list, tuple or numpy.ndarray, default='all') – Atoms to return. Classification uses the full source graph first; returned bonds require both endpoints in the selection.

  • structure_indices (int, list, tuple or numpy.ndarray, default='all') – Structure indices (0-based) for selection and state resolution only. The classifier does not use coordinates.

  • chemical_state (str or int, default='reference') – State supplying bond chemistry. ‘structure’ requires one resolved state across the requested structures.

  • method (str, default='conjugation_restricted') – Both methods require a single, nonaromatic bridge between nonterminal heavy atoms, neither incident to a triple bond. ‘conjugation_restricted’ additionally excludes C(=N/O/S)-N/O/S bonds. ‘acyclic_single’ retains them.

  • syntax (str, default='MolSysMT') – Syntax used for atom selection.

  • skip_digestion (bool, default=False) – Whether to skip MolSysMT’s internal argument digestion mechanism.

Returns:

Source bond_indices and bonded_atom_pairs, aligned bool is_rotatable, uint8 exclusion_mask and named exclusion_bits, plus eligible rotatable_bond_indices and rotatable_bonded_atom_pairs. Source atoms, evaluated scope, state, versioned criteria, evidence and original producer versions are retained. Empty pairs have shape (0, 2). No units apply.

Return type:

dict

Raises:
  • ArgumentError – If the method, state, selection or structure request is invalid.

  • StructuralInconsistencyError – If elements, complete connectivity or supported orders are unavailable, an aromatic bridge is declared, or dative chemistry is present.

Notes

Experimental graph policies, not energy/barrier calculations or exact RDKit Strict/Meeko reproductions. Heavy degree excludes H, so materializing the same H inventory does not change heavy-bond eligibility. Ring detection uses bridges of the original graph, without enumerating cycles. Amide, thioamide, amidine, ester and thioester links are restricted by the second policy; tertiary-amide symmetry exceptions are not applied. Charged resonance forms, biaryl hindrance and symmetry-equivalent terminal groups are not normalized. No aromaticity, charges, H or torsion tree is assigned. RDKit is unnecessary for native inputs; it may be needed by their chosen form conversion. Numeric H5MSM selections read chemistry; rich selections may load coordinates. Coordinates and source chemistry remain unchanged. Optional attribution failures preserve results. Consumers choose active cuts and export roots.

See also

get_rigid_fragments

Partition complete connectivity at explicit chosen cuts.

get_rings

Perceive a minimum covalent cycle basis.

Examples

>>> import molsysmt as msm
>>> result = msm.topology.get_rotatable_bonds(
...     msm.systems['caffeine']['caffeine.sdf'])
>>> result['rotatable_bond_indices'].tolist()
[]

User guide

See Classifying rotatable bonds for criteria and source correspondence.

Added in version 1.0.0.