Examples that showcase the usage of PheSA for shape-based docking (negative receptor image) and PheSA screening (flexible and rigid)
We use gradle as a build management tool.
The examples can be run by using gradle:
./gradlew run
In the main method App.java all examples that will be run are listed. Depending on your needs, you can comment out or delete certain examples.
The concepts are explained briefly
Dependencies: PheSA is part of the OpenChemLib https://github.com/Actelion/openchemlib
PheSA is implemented as a descriptor in the OpenChemLib and requires first a descriptor generation step using a DescriptorHandler. There are two DescriptorHandlers for two different purposes: A) generating a PheSA descriptor from a single, bioactive 3D query conformation and B) generating a descriptor for a candidate molecule, where first a conformer ensemble is generated by the OpenChemLib.
For case A, the DescriptorHandlerShapeOneConf
has to be used, whereas StereoMolecule nativeLigandPose
requires 3D coordinates to be present.
StereoMolecules are usually obtained by parsing an SD-File, SMILES Text File, Molfile or a DWAR File. If 3D coordinates are specifiecd in the field,
they will be parsed per default.
DescriptorHandlerShapeOneConf dhsSC = new DescriptorHandlerShapeOneConf();
PheSAMolecule queryShape = dhs.createDescriptor(nativeLigandPose);
whereas for case B, DescriptorHandlerShape
is used and StereoMolecule candidateMol
does not require the presence of 3D Coordinate.
DescriptorHandlerShape dhs = new DescriptorHandlerShape();
PheSAMolecule candidateShape = dhs.createDescriptor(candidateMol);
The descriptor generation step from DescriptorHandlerShape
by default creates a maximum of 200 conformers. This can be adjusted via the constructor:
DescriptorHandlerShape(int maxConfs,double ppWeight)
where the number of conformers and the pharmacophore weight for the similarity calculation can be adjusted.
After creating the PheSA descriptors (instances of PheSAMolecule
) the similarity and the optimal 3D alignment can be calculated:
double sim = dhs.getSimilarity(queryShape, candidateShape);
StereoMolecule[] previousAlignment = dhs.getPreviousAlignment();
StereoMolecule referenceMol = previousAlignment[0];
StereoMolecule candidateMol = previousAlignment[1]
referenceMol and candidateMol can be written to SD-Files as demonstrated in the examples and visualized in any chemistry visualization program supporting .sdf imports.
For using flexible refinement of the alignments, PheSAFlex can be activated via:
dhs.setFlexible(true)
Further control over the PheSA parameters and settings can be exerted via the PheSASetting
class, where for example the triangle alignments can be turned off
for faster performance:
PheSASetting setting = new PheSASetting();
setting.setUseTriangle(false);
Examples on how to use PheSA and PheSAFlex are provided in the classes PheSATest
and PheSAFlexTest
.
To create shape and pharmacophore representation of the receptor binding site, we rely on the NegativeReceptorImageCreator
class:
TransformationSequence transform = new TransformationSequence();
ShapeVolume bsVolume = NegativeReceptorImageCreator.create(nativeLigandPose, receptor,transform);
ShapeDocking shapeDocking = new ShapeDocking(bsVolume,transform);
nativeLigandPose and receptor are of type StereoMolecule
and rely on the presence of 3D coordinates. The TransformationSequence can be used to later transform the coordinates
of the docked ligand for visual inspection with respect to the protein structure. This step is necessary since the created ShapeVolume
is centered at the origin of the coordinate
system.
A candidate molecule (no 3D coordinates required) can then aligned to the receptor image:
shapeDocking.dock(toDock)
Which return a List of aligned StereoMolecules sorted by decreasing score. ShapeDockingTest
demonstrates how to use the shape-based docking.
Since the most expensive step in the PheSA workflow is to create the conformers of the screening library, it can save computational resources to precalculate them
and store them into a file, so that they can be reused again for subsequent screenings. The PheSA DescriptorHandler contains methods to encode and decode instances of PheSAMolecule
. Which is a full representation of shape and
pharmacophore of a conformational ensemble (if DescriptorHandlerShape
was used as opposed to DescriptorHandlerShapeOneConf
).
DescriptorHandlerShape dhs = new DescriptorHandlerShape();
PheSAMolecule candidateShape = dhs.createDescriptor(candidateMol);
String encodedShape = dhs.encode(candidateShape);
candidateShape = dhs.decode(encodedShape);
The exeuction of both PheSA descriptor generation and PheSA similarity calculation can be dramatically speeded up by using Java Multithreading.
The DescriptorHandlerShape
is not thread-safe, so every thread requires it's own copy of this class.
Vast libraries can be screened with low-memory consumption using Java's Stream API. The examples PheSADescGenerationMulticore
and PheSAScreenMulticore
demonstrate how to 1) precalculate PheSA descriptors of 100'000 SMILES strings and persist them in a file
and 2) run a subsequent screening and write the best results (similarities, 3D alignments) to an SD-File.