|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openscience.cdk.pharmacophore.PharmacophoreMatcher
@TestClass(value="org.openscience.cdk.pharmacophore.PharmacophoreMatcherTest") public class PharmacophoreMatcher
Identifies atoms whose 3D arrangement matches a specified pharmacophore query.
A pharmacophore is defined by a set of atoms and distances between them. More generically we can restate this as a set of pharmacophore groups and the distances between them. Note that a pharmacophore group may consist of one or more atoms and the distances can be specified as a distance range rather than an exact distance. The goal of a pharmacophore query is to identify atom in a molecule whose 3D arrangement match a specified query. To perform a query one must first create a set of pharmacophore groups and specify the distances between them. Each pharmacophore group is represented by aPharmacophoreAtom
and the distances between them are represented by a PharmacophoreBond.
These are collected in a QueryAtomContainer.
Given the query pharmacophore one can use this class to check with it occurs in a specified molecule.
Note that for full generality pharmacophore searches are performed using conformations of molecules.
This can easily be accomplished using this class together with the ConformerContainer
class. See the example below.
Currently this class will allow you to perform pharmacophore searches using triads, quads or any number
of pharmacophore groups. However, only distances and angles between pharmacophore groups are considered, so
alternative constraints such as torsions and so on cannot be considered at this point.
After a query has been performed one can retrieve the matching groups (as opposed to the matching atoms
of the target molecule). However since a pharmacophore group (which is an object of class PharmacophoreAtom)
allows you to access the indices of the corresponding atoms in the target molecule, this is not very
difficult.
Example usage:
QueryAtomContainer query = new QueryAtomContainer();
PharmacophoreQueryAtom o = new PharmacophoreQueryAtom("D", "[OX1]");
PharmacophoreQueryAtom n1 = new PharmacophoreQueryAtom("A", "[N]");
PharmacophoreQueryAtom n2 = new PharmacophoreQueryAtom("A", "[N]");
query.addAtom(o);
query.addAtom(n1);
query.addAtom(n2);
PharmacophoreQueryBond b1 = new PharmacophoreQueryBond(o, n1, 4.0, 4.5);
PharmacophoreQueryBond b2 = new PharmacophoreQueryBond(o, n2, 4.0, 5.0);
PharmacophoreQueryBond b3 = new PharmacophoreQueryBond(n1, n2, 5.4, 5.8);
query.addBond(b1);
query.addBond(b2);
query.addBond(b3);
String filename = "/Users/rguha/pcore1.sdf";
IteratingMDLConformerReader reader = new IteratingMDLConformerReader(
new FileReader(new File(filename)), DefaultChemObjectBuilder.getInstance());
ConformerContainer conformers;
if (reader.hasNext()) conformers = (ConformerContainer) reader.next();
boolean firstTime = true;
for (IAtomContainer conf : conformers) {
boolean status;
if (firstTime) {
status = matcher.matches(conf, true);
firstTime = false;
} else status = matcher.matches(conf, false);
if (status) {
// OK, matched. Do something
}
}
A1AAAA1|A1AAAAA1
PharmacophoreAtom,
PharmacophoreBond,
PharmacophoreQueryAtom,
PharmacophoreQueryBond| Constructor Summary | |
|---|---|
PharmacophoreMatcher()
An empty constructor. |
|
PharmacophoreMatcher(PharmacophoreQuery pharmacophoreQuery)
Initialize the matcher with a query. |
|
| Method Summary | |
|---|---|
List<List<PharmacophoreAtom>> |
getMatchingPharmacophoreAtoms()
Get the matching pharmacophore groups. |
List<List<IBond>> |
getMatchingPharmacophoreBonds()
Get the matching pharmacophore constraints. |
PharmacophoreQuery |
getPharmacophoreQuery()
Get the query pharmacophore |
List<HashMap<IBond,IBond>> |
getTargetQueryBondMappings()
Return a list of HashMap's that allows one to get the query constraint for a given pharmacophore bond. |
List<List<PharmacophoreAtom>> |
getUniqueMatchingPharmacophoreAtoms()
Get the uniue matching pharmacophore groups. |
boolean |
matches(IAtomContainer atomContainer)
Performs the pharmacophore matching. |
boolean |
matches(IAtomContainer atomContainer,
boolean initializeTarget)
Performs the pharmacophore matching. |
void |
setPharmacophoreQuery(PharmacophoreQuery query)
Set a pharmacophore query |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PharmacophoreMatcher()
public PharmacophoreMatcher(PharmacophoreQuery pharmacophoreQuery)
pharmacophoreQuery - The query pharmacophorePharmacophoreQueryAtom,
PharmacophoreQueryBond| Method Detail |
|---|
@TestMethod(value="testCNSPcore")
public boolean matches(IAtomContainer atomContainer)
throws CDKException
atomContainer - The target molecule. Must have 3D coordinates
CDKException - if the query pharmacophore was not set or the query is invalid or if the molecule
does not have 3D coordinatesmatches(org.openscience.cdk.interfaces.IAtomContainer, boolean)
@TestMethod(value="testMatcherQuery1")
public boolean matches(IAtomContainer atomContainer,
boolean initializeTarget)
throws CDKException
atomContainer - The target molecule. Must have 3D coordinatesinitializeTarget - If true, the target molecule specified in the
first argument will be analyzed to identify matching pharmacophore groups. If false
this is not performed. The latter case is only useful when dealing with conformers
since for a given molecule, all conformers will have the same pharmacophore groups
and only the constraints will change from one conformer to another.
CDKException - if the query pharmacophore was not set or the query is invalid or if the molecule
does not have 3D coordinates@TestMethod(value="testMatchedBonds") public List<List<IBond>> getMatchingPharmacophoreBonds()
PharmacophoreBond,
PharmacophoreAngleBond@TestMethod(value="testMatchedBonds") public List<HashMap<IBond,IBond>> getTargetQueryBondMappings()
getMatchingPharmacophoreBonds(), otherwise the
return value is null. If the matching is successfull, the return value is a List of HashMaps, each
HashMap corresponding to a seperate match. Each HashMap is keyed on the PharmacophoreBond
in the target molecule that matched a contstraint (PharmacophoreQueryBond or
PharmacophoreQueryAngleBond. The value is the corresponding query bond.
@TestMethod(value="testMatchedAtoms") public List<List<PharmacophoreAtom>> getMatchingPharmacophoreAtoms()
PharmacophoreAtom@TestMethod(value="testMatchedAtoms") public List<List<PharmacophoreAtom>> getUniqueMatchingPharmacophoreAtoms()
PharmacophoreAtom@TestMethod(value="testGetterSetter") public PharmacophoreQuery getPharmacophoreQuery()
@TestMethod(value="testGetterSetter") public void setPharmacophoreQuery(PharmacophoreQuery query)
query - The query
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||