18 #ifndef __RD_VALIDATE_H__ 19 #define __RD_VALIDATE_H__ 33 namespace MolStandardize {
42 const char *
message()
const {
return d_msg.c_str(); };
53 virtual std::vector<ValidationErrorInfo> validate(
54 const ROMol &mol,
bool reportAllFailures)
const = 0;
67 std::vector<ValidationErrorInfo> validate(
68 const ROMol &mol,
bool reportAllFailures)
const override;
80 virtual void run(
const ROMol &mol,
bool reportAllFailures,
81 std::vector<ValidationErrorInfo> &errors)
const = 0;
82 virtual boost::shared_ptr<MolVSValidations> copy()
const = 0;
89 void run(
const ROMol &mol,
bool reportAllFailures,
90 std::vector<ValidationErrorInfo> &errors)
const override;
93 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
94 return boost::make_shared<NoAtomValidation>(*this);
101 void run(
const ROMol &mol,
bool reportAllFailures,
102 std::vector<ValidationErrorInfo> &errors)
const override;
105 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
106 return boost::make_shared<FragmentValidation>(*this);
113 void run(
const ROMol &mol,
bool reportAllFailures,
114 std::vector<ValidationErrorInfo> &errors)
const override;
117 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
118 return boost::make_shared<NeutralValidation>(*this);
125 void run(
const ROMol &mol,
bool reportAllFailures,
126 std::vector<ValidationErrorInfo> &errors)
const override;
129 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
130 return boost::make_shared<IsotopeValidation>(*this);
143 const std::vector<boost::shared_ptr<MolVSValidations>> validations);
147 std::vector<ValidationErrorInfo> validate(
148 const ROMol &mol,
bool reportAllFailures)
const override;
151 std::vector<boost::shared_ptr<MolVSValidations>> d_validations;
161 : d_allowedList(atoms){};
162 std::vector<ValidationErrorInfo> validate(
163 const ROMol &mol,
bool reportAllFailures)
const override;
166 std::vector<std::shared_ptr<Atom>> d_allowedList;
176 : d_disallowedList(atoms){};
177 std::vector<ValidationErrorInfo> validate(
178 const ROMol &mol,
bool reportAllFailures)
const override;
181 std::vector<std::shared_ptr<Atom>> d_disallowedList;
186 const std::string &smiles);
#define BOOST_LOG(__arg__)
ValidationErrorInfo(const std::string &msg)
Defines the primary molecule class ROMol as well as associated typedefs.
The MolVSValidation class can be used to perform all MolVSValidions.
The ValidationMethod class is the abstract base class upon which all the.
The IsotopeValidation class logs if molecule contains isotopes.
virtual boost::shared_ptr< MolVSValidations > copy() const override
pulls in the core RDKit functionality
virtual boost::shared_ptr< MolVSValidations > copy() const override
The NeutralValidation class logs if not an overall neutral system.
AllowedAtomsValidation(const std::vector< std::shared_ptr< Atom >> &atoms)
RDKIT_MOLSTANDARDIZE_EXPORT std::vector< ValidationErrorInfo > validateSmiles(const std::string &smiles)
A convenience function for quickly validating a single SMILES string.
virtual boost::shared_ptr< MolVSValidations > copy() const override
The MolVSValidations class includes most of the same validations as.
The RDKitValidation class throws an error when there are no atoms in the.
The ValidationErrorInfo class is used to store the information returned by a.
The FragmentValidation class logs if certain fragments are present.
Defines the Atom class and associated typedefs.
The NoAtomValidation class throws an error if no atoms are present in the.
DisallowedAtomsValidation(const std::vector< std::shared_ptr< Atom >> &atoms)
const char * message() const
#define RDKIT_MOLSTANDARDIZE_EXPORT
RDKIT_RDGENERAL_EXPORT boost::logging::rdLogger * rdInfoLog
virtual boost::shared_ptr< MolVSValidations > copy() const override