mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
* Function for converting text to db file. * Do search looping first on reactions, then on fragments. * Add lowMem mode so reactions are only read from database as required. * Move fragment fingerprint generation out of the inner loop. * Put positions of SynthonSets directly in DB file so no need to read the file on initialisation. * Update test binary file. * Fix SynthonSpace.summarise() for new loMem mode. * Extra bits in Python wrapper. * Correct docstring. * Compute pattern fingerprints ahead of search. * Put Synthons into hitsets. * First stage of re-factoring SynthonSpace. Synthons are highly duplicated in the SynthonSets, so are held centrally in a pool in SynthonSpace and just the pointers kept in the SynthonSets. The same Synthon, identified by SMILES string, can have multiple IDs in the SynthonSets so the ID is now held by the SynthonSet not the Synthon. * Second stage - moved the synthon FPs into the Synthon as well. * New binary file format. * Tidying and fix because Synthons are shared across SynthonSets. * Use shorter fingerprints for synthons. * Don't exit with a bad file. * Back out the fingeprint folding which made things worse. Don't copy the synthon molecules into the hit sets, just take a pointer. Put the fragments into the corresponding hit set, useful for debugging. * Change way hit names are made to the manner preferred by Enamine. * Only generate query connector regions once. * Do some of the connector region checking by SMILES. * Move where it gets the connector combinations so it's not done unnecessarily often. * Fix tests. * Don't make molecules for the connector combinations, a bitset is plenty. * Make a pool of fragment fingerprints to reduce the number in total. Use an upper bound on the Tanimoto Coeff to reduce need for full calculation. * Fix splitMolecule, which wasn't producing all possible fragments. * Take out old code. * Back to using unique_ptr for fragments. Abolish maxBondSplits option. Use the maximum number of synthons in the space to control the splitting. * Don't fold the reaction connector region fps into 1. * Streamline connector combinations in substructure search. * Re-factor fragment fingerprint generation prior to multi-threading. * Make checkConnectorRegions return false when it should. Tweak AllProbeBitsMatch.cpp. * Fix Python wrapper of text file reader. * More complex query shenanigans - amino acid this time. * More complex query shenanigans - amino acid this time. * Tidy. * Fix binary DB read bug. New Idorsia space file. * Correct/improve function documentation. * Tidying up. * Remove stray include. * Fix CI Tests. * Plug memory leak. Revise python timeout test. * Simplify way synthon searchMols are created. Previous method gave incorrect results sometimes hence new test. * Update idorsia space file. * Update idorsia test result. * Update idorsia test result. * Changes after first review. * Move getFormattedNumProducts to general function. * Stash working version with maps and mutex. * Working with sorted vectors rather than maps. Reading Text DB presumably slow. * Split out MemoryMappedFileReader.cpp. * Fix ReadDBFile in Python wrapper. * Streamline tests. * Include filesystem. * Replace many uses of std::map with sorted std::vector. * Use more auto. * Threaded build hits. * Threaded search. * Don't chunk threaded buildAllHits. * Allow for different results in random sampling. * Threaded splitMolecule. Fix bug - apply removeQueryAtoms to all frags, not just one per unique SMILES. Do largest fragment heuristic up front so as not to repeat on each thread. * Streamline Python tests. * Separate out time-consuming tests. * Add Rascal similarity searching. * Add extended queries. * Make extended queries honour maxHits correctly. * Extra extended query test. * Hide really long tests on local files. * Remove local test. * Make random tests less strict. Attempt to fix build issues. * Attempt to fix build issues. * Response to review. * Fix no-threads version. * Re-move re-formatting. * Add move semantics to MemoryMappedFileReader. * Move c'tor needs size as well. --------- Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
//
|
|
// Copyright (C) David Cosgrove 2025.
|
|
//
|
|
// @@ All Rights Reserved @@
|
|
// This file is part of the RDKit.
|
|
// The contents are covered by the terms of the BSD license
|
|
// which is included in the file license.txt, found at the root
|
|
// of the RDKit source tree.
|
|
//
|
|
|
|
#ifndef MEMORYMAPPEDFILEREADER_H
|
|
#define MEMORYMAPPEDFILEREADER_H
|
|
|
|
#include <string>
|
|
|
|
#include <RDGeneral/export.h>
|
|
|
|
namespace RDKit::SynthonSpaceSearch::details
|
|
{
|
|
struct RDKIT_SYNTHONSPACESEARCH_EXPORT MemoryMappedFileReader
|
|
{
|
|
MemoryMappedFileReader() = delete;
|
|
MemoryMappedFileReader(const std::string& filePath);
|
|
MemoryMappedFileReader(const MemoryMappedFileReader&) = delete;
|
|
MemoryMappedFileReader(MemoryMappedFileReader&& other);
|
|
|
|
~MemoryMappedFileReader();
|
|
|
|
MemoryMappedFileReader& operator=(const MemoryMappedFileReader&) = delete;
|
|
MemoryMappedFileReader& operator=(MemoryMappedFileReader&& other);
|
|
|
|
char* d_mappedMemory{nullptr};
|
|
size_t d_size{0};
|
|
};
|
|
} // namespace RDKit::SynthonSpaceSearch::details
|
|
|
|
#endif // MEMORYMAPPEDFILEREADER_H
|