![]() |
RDKit
Open-source cheminformatics and machine learning.
|
#include <SynthonSpace.h>
Protected Member Functions | |
unsigned int | getMaxNumSynthons () const |
bool | hasFingerprints () const |
bool | hasAddAndSubstractFingerprints () const |
Synthon * | addSynthonToPool (const std::string &smiles) |
std::shared_ptr< SynthonSet > | addReactionToPool (const std::string &reactionName) |
Synthon * | getSynthonFromPool (const std::string &smiles) const |
Friends | |
class | SynthonSet |
class | SynthonSpaceSearcher |
class | SynthonSpaceFingerprintSearcher |
class | SynthonSpaceRascalSearcher |
Definition at line 123 of file SynthonSpace.h.
|
explicitdefault |
|
default |
|
delete |
|
protected |
|
protected |
void RDKit::SynthonSpaceSearch::SynthonSpace::buildSynthonFingerprints | ( | const FingerprintGenerator< std::uint64_t > & | fpGen | ) |
Create the fingerprints for the synthons ready for fingerprint searches. Will be done by the fingerprint search if not done ahead of time.
fpGen | a fingerprint generator of the appropriate type |
SearchResults RDKit::SynthonSpaceSearch::SynthonSpace::fingerprintSearch | ( | const ROMol & | query, |
const FingerprintGenerator< std::uint64_t > & | fpGen, | ||
const SynthonSpaceSearchParams & | params = SynthonSpaceSearchParams() |
||
) |
Perform a fingerprint similarity search with the given query molecule across the synthonspace library. Duplicate SMILES strings produced by different reactions will be returned.
query | : query molecule |
fpGen | a FingerprintGenerator object that will provide the fingerprints for the similarity calculation |
params | : (optional) settings for the search |
std::string RDKit::SynthonSpaceSearch::SynthonSpace::getInputFileName | ( | ) | const |
Definition at line 310 of file SynthonSpace.h.
std::uint64_t RDKit::SynthonSpaceSearch::SynthonSpace::getNumProducts | ( | ) | const |
Get the total number of products that the SynthonSpace could produce.
size_t RDKit::SynthonSpaceSearch::SynthonSpace::getNumReactions | ( | ) | const |
Get the number of different reactions in the SynthonSpace.
const std::shared_ptr< SynthonSet > RDKit::SynthonSpaceSearch::SynthonSpace::getReaction | ( | std::string | reactionName | ) |
std::vector< std::string > RDKit::SynthonSpaceSearch::SynthonSpace::getReactionNames | ( | ) | const |
Get a list of the names of all the reactions in the SynthonSpace.
|
inline |
Get the info string for the fingerprint generator used to generate the stored fingerprints, so the user can query with the same type.
Definition at line 170 of file SynthonSpace.h.
|
protected |
|
protected |
|
protected |
|
delete |
SearchResults RDKit::SynthonSpaceSearch::SynthonSpace::rascalSearch | ( | const ROMol & | query, |
const RascalMCES::RascalOptions & | rascalOptions, | ||
const SynthonSpaceSearchParams & | params = SynthonSpaceSearchParams() |
||
) |
query | : query molecule |
rascalOptions | RASCAL options. The similarityThreshold value in the rascalOptions will be used rather than params.similarityCutoff, but params.fragSimilarityAdjuster will be used to adjust the threshold for the fragment comparisons. |
params | : (optional) settings for the search |
void RDKit::SynthonSpaceSearch::SynthonSpace::readDBFile | ( | const std::string & | inFilename, |
int | numThreads = 1 |
||
) |
Reads from a binary DB File in our format.
inFilename | the name of the file to read. |
numThreads | number of threads to use in reading. If negative, adds the number to the number of hardware threads available. |
void RDKit::SynthonSpaceSearch::SynthonSpace::readTextFile | ( | const std::string & | inFilename, |
bool & | cancelled | ||
) |
inFilename | name of the file containing the synthon-based library. |
The original format is: all lines are tab-separated first line:SMILES synton_id synton# reaction_id Note the spelling "synton" from the original paper/example file. Subsequent lines have a single reagent e.g. OCC([U])=NN=[Np] 1-1 0 triazole-1 C1CCCC1N([Pu])[U] 2-1 1 triazole-1 CC1CCN(C1)C(=[Np])[Pu] 3-1 2 triazole-1
Other acceptable formats are as above, but with a 5th column "release": SMILES synton_id synton# reaction_id release
or a comma-separated equivalent of the first format: SMILES,synton_id,synton_role,reaction_id but with the 3rd column named differently but with the same meaning. The formatting of the first 2 formats has been relaxed such that any whitespace may be used as the field separator.
Attachment points are U, Np, Pu and Am for up to 4 synthons per reaction. A product is created by taking a synthon from each synton# value and combining by replacing matching trans-uranic elements and replacing them with a direct bond of the appropriate type. A more (for RDKit) conventional connection flag of isotope labelled dummy atoms is also accepted ([1*] etc.). Throws a std::runtime_error if it doesn't think the format is correct, which it does by checking that the first line is as above and subsequent lines have appropriate number of fields. If it receives a SIGINT, returns cancelled=true.
SearchResults RDKit::SynthonSpaceSearch::SynthonSpace::substructureSearch | ( | const GeneralizedSubstruct::ExtendedQueryMol & | query, |
const SubstructMatchParameters & | matchParams = SubstructMatchParameters() , |
||
const SynthonSpaceSearchParams & | params = SynthonSpaceSearchParams() |
||
) |
Perform a substructure search with the given generalized query molecule across the synthonspace library. Duplicate SMILES strings produced by different reactions will be returned.
query | : query molecule |
params | : (optional) settings for the search |
SearchResults RDKit::SynthonSpaceSearch::SynthonSpace::substructureSearch | ( | const ROMol & | query, |
const SubstructMatchParameters & | matchParams = SubstructMatchParameters() , |
||
const SynthonSpaceSearchParams & | params = SynthonSpaceSearchParams() |
||
) |
Perform a substructure search with the given query molecule across the synthonspace library. Duplicate SMILES strings produced by different reactions will be returned.
query | : query molecule |
params | : (optional) settings for the search |
void RDKit::SynthonSpaceSearch::SynthonSpace::summarise | ( | std::ostream & | os | ) |
Write a summary of the SynthonSpace to given stream.
os | stream |
Writes to a binary DB File in our format.
outFilename | the name of the file to write. |
void RDKit::SynthonSpaceSearch::SynthonSpace::writeEnumeratedFile | ( | const std::string & | outFilename | ) | const |
Writes the enumerated library to file in SMILES format (1 compound per line, SMILES name)
outFilename | name of the file to write |
|
friend |
Definition at line 124 of file SynthonSpace.h.
Definition at line 126 of file SynthonSpace.h.
Definition at line 127 of file SynthonSpace.h.
|
friend |
Definition at line 125 of file SynthonSpace.h.