Loading...
Searching...
No Matches
SynthonSpaceHitSet.h
Go to the documentation of this file.
//
// Copyright (C) David Cosgrove 2024.
//
// @@ 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 SYNTHONSPACEHITSET_H
#define SYNTHONSPACEHITSET_H
#include <numeric>
#include <string>
#include <vector>
#include <RDGeneral/export.h>
#include <GraphMol/ROMol.h>
#include <GraphMol/SynthonSpaceSearch/SynthonSet.h>
namespace RDKit::SynthonSpaceSearch {
// Holds the information about a set of hits. The molecules can be built
// by making all combinations of synthons, one taken from each synthon set.
// The synthons are copied from the SynthonSet so it is not needed to
// build the hits.
struct RDKIT_SYNTHONSPACESEARCH_EXPORT SynthonSpaceHitSet {
SynthonSpaceHitSet() = delete;
SynthonSpaceHitSet(const SynthonSet &reaction,
const std::vector<std::vector<size_t>> &stu,
const std::vector<std::unique_ptr<ROMol>> &fragSet);
SynthonSpaceHitSet(const SynthonSpaceHitSet &lhs) = delete;
SynthonSpaceHitSet(SynthonSpaceHitSet &&lhs) = delete;
virtual ~SynthonSpaceHitSet() = default;
SynthonSpaceHitSet &operator=(const SynthonSpaceHitSet &rhs) = delete;
SynthonSpaceHitSet &operator=(SynthonSpaceHitSet &&rhs) = delete;
const SynthonSet *d_reaction{nullptr};
// The outer vector of synthonsToUse is the size of the synthon lists
// in the reaction. So synthonsToUse[0] is all the synthons selected
// from reaction->synthons[0], likewise for synthonsToUse[1] etc.
// There should be at least one entry in each outer vector, but there
// may be different numbers in each.
std::vector<std::vector<std::pair<std::string, const Synthon *>>>
synthonsToUse;
size_t numHits{0};
// The fragments that this hitset is derived from, useful for debugging.
std::vector<const ROMol *> frags;
};
// This sub-class holds results from a SynthonSpaceFingerprintSearch.
// It needs pointers to the synthon fingerprints as well.
struct RDKIT_SYNTHONSPACESEARCH_EXPORT SynthonSpaceFPHitSet
: SynthonSpaceHitSet {
SynthonSpaceFPHitSet() = delete;
SynthonSpaceFPHitSet(const SynthonSet &reaction,
const std::vector<std::vector<size_t>> &stu,
const std::vector<std::unique_ptr<ROMol>> &fragSet);
SynthonSpaceFPHitSet(const SynthonSpaceFPHitSet &lhs) = delete;
SynthonSpaceFPHitSet(SynthonSpaceFPHitSet &&lhs) = delete;
~SynthonSpaceFPHitSet() override = default;
SynthonSpaceFPHitSet &operator=(const SynthonSpaceFPHitSet &rhs) = delete;
SynthonSpaceFPHitSet &operator=(SynthonSpaceFPHitSet &&rhs) = delete;
std::vector<std::vector<ExplicitBitVect *>> synthonFPs;
ExplicitBitVect *addFP;
ExplicitBitVect *subtractFP;
};
} // namespace RDKit::SynthonSpaceSearch
#endif // SYNTHONSPACEHITSET_H
ROMol.h
Defines the primary molecule class ROMol as well as associated typedefs.
SynthonSet.h
ExplicitBitVect
a class for bit vectors that are densely occupied
Definition ExplicitBitVect.h:29
RDKit::SynthonSpaceSearch::SynthonSet
Definition SynthonSet.h:36
export.h
RDKIT_SYNTHONSPACESEARCH_EXPORT
#define RDKIT_SYNTHONSPACESEARCH_EXPORT
Definition export.h:585
RDKit::SynthonSpaceSearch
Definition MemoryMappedFileReader.h:19
RDKit::SynthonSpaceSearch::SynthonSpaceFPHitSet::SynthonSpaceFPHitSet
SynthonSpaceFPHitSet(const SynthonSet &reaction, const std::vector< std::vector< size_t > > &stu, const std::vector< std::unique_ptr< ROMol > > &fragSet)
RDKit::SynthonSpaceSearch::SynthonSpaceFPHitSet::SynthonSpaceFPHitSet
SynthonSpaceFPHitSet(SynthonSpaceFPHitSet &&lhs)=delete
RDKit::SynthonSpaceSearch::SynthonSpaceFPHitSet::synthonFPs
std::vector< std::vector< ExplicitBitVect * > > synthonFPs
Definition SynthonSpaceHitSet.h:65
RDKit::SynthonSpaceSearch::SynthonSpaceFPHitSet::SynthonSpaceFPHitSet
SynthonSpaceFPHitSet()=delete
RDKit::SynthonSpaceSearch::SynthonSpaceFPHitSet::operator=
SynthonSpaceFPHitSet & operator=(SynthonSpaceFPHitSet &&rhs)=delete
RDKit::SynthonSpaceSearch::SynthonSpaceFPHitSet::~SynthonSpaceFPHitSet
~SynthonSpaceFPHitSet() override=default
RDKit::SynthonSpaceSearch::SynthonSpaceFPHitSet::subtractFP
ExplicitBitVect * subtractFP
Definition SynthonSpaceHitSet.h:67
RDKit::SynthonSpaceSearch::SynthonSpaceFPHitSet::operator=
SynthonSpaceFPHitSet & operator=(const SynthonSpaceFPHitSet &rhs)=delete
RDKit::SynthonSpaceSearch::SynthonSpaceFPHitSet::SynthonSpaceFPHitSet
SynthonSpaceFPHitSet(const SynthonSpaceFPHitSet &lhs)=delete
RDKit::SynthonSpaceSearch::SynthonSpaceFPHitSet::addFP
ExplicitBitVect * addFP
Definition SynthonSpaceHitSet.h:66
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::synthonsToUse
std::vector< std::vector< std::pair< std::string, const Synthon * > > > synthonsToUse
Definition SynthonSpaceHitSet.h:45
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::SynthonSpaceHitSet
SynthonSpaceHitSet(const SynthonSet &reaction, const std::vector< std::vector< size_t > > &stu, const std::vector< std::unique_ptr< ROMol > > &fragSet)
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::numHits
size_t numHits
Definition SynthonSpaceHitSet.h:46
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::frags
std::vector< const ROMol * > frags
Definition SynthonSpaceHitSet.h:48
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::operator=
SynthonSpaceHitSet & operator=(const SynthonSpaceHitSet &rhs)=delete
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::d_reaction
const SynthonSet * d_reaction
Definition SynthonSpaceHitSet.h:38
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::SynthonSpaceHitSet
SynthonSpaceHitSet(const SynthonSpaceHitSet &lhs)=delete
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::SynthonSpaceHitSet
SynthonSpaceHitSet()=delete
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::~SynthonSpaceHitSet
virtual ~SynthonSpaceHitSet()=default
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::SynthonSpaceHitSet
SynthonSpaceHitSet(SynthonSpaceHitSet &&lhs)=delete
RDKit::SynthonSpaceSearch::SynthonSpaceHitSet::operator=
SynthonSpaceHitSet & operator=(SynthonSpaceHitSet &&rhs)=delete