Constructor and Description |
---|
PharmacophoreUtils() |
Modifier and Type | Method and Description |
---|---|
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.
|
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
List<PharmacophoreQuery> defs = 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 fromPharmacophoreQuery
objectsCDKException
- if there is an error in the formatIOException
- if there is an error in opening the filePharmacophoreQueryAtom
,
PharmacophoreQueryBond
,
PharmacophoreQuery
,
PharmacophoreMatcher
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
List<PharmacophoreQuery> defs = 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 fromPharmacophoreQuery
objectsCDKException
- if there is an error in the formatIOException
- if there is an error in opening the filePharmacophoreQueryAtom
,
PharmacophoreQueryBond
,
PharmacophoreMatcher
,
PharmacophoreQuery
public static void writePharmacophoreDefinition(PharmacophoreQuery query, OutputStream out) throws IOException
query
- The pharmacophore queriesout
- The OutputStream to write toIOException
- if there is a problem writing the XML documentpublic static void writePharmacophoreDefinition(List<PharmacophoreQuery> queries, OutputStream out) throws IOException
queries
- The pharmacophore queriesout
- The OutputStream to write toIOException
- if there is a problem writing the XML documentpublic static void writePharmacophoreDefinition(PharmacophoreQuery[] queries, OutputStream out) throws IOException
queries
- The pharmacophore queriesout
- The OutputStream to write toIOException
- if there is a problem writing the XML documentCopyright © 2018. All Rights Reserved.