# mdtraj.pi_stacking

mdtraj.pi_stacking(trajectory, ligand_aromatic_groups, receptor_aromatic_groups, ligand_neighbor_cutoff=None, max_face_to_face_centroid_distance=5.5, face_plane_angle_range=(0.0, 35.0), face_normal_to_centroid_angle_range=(0.0, 33.0), max_edge_to_face_centroid_distance=0.65, edge_plane_angle_range=(50.0, 90.0), edge_normal_to_centroid_angle_range=(0.0, 30.0), edge_intersection_radius=0.15)

  Calculate the pi-stacking interactions based on supplied atom groups.

  This function calculates the pi-stacking interactions between the ligand and receptor groups based on the supplied atom indices. The function uses the centroid of the groups to determine the distance between them, and the normal vector of the groups to determine the angle between them.

  Two types of pi-stacking interactions are considered:

  1. Face-to-face interactions: The two groups are parallel and close to each other.

  2. Edge-to-face interactions: The two groups are not parallel, but the edge of one group is close to the face of the other group.

  Both are returned together in the same list.

  Parameters:

    - trajectory (md.Trajectory) –

      The trajectory to analyze. The ligand and receptor groups map onto the

        trajectory’s topology indices.

    - ligand_aromatic_groups (list of int) – The atom indices of the groups to be considered aromatic for the ligand.

    - receptor_aromatic_groups (list of int) – The atom indices of the groups to be considered aromatic for the receptor.

    - ligand_neighbor_cutoff (float, default=None) – The distance cutoff for considering a receptor group for pi-stacking with a ligand group. If None, then all pairwise aromatic groups are considered. IMPORTANT: When provided, this filtering is only applied once, using the first frame of the trajectory, which may miss interactions that form later due to molecular movement. It is recommended that you use this parameter only if: (1) your system has minimal conformational changes throughout the trajectory, or (2) you’re only interested in interactions present in the first frame.

    - max_face_to_face_centroid_distance (float) – The maximum distance between the centroids of the ligand and receptor groups for the interaction.

    - face_plane_angle_range (tuple of float) – The range of acceptable angles between the two normal vectors defined by the two centroids. In degrees.

    - face_normal_to_centroid_angle_range (tuple of float) – The range of acceptable angles between the normal vector and the vector between centroids. Checks both the ligand and receptor groups. In degrees.

    - max_edge_to_face_centroid_distance (float) – The maximum distance between the centroids of the ligand and receptor groups for the interaction.

    - edge_plane_angle_range (tuple of float) – The range of acceptable angles between the two normal vectors defined by the two centroids. In degrees.

    - edge_normal_to_centroid_angle_range (tuple of float) – The range of acceptable angles between the normal vector and the vector between centroids. Checks both the ligand and receptor groups. In degrees.

    - edge_intersection_radius (float) – The maximum distance between the point of intersection between both rings and the opposite ring’s centroid.

  Returns:

    stacking_interactions – A list of lists of tuples, where each tuple is a pair of aromatic groups that are stacking in that frame. The order of the tuple goes (ligand_group, protein_group). Includes both face-to-face and edge-to-face interactions.

  Return type:

    list, len=n_frames