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;
90 void run(
const ROMol &mol,
bool reportAllFailures,
91 std::vector<ValidationErrorInfo> &errors)
const override;
94 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
95 return boost::make_shared<NoAtomValidation>(*this);
103 void run(
const ROMol &mol,
bool reportAllFailures,
104 std::vector<ValidationErrorInfo> &errors)
const override;
107 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
108 return boost::make_shared<FragmentValidation>(*this);
116 void run(
const ROMol &mol,
bool reportAllFailures,
117 std::vector<ValidationErrorInfo> &errors)
const override;
120 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
121 return boost::make_shared<NeutralValidation>(*this);
129 void run(
const ROMol &mol,
bool reportAllFailures,
130 std::vector<ValidationErrorInfo> &errors)
const override;
133 virtual boost::shared_ptr<MolVSValidations>
copy()
const override {
134 return boost::make_shared<IsotopeValidation>(*this);
147 const std::vector<boost::shared_ptr<MolVSValidations>> validations);
151 std::vector<ValidationErrorInfo> validate(
152 const ROMol &mol,
bool reportAllFailures)
const override;
155 std::vector<boost::shared_ptr<MolVSValidations>> d_validations;
165 : d_allowedList(atoms){};
166 std::vector<ValidationErrorInfo> validate(
167 const ROMol &mol,
bool reportAllFailures)
const override;
170 std::vector<std::shared_ptr<Atom>> d_allowedList;
180 : d_disallowedList(atoms){};
181 std::vector<ValidationErrorInfo> validate(
182 const ROMol &mol,
bool reportAllFailures)
const override;
185 std::vector<std::shared_ptr<Atom>> d_disallowedList;
190 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
RDKIT_RDGENERAL_EXPORT std::shared_ptr< boost::logging::rdLogger > rdInfoLog
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
virtual boost::shared_ptr< MolVSValidations > copy() const override