public class PharmacophoreMatcher extends Object
PharmacophoreAtom
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 and Description |
---|
PharmacophoreMatcher()
An empty constructor.
|
PharmacophoreMatcher(PharmacophoreQuery pharmacophoreQuery)
Initialize the matcher with a query.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public PharmacophoreMatcher()
public PharmacophoreMatcher(PharmacophoreQuery pharmacophoreQuery)
pharmacophoreQuery
- The query pharmacophorePharmacophoreQueryAtom
,
PharmacophoreQueryBond
public boolean matches(IAtomContainer atomContainer) throws CDKException
atomContainer
- The target molecule. Must have 3D coordinatesCDKException
- 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)
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 coordinatespublic List<List<IBond>> getMatchingPharmacophoreBonds()
PharmacophoreBond
,
PharmacophoreAngleBond
public List<HashMap<IBond,IBond>> getTargetQueryBondMappings()
PharmacophoreBond
in the target molecule that matched a constraint (PharmacophoreQueryBond
or
PharmacophoreQueryAngleBond
. The value is the corresponding query bond.public List<List<PharmacophoreAtom>> getMatchingPharmacophoreAtoms()
PharmacophoreAtom
public List<List<PharmacophoreAtom>> getUniqueMatchingPharmacophoreAtoms()
PharmacophoreAtom
public PharmacophoreQuery getPharmacophoreQuery()
public void setPharmacophoreQuery(PharmacophoreQuery query)
query
- The queryCopyright © 2021. All rights reserved.