 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
18 #ifndef __RD_VALIDATE_H__
19 #define __RD_VALIDATE_H__
33 namespace MolStandardize {
42 const char *
what() const noexcept
override {
return d_msg.c_str(); };
43 const char *
message() const noexcept {
return what(); };
54 virtual std::vector<ValidationErrorInfo>
validate(
55 const ROMol &mol,
bool reportAllFailures)
const = 0;
69 const ROMol &mol,
bool reportAllFailures)
const override;
81 virtual void run(
const ROMol &mol,
bool reportAllFailures,
82 std::vector<ValidationErrorInfo> &errors)
const = 0;
83 virtual boost::shared_ptr<MolVSValidations>
copy()
const = 0;
91 void run(
const ROMol &mol,
bool reportAllFailures,
92 std::vector<ValidationErrorInfo> &errors)
const override;
95 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
96 return boost::make_shared<NoAtomValidation>(*
this);
105 std::vector<ValidationErrorInfo> &errors)
const override;
108 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
109 return boost::make_shared<FragmentValidation>(*
this);
118 std::vector<ValidationErrorInfo> &errors)
const override;
121 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
122 return boost::make_shared<NeutralValidation>(*
this);
131 std::vector<ValidationErrorInfo> &errors)
const override;
134 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
135 return boost::make_shared<IsotopeValidation>(*
this);
148 const std::vector<boost::shared_ptr<MolVSValidations>> validations);
153 const ROMol &mol,
bool reportAllFailures)
const override;
156 std::vector<boost::shared_ptr<MolVSValidations>> d_validations;
166 : d_allowedList(atoms){};
168 const ROMol &mol,
bool reportAllFailures)
const override;
171 std::vector<std::shared_ptr<Atom>> d_allowedList;
181 : d_disallowedList(atoms){};
183 const ROMol &mol,
bool reportAllFailures)
const override;
186 std::vector<std::shared_ptr<Atom>> d_disallowedList;
191 const std::string &smiles);
#define BOOST_LOG(__arg__)
RDKIT_MOLSTANDARDIZE_EXPORT std::vector< ValidationErrorInfo > validateSmiles(const std::string &smiles)
A convenience function for quickly validating a single SMILES string.
AllowedAtomsValidation(const std::vector< std::shared_ptr< Atom >> &atoms)
Defines the primary molecule class ROMol as well as associated typedefs.
void run(const ROMol &mol, bool reportAllFailures, std::vector< ValidationErrorInfo > &errors) const override
void run(const ROMol &mol, bool reportAllFailures, std::vector< ValidationErrorInfo > &errors) const override
virtual void run(const ROMol &mol, bool reportAllFailures, std::vector< ValidationErrorInfo > &errors) const =0
virtual boost::shared_ptr< MolVSValidations > copy() const override
The RDKitValidation class throws an error when there are no atoms in the.
virtual boost::shared_ptr< MolVSValidations > copy() const =0
void run(const ROMol &mol, bool reportAllFailures, std::vector< ValidationErrorInfo > &errors) const override
The NoAtomValidation class throws an error if no atoms are present in the.
The ValidationMethod class is the abstract base class upon which all the.
Defines the Atom class and associated typedefs.
The IsotopeValidation class logs if molecule contains isotopes.
DisallowedAtomsValidation(const std::vector< std::shared_ptr< Atom >> &atoms)
pulls in the core RDKit functionality
virtual boost::shared_ptr< MolVSValidations > copy() const override
ValidationErrorInfo(const std::string &msg)
const char * message() const noexcept
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
const char * what() const noexcept override
MolVSValidation(const std::vector< boost::shared_ptr< MolVSValidations >> validations)
overloaded constructor to take in a user-defined list of MolVSValidations
~ValidationErrorInfo() noexcept
The MolVSValidation class can be used to perform all MolVSValidions.
RDKIT_RDGENERAL_EXPORT std::shared_ptr< boost::logging::rdLogger > rdInfoLog
The NeutralValidation class logs if not an overall neutral system.
The MolVSValidations class includes most of the same validations as.
MolVSValidation(const MolVSValidation &other)
virtual std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const =0
The ValidationErrorInfo class is used to store the information returned by a.
void run(const ROMol &mol, bool reportAllFailures, std::vector< ValidationErrorInfo > &errors) const override
virtual boost::shared_ptr< MolVSValidations > copy() const override
The FragmentValidation class logs if certain fragments are present.
#define RDKIT_MOLSTANDARDIZE_EXPORT
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
virtual boost::shared_ptr< MolVSValidations > copy() const override
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override