Fragment.h
Go to the documentation of this file.
//
// Copyright (C) 2018 Susan H. Leung
//
// @@ 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.
//
#include <RDGeneral/export.h>
#ifndef RD_FRAGMENT_REMOVER_H
#define RD_FRAGMENT_REMOVER_H
#include <Catalogs/Catalog.h>
#include <GraphMol/MolStandardize/FragmentCatalog/FragmentCatalogEntry.h>
#include <GraphMol/MolStandardize/FragmentCatalog/FragmentCatalogParams.h>
#include <GraphMol/MolStandardize/MolStandardize.h>
namespace RDKit {
class ROMol;
namespace MolStandardize {
RDKIT_MOLSTANDARDIZE_EXPORT extern const CleanupParameters
defaultCleanupParameters;
typedef RDCatalog::HierarchCatalog<FragmentCatalogEntry, FragmentCatalogParams,
int>
FragmentCatalog;
class RDKIT_MOLSTANDARDIZE_EXPORT FragmentRemover {
public:
FragmentRemover();
FragmentRemover(const std::string fragmentFile, bool leave_last,
bool skip_if_all_match = false);
FragmentRemover(std::istream &fragmentStream, bool leave_last,
bool skip_if_all_match = false);
~FragmentRemover();
//! making FragmentRemover objects non-copyable
FragmentRemover(const FragmentRemover &other) = delete;
FragmentRemover &operator=(FragmentRemover const &) = delete;
ROMol *remove(const ROMol &mol);
private:
// Setting leave_last to True will ensure at least one fragment
// is left in the molecule, even if it is matched by a
// FragmentPattern
bool LEAVE_LAST;
// If set, this causes the original molecule to be returned
// if every fragment in it matches the salt list
bool SKIP_IF_ALL_MATCH;
FragmentCatalog *d_fcat;
}; // class FragmentRemover
class RDKIT_MOLSTANDARDIZE_EXPORT LargestFragmentChooser {
public:
// LargestFragmentChooser(){};
LargestFragmentChooser(bool prefer_organic = false)
: PREFER_ORGANIC(prefer_organic){};
LargestFragmentChooser(const LargestFragmentChooser &other);
~LargestFragmentChooser(){};
ROMol *choose(const ROMol &mol);
struct Largest {
Largest();
Largest(std::string &smiles, const boost::shared_ptr<ROMol> &fragment,
unsigned int &numatoms, double &weight, bool &organic);
std::string Smiles;
boost::shared_ptr<ROMol> Fragment;
unsigned int NumAtoms;
double Weight;
bool Organic;
};
private:
bool PREFER_ORGANIC;
}; // class LargestFragmentChooser
} // namespace MolStandardize
} // namespace RDKit
#endif
MolStandardize.h
RDKit::MolStandardize::FragmentCatalog
RDCatalog::HierarchCatalog< FragmentCatalogEntry, FragmentCatalogParams, int > FragmentCatalog
Definition: Fragment.h:29
FragmentCatalogParams.h
RDCatalog::HierarchCatalog
A Catalog with a hierarchical structure.
Definition: Catalog.h:135
Catalog.h
RDKit::ROMol
Definition: ROMol.h:171
RDKit::MolStandardize::LargestFragmentChooser::Largest::NumAtoms
unsigned int NumAtoms
Definition: Fragment.h:73
RDKit::MolStandardize::FragmentCatalogEntry
Definition: FragmentCatalogEntry.h:23
RDKit::MolStandardize::LargestFragmentChooser::Largest::Weight
double Weight
Definition: Fragment.h:74
RDKit::MolStandardize::LargestFragmentChooser::~LargestFragmentChooser
~LargestFragmentChooser()
Definition: Fragment.h:64
FragmentCatalogEntry.h
RDKit::MolStandardize::FragmentCatalogParams
Definition: FragmentCatalogParams.h:25
RDKit::MolStandardize::LargestFragmentChooser::LargestFragmentChooser
LargestFragmentChooser(bool prefer_organic=false)
Definition: Fragment.h:61
RDKit
Std stuff.
Definition: Atom.h:30
RDKit::MolStandardize::LargestFragmentChooser::Largest
Definition: Fragment.h:67
RDKit::MolStandardize::LargestFragmentChooser::Largest::Organic
bool Organic
Definition: Fragment.h:75
RDKit::MolStandardize::FragmentRemover
Definition: Fragment.h:31
RDKit::MolStandardize::LargestFragmentChooser::Largest::Smiles
std::string Smiles
Definition: Fragment.h:71
RDKit::MolStandardize::LargestFragmentChooser
Definition: Fragment.h:58
RDKIT_MOLSTANDARDIZE_EXPORT
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition: export.h:437
RDKit::MolStandardize::defaultCleanupParameters
const RDKIT_MOLSTANDARDIZE_EXPORT CleanupParameters defaultCleanupParameters
Definition: Fragment.h:25
RDKit::MolStandardize::LargestFragmentChooser::Largest::Fragment
boost::shared_ptr< ROMol > Fragment
Definition: Fragment.h:72
export.h