![]() |
RDKit
Open-source cheminformatics and machine learning.
|
#include <SynthonSpace.h>
Protected Member Functions | |
| unsigned int | getMaxNumSynthons () const |
| unsigned int | getMaxNumConnectors () const |
| bool | hasFingerprints () const |
| bool | hasAddAndSubstractFingerprints () const |
| bool | getHasRingFormer () 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 |
| class | SynthonSpaceSubstructureSearcher |
Definition at line 134 of file SynthonSpace.h.
|
explicitdefault |
Referenced by operator=(), and SynthonSpace().
|
default |
|
delete |
References SynthonSpace().
|
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 |
| void RDKit::SynthonSpaceSearch::SynthonSpace::enumerateToStream | ( | std::ostream & | os | ) | const |
| void RDKit::SynthonSpaceSearch::SynthonSpace::fingerprintSearch | ( | const ROMol & | query, |
| const FingerprintGenerator< std::uint64_t > & | fpGen, | ||
| const SearchResultCallback & | callback, | ||
| 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. Search results are returned incrementally through the provided callback, which will receive at most toTryChunkSize sized lists of ROMols at a time, thereby reducing the amount of memory required to hold search results.
| query | : query molecule |
| fpGen | a FingerprintGenerator object that will provide the fingerprints for the similarity calculation |
| callback | user-provided callback receiving chunks of ROMols. |
| params | : (optional) settings for the search |
| 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 |
| unsigned int RDKit::SynthonSpaceSearch::SynthonSpace::getFPSize | ( | ) | const |
|
inlineprotected |
Definition at line 389 of file SynthonSpace.h.
| std::string RDKit::SynthonSpaceSearch::SynthonSpace::getInputFileName | ( | ) | const |
|
protected |
|
inlineprotected |
Definition at line 383 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.
| unsigned int RDKit::SynthonSpaceSearch::SynthonSpace::getPatternFPSize | ( | ) | const |
| 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 182 of file SynthonSpace.h.
|
protected |
|
protected |
|
protected |
|
delete |
References SynthonSpace().
| void RDKit::SynthonSpaceSearch::SynthonSpace::rascalSearch | ( | const ROMol & | query, |
| const RascalMCES::RascalOptions & | rascalOptions, | ||
| const SearchResultCallback & | callback, | ||
| const SynthonSpaceSearchParams & | params = SynthonSpaceSearchParams() ) |
| 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::readStream | ( | std::istream & | is, |
| bool & | cancelled ) |
| 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, but a tab is tried first so that a tab-separated file may have spaces in the columns.
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 |
| void RDKit::SynthonSpaceSearch::SynthonSpace::substructureSearch | ( | const ROMol & | query, |
| const SearchResultCallback & | callback, | ||
| 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. Search results are returned incrementally through the provided callback, which will receive at most toTryChunkSize sized lists of ROMols at a time, thereby reducing the amount of memory required to hold search results.
| query | : query molecule |
| callback | user-provided callback receiving chunks of ROMols. |
| 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 |
| void RDKit::SynthonSpaceSearch::SynthonSpace::writeDBFile | ( | const std::string & | outFilename | ) | const |
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 |
|
friend |
Definition at line 137 of file SynthonSpace.h.
References SynthonSpaceFingerprintSearcher.
Referenced by SynthonSpaceFingerprintSearcher.
|
friend |
Definition at line 138 of file SynthonSpace.h.
References SynthonSpaceRascalSearcher.
Referenced by SynthonSpaceRascalSearcher.
|
friend |
Definition at line 136 of file SynthonSpace.h.
References SynthonSpaceSearcher.
Referenced by SynthonSpaceSearcher.
|
friend |
Definition at line 139 of file SynthonSpace.h.
References SynthonSpaceSubstructureSearcher.
Referenced by SynthonSpaceSubstructureSearcher.