Chemical Data Processing Library Python API - Version 1.4.0
Classes | Public Member Functions | Static Public Attributes | Properties | List of all members
CDPL.GRAIL.GRAILDescriptorCalculator Class Reference

Calculation of GRAIL descriptors for protein-ligand complexes. More...

+ Inheritance diagram for CDPL.GRAIL.GRAILDescriptorCalculator:

Classes

class  ElementIndex
 Indices of the individual elements of the GRAIL descriptor vector. More...
 

Public Member Functions

None __init__ ()
 Constructs the GRAILDescriptorCalculator instance.
 
None __init__ (GRAILDescriptorCalculator calc)
 Constructs a copy of the GRAILDescriptorCalculator instance calc. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
GRAILDescriptorCalculator assign (GRAILDescriptorCalculator calc)
 Copy assignment operator. More...
 
None initTargetData (Chem.MolecularGraph tgt_env, Chem.Atom3DCoordinatesFunction coords_func, bool tgt_env_changed=True)
 Initializes the calculator with target-environment data for subsequent descriptor calculations. More...
 
None initLigandData (Chem.MolecularGraph ligand)
 Initializes the calculator with the molecular graph of the ligand. More...
 
None calculate (Math.Vector3DArray atom_coords, Math.DVector descr, bool update_lig_part=True)
 Calculates the GRAIL descriptor for the current ligand pose. More...
 

Static Public Attributes

int TOTAL_DESCRIPTOR_SIZE = 35
 Total number of elements in the calculated descriptor vector.
 
int LIGAND_DESCRIPTOR_SIZE = 13
 Number of ligand-only descriptor elements (the first LIGAND_DESCRIPTOR_SIZE entries of the vector).
 

Properties

 objectID = property(getObjectID)
 

Detailed Description

Calculation of GRAIL descriptors for protein-ligand complexes.

The descriptor is a vector of 35 elements that captures ligand-only properties (counts of pharmacophore features, heavy atoms, rotatable bonds, \( \log P \), \( TPSA \), etc.) and target-environment-specific scores (HBA/HBD occupancy sums and maxima, pi/aromatic/hydrophobic/halogen-bonding interaction scores, and electrostatic

See also
[GRADE]

Constructor & Destructor Documentation

◆ __init__()

None CDPL.GRAIL.GRAILDescriptorCalculator.__init__ ( GRAILDescriptorCalculator  calc)

Constructs a copy of the GRAILDescriptorCalculator instance calc.

Parameters
calcThe GRAILDescriptorCalculator to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.GRAIL.GRAILDescriptorCalculator.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python GRAILDescriptorCalculator instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two GRAILDescriptorCalculator instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ assign()

GRAILDescriptorCalculator CDPL.GRAIL.GRAILDescriptorCalculator.assign ( GRAILDescriptorCalculator  calc)

Copy assignment operator.

Parameters
calcThe other GRAILDescriptorCalculator instance.
Returns
self

◆ initTargetData()

None CDPL.GRAIL.GRAILDescriptorCalculator.initTargetData ( Chem.MolecularGraph  tgt_env,
Chem.Atom3DCoordinatesFunction  coords_func,
bool   tgt_env_changed = True 
)

Initializes the calculator with target-environment data for subsequent descriptor calculations.

Parameters
tgt_envThe target environment (e.g. binding-site residues).
coords_funcThe function used to retrieve atom 3D-coordinates from tgt_env.
tgt_env_changedIf True, the target environment is reinitialized even if the same target was supplied previously.

◆ initLigandData()

None CDPL.GRAIL.GRAILDescriptorCalculator.initLigandData ( Chem.MolecularGraph  ligand)

Initializes the calculator with the molecular graph of the ligand.

Parameters
ligandThe ligand molecular graph.

◆ calculate()

None CDPL.GRAIL.GRAILDescriptorCalculator.calculate ( Math.Vector3DArray  atom_coords,
Math.DVector  descr,
bool   update_lig_part = True 
)

Calculates the GRAIL descriptor for the current ligand pose.

The pose is supplied via per-atom 3D coordinates in atom_coords (same order as the atoms of the molecular graph passed to initLigandData()). The result is written to descr.

Parameters
atom_coordsThe 3D coordinates of the ligand atoms.
descrThe output descriptor vector (resized to TOTAL_DESCRIPTOR_SIZE).
update_lig_partIf True, the ligand-only part of the descriptor is recomputed.