10 #ifndef BALL_STRUCTURE_MOLECULARSIMILARITY_H
11 #define BALL_STRUCTURE_MOLECULARSIMILARITY_H
20 #ifdef BALL_HAS_OPENEYE
21 #include <oechem/mol.h>
22 #elif defined BALL_HAS_OPENBABEL
23 #include <openbabel/mol.h>
35 void generateFingerprints(
System&
molecules, vector<vector<Size> >& fingerprints);
37 void generateFingerprints(
const list<Molecule*>& molecules, vector<vector<Size> >& fingerprints);
39 void generateFingerprint(
Molecule& molecule, vector<Size>& fingerprint);
42 #ifdef BALL_HAS_OPENEYE
43 static OEChem::OEMol* createOEMol(
const Molecule& mol,
bool ignore_hydrogen=0);
45 void generateCanSmile(
const Molecule& molecule,
String& cansmile, OEChem::OEMol** output_oemol=0,
bool ignore_hydrogen=0);
47 void generateFingerprint(OEChem::OEMol& mol, vector<Size>& fingerprint);
48 #elif defined BALL_HAS_OPENBABEL
52 static OpenBabel::OBMol* createOBMol(
const Molecule& mol,
bool ignore_hydrogen=0,
bool suppress_warning=0);
55 static Molecule* createMolecule(OpenBabel::OBMol& obmol,
bool ignore_hydrogen=0);
57 void generateCanSmile(
const Molecule& mol,
String& cansmile, OpenBabel::OBMol** output_obmol=0,
bool ignore_hydrogen=0);
59 void generateFingerprint(OpenBabel::OBMol& mol, vector<Size>& fingerprint);
62 #if (defined BALL_HAS_OPENEYE | defined BALL_HAS_OPENBABEL)
65 void matchSmarts(
const String& usmile,
const String& smarts,
Size& no_matches,
Size max_matches=0);
68 void generatePathFingerprint(
Molecule& mol, vector<bool>& fingerprint);
71 float calculateSimilarity(vector<bool>& fingerprint1, vector<bool>& fingerprint2);
73 void filterRedundantMolecules(
const list<Molecule*>& molecules,
float similarity_threshold);
75 void filterRedundantMolecules(
System& molecules,
float similarity_threshold);
80 float calculateSimilarity(vector<Size>& fingerprint1, vector<Size>& fingerprint2, vector<float>* stddev);
83 const vector<String>& getFunctionalGroupNames();
96 void generatePathHash_(vector<Size>& path,
Size& hash);
98 bool generatePathFingerprint_(
const Atom* atom, std::vector<Size>& path, std::set<const Bond*>& path_bonds,
99 std::vector<bool>& fingerprint);
vector< String > smart_names_
BALL_EXPORT MoleculeList molecules(const AtomContainer &fragment, bool selected_only=false)
vector< vector< Size > > fingerprints_