Class PharmacophoreUtils
- java.lang.Object
-
- org.openscience.cdk.pharmacophore.PharmacophoreUtils
-
-
Constructor Summary
Constructors Constructor Description PharmacophoreUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
readPharmacophoreDefinitions
public static List<PharmacophoreQuery> readPharmacophoreDefinitions(String filename) throws CDKException, IOException
Read in a set of pharmacophore definitions to create pharmacophore queries. Pharmacophore queries can be saved in an XML format which is described XXX. The file can contain multiple definitions. This method will process all the definitions and return a list foPharmacophoreQuery
objects which can be used with thePharmacophoreMatcher
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 thePharmacophoreQuery
object. Example usage isList<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"); }
- Parameters:
filename
- The file to read the definitions from- Returns:
- A list of
PharmacophoreQuery
objects - Throws:
CDKException
- if there is an error in the formatIOException
- if there is an error in opening the file- See Also:
PharmacophoreQueryAtom
,PharmacophoreQueryBond
,PharmacophoreQuery
,PharmacophoreMatcher
-
readPharmacophoreDefinitions
public static List<PharmacophoreQuery> readPharmacophoreDefinitions(InputStream ins) throws IOException, CDKException
Read in a set of pharmacophore definitions to create pharmacophore queries. Pharmacophore queries can be saved in an XML format which is described XXX. The file can contain multiple definitions. This method will process all the definitions and return a list ofPharmacophoreQuery
objects which can be used with thePharmacophoreMatcher
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 thePharmacophoreQuery
object. Example usage isList<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"); }
- Parameters:
ins
- The stream to read the definitions from- Returns:
- A list of
PharmacophoreQuery
objects - Throws:
CDKException
- if there is an error in the formatIOException
- if there is an error in opening the file- See Also:
PharmacophoreQueryAtom
,PharmacophoreQueryBond
,PharmacophoreMatcher
,PharmacophoreQuery
-
writePharmacophoreDefinition
public static void writePharmacophoreDefinition(PharmacophoreQuery query, OutputStream out) throws IOException
Write out one or more pharmacophore queries in the CDK XML format.- Parameters:
query
- The pharmacophore queriesout
- The OutputStream to write to- Throws:
IOException
- if there is a problem writing the XML document
-
writePharmacophoreDefinition
public static void writePharmacophoreDefinition(List<PharmacophoreQuery> queries, OutputStream out) throws IOException
Write out one or more pharmacophore queries in the CDK XML format.- Parameters:
queries
- The pharmacophore queriesout
- The OutputStream to write to- Throws:
IOException
- if there is a problem writing the XML document
-
writePharmacophoreDefinition
public static void writePharmacophoreDefinition(PharmacophoreQuery[] queries, OutputStream out) throws IOException
Write out one or more pharmacophore queries in the CDK XML format.- Parameters:
queries
- The pharmacophore queriesout
- The OutputStream to write to- Throws:
IOException
- if there is a problem writing the XML document
-
-