schrodinger.structutils.interactions.pi module

A module for detecting pi-pi and pi-cation interactions.

Code example for pi-cation interactions:

from schrodinger.structutils import interactions
from schrodinger import structure
recep = None
for struct in structure.StructureReader(input_file):
    if not recep:
        recep = struct
    else:
        picats = interactions.find_pi_cation_interactions(recep,
                                    struct2=struct)

Code example for pi-pi interactions:

from schrodinger.structutils import interactions
from schrodinger import structure
recep = None
for struct in structure.StructureReader(input_file):
    if not recep:
        recep = struct
    else:
        pipi = interactions.find_pi_pi_interactions(recep, struct2=struct)
schrodinger.structutils.interactions.pi.squared_centroid_distance(cent1, cent2)

Compute the squared distance between two centroids. Using the squared distance saves the sqrt compute cycles.

Parameters
  • cent1 (Centroid object) – first centroid

  • cent2 (Centroid object) – second centroid

Return type

float

Returns

the squared distance between the two centroids.

schrodinger.structutils.interactions.pi.unit_vector_points(a, b)
schrodinger.structutils.interactions.pi.unit_vector(vec)
class schrodinger.structutils.interactions.pi.Centroid(atoms, xyz)

Bases: object

The object that stores data about a centroid

__init__(atoms, xyz)

Create a Centroid object

Parameters
  • atoms (list of int) – the atom numbers involved in the centroid

  • xyz (list of float) – the XYZ coordinates of the centroid

class schrodinger.structutils.interactions.pi.CationPiInteraction(cation_structure, pi_structure, cation_centroid, pi_centroid)

Bases: object

The object that stores the data for a Cation-Pi interaction

__init__(cation_structure, pi_structure, cation_centroid, pi_centroid)

Create a CationPiInteraction object

Parameters
  • cation_structure (schrodinger.structure.Structure object) – structure that contains the cation

  • pi_structure (schrodinger.structure.Structure object) – structure that contains the pi group

  • cation_centroid (Centroid object) – Centroid of the positive charge

  • pi_centroid (Centroid object) – Centroid of the pi group

  • distance (float) – distance between the centroids

  • angle (float) – angle in degrees between the centroids

cation_structure
Ivar

structure that contains the cation

Type

schrodinger.structure.Structure object

pi_structure
Ivar

structure that contains the pi group

Type

schrodinger.structure.Structure object

cation_centroid
Ivar

Centroid of the positive charge

Type

Centroid object

pi_centroid
Ivar

Centroid of the pi group

Type

Centroid object

property distance
Ivar

distance between the centroids

Type

float

property angle
Ivar

angle in degrees between the centroids

Type

float

class schrodinger.structutils.interactions.pi.PiPiInteraction(struct1, struct2, ring1, ring2, face_to_face)

Bases: object

The object that stores the data for a Pi-Pi interaction

__init__(struct1, struct2, ring1, ring2, face_to_face)

Create a PiPiInteraction object

Parameters
  • struct1 (schrodinger.structure.Structure object) – structure that contains the first ring

  • struct2 (schrodinger.structure.Structure object) – structure that contains the second ring

  • ring1 (Centroid object) – Centroid of the first ring

  • ring2 (Centroid object) – Centroid of the second ring

  • distance (float) – distance between the centroids

  • angle (float) – angle in degrees between the two ring planes

  • face_to_face (bool) – True if the interaction is face to face, False if it is edge to face

property distance
Returns

distance between the centroids

Return type

float

property angle
Returns

angle in degrees between the centroids

Return type

float

schrodinger.structutils.interactions.pi.find_pi_cation_interactions(struct1, struct2=None, atoms1=None, atoms2=None, skip_unknown=None, params=None)

Determine if any positive centers are within a specified distance cutoff of any aromatic ring centroids. For those positive center/ring contacts, determine if the positive center is located on the face of the ring rather than the edge.

Code example:

import interactions
from schrodinger import structure
recep = None
for struct in structure.StructureReader(input_file):
    if not recep:
        recep = struct
    else:
        picats = interactions.find_pi_cation_interactions(recep,
                                    struct2=struct)
Parameters
  • struct1 (schrodinger.structure.Structure object) – first structure to compute pi-cation interactions for

  • struct2 (schrodinger.structure.Structure object) – second structure to compute pi-cation interactions for or or None if the first structure should be used.

  • atoms1 (list of atom indices) – atoms in struct1 defining the selection to be examined. If not passed, all atoms will be used.

  • atoms2 (list of atom indices) – atoms in struct2 defining the selection to be examined. If not passed, all atoms will be used. If struct2 is not specified struct1 will be used.

  • skip_unknown – UNUSED and deprecated.

  • params (schrodinger.infra.structure.PiCationParams or NoneType) – Detailed parameters controlling the interaction criteria. If None, then the default values will be used.

Return type

list

Returns

list of CationPiInteraction interaction objects:: # CationPiInteraction properties: cation_structure: structure that contains the cation pi_structure: structure that contains the pi group cation_centroid: Centroid of the positive charge pi_centroid: Centroid of the pi group distance: distance between the centroids angle: angle in degrees between the centroids

schrodinger.structutils.interactions.pi.gather_rings(astruct, atom_subset=None)
schrodinger.structutils.interactions.pi.find_pi_pi_interactions(struct1, struct2=None, atoms1=None, atoms2=None, params=None, honor_pbc=True)

Find all pi-pi interactions between the rings in struct1 and struct2 (or within struct1 if only 1 structure is given). Interactions are classified as to whether they are face-to-face or edge-to-face.

Code example:

import interactions
from schrodinger import structure
recep = None
for struct in structure.StructureReader(input_file):
    if not recep:
        recep = struct
    else:
        pipi = interactions.find_pi_pi_interactions(recep, struct2=struct)
Parameters
  • struct1 (schrodinger.structure.Structure object) – first of two structures to compute pi-pi interactions for

  • struct2 (schrodinger.structure.Structure object) – second of two structures to compute pi-pi interactions for. If not given, struct1 will be searched for intramolecular interactions.

  • atoms1 (list of atom indices) – atoms in struct1 defining the rings that will be examined. If not passed, all atoms will be used.

  • atoms2 (list of atom indices) – atoms in struct2 defining the rings that will be examined. If not passed, all atoms will be used. struct2 must be specified if this argument is used.

  • params (schrodinger.infra.structure.PiPiParams or NoneType) – Detailed parameters controlling the interaction criteria. If None, then the default values will be used.

Return type

list of PiPiInteraction objects

Returns

a PiPiInteraction object for each interaction found.