Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Functions
core::chemical::rdkit Namespace Reference

Classes

class  RDMolToRestype
 
class  RestypeToRDMol
 

Typedefs

typedef std::vector< std::pair
< ::RDKit::RWMolOP, int > > 
ChargeTransformList
 

Functions

static basic::Tracer TR ("core.chemical.rdkit.RDMolToRestype")
 
static basic::Tracer TR ("core.chemical.rdkit.RestypeToRDMol")
 
static basic::Tracer TR ("core.chemical.rdkit.util")
 
static basic::Tracer TR_RDKit ("RDKit")
 
void initialize_rdkit_random (int seed)
 Initialize the RDKit random number generator. More...
 
void initialize_rdkit_tracers ()
 Initialize the RDKit output levels with the Rosetta commandline settings. More...
 
::RDKit::Bond::BondType convert_to_rdkit_bondtype (core::chemical::BondName bondtype)
 Convert a Rosetta BondName enum to an RDKit BondType value. More...
 
core::chemical::BondName convert_from_rdkit_bondtype (::RDKit::Bond::BondType bondtype)
 Convert an RDKit BondType value to a Rosetta BondName enum. More...
 
std::string get_name (::RDKit::ROMol const &mol)
 Get the name of the RDMol. More...
 
bool has_physical_Hs (::RDKit::ROMol const &mol)
 Does the molecule have physical hydrogens? More...
 
bool has_explicit_Hs (::RDKit::ROMol const &mol)
 Does the molecule have "explicit" (but not physical) hydrogens? More...
 
bool has_implicit_Hs (::RDKit::ROMol const &mol)
 Does the molecule have implicit hydrogens? More...
 
::RDKit::ForceFieldOP get_forcefield (::RDKit::ROMol &mol, int conf_num=-1)
 Load an RDKit forcefield. Will prefer MMFF, but will fall back to UFF. More...
 
void 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 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 remove_most_charges (::RDKit::RWMol &rdmol)
 
void apply_charge_transforms (::RDKit::RWMol &rdmol, ChargeTransformList const &transforms)
 Reset the charges on particular groups (Assumes a graph-hydrogen removed form.) More...
 
void 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 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 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 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 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 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 > 
get_metric_names ()
 Return a set containing all the valid names for the rdkit_metric() function mapped to short descriptions. More...
 
core::Real rdkit_metric (::RDKit::ROMol const &mol, std::string const &metric)
 Return the value of a given RDKit metric for the given mol. More...
 

Typedef Documentation

typedef std::vector< std::pair< ::RDKit::RWMolOP, int > > core::chemical::rdkit::ChargeTransformList

Function Documentation

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.)

Referenced by neutralize_rdmol(), and reprotonate_rdmol().

core::chemical::BondName core::chemical::rdkit::convert_from_rdkit_bondtype ( ::RDKit::Bond::BondType  bondtype)
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.

Referenced by find_mapping().

RDKit::Bond::BondType core::chemical::rdkit::convert_to_rdkit_bondtype ( core::chemical::BondName  bondtype)
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.

Find a mapping from one RDMol to another If index_prop is found, it will be used (if present) as the starting index.

References core::chemical::combine(), convert_match_vect_to_index_index_map(), core::chemical::AtomRefMapping< FromRef, ToRef >::empty(), core::chemical::AtomRefMapping< FromRef, ToRef >::reverse(), and TR().

RDKit::ForceFieldOP core::chemical::rdkit::get_forcefield ( ::RDKit::ROMol &  mol,
int  conf_num 
)

Load an RDKit forcefield. Will prefer MMFF, but will fall back to UFF.

References TR().

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.

Referenced by protocols::drug_design::RDKitMetricsMover::add_scores_for_residue(), and protocols::drug_design::RDKitMetric::rdkit_metric().

std::string core::chemical::rdkit::get_name ( ::RDKit::ROMol const &  mol)
bool core::chemical::rdkit::has_explicit_Hs ( ::RDKit::ROMol const &  mol)

Does the molecule have "explicit" (but not physical) hydrogens?

bool core::chemical::rdkit::has_implicit_Hs ( ::RDKit::ROMol const &  mol)

Does the molecule have implicit hydrogens?

bool core::chemical::rdkit::has_physical_Hs ( ::RDKit::ROMol const &  mol)

Does the molecule have physical hydrogens?

void core::chemical::rdkit::initialize_rdkit_random ( int  seed)

Initialize the RDKit random number generator.

Note that seed is an int to match the seed generated in core/init.cc

References TR().

Referenced by core::init::init().

void core::chemical::rdkit::initialize_rdkit_tracers ( )

Initialize the RDKit output levels with the Rosetta commandline settings.

You can set the global RDKit output by controlling the "RDKit" tracer.

References TR_RDKit().

Referenced by core::init::init_tracers().

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)

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.

Load the structures from the given file into the provided vector Structures will be appended to the ones already in the vector.

References TR().

void core::chemical::rdkit::neutralize_rdmol ( ::RDKit::RWMol &  rdmol,
bool  addHs 
)

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.

References apply_charge_transforms(), remove_excess_protons(), remove_most_charges(), and softSanitize().

Referenced by core::chemical::rdkit::RestypeToRDMol::Mol().

core::Real core::chemical::rdkit::rdkit_metric ( ::RDKit::ROMol const &  mol,
std::string const &  metric 
)
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.)

References protocols::mean_field::min().

Referenced by neutralize_rdmol(), and reprotonate_rdmol().

void core::chemical::rdkit::remove_most_charges ( ::RDKit::RWMol &  rdmol)

Referenced by neutralize_rdmol().

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.

References apply_charge_transforms(), remove_excess_protons(), and softSanitize().

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)

Referenced by neutralize_rdmol(), and reprotonate_rdmol().

static basic::Tracer core::chemical::rdkit::TR ( "core.chemical.rdkit.util"  )
static
static basic::Tracer core::chemical::rdkit::TR ( "core.chemical.rdkit.RestypeToRDMol"  )
static
static basic::Tracer core::chemical::rdkit::TR ( "core.chemical.rdkit.RDMolToRestype"  )
static
static basic::Tracer core::chemical::rdkit::TR_RDKit ( "RDKit"  )
static