Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Functions
util.cc File Reference

Utilities for interacting with the RDKit library. More...

#include <core/chemical/rdkit/util.hh>
#include <core/chemical/AtomRefMapping.hh>
#include <core/types.hh>
#include <utility/io/izstream.hh>
#include <utility/exit.hh>
#include <basic/Tracer.hh>
#include <rdkit/RDGeneral/utils.h>
#include <rdkit/GraphMol/FileParsers/MolSupplier.h>
#include <rdkit/ForceField/ForceField.h>
#include <rdkit/GraphMol/ForceFieldHelpers/MMFF/AtomTyper.h>
#include <rdkit/GraphMol/ForceFieldHelpers/MMFF/Builder.h>
#include <rdkit/GraphMol/ForceFieldHelpers/UFF/AtomTyper.h>
#include <rdkit/GraphMol/ForceFieldHelpers/UFF/Builder.h>
#include <rdkit/GraphMol/SmilesParse/SmilesWrite.h>
#include <rdkit/GraphMol/Substruct/SubstructMatch.h>
#include <rdkit/GraphMol/FMCS/FMCS.h>
#include <rdkit/GraphMol/SmilesParse/SmilesParse.h>
#include <rdkit/GraphMol/SmilesParse/SmartsWrite.h>
#include <rdkit/GraphMol/FileParsers/FileParsers.h>
#include <rdkit/GraphMol/Descriptors/MolDescriptors.h>
#include <rdkit/GraphMol/MolPickler.h>

Namespaces

 core
 A class for reading in the atom type properties.
 
 core::chemical
 
 core::chemical::rdkit
 

Functions

static basic::Tracer core::chemical::rdkit::TR ("core.chemical.rdkit.util")
 
static basic::Tracer core::chemical::rdkit::TR_RDKit ("RDKit")
 
void core::chemical::rdkit::initialize_rdkit_random (int seed)
 Initialize the RDKit random number generator. More...
 
void core::chemical::rdkit::initialize_rdkit_tracers ()
 Initialize the RDKit output levels with the Rosetta commandline settings. More...
 
::RDKit::Bond::BondType core::chemical::rdkit::convert_to_rdkit_bondtype (core::chemical::BondName bondtype)
 Convert a Rosetta BondName enum to an RDKit BondType value. More...
 
core::chemical::BondName core::chemical::rdkit::convert_from_rdkit_bondtype (::RDKit::Bond::BondType bondtype)
 Convert an RDKit BondType value to a Rosetta BondName enum. More...
 
std::string core::chemical::rdkit::get_name (::RDKit::ROMol const &mol)
 Get the name of the RDMol. More...
 
bool core::chemical::rdkit::has_physical_Hs (::RDKit::ROMol const &mol)
 Does the molecule have physical hydrogens? More...
 
bool core::chemical::rdkit::has_explicit_Hs (::RDKit::ROMol const &mol)
 Does the molecule have "explicit" (but not physical) hydrogens? More...
 
bool core::chemical::rdkit::has_implicit_Hs (::RDKit::ROMol const &mol)
 Does the molecule have implicit hydrogens? More...
 
::RDKit::ForceFieldOP core::chemical::rdkit::get_forcefield (::RDKit::ROMol &mol, int conf_num=-1)
 Load an RDKit forcefield. Will prefer MMFF, but will fall back to UFF. More...
 
void core::chemical::rdkit::softSanitize (::RDKit::RWMol &mol)
 Non strict sanitization, useful if working with molecules which aren't 100% acceptable by RDKit (e.g. protonation/kekulization issues) More...
 
void core::chemical::rdkit::remove_excess_protons (::RDKit::RWMol &rdmol)
 Remove any excess hydrogens, where "excess" is defined as any which contribute to a positive formal charge (Assumes a graph-hydrogen removed form.) More...
 
void core::chemical::rdkit::remove_most_charges (::RDKit::RWMol &rdmol)
 
void core::chemical::rdkit::apply_charge_transforms (::RDKit::RWMol &rdmol, ChargeTransformList const &transforms)
 Reset the charges on particular groups (Assumes a graph-hydrogen removed form.) More...
 
void core::chemical::rdkit::reprotonate_rdmol (::RDKit::RWMol &rdmol)
 Change the protonation state on an rdmol to match physiological pH. Will reset the molecule to an graph-explicit hydrogen form. More...
 
void core::chemical::rdkit::neutralize_rdmol (::RDKit::RWMol &rdmol, bool addHs=true)
 Remove any pH-dependent charges on the molecule If addHs is true, then the resultant molecule with have hydrogens added. If addHs is false, then the resultant molecule will be without hydrogens. More...
 
void core::chemical::rdkit::label_with_index (::RDKit::ROMol &rdmol, std::string const &index_prop)
 Label a molecule with it's index values (for find_mapping, later) More...
 
core::chemical::IndexIndexMapping core::chemical::rdkit::convert_match_vect_to_index_index_map (::RDKit::MatchVectType const &match_vect)
 Convert the MatchVectType to an IndexIndex map, going query->molecule Use -1 as the invalid value, as zero is a valid one. More...
 
core::chemical::IndexIndexMapping core::chemical::rdkit::find_mapping (::RDKit::ROMOL_SPTR from,::RDKit::ROMOL_SPTR to, std::string const &index_prop)
 Find a mapping from one RDMol to another. More...
 
void core::chemical::rdkit::load_sdf (std::string const &filename, utility::vector1< ::RDKit::ROMolOP > &mol_vector, bool removeHs)
 Load molecules from file and append them to mol_vector. More...
 
std::map< std::string,
std::string > 
core::chemical::rdkit::get_metric_names ()
 Return a set containing all the valid names for the rdkit_metric() function mapped to short descriptions. More...
 
core::Real core::chemical::rdkit::rdkit_metric (::RDKit::ROMol const &mol, std::string const &metric)
 Return the value of a given RDKit metric for the given mol. More...
 

Detailed Description

Utilities for interacting with the RDKit library.

Author
Rocco Moretti (rmore.nosp@m.ttia.nosp@m.se@gm.nosp@m.ail..nosp@m.com)