#pragma once #include "rust/cxx.h" #include #include #include #include #include #include #include namespace RDKit { std::shared_ptr copy_mol(const std::shared_ptr &mol); std::shared_ptr smiles_to_mol(const std::string &smiles); rust::String mol_to_smiles(const std::shared_ptr &mol); rust::String mol_to_molblock(const std::shared_ptr &mol); std::shared_ptr smiles_to_mol_with_params(const std::string &smiles, const std::shared_ptr ¶ms); std::shared_ptr new_smiles_parser_params(); void smiles_parser_params_set_sanitize(const std::shared_ptr ¶ms, bool sanitize); bool smiles_parser_params_get_sanitize(const std::shared_ptr ¶ms); using MolSanitizeExceptionUniquePtr = std::unique_ptr; std::unique_ptr> detect_chemistry_problems(const std::shared_ptr &mol); rust::String mol_sanitize_exception_type(const MolSanitizeExceptionUniquePtr &mol_except); unsigned int atom_sanitize_exception_get_atom_idx(const MolSanitizeExceptionUniquePtr &mol_except); unsigned int get_num_atoms(const std::shared_ptr &mol, bool only_explicit); Atom &get_atom_with_idx(std::shared_ptr &mol, unsigned int idx); rust::String get_symbol(const Atom &atom); bool get_is_aromatic(const Atom &atom); int get_atomic_num(const Atom &atom); int get_formal_charge(const Atom &atom); unsigned int get_total_num_hs(const Atom &atom); unsigned int get_total_valence(const Atom &atom); void set_formal_charge(Atom &atom, int what); void set_num_explicit_hs(Atom &atom, int what); void atom_update_property_cache(Atom &atom, bool strict); using HybridizationType = Atom::HybridizationType; void atom_set_hybridization(Atom &atom, HybridizationType what); HybridizationType atom_get_hybridization(const Atom &atom); void ro_mol_update_property_cache(std::shared_ptr &mol, bool strict); void set_int_prop(Atom &atom, const std::string &key, int val); int get_int_prop(const Atom &atom, const std::string &key); void set_float_prop(Atom &atom, const std::string &key, double val); double get_float_prop(const Atom &atom, const std::string &key); void set_bool_prop(Atom &atom, const std::string &key, bool val); bool get_bool_prop(const Atom &atom, const std::string &key); void set_prop(Atom &atom, const std::string &key, const std::string &val); rust::String get_prop(const Atom &atom, const std::string &key); unsigned int get_num_radical_electrons(const Atom &atom); unsigned int get_degree(const Atom &atom); } // namespace RDKit