11#ifndef RD_SCAFFOLDNETWORK_H
12#define RD_SCAFFOLDNETWORK_H
20#ifdef RDK_USE_BOOST_SERIALIZATION
23#include <boost/archive/text_oarchive.hpp>
24#include <boost/archive/text_iarchive.hpp>
25#include <boost/serialization/vector.hpp>
26#include <boost/serialization/shared_ptr.hpp>
27#include <boost/serialization/version.hpp>
60 std::vector<std::shared_ptr<ChemicalReaction>>
89#ifdef RDK_USE_BOOST_SERIALIZATION
91 friend class boost::serialization::access;
92 template <
class Archive>
93 void serialize(Archive &ar,
const unsigned int version) {
104 std::vector<unsigned>
106 std::vector<unsigned>
110#ifdef RDK_USE_BOOST_SERIALIZATION
112 std::stringstream iss(pkl);
113 boost::archive::text_iarchive ia(iss);
118 friend class boost::serialization::access;
119 template <
class Archive>
120 void serialize(Archive &ar,
const unsigned int version) {
156 ostr <<
"GenericBond";
159 ostr <<
"RemoveAttachment";
162 ostr <<
"Initialize";
174 <<
", type:" << e.
type <<
" )";
185#ifdef RDK_USE_BOOST_SERIALIZATION
187namespace serialization {
189struct version<
RDKit::ScaffoldNetwork::ScaffoldNetwork> {
190 BOOST_STATIC_CONSTANT(
int, value = 1);
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::Atom &at)
allows Atom objects to be dumped to streams
#define RDUNUSED_PARAM(x)
This is a class for storing and applying general chemical reactions.
#define RDKIT_SCAFFOLDNETWORK_EXPORT
ScaffoldNetwork createScaffoldNetwork(const T &mols, const ScaffoldNetworkParams ¶ms)
create a new ScaffoldNetwork for a set of molecules
void updateScaffoldNetwork(const T &mols, ScaffoldNetwork &network, const ScaffoldNetworkParams ¶ms)
update an existing ScaffoldNetwork using a set of molecules
@ Initialize
molecule -> flattened molecule
@ Fragment
molecule -> fragment
@ Generic
molecule -> generic molecule (all atoms are dummies)
@ RemoveAttachment
molecule -> molecule with no attachment points
@ GenericBond
molecule -> generic bond molecule (all bonds single)
RDKIT_SCAFFOLDNETWORK_EXPORT ScaffoldNetworkParams getBRICSNetworkParams()
bool operator==(const RDKit::ScaffoldNetwork::NetworkEdge &o) const
NetworkEdge(size_t bi, size_t ei, EdgeType typ)
bool operator!=(const RDKit::ScaffoldNetwork::NetworkEdge &o) const
bool includeGenericBondScaffolds
include scaffolds with all bonds replaced by single bonds
bool includeNames
Include molecules names of the input molecules.
bool pruneBeforeFragmenting
Do a pruning/flattening step before starting fragmenting.
bool includeGenericScaffolds
include scaffolds with all atoms replaced by dummies
bool flattenKeepLargest
keep only the largest fragment when doing flattening
std::vector< std::shared_ptr< ChemicalReaction > > bondBreakersRxns
bool includeScaffoldsWithAttachments
Include the version of the scaffold with attachment points.
bool flattenIsotopes
remove isotopes when flattening
ScaffoldNetworkParams(const std::vector< std::string > &bondBreakersSmarts)
bool flattenChirality
remove chirality and bond stereo when flattening
bool keepOnlyFirstFragment
keep only the first fragment from the bond breaking rule
bool includeScaffoldsWithoutAttachments
remove attachment points from scaffolds and include the result
std::vector< NetworkEdge > edges
edges in the network
std::vector< unsigned > molCounts
number of molecules each scaffold was found in
std::vector< std::string > nodes
SMILES for the scaffolds.
std::vector< unsigned > counts
number of times each scaffold was encountered