34namespace MolStandardize {
47 virtual std::vector<ValidationErrorInfo>
validate(
48 const ROMol &mol,
bool reportAllFailures)
const = 0;
49 virtual std::shared_ptr<ValidationMethod>
copy()
const = 0;
57 const std::vector<std::shared_ptr<ValidationMethod>> & validations)
58 : validations(validations) {};
61 const ROMol &mol,
bool reportAllFailures)
const override;
63 std::shared_ptr<ValidationMethod>
copy()
const override {
64 return std::make_shared<CompositeValidation>(*
this);
68 std::vector<std::shared_ptr<ValidationMethod>> validations;
82 const ROMol &mol,
bool reportAllFailures)
const override;
84 std::shared_ptr<ValidationMethod>
copy()
const override {
85 return std::make_shared<RDKitValidation>(*
this);
98 const ROMol &mol,
bool reportAllFailures)
const override;
100 std::shared_ptr<ValidationMethod>
copy()
const override {
101 return std::make_shared<NoAtomValidation>(*
this);
109 const ROMol &mol,
bool reportAllFailures)
const override;
111 std::shared_ptr<ValidationMethod>
copy()
const override {
112 return std::make_shared<FragmentValidation>(*
this);
120 const ROMol &mol,
bool reportAllFailures)
const override;
122 std::shared_ptr<ValidationMethod>
copy()
const override {
123 return std::make_shared<NeutralValidation>(*
this);
131 const ROMol &mol,
bool reportAllFailures)
const override;
133 std::shared_ptr<ValidationMethod>
copy()
const override {
134 return std::make_shared<IsotopeValidation>(*
this);
149 const std::vector<std::shared_ptr<ValidationMethod>> & validations);
151 std::shared_ptr<ValidationMethod>
copy()
const override {
152 return std::make_shared<MolVSValidation>(*
this);
163 : d_allowedList(std::move(atoms)) {}
165 const ROMol &mol,
bool reportAllFailures)
const override;
167 std::shared_ptr<ValidationMethod>
copy()
const override {
168 return std::make_shared<AllowedAtomsValidation>(*
this);
172 std::vector<std::shared_ptr<Atom>> d_allowedList;
182 : d_disallowedList(std::move(atoms)) {}
184 const ROMol &mol,
bool reportAllFailures)
const override;
186 std::shared_ptr<ValidationMethod>
copy()
const override {
187 return std::make_shared<DisallowedAtomsValidation>(*
this);
191 std::vector<std::shared_ptr<Atom>> d_disallowedList;
196 const std::string &smiles);
Defines the Atom class and associated typedefs.
pulls in the core RDKit functionality
Defines the primary molecule class ROMol as well as associated typedefs.
AllowedAtomsValidation(std::vector< std::shared_ptr< Atom > > atoms)
std::shared_ptr< ValidationMethod > copy() const override
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
The CompositeValidation class provides a simple way to apply a collection of.
std::shared_ptr< ValidationMethod > copy() const override
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
CompositeValidation(const std::vector< std::shared_ptr< ValidationMethod > > &validations)
DisallowedAtomsValidation(std::vector< std::shared_ptr< Atom > > atoms)
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
std::shared_ptr< ValidationMethod > copy() const override
The FragmentValidation class logs if certain fragments are present.
std::shared_ptr< ValidationMethod > copy() const override
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
The IsotopeValidation class logs if molecule contains isotopes.
std::shared_ptr< ValidationMethod > copy() const override
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
MolVSValidation(const std::vector< std::shared_ptr< ValidationMethod > > &validations)
overloaded constructor to take in a user-defined list of ValidationMethod
std::shared_ptr< ValidationMethod > copy() const override
The NeutralValidation class logs if not an overall neutral system.
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
std::shared_ptr< ValidationMethod > copy() const override
std::shared_ptr< ValidationMethod > copy() const override
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const override
std::shared_ptr< ValidationMethod > copy() const override
virtual std::shared_ptr< ValidationMethod > copy() const =0
virtual std::vector< ValidationErrorInfo > validate(const ROMol &mol, bool reportAllFailures) const =0
virtual ~ValidationMethod()=default
ValidationMethod()=default
#define RDKIT_MOLSTANDARDIZE_EXPORT
RDKIT_MOLSTANDARDIZE_EXPORT std::vector< ValidationErrorInfo > validateSmiles(const std::string &smiles)
A convenience function for quickly validating a single SMILES string.
std::string ValidationErrorInfo