molsysmt.hbonds package#

Submodules#

molsysmt.hbonds.get_acceptor_atoms module#

molsysmt.hbonds.get_acceptor_atoms.get_acceptor_atoms(molecular_system, selection='all', inclusion_rules=None, exclusion_rules=None, default_inclusion_rules=True, default_exclusion_rules=True, syntax='MolSysMT')[source]#

Identify acceptor atoms within a molecular system for hydrogen-bond detection.

Parameters:
  • molecular_system (molecular system) – Input system.

  • selection (str, list, tuple or numpy.ndarray, default 'all') – Atom selection to filter candidates.

  • inclusion_rules (list of str or None) – Selection rules to include or exclude atoms.

  • exclusion_rules (list of str or None) – Selection rules to include or exclude atoms.

  • default_inclusion_rules (bool, default True) – Whether to apply built-in acceptor rules.

  • default_exclusion_rules (bool, default True) – Whether to apply built-in acceptor rules.

  • syntax (str, default 'MolSysMT') – Selection syntax for string rules.

Returns:

Sorted array of acceptor atom indices.

Return type:

numpy.ndarray

molsysmt.hbonds.get_buch_hbonds module#

molsysmt.hbonds.get_buch_hbonds.get_buch_hbonds(molecular_system, selection='all', acceptors=None, donors=None, structure_indices='all', molecular_system_2=None, selection_2=None, acceptors_2=None, donors_2=None, structure_indices_2=None, distance_threshold='2.3 angstroms', pbc=True, syntax='MolSysMT', skip_digestion=False)[source]#

Calculating hydrogen bonds using the Buch geometric criteria.

Parameters:
  • molecular_system (molecular system) – Input system containing potential donors/acceptors.

  • selection (str, list, tuple or numpy.ndarray, default 'all') – Atom selection used to derive donors/acceptors (MolSysMT syntax or indices).

  • acceptors (array-like or None) – Preselected acceptor/donor atom indices; if None, they are inferred from selection.

  • donors (array-like or None) – Preselected acceptor/donor atom indices; if None, they are inferred from selection.

  • structure_indices ('all' or array-like, default 'all') – Structures/frames over which to compute.

  • molecular_system_2 (molecular system, optional) – Second system for intermolecular H-bonds; if None, uses molecular_system.

  • selection_2 (array-like or None) – Counterpart selections/indices for molecular_system_2 when provided.

  • acceptors_2 (array-like or None) – Counterpart selections/indices for molecular_system_2 when provided.

  • donors_2 (array-like or None) – Counterpart selections/indices for molecular_system_2 when provided.

  • structure_indices_2 ('all' or array-like, optional) – Structures for the second system; defaults to structure_indices.

  • distance_threshold (quantity or str, default '2.3 angstroms') – Maximum donor–acceptor distance.

  • pbc (bool, default True) – Whether to consider periodic boundary conditions.

  • syntax (str, default 'MolSysMT') – Selection syntax for string selections.

  • skip_digestion (bool, default False) – Whether to skip argument digestion.

Returns:

(atoms, distances) arrays per structure for the detected H-bonds.

Return type:

tuple

molsysmt.hbonds.get_donor_atoms module#

molsysmt.hbonds.get_donor_atoms.get_donor_atoms(molecular_system, selection='all', inclusion_rules=None, exclusion_rules=None, default_inclusion_rules=True, default_exclusion_rules=True, syntax='MolSysMT')[source]#

Identify donor atoms (and their hydrogens) for hydrogen-bond detection.

Parameters:
  • molecular_system (molecular system) – Input system.

  • selection (str, list, tuple or numpy.ndarray, default 'all') – Atom selection to filter candidates.

  • inclusion_rules (list of str or None) – Selection rules to include or exclude atoms.

  • exclusion_rules (list of str or None) – Selection rules to include or exclude atoms.

  • default_inclusion_rules (bool, default True) – Whether to apply built-in donor rules.

  • default_exclusion_rules (bool, default True) – Whether to apply built-in donor rules.

  • syntax (str, default 'MolSysMT') – Selection syntax for string rules.

Returns:

Array of donor–hydrogen pairs (shape (n, 2)).

Return type:

numpy.ndarray

molsysmt.hbonds.get_luzard_chandler_hbonds module#

molsysmt.hbonds.get_luzard_chandler_hbonds.get_luzard_chandler_hbonds(molecular_system, selection='all', acceptors=None, donors=None, structure_indices='all', molecular_system_2=None, selection_2=None, acceptors_2=None, donors_2=None, structure_indices_2=None, distance_threshold='3.5 angstroms', angle_threshold='30 degrees', pbc=True, syntax='MolSysMT')[source]#

Calculating hydrogen bonds using the Luzard–Chandler geometric criteria.

Parameters:
  • molecular_system (molecular system) – Input system containing potential donors/acceptors.

  • selection (str, list, tuple or numpy.ndarray, default 'all') – Atom selection used to derive donors/acceptors (MolSysMT syntax or indices).

  • acceptors (array-like or None) – Preselected acceptor/donor atom indices; if None, they are inferred from selection.

  • donors (array-like or None) – Preselected acceptor/donor atom indices; if None, they are inferred from selection.

  • structure_indices ('all' or array-like, default 'all') – Structures/frames over which to compute.

  • molecular_system_2 (molecular system, optional) – Second system for intermolecular H-bonds; if None, uses molecular_system.

  • selection_2 (array-like or None) – Counterpart selections/indices for molecular_system_2 when provided.

  • acceptors_2 (array-like or None) – Counterpart selections/indices for molecular_system_2 when provided.

  • donors_2 (array-like or None) – Counterpart selections/indices for molecular_system_2 when provided.

  • structure_indices_2 ('all' or array-like, optional) – Structures for the second system; defaults to structure_indices.

  • distance_threshold (quantity or str, default '3.5 angstroms') – Maximum donor–acceptor distance.

  • angle_threshold (quantity or str, default '30 degrees') – Maximum deviation from linearity (D–H···A); smaller angles are stricter.

  • pbc (bool, default True) – Whether to consider periodic boundary conditions.

  • syntax (str, default 'MolSysMT') – Selection syntax for string selections.

Returns:

(atoms, distances, angles) arrays per structure for the detected H-bonds.

Return type:

tuple

Module contents#