Skip to content

Create nem Class interaction (Amide-π Stacking) #330

Description

@pablo-arantes

Hi All,

Thank you for the work you have done on Prolif library. It's a great resource and help a lot of scientists in the field.
At our group we are trying to implement a new type of interaction, similar to π-π stacking, however it's an amide of the protein backbone and the aromatic ring. We have created new classes, as you can check above:

class AmideFaceToFace(BasePiStacking):
    """Face-to-face Amide-Pi Stacking interaction between a ligand (amide) and a residue (aromatic ring)

    Parameters
    ----------
    amide : str
        SMARTS pattern for the amide group
    pi_ring : tuple
        SMARTS for aromatic rings
    distance : float
        Cutoff distance between the amide and ring centroids
    plane_angle : tuple
        Min and max values for the angle between the planes
    normal_to_centroid_angle : tuple
        Min and max angles allowed between the vector normal to the ring's plane,
        and the vector between the centroids.
    """

    def __init__(
        self,
        amide: str = "[NX3][CX3](=[OX1])[#6]",
        pi_ring: tuple[str, ...] = (
            "[a;r6]1:[a;r6]:[a;r6]:[a;r6]:[a;r6]:[a;r6]:1",
            "[a;r5]1:[a;r5]:[a;r5]:[a;r5]:[a;r5]:1",
        ),
        distance: float = 5.5,
        plane_angle: "Angles" = (0, 35),
        normal_to_centroid_angle: "Angles" = (0, 33),
    ) -> None:
        super().__init__(
            lig_pattern=amide,
            prot_pattern=pi_ring,
            distance=distance,
            plane_angle=plane_angle,
            normal_to_centroid_angle=normal_to_centroid_angle,
        )


class AmideEdgeToFace(BasePiStacking):
    """Edge-to-face Amide-Pi Stacking interaction between a ligand (amide) and a residue (aromatic ring)

    Parameters
    ----------
    amide : str
        SMARTS pattern for the amide group
    pi_ring : tuple
        SMARTS for aromatic rings
    distance : float
        Cutoff distance between the amide and ring centroids
    plane_angle : tuple
        Min and max values for the angle between the planes
    normal_to_centroid_angle : tuple
        Min and max angles allowed between the vector normal to the ring's plane,
        and the vector between the centroids.
    intersect_radius : float
        Used to check whether the intersect point between planes falls within
        ``intersect_radius`` of the opposite centroid.
    """

    def __init__(
        self,
        amide: str = "[NX3][CX3](=[OX1])[#6]",
        pi_ring: tuple[str, ...] = (
            "[a;r6]1:[a;r6]:[a;r6]:[a;r6]:[a;r6]:[a;r6]:1",
            "[a;r5]1:[a;r5]:[a;r5]:[a;r5]:[a;r5]:1",
        ),
        distance: float = 6.5,
        plane_angle: "Angles" = (50, 90),
        normal_to_centroid_angle: "Angles" = (0, 30),
        intersect_radius: float = 1.5,
    ) -> None:
        super().__init__(
            lig_pattern=amide,
            prot_pattern=pi_ring,
            distance=distance,
            plane_angle=plane_angle,
            normal_to_centroid_angle=normal_to_centroid_angle,
            intersect=True,
            intersect_radius=intersect_radius,
        )


class AmidePiStacking(Interaction):
    """Amide-Pi Stacking interaction between a ligand (amide) and a residue (aromatic ring)

    Parameters
    ----------
    ftf_kwargs : dict
        Parameters to pass to the underlying AmideFaceToFace class
    etf_kwargs : dict
        Parameters to pass to the underlying AmideEdgeToFace class
    """

    def __init__(
        self, ftf_kwargs: dict | None = None, etf_kwargs: dict | None = None
    ) -> None:
        self.ftf = AmideFaceToFace(**ftf_kwargs or {})
        self.etf = AmideEdgeToFace(**etf_kwargs or {})

    def detect(
        self, ligand: "Residue", residue: "Residue"
    ) -> Iterator["InteractionMetadata"]:
        yield from self.ftf.detect(ligand, residue)
        yield from self.etf.detect(ligand, residue)

Can you please let me know if we are in the right track, and we can move on and implement?

Again, thank you so much.

Best,

Pablo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions