Skip to content

Atom-Atom

lahuta.contacts.CovalentContacts

Bases: ContactAnalysis

Handle the computation of covalent contacts in a molecular system.

Covalent contacts are interactions based on covalent bonds between atoms in a molecular system. This class, a derivative of the ContactAnalysis base class, overrides the compute method to provide functionality specifically for covalent contact computation.

Covalent contacts refer to the interactions between atoms that share an electron pair, forming a covalent bond. We use the OpenBabel library to identify covalent bonds in the structure.

Definition

Two atoms are considered to form a covalent contact if they are covalently bonded according to the molecular structure information obtained from OpenBabel.

Attributes:

Name Type Description
ns NeighborPairs

A NeighborPairs object containing the atom neighbor relationships in the system.

Example
luni = Luni(...)
ns = luni.compute_neighbors()

cov = CovalentContacts(ns)
print(cov.results)
Source code in lahuta/contacts/covalent.py
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
class CovalentContacts(ContactAnalysis):
    """Handle the computation of covalent contacts in a molecular system.

    Covalent contacts are interactions based on covalent bonds between atoms in a molecular system.
    This class, a derivative of the `ContactAnalysis` base class, overrides the `compute` method
    to provide functionality specifically for covalent contact computation.

    Covalent contacts refer to the interactions between atoms that share an electron pair, forming a covalent bond.
    We use the OpenBabel library to identify covalent bonds in the structure.

    !!! tip "Definition"
        Two atoms are considered to form a covalent contact if they are covalently bonded according to the molecular
        structure information obtained from OpenBabel.

    Attributes:
        ns (NeighborPairs): A NeighborPairs object containing the atom neighbor relationships in the system.


    ??? example "Example"
        ``` py
        luni = Luni(...)
        ns = luni.compute_neighbors()

        cov = CovalentContacts(ns)
        print(cov.results)
        ```

    """

    def compute(self) -> NeighborPairs:
        """Compute covalent contacts based on the neighbor pairs.

        Returns:
            NeighborPairs: A NeighborPairs object containing only covalent contacts.
        """
        return F.covalent_neighbors(self.ns)

lahuta.contacts.CarbonylContacts

Bases: ContactAnalysis

Handle the computation of carbonyl contacts in a molecular system.

Carbonyl contacts involve the interaction between a carbonyl oxygen atom (O) and a carbonyl carbon atom (C) from a carbonyl functional group (C=O) in the context of protein-ligand structures or protein-protein structures.

In a carbonyl group, the carbon atom has a double bond with the oxygen atom. This arrangement results in a polar bond with the oxygen atom carrying a partial negative charge and the carbon atom a partial positive charge. This polarity can lead to interactions with other polar or charged atoms.

Definition

  1. One atom is a carbonyl oxygen atom (O=C).
  2. The second atom is a carbonyl carbon atom (O=C).
  3. The distance between these two atoms does not exceed a defined distance cutoff.

The directionality of the contact is not considered, meaning that an Oxygen to Carbon contact is equivalent to a Carbon to Oxygen contact.

Attributes:

Name Type Description
ns NeighborPairs

A NeighborPairs object containing the atom neighbor relationships in the system.

distance float

The maximum distance to consider for a carbonyl contact. See lahuta.config.defaults.CONTACTS for default values.

Example
luni = Luni(...)
ns = luni.compute_neighbors()

cbyl = CarbonylContacts(ns)
print(cbyl.results)
Source code in lahuta/contacts/carbonyl.py
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
class CarbonylContacts(ContactAnalysis):
    """Handle the computation of carbonyl contacts in a molecular system.

    Carbonyl contacts involve the interaction between a carbonyl oxygen atom (O) and a carbonyl carbon atom (C)
    from a carbonyl functional group (C=O) in the context of protein-ligand structures or protein-protein structures.

    In a carbonyl group, the carbon atom has a double bond with the oxygen atom. This arrangement results in a polar
    bond with the oxygen atom carrying a partial negative charge and the carbon atom a partial positive charge.
    This polarity can lead to interactions with other polar or charged atoms.


    !!! tip "Definition"
        1. One atom is a carbonyl oxygen atom (O=C).
        2. The second atom is a carbonyl carbon atom (O=C).
        3. The distance between these two atoms does not exceed a defined distance cutoff.

    The directionality of the contact is not considered, meaning that an Oxygen to Carbon contact is equivalent
    to a Carbon to Oxygen contact.

    Attributes:
        ns (NeighborPairs): A NeighborPairs object containing the atom neighbor relationships in the system.
        distance (float): The maximum distance to consider for a carbonyl contact. See `lahuta.config.defaults.CONTACTS`
            for default values.

    ??? example "Example"
        ``` py
        luni = Luni(...)
        ns = luni.compute_neighbors()

        cbyl = CarbonylContacts(ns)
        print(cbyl.results)
        ```
    """

    distance = CONTACTS["carbonyl"]["distance"]

    def compute(self) -> NeighborPairs:
        """Compute carbonyl contacts based on the neighbor pairs.

        Returns:
            NeighborPairs: A NeighborPairs object containing only carbonyl contacts.
        """
        return F.carbonyl_neighbors(self.ns, self.distance)

lahuta.contacts.AromaticContacts

Bases: ContactAnalysis

Handles the computation of aromatic contacts in a molecular structure.

Aromatic contacts are computed based on the interactions between atoms in aromatic rings found in proteins and ligands. Aromatic interactions, commonly found in biological systems, are characterized by π-stacking (face-to-face), T-shaped or edge-to-face configurations, and cation-π interactions.

Definition

  1. Both atoms belong to an aromatic ring.
  2. The distance between these two atoms does not exceed a defined distance cutoff.

Attributes:

Name Type Description
ns NeighborPairs

A NeighborPairs object containing the atom neighbor relationships in the system.

distance float

The maximum distance to consider for contact. See lahuta.config.defaults.CONTACTS for default values.

Example
luni = Luni(...)
ns = luni.compute_neighbors()

ac = AromaticContacts(ns)
print(ac.results)
Source code in lahuta/contacts/aromatic.py
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
class AromaticContacts(ContactAnalysis):
    """Handles the computation of aromatic contacts in a molecular structure.

    Aromatic contacts are computed based on the interactions between atoms in
    aromatic rings found in proteins and ligands. Aromatic interactions,
    commonly found in biological systems, are characterized by π-stacking
    (face-to-face), T-shaped or edge-to-face configurations, and cation-π
    interactions.

    !!! tip "Definition"
        1. Both atoms belong to an aromatic ring.
        2. The distance between these two atoms does not exceed a defined distance cutoff.

    Attributes:
        ns (NeighborPairs): A NeighborPairs object containing the atom neighbor relationships in the system.
        distance (float): The maximum distance to consider for contact. See `lahuta.config.defaults.CONTACTS` for
            default values.

    ??? example "Example"
        ``` py
        luni = Luni(...)
        ns = luni.compute_neighbors()

        ac = AromaticContacts(ns)
        print(ac.results)
        ```
    """

    distance = CONTACTS["aromatic"]["distance"]

    def compute(self) -> NeighborPairs:
        """Compute aromatic contacts based on the neighbor pairs.

        Returns:
            NeighborPairs: A NeighborPairs object containing only aromatic contacts.
        """
        return F.aromatic_neighbors(self.ns, self.distance)

lahuta.contacts.IonicContacts

Bases: ContactAnalysis

Handle the computation of ionic contacts in a molecular system.

Ionic contacts refer to the interactions between positively and negatively ionizable atoms, forming one of the primary types of electrostatic interactions.

Definition

  1. One atom must be positively ionizable.
  2. The other atom must be negatively ionizable.
  3. The distance between these two atoms does not exceed a defined distance cutoff.

These criteria apply regardless of the order of the atoms in the pair, meaning a positively ionizable to negatively ionizable contact is considered equivalent to a negatively ionizable to positively ionizable contact.

Attributes:

Name Type Description
ns NeighborPairs

A NeighborPairs object containing the atom neighbor relationships in the system.

distance float

The maximum distance to consider for an ionic contact. See lahuta.config.defaults.CONTACTS for default values.

Example
luni = Luni(...)
ns = luni.compute_neighbors()

ionic = IonicContacts(ns)
print(ionic.results)
Source code in lahuta/contacts/ionic.py
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
class IonicContacts(ContactAnalysis):
    """Handle the computation of ionic contacts in a molecular system.

    Ionic contacts refer to the interactions between positively and negatively ionizable atoms,
    forming one of the primary types of electrostatic interactions.

    !!! tip "Definition"
        1. One atom must be positively ionizable.
        2. The other atom must be negatively ionizable.
        3. The distance between these two atoms does not exceed a defined distance cutoff.

    These criteria apply regardless of the order of the atoms in the pair, meaning a positively ionizable
    to negatively ionizable contact is considered equivalent to a negatively ionizable to positively ionizable contact.

    Attributes:
        ns (NeighborPairs): A NeighborPairs object containing the atom neighbor relationships in the system.
        distance (float): The maximum distance to consider for an ionic contact. See `lahuta.config.defaults.CONTACTS`
            for default values.

    ??? example "Example"
        ``` py
        luni = Luni(...)
        ns = luni.compute_neighbors()

        ionic = IonicContacts(ns)
        print(ionic.results)
        ```
    """

    distance = CONTACTS["ionic"]["distance"]

    def compute(self) -> NeighborPairs:
        """Compute ionic contacts based on the neighbor pairs.

        Returns:
            NeighborPairs: A NeighborPairs object containing only ionic contacts.

        """
        return F.ionic_neighbors(self.ns, self.distance)

lahuta.contacts.HydrophobicContacts

Bases: ContactAnalysis

Handle the computation of hydrophobic contacts in a molecular system.

Hydrophobic contacts are interactions between hydrophobic atoms in a molecular system. This class, a derivative of the ContactAnalysis base class, overrides the compute method to provide functionality specifically for hydrophobic contact computation.

Hydrophobic contacts are interactions between hydrophobic (non-polar) atoms. Hydrophobic interactions occur due to the tendency of hydrophobic molecules to aggregate together in an aqueous environment, minimizing their exposure to water molecules.

Definition

  1. Both atoms must be hydrophobic.
  2. The distance between these two atoms does not exceed a defined distance cutoff.

Attributes:

Name Type Description
ns NeighborPairs

A NeighborPairs object containing the atom neighbor relationships in the system.

distance float

The maximum distance to consider for a hydrophobic contact. See lahuta.config.defaults.CONTACTS for default values.

Example
luni = Luni(...)
ns = luni.compute_neighbors()

hbc = HydrophobicContacts(ns)
print(hbc.results)
Source code in lahuta/contacts/hydrophobic.py
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
class HydrophobicContacts(ContactAnalysis):
    """Handle the computation of hydrophobic contacts in a molecular system.

    Hydrophobic contacts are interactions between hydrophobic atoms in a molecular system.
    This class, a derivative of the `ContactAnalysis` base class, overrides the `compute`
    method to provide functionality specifically for hydrophobic contact computation.

    Hydrophobic contacts are interactions between hydrophobic (non-polar) atoms.
    Hydrophobic interactions occur due to the tendency of hydrophobic molecules to aggregate together
    in an aqueous environment, minimizing their exposure to water molecules.

    !!! tip "Definition"
        1. Both atoms must be hydrophobic.
        2. The distance between these two atoms does not exceed a defined distance cutoff.

    Attributes:
        ns (NeighborPairs): A NeighborPairs object containing the atom neighbor relationships in the system.
        distance (float): The maximum distance to consider for a hydrophobic contact. \
            See `lahuta.config.defaults.CONTACTS`
            for default values.

    ??? example "Example"
        ``` py
        luni = Luni(...)
        ns = luni.compute_neighbors()

        hbc = HydrophobicContacts(ns)
        print(hbc.results)
        ```
    """

    distance = CONTACTS["hydrophobic"]["distance"]

    def compute(self) -> NeighborPairs:
        """Compute hydrophobic contacts based on the neighbor pairs.

        Returns:
            NeighborPairs: A NeighborPairs object containing only hydrophobic contacts.
        """
        return F.hydrophobic_neighbors(self.ns, self.distance)

lahuta.contacts.MetalicContacts

Bases: ContactAnalysis

Handle the computation of metallic contacts in a molecular system.

Metallic contacts are interactions involving metal atoms in a molecular system. This class, a derivative of the ContactAnalysis base class, overrides the compute method to provide functionality specifically for metallic contact computation.

Metallic contacts are interactions between metal ions and atoms that can act as hydrogen bond acceptors. These contacts play significant roles in the structure and function of many proteins, especially metalloproteins. Metal ions can form coordination bonds with electron-rich atoms (like oxygen, nitrogen, or sulfur), contributing to the structural stability and sometimes the catalytic activity of these proteins.

Definition

  1. The contact involves a metal ion and an atom that is a hydrogen bond acceptor.
  2. The distance between the metal ion and the hydrogen bond acceptor does not exceed a predefined distance cutoff.

Attributes:

Name Type Description
ns NeighborPairs

A NeighborPairs object containing the atom neighbor relationships in the system.

distance float

The maximum distance to consider for a metallic contact. See lahuta.config.defaults.CONTACTS for default values.

Example
luni = Luni(...)
ns = luni.compute_neighbors()

metal_contacts = MetalicContacts(ns)
print(metal_contacts.results)
Source code in lahuta/contacts/metal.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
class MetalicContacts(ContactAnalysis):
    """Handle the computation of metallic contacts in a molecular system.

    Metallic contacts are interactions involving metal atoms in a molecular system.
    This class, a derivative of the `ContactAnalysis` base class, overrides the `compute`
    method to provide functionality specifically for metallic contact computation.

    Metallic contacts are interactions between metal ions and atoms that can act as hydrogen bond acceptors.
    These contacts play significant roles in the structure and function of many proteins, especially metalloproteins.
    Metal ions can form coordination bonds with electron-rich atoms (like oxygen, nitrogen, or sulfur),
    contributing to the structural stability and sometimes the catalytic activity of these proteins.


    !!! tip "Definition"
        1. The contact involves a metal ion and an atom that is a hydrogen bond acceptor.
        2. The distance between the metal ion and the hydrogen bond acceptor does not exceed \
            a predefined distance cutoff.

    Attributes:
        ns (NeighborPairs): A NeighborPairs object containing the atom neighbor relationships in the system.
        distance (float): The maximum distance to consider for a metallic contact. See `lahuta.config.defaults.CONTACTS`
            for default values.

    ??? example "Example"
        ``` py
        luni = Luni(...)
        ns = luni.compute_neighbors()

        metal_contacts = MetalicContacts(ns)
        print(metal_contacts.results)
        ```
    """

    distance = CONTACTS["metal"]["distance"]

    def compute(self) -> NeighborPairs:
        """Compute metalic contacts based on the neighbor pairs.

        Returns:
            NeighborPairs: A NeighborPairs object containing only metalic contacts.
        """
        return F.metalic_neighbors(self.ns, self.distance)

lahuta.contacts.HBondContacts

Bases: ContactAnalysis

Handle the computation of hydrogen bond (hbond) contacts in a molecular system.

Hydrogen bonds are pivotal non-covalent interactions that significantly influence the structure, stability, and dynamics of biomolecules such as proteins and nucleic acids. A hydrogen bond forms when a hydrogen atom covalently bonded to a highly electronegative atom (such as oxygen or nitrogen) interacts with another electronegative atom from a different group.

Definition

  1. It involves a hydrogen bond donor atom and a hydrogen bond acceptor atom.
  2. The distance between the hydrogen atom and the acceptor atom does not exceed a predefined cutoff distance.
  3. The angle formed by the donor, hydrogen, and acceptor atoms falls within a predefined range. This accounts for the directional nature of hydrogen bonds.

Attributes:

Name Type Description
ns NeighborPairs

A NeighborPairs object containing the atom neighbor relationships in the system.

Example
luni = Luni(...)
ns = luni.compute_neighbors()

hbonds = HBondContacts(ns)
print(hbonds.results)
Source code in lahuta/contacts/hbonds.py
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
class HBondContacts(ContactAnalysis):
    """Handle the computation of hydrogen bond (hbond) contacts in a molecular system.

    Hydrogen bonds are pivotal non-covalent interactions that significantly influence the structure, stability,
    and dynamics of biomolecules such as proteins and nucleic acids. A hydrogen bond forms when a hydrogen atom
    covalently bonded to a highly electronegative atom (such as oxygen or nitrogen) interacts with another
    electronegative atom from a different group.


    !!! tip "Definition"
        1. It involves a hydrogen bond donor atom and a hydrogen bond acceptor atom.
        2. The distance between the hydrogen atom and the acceptor atom does not exceed a predefined cutoff distance.
        3. The angle formed by the donor, hydrogen, and acceptor atoms falls within a predefined range.
        This accounts for the directional nature of hydrogen bonds.

    Attributes:
        ns (NeighborPairs): A NeighborPairs object containing the atom neighbor relationships in the system.

    ??? example "Example"
        ``` py
        luni = Luni(...)
        ns = luni.compute_neighbors()

        hbonds = HBondContacts(ns)
        print(hbonds.results)
        ```
    """

    def compute(self) -> NeighborPairs:
        """Compute hydrogen bond (hbond) contacts based on the neighbor pairs.

        Returns:
            NeighborPairs: A NeighborPairs object containing only hbond contacts.
        """
        return F.hbond_neighbors(self.ns)

lahuta.contacts.WeakHBondContacts

Bases: ContactAnalysis

Handle the computation of weak hydrogen bond (weak hbond) contacts in a molecular system.

Weak hydrogen bonds are a type of non-covalent interactions that, despite their reduced strength compared to regular hydrogen bonds, still play important roles in biomolecular structures and functions. These bonds form when a hydrogen atom, covalently linked to a weakly electronegative atom (such as carbon), interacts with an electronegative acceptor atom from a different group. The difference in electronegativity between the donor and acceptor atoms is what makes these bonds relatively weaker than conventional hydrogen bonds.

Definition

  1. A weak hydrogen bond involves a weak hydrogen bond donor atom and a hydrogen bond acceptor atom.
  2. The distance between the hydrogen atom and the acceptor atom does not surpass a certain cutoff distance.
  3. The angle formed by the donor, hydrogen, and acceptor atoms is within a predefined range. This accounts for the directional nature of hydrogen bonds.

Attributes:

Name Type Description
ns NeighborPairs

A NeighborPairs object containing the atom neighbor relationships in the system.

Example
luni = Luni(...)
ns = luni.compute_neighbors()

weak_hbonds = WeakHBondContacts(ns)
print(weak_hbonds.results)
Source code in lahuta/contacts/hbonds.py
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
class WeakHBondContacts(ContactAnalysis):
    """Handle the computation of weak hydrogen bond (weak hbond) contacts in a molecular system.

    Weak hydrogen bonds are a type of non-covalent interactions that, despite their reduced strength
    compared to regular hydrogen bonds, still play important roles in biomolecular structures and functions.
    These bonds form when a hydrogen atom, covalently linked to a weakly electronegative atom (such as carbon),
    interacts with an electronegative acceptor atom from a different group. The difference in electronegativity
    between the donor and acceptor atoms is what makes these bonds relatively weaker than conventional hydrogen bonds.

    !!! tip "Definition"
        1. A weak hydrogen bond involves a weak hydrogen bond donor atom and a hydrogen bond acceptor atom.
        2. The distance between the hydrogen atom and the acceptor atom does not surpass a certain cutoff distance.
        3. The angle formed by the donor, hydrogen, and acceptor atoms is within a predefined range.
        This accounts for the directional nature of hydrogen bonds.

    Attributes:
        ns (NeighborPairs): A NeighborPairs object containing the atom neighbor relationships in the system.

    ??? example "Example"
        ``` py
        luni = Luni(...)
        ns = luni.compute_neighbors()

        weak_hbonds = WeakHBondContacts(ns)
        print(weak_hbonds.results)
        ```
    """

    def compute(self) -> NeighborPairs:
        """Compute weak hydrogen bond (weak hbond) contacts based on the neighbor pairs.

        Returns:
            NeighborPairs: A NeighborPairs object containing only weak hbond contacts.
        """
        return F.weak_hbond_neighbors(self.ns)

lahuta.contacts.PolarHBondContacts

Bases: ContactAnalysis

Handle the computation of polar hydrogen bond (polar hbond) contacts in a molecular system.

Polar hydrogen bonds involve a hydrogen atom covalently bonded to a polar atom (hydrogen bond donor), forming an interaction with another polar atom from a different group (hydrogen bond acceptor). In contrast to conventional hydrogen bonds, for polar hydrogen bonds, we do not consider the angle formed by the donor, hydrogen, and acceptor atoms.

Definition

  1. The presence of a hydrogen bond donor and a hydrogen bond acceptor.
  2. The distance between the hydrogen bond donor and the hydrogen bond acceptor does not exceed a specific cutoff distance.

Attributes:

Name Type Description
ns NeighborPairs

A NeighborPairs object containing the atom neighbor relationships in the system.

distance float

The maximum distance to consider for a polar hbond contact. See lahuta.config.defaults.CONTACTS for default values.

Example
luni = Luni(...)
ns = luni.compute_neighbors()

polar_hbonds = PolarHBondContacts(ns)
print(polar_hbonds.results)
Source code in lahuta/contacts/hbonds.py
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
class PolarHBondContacts(ContactAnalysis):
    """Handle the computation of polar hydrogen bond (polar hbond) contacts in a molecular system.

    Polar hydrogen bonds involve a hydrogen atom covalently bonded to a polar atom (hydrogen bond donor),
    forming an interaction with another polar atom from a different group (hydrogen bond acceptor). In contrast to
    conventional hydrogen bonds, for polar hydrogen bonds, we do not consider the angle formed by the donor, hydrogen,
    and acceptor atoms.

    !!! tip "Definition"
        1. The presence of a hydrogen bond donor and a hydrogen bond acceptor.
        2. The distance between the hydrogen bond donor and the hydrogen bond acceptor does
        not exceed a specific cutoff distance.

    Attributes:
        ns (NeighborPairs): A NeighborPairs object containing the atom neighbor relationships in the system.
        distance (float): The maximum distance to consider for a polar hbond contact. \
            See `lahuta.config.defaults.CONTACTS`
            for default values.

    ??? example "Example"
        ``` py
        luni = Luni(...)
        ns = luni.compute_neighbors()

        polar_hbonds = PolarHBondContacts(ns)
        print(polar_hbonds.results)
        ```
    """

    distance = CONTACTS["hbond"]["polar distance"]

    def compute(self) -> NeighborPairs:
        """Compute polar hydrogen bond (polar hbond) contacts based on the neighbor pairs and the set distance.

        Returns:
            NeighborPairs: A NeighborPairs object containing only polar hbond contacts.
        """
        return F.polar_hbond_neighbors(self.ns, self.distance)

lahuta.contacts.WeakPolarHBondContacts

Bases: ContactAnalysis

Handle the computation of weak polar hydrogen bond (weak polar hbond) contacts in a molecular system.

Weak polar hydrogen bonds rely on a weak hydrogen bond donor, and we also do not consider the angle formed by the donor, hydrogen, and acceptor atoms.

Definition

  1. The presence of a hydrogen bond acceptor and a weak hydrogen bond donor.
  2. The distance between the hydrogen bond acceptor and the weak hydrogen bond donor should not exceed a certain cutoff distance.

Attributes:

Name Type Description
ns NeighborPairs

A NeighborPairs object containing the atom neighbor relationships in the system.

distance float

The maximum distance to consider for a weak polar hbond contact. See lahuta.config.defaults.CONTACTS for default values.

Example
luni = Luni(...)
ns = luni.compute_neighbors()

weak_polar_hbonds = WeakPolarHBondContacts(ns)
print(weak_polar_hbonds.results)
Source code in lahuta/contacts/hbonds.py
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
class WeakPolarHBondContacts(ContactAnalysis):
    """Handle the computation of weak polar hydrogen bond (weak polar hbond) contacts in a molecular system.

    Weak polar hydrogen bonds rely on a weak hydrogen bond donor, and we also do not consider the angle
    formed by the donor, hydrogen, and acceptor atoms.

    !!! tip "Definition"
        1. The presence of a hydrogen bond acceptor and a weak hydrogen bond donor.
        2. The distance between the hydrogen bond acceptor and the weak hydrogen bond donor
        should not exceed a certain cutoff distance.

    Attributes:
        ns (NeighborPairs): A NeighborPairs object containing the atom neighbor relationships in the system.
        distance (float): The maximum distance to consider for a weak polar hbond contact. \
            See `lahuta.config.defaults.CONTACTS`
            for default values.

    ??? example "Example"
        ``` py
        luni = Luni(...)
        ns = luni.compute_neighbors()

        weak_polar_hbonds = WeakPolarHBondContacts(ns)
        print(weak_polar_hbonds.results)
        ```
    """

    distance = CONTACTS["weak hbond"]["weak polar distance"]

    def compute(self) -> NeighborPairs:
        """Compute weak polar hydrogen bond contacts based on the neighbor pairs and the set distance.

        Returns:
            NeighborPairs: A NeighborPairs object containing only weak polar hbond contacts.
        """
        return F.weak_polar_hbond_neighbors(self.ns, self.distance)