|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openscience.cdk.pharmacophore.PharmacophoreUtils
@TestClass(value="org.openscience.cdk.pharmacophore.PharmacophoreUtilityTest") public class PharmacophoreUtils
Provides some utility methods for pharmacophore handling.
| Constructor Summary | |
|---|---|
PharmacophoreUtils()
|
|
| Method Summary | |
|---|---|
static List<PharmacophoreQuery> |
readPharmacophoreDefinitions(InputStream ins)
Read in a set of pharmacophore definitions to create pharmacophore queries. |
static List<PharmacophoreQuery> |
readPharmacophoreDefinitions(String filename)
Read in a set of pharmacophore definitions to create pharmacophore queries. |
static void |
writePharmacophoreDefinition(List<PharmacophoreQuery> queries,
OutputStream out)
Write out one or more pharmacophore queries in the CDK XML format. |
static void |
writePharmacophoreDefinition(PharmacophoreQuery[] queries,
OutputStream out)
Write out one or more pharmacophore queries in the CDK XML format. |
static void |
writePharmacophoreDefinition(PharmacophoreQuery query,
OutputStream out)
Write out one or more pharmacophore queries in the CDK XML format. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PharmacophoreUtils()
| Method Detail |
|---|
@TestMethod(value="testReadPcoreDef, testInvalidPcoreXML")
public static List<PharmacophoreQuery> readPharmacophoreDefinitions(String filename)
throws CDKException,
IOException
PharmacophoreQuery objects which can be used with
the PharmacophoreMatcher class.
The current schema for the document allows one to specify angle and distance
constraints. Currently the CDK does not support angle constraints, so they are
ignored.
The schema also specifies a units attribute for a given constraint. The
current reader ignores this and assumes that all distances are in Angstroms.
Finally, if there is a description associated with a pharmacophore definition, it is
available as the "description" property of the PharmacophoreQuery object.
Example usage is
Listdefs = readPharmacophoreDefinitions("mydefs.xml"); System.out.println("Number of definitions = "+defs.size()); for (int i = 0; i < defs.size(); i++) { System.out.println("Desc: "+defs.get(i).getProperty("description"); }
filename - The file to read the definitions from
PharmacophoreQuery objects
CDKException - if there is an error in the format
IOException - if there is an error in opening the filePharmacophoreQueryAtom,
PharmacophoreQueryBond,
PharmacophoreQuery,
PharmacophoreMatcher
@TestMethod(value="testReadPcoreDef, testReadPcoreAngleDef, testInvalidPcoreXML")
public static List<PharmacophoreQuery> readPharmacophoreDefinitions(InputStream ins)
throws IOException,
CDKException
PharmacophoreQuery objects which can be used with
the PharmacophoreMatcher class.
The current schema for the document allows one to specify angle and distance
constraints.
The schema also specifies a units attribute for a given constraint. The
current reader ignores this and assumes that all distances are in Angstroms and
angles are in degrees.
Finally, if there is a description associated with a pharmacophore definition, it is
available as the "description" property of the PharmacophoreQuery object.
Example usage is
Listdefs = readPharmacophoreDefinitions"mydefs.xml"); System.out.println("Number of definitions = "+defs.size()); for (int i = 0; i < defs.size(); i++) { System.out.println("Desc: "+defs.get(i).getProperty("description"); }
ins - The stream to read the definitions from
PharmacophoreQuery objects
CDKException - if there is an error in the format
IOException - if there is an error in opening the filePharmacophoreQueryAtom,
PharmacophoreQueryBond,
PharmacophoreMatcher,
PharmacophoreQuery
@TestMethod(value="testPCoreWrite")
public static void writePharmacophoreDefinition(PharmacophoreQuery query,
OutputStream out)
throws IOException
query - The pharmacophore queriesout - The OutputStream to write to
IOException - if there is a problem writing the XML document
@TestMethod(value="testPCoreWrite")
public static void writePharmacophoreDefinition(List<PharmacophoreQuery> queries,
OutputStream out)
throws IOException
queries - The pharmacophore queriesout - The OutputStream to write to
IOException - if there is a problem writing the XML document
@TestMethod(value="testPCoreWrite")
public static void writePharmacophoreDefinition(PharmacophoreQuery[] queries,
OutputStream out)
throws IOException
queries - The pharmacophore queriesout - The OutputStream to write to
IOException - if there is a problem writing the XML document
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||