MoleculeUtils Class Reference

#include <moleculeutils.h>

List of all members.

Static Public Member Functions

Input/Ouput utility functions
static void readMDLCtabBlock (Molecule &aMolecule, ifstream &inFile, bool genericAtomTypeFlag=false) throw ( CError )
static void readMDLHeaderBlock (Molecule &aMolecule, ifstream &inFile, string aName="COMMENT") throw ( CError )
static void readMDLNSDBlock (Molecule &aMolecule, ifstream &inFile) throw ( CError )
static void skipMDLEntry (Molecule &aMolecule, ifstream &inFile) throw ( CError )
static void writeMDLHeaderBlock (Molecule &aMolecule, ofstream &outFile)
static void writeMDLCtabBlock (Molecule &aMolecule, ofstream &outFile)
static void writeMDLNSDBlock (Molecule &aMolecule, ofstream &outFile)
static void writeKCF (Molecule &aMolecule, ofstream &outFile)
static void writeKCFNSDBlock (Molecule &aMolecule, ofstream &outFile)
static bool readKCFMolecule (KCFMolecule &aMolecule, ifstream &inFile) throw ( CError )
static void writeDOTGraph (Molecule &aMolecule, ofstream &outFile, bool perretabels=false)
Graph kernels related functions
static double moleculeKernel (Molecule *mol1, Molecule *mol2, double(*pt2AtomKernel)(Atom *, Atom *)=&atomKernelSymbol, double(*pt2BondKernel)(Bond *, Bond *)=&bondKernelType, int convergenceCondition=1000, int parameter2=1)
static double powerKernelUntilN (Molecule *mol1, Molecule *mol2, double(*pt2AtomKernel)(Atom *, Atom *), double(*pt2BondKernel)(Bond *, Bond *), int maxPower, int minLength=1) throw ( CError )
static double powerKernelOrderN (Molecule *mol1, Molecule *mol2, double(*pt2AtomKernel)(Atom *, Atom *), double(*pt2BondKernel)(Bond *, Bond *), int anOrder, int parameter2=1) throw ( CError )
static double powerKernelConverge (Molecule *mol1, Molecule *mol2, double(*pt2AtomKernel)(Atom *, Atom *), double(*pt2BondKernel)(Bond *, Bond *), int converge, int parameter2=1) throw ( CError )
static vector< vector< double > > * rlk (vector< vector< double > > *r, vector< vector< double > > *rwork, vector< vector< double > > *rstart, Molecule *mol1, Molecule *mol2, int convergenceCondition, int parameter2, double(*pt2AtomKernel)(Atom *, Atom *), double(*pt2BondKernel)(Bond *, Bond *), int depth)
static bool converge (vector< vector< double > > *r1, vector< vector< double > > *r2, Molecule *mol1, Molecule *mol2, int convergenceCondition)
static double atomKernelSymbol (Atom *a1, Atom *a2)
static double atomKernelMorganLabel (Atom *a1, Atom *a2)
static double atomKernelPerretLabel (Atom *a1, Atom *a2)
static double atomKernelPerretLabelExternalMatrix (Atom *a1, Atom *a2)
static double atomKernelExternalMatrix (Atom *a1, Atom *a2)
static double atomKernelLabel (Atom *a1, Atom *a2)
static double bondKernelType (Bond *b1, Bond *b2)
static double bondKernelPerretLabelStrict (Bond *b1, Bond *b2)
static double bondKernelPerretLabel (Bond *b1, Bond *b2)
static double bondKernelRotable (Bond *b1, Bond *b2)
3D kernels related functions
static double threeDkernel (Molecule *mol1, Molecule *mol2, double(*pt2AtomKernel)(Atom *, Atom *), double(*pt2BondKernel)(float, float, float), float edgeKernelParameter)
static double threeDedgeKernelRBF (float dist1, float dist2, float param)
static double threeDedgeKernelTriangle (float dist1, float dist2, float param)
Miscallenous utility functions
static string getRingString (Bond *aBond) throw ( CError )
static void describeMap (map< Atom *, float > *aMap)
static void substractSet (vector< Atom * > *full, vector< Atom * > *exclude, vector< Atom * > *result)
static bool atomVectorHas (vector< Atom * > *atomVector, Atom *anAtom)
static void mergeSet (vector< Atom * > *v1, vector< Atom * > *v2, vector< Atom * > *result)
static void mergeBondSet (vector< Bond * > *v1, vector< Bond * > *v2, vector< Bond * > *result)
static void selectRingMemberBonds (vector< Bond * > *v1, vector< Atom * > *a, vector< Bond * > *v2)


Detailed Description

static functions to be used to process molecules
Author:
Jean-Luc Perret


Member Function Documentation

static double MoleculeUtils::atomKernelExternalMatrix Atom a1,
Atom a2
[static]
 

atom kernel based on an external gram matrix. WARNING: the gram matrix must first be loaded using Elements::loadGramAtoms().

static double MoleculeUtils::atomKernelLabel Atom a1,
Atom a2
[static]
 

generic atom kernel label.

static double MoleculeUtils::atomKernelMorganLabel Atom a1,
Atom a2
[static]
 

atom kernel based on Morgan label. WARNING: labels must first be set.

static double MoleculeUtils::atomKernelPerretLabel Atom a1,
Atom a2
[static]
 

atom kernel based on Perret label.

static double MoleculeUtils::atomKernelPerretLabelExternalMatrix Atom a1,
Atom a2
[static]
 

atom kernel based on Perret label and external gram matrix.

static double MoleculeUtils::atomKernelSymbol Atom a1,
Atom a2
[static]
 

atom kernel based on atomic number.

static bool MoleculeUtils::atomVectorHas vector< Atom * > *  atomVector,
Atom anAtom
[static]
 

returns true if anAtom is present into the atomVector vector.

static double MoleculeUtils::bondKernelPerretLabel Bond b1,
Bond b2
[static]
 

bond kernel. returns 1 if two bonds have the same perretLabel. returns 0 if one bond is a cycle while the other is not. returns a weight is both bonds are cycles or non cycles.

static double MoleculeUtils::bondKernelPerretLabelStrict Bond b1,
Bond b2
[static]
 

bond kernel. returns 1 if two bonds have the same perretLabel, 0 otherwise.

static double MoleculeUtils::bondKernelRotable Bond b1,
Bond b2
[static]
 

bond kernel. Single bonds are rotable, others are not. Returns 1 if two bonds. are rotable or two bonds are non rotable, 0 if one of the bonds. is rotable and the other is not.

static double MoleculeUtils::bondKernelType Bond b1,
Bond b2
[static]
 

bond kernel. returns 1 if two bonds have the same type, 0 otherwise.

static bool MoleculeUtils::converge vector< vector< double > > *  r1,
vector< vector< double > > *  r2,
Molecule mol1,
Molecule mol2,
int  convergenceCondition
[static]
 

returns true if the marginalized kernel computation has converged according to a convergence condition.

static void MoleculeUtils::describeMap map< Atom *, float > *  aMap  )  [static]
 

NO DOCUMENTATION

static string MoleculeUtils::getRingString Bond aBond  )  throw ( CError ) [static]
 

returns a string with the ring membership of aBond.

static void MoleculeUtils::mergeBondSet vector< Bond * > *  v1,
vector< Bond * > *  v2,
vector< Bond * > *  result
[static]
 

merges two bonds sets.

static void MoleculeUtils::mergeSet vector< Atom * > *  v1,
vector< Atom * > *  v2,
vector< Atom * > *  result
[static]
 

helper function for Molecule::detextSSSR. the result vector is the concatenation of v1 and v2 without duplicates.

static double MoleculeUtils::moleculeKernel Molecule mol1,
Molecule mol2,
double(*)(Atom *, Atom *)  pt2AtomKernel = &atomKernelSymbol,
double(*)(Bond *, Bond *)  pt2BondKernel = &bondKernelType,
int  convergenceCondition = 1000,
int  parameter2 = 1
[static]
 

computes the marginalized graph kernel between two molecules. takes two molecules, a function pointer to the atom and the bond kernels and the convergence condition as parameter. WARNING: random walk parameters must first be set.

static double MoleculeUtils::powerKernelConverge Molecule mol1,
Molecule mol2,
double(*)(Atom *, Atom *)  pt2AtomKernel,
double(*)(Bond *, Bond *)  pt2BondKernel,
int  converge,
int  parameter2 = 1
throw ( CError ) [static]
 

returns the marginalized graph kernel value between two molecules using the product graph approach and the sum of matrix powers. The kernel computes the sum of the probabilities of infinite length paths, until the kernel value does not change by more than 1/converge.

static double MoleculeUtils::powerKernelOrderN Molecule mol1,
Molecule mol2,
double(*)(Atom *, Atom *)  pt2AtomKernel,
double(*)(Bond *, Bond *)  pt2BondKernel,
int  anOrder,
int  parameter2 = 1
throw ( CError ) [static]
 

returns the marginalized graph kernel value between two molecules using the product graph approach and the sum of matrix powers. The kernel computes the probabilities of finite length of length anOrder.

static double MoleculeUtils::powerKernelUntilN Molecule mol1,
Molecule mol2,
double(*)(Atom *, Atom *)  pt2AtomKernel,
double(*)(Bond *, Bond *)  pt2BondKernel,
int  maxPower,
int  minLength = 1
throw ( CError ) [static]
 

returns the marginalized graph kernel value between two molecules using the product graph approach and the sum of matrix powers. The kernel computes the sum of the probabilities of finite length paths, until order maxPower.

static bool MoleculeUtils::readKCFMolecule KCFMolecule aMolecule,
ifstream &  inFile
throw ( CError ) [static]
 

reads one molecule from a kcf file.

static void MoleculeUtils::readMDLCtabBlock Molecule aMolecule,
ifstream &  inFile,
bool  genericAtomTypeFlag = false
throw ( CError ) [static]
 

reads the ctab block of a stream (connection table), and adds atoms and bonds to aMolecule. if genericAtomTypeFlag is true then the atoms are not taken from the periodic table of elements, but are created from the label provided.

static void MoleculeUtils::readMDLHeaderBlock Molecule aMolecule,
ifstream &  inFile,
string  aName = "COMMENT"
throw ( CError ) [static]
 

reads the header block of a stream, and sets molecule name to the comment content or to aName if specified.

static void MoleculeUtils::readMDLNSDBlock Molecule aMolecule,
ifstream &  inFile
throw ( CError ) [static]
 

reads the non structural data block of a compound in a MDL SDfile. WARNING only data entry with a structure aLabel will be considered. entries missing the aLabel entry will be ignored.

static vector< vector<double> >* MoleculeUtils::rlk vector< vector< double > > *  r,
vector< vector< double > > *  rwork,
vector< vector< double > > *  rstart,
Molecule mol1,
Molecule mol2,
int  convergenceCondition,
int  parameter2,
double(*)(Atom *, Atom *)  pt2AtomKernel,
double(*)(Bond *, Bond *)  pt2BondKernel,
int  depth
[static]
 

computes the "rlk" term involved in the marginalized kernel computation.

static void MoleculeUtils::selectRingMemberBonds vector< Bond * > *  v1,
vector< Atom * > *  a,
vector< Bond * > *  v2
[static]
 

NO DOCUMENTATION

static void MoleculeUtils::skipMDLEntry Molecule aMolecule,
ifstream &  inFile
throw ( CError ) [static]
 

skips all lines until next entry.

static void MoleculeUtils::substractSet vector< Atom * > *  full,
vector< Atom * > *  exclude,
vector< Atom * > *  result
[static]
 

helper function for Molecule::detectSSSR. returns in result a vector containing atom pointer for atoms present in full but not in exclude.

static double MoleculeUtils::threeDedgeKernelRBF float  dist1,
float  dist2,
float  param
[static]
 

(3D) RBF edge kernel. param = bandwith.

static double MoleculeUtils::threeDedgeKernelTriangle float  dist1,
float  dist2,
float  param
[static]
 

(3D) triangular edge kernel. param = cut-off.

static double MoleculeUtils::threeDkernel Molecule mol1,
Molecule mol2,
double(*)(Atom *, Atom *)  pt2AtomKernel,
double(*)(float, float, float)  pt2BondKernel,
float  edgeKernelParameter
[static]
 

(3D) generic pharmacophore kernel between two molecules. defined for a choice of atom an edge kernels, and corresponding parameters.

static void MoleculeUtils::writeDOTGraph Molecule aMolecule,
ofstream &  outFile,
bool  perretabels = false
[static]
 

writes a graph in Graphviz's dot format.

static void MoleculeUtils::writeKCF Molecule aMolecule,
ofstream &  outFile
[static]
 

writes a molecule under the KCF format in the outFile stream

static void MoleculeUtils::writeKCFNSDBlock Molecule aMolecule,
ofstream &  outFile
[static]
 

writes the non structural data block to a stream, for aMolecule. this function writes all stringDescriptors, floatDescriptors and IntDescriptors of a molecule in appropriate KEGG KCF format.

static void MoleculeUtils::writeMDLCtabBlock Molecule aMolecule,
ofstream &  outFile
[static]
 

writes the ctab block to a stream (connection table), for aMolecule.

static void MoleculeUtils::writeMDLHeaderBlock Molecule aMolecule,
ofstream &  outFile
[static]
 

writes the header block to a stream, for aMolecule.

static void MoleculeUtils::writeMDLNSDBlock Molecule aMolecule,
ofstream &  outFile
[static]
 

writes the non structural data block to a stream, for aMolecule. this function writes all stringDescriptors, floatDescriptors and IntDescriptors of a molecule in appropriate MDL SD format.


The documentation for this class was generated from the following file:
Generated on Wed Nov 28 12:12:52 2007 for ChemCpp by  doxygen 1.4.6