BALL
1.4.79
|
#include <BALL/FORMAT/molDB.h>
Classes | |
struct | VendorInfo |
Public Member Functions | |
int | getVersion () |
MolDB (String hostname, String user, String password, String db, int port=3306) | |
virtual | ~MolDB () |
void | getDatasetSummary (vector< String > &dataset_names, vector< Size > &no_isomers, vector< Size > &no_conformations) |
void | searchMoleculesByUCK (String uck, list< LongSize > &conformation_IDs) |
Molecule * | fetchMoleculeById (LongSize conformation_id) |
vector< Molecule * > | fetchMoleculeById (vector< LongSize > &conformation_ids) |
LongSize | storeMolecule (Molecule *mol, String *conformation_hash) |
LongSize | storeMolecule (Molecule *mol) |
void | deleteIsomer (LongSize isomer_id) |
void | deleteConformation (LongSize conformation_id) |
void | storeResult (Result *result, String &target_name) |
vector< Result * > | fetchResults (list< String > &conformation_hashs, String target_name="") |
void | searchMoleculesByLogP (const double &min_logP, const double &max_logP, list< LongSize > &conformation_IDs, const list< LongSize > *conformation_IDs_to_check, bool input_isomer_IDs=0, bool output_isomer_IDs=0) |
void | searchMoleculesByMW (const double &min_MW, const double &max_MW, list< LongSize > &conformation_IDs, const list< LongSize > *conformation_IDs_to_check, bool input_isomer_IDs, bool output_isomer_IDs) |
void | fetchDatasetConformationIDs (String &target_name, list< LongSize > &conformation_IDs, const list< LongSize > *conformation_IDs_to_check=0, bool input_isomer_IDs=0, bool output_isomer_IDs=0) |
void | searchSimilarMoleculesByFingerprint (list< vector< bool > > &query_fingerprints, const float &minimal_similarity, const float &maximal_similarity, list< LongSize > &conformation_IDs, const list< LongSize > *conformation_IDs_to_check=0, bool input_isomer_IDs=0, bool output_isomer_IDs=0) |
void | fetchVendorInformation (Molecule *mol, list< VendorInfo > &vendor_info) |
bool | hasResults () |
void | disableFunctionalGroupCounting () |
void | setVendorPropertyNames (String vendor_name, String vendors_compound_id_tag, bool fetch_vendorname_from_prop, String vendor_version, String url) |
Static Public Member Functions | |
static void | createNewDatabase (String &host, String &user, String &password, String &db_name, int port=0) |
static void | buildTopology (Molecule &mol, QByteArray &data) |
static void | getTopology (Molecule &mol, QDataStream &ds) |
static void | buildCoordinates (Molecule &mol, QByteArray &data) |
static void | getCoordinates (Molecule &mol, QDataStream &ds) |
static void | buildCharges (Molecule &mol, QByteArray &data) |
static void | getCharges (Molecule &mol, QDataStream &ds) |
Molecule database class.
This class is intended to store small molecules, information about them (fingerprint, smiles, etc.) and results of docking or (re-)scoring.
Topologies and conformations are stored separately in order to prevent waste of space. IDs will be automatically assigned to new topologies and conformations.
When a given molecule is to be stored in the database (by use of MolDB::storeMolecule()), it is automatically detected (by use of hash-keys for topologies and conformations) whether its topology and conformation need to be written to the database or whether they already exists in the database. This way, waste of disk space is automatically prevented.
Furthermore, all Properties of a given molecule will also be saved and will be restored when retrieving the molecule later.
Additionally, the following things that can be used for searching molecules later will be automatically calculated and stored in the database: – molecular weight – canonical smile (if OpenEye or OpenBabel is available) – logP (if OpenEye or OpenBabel is available; needed for SMARTS matching) – binary pathway-based fingerprint – functional group counts (if OpenEye or OpenBabel is available; needed for SMARTS matching).
Information about docking or (re-)scoring can be stored by use MolDB::storeResult() and retrieved later by MolDB::fetchResults().
Create MolDB instance with database connection parameters.
hostname | |
username | |
password | |
dbname |
|
virtual |
|
static |
Reconstruct molecule charges from binary data.
target | molecule for building charges |
binary | data fetched from database |
|
static |
Reconstruct molecule conformation from binary data.
target | molecule for building conformation |
binary | data fetched from database |
|
static |
Reconstruct molecule topology from binary data.
target | molecule for building topology |
binary | data fetched from database |
|
static |
void BALL::MolDB::deleteConformation | ( | LongSize | conformation_id | ) |
void BALL::MolDB::deleteIsomer | ( | LongSize | isomer_id | ) |
void BALL::MolDB::disableFunctionalGroupCounting | ( | ) |
Disable creation/filling of table 'functional_groups' during molecule import.
void BALL::MolDB::fetchDatasetConformationIDs | ( | String & | target_name, |
list< LongSize > & | conformation_IDs, | ||
const list< LongSize > * | conformation_IDs_to_check = 0 , |
||
bool | input_isomer_IDs = 0 , |
||
bool | output_isomer_IDs = 0 |
||
) |
Fetch all conformation-IDs for a given target.
vector<Result*> BALL::MolDB::fetchResults | ( | list< String > & | conformation_hashs, |
String | target_name = "" |
||
) |
void BALL::MolDB::fetchVendorInformation | ( | Molecule * | mol, |
list< VendorInfo > & | vendor_info | ||
) |
Search for vendors for the given compound.
mol | input compound |
vendor_info | vendor-information found for this compound will be stored here. |
|
static |
Encode the molecule charge data into binary data.
source | molecule for extracting charges |
binary | data stream to output data |
|
static |
Encode the molecule conformation into binary data.
source | molecule for extracting conformation |
binary | data stream to output data |
void BALL::MolDB::getDatasetSummary | ( | vector< String > & | dataset_names, |
vector< Size > & | no_isomers, | ||
vector< Size > & | no_conformations | ||
) |
Get a summary of all datasets currently stored in the data base.
dataset_names | the name of each dataset will be stored here |
no_isomers | the number of distinct isomers of each of the datasets |
no_conformations | the number of distinct conformations of each of the datasets |
|
static |
Encode the molecule topology into binary data.
source | molecule for extracting topology |
binary | data stream to output data |
int BALL::MolDB::getVersion | ( | ) |
Get version number of MolDB.
bool BALL::MolDB::hasResults | ( | ) |
Find out whether this database has a 'results' table or not. If it has such a table, the results of Docking/Scoring have been saved here.
void BALL::MolDB::searchMoleculesByLogP | ( | const double & | min_logP, |
const double & | max_logP, | ||
list< LongSize > & | conformation_IDs, | ||
const list< LongSize > * | conformation_IDs_to_check, | ||
bool | input_isomer_IDs = 0 , |
||
bool | output_isomer_IDs = 0 |
||
) |
Filter database according to specified logP thresholds.
void BALL::MolDB::searchMoleculesByMW | ( | const double & | min_MW, |
const double & | max_MW, | ||
list< LongSize > & | conformation_IDs, | ||
const list< LongSize > * | conformation_IDs_to_check, | ||
bool | input_isomer_IDs, | ||
bool | output_isomer_IDs | ||
) |
Filter database according to specified molecular weight thresholds.
void BALL::MolDB::searchSimilarMoleculesByFingerprint | ( | list< vector< bool > > & | query_fingerprints, |
const float & | minimal_similarity, | ||
const float & | maximal_similarity, | ||
list< LongSize > & | conformation_IDs, | ||
const list< LongSize > * | conformation_IDs_to_check = 0 , |
||
bool | input_isomer_IDs = 0 , |
||
bool | output_isomer_IDs = 0 |
||
) |
Fetch all conformation-IDs for those molecules that have a tanimoto coefficient larger or equal than the given cutoff to at least one of the query fingerprints.
void BALL::MolDB::setVendorPropertyNames | ( | String | vendor_name, |
String | vendors_compound_id_tag, | ||
bool | fetch_vendorname_from_prop, | ||
String | vendor_version, | ||
String | url | ||
) |