Rosetta
Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::chemical::rdkit::RestypeToRDMol Class Reference

#include <RestypeToRDMol.hh>

Public Member Functions

 RestypeToRDMol (MutableResidueType const &res, bool neutralize=true, bool keep_hydro=false, bool sanitize=true, bool noImplicitHs=false, bool skipHs=false)
 Convert ResidueType to an RDKit RWMol object. More...
 
 RestypeToRDMol (MutableResidueType const &res, RestypeToRDMolOptions const &options)
 
VDIndexMapping const & vd_to_index () const
 Return the corespondance from the input ResidueType VD to the RDKit atom index. More...
 
IndexVDMapping const & index_to_vd () const
 
std::map< core::Size, core::Size > const & get_atomIndexMap_Rd2Res () const
 
::RDKit::RWMOL_SPTR Mol ()
 Return an RDKit RWMol object which represents the residue type. More...
 

Private Member Functions

 RestypeToRDMol ()
 

Private Attributes

MutableResidueType const & res_
 
RestypeToRDMolOptions options_
 
bool neutralize_
 
bool keep_hydro_
 
bool sanitize_
 
bool noImplicitHs_
 
bool skipHs_
 
bool aro2double_ = false
 
VDIndexMapping vd_to_index_
 Mapping of restype vertex descriptors to indices of the rdkit object. More...
 
IndexVDMapping index_to_vd_
 
std::map< core::Size, core::SizeatomIndexMap_Rd2Res_
 

Constructor & Destructor Documentation

◆ RestypeToRDMol() [1/3]

core::chemical::rdkit::RestypeToRDMol::RestypeToRDMol ( MutableResidueType const &  res,
bool  neutralize = true,
bool  keep_hydro = false,
bool  sanitize = true,
bool  noImplicitHs = false,
bool  skipHs = false 
)

Convert ResidueType to an RDKit RWMol object.

If neutralize is true, attempt to reprotonate into a neutral (non-formally charged) molecule. (Charges due to heavy atoms, like quaternary amines, will still be present.)

If keep_hydro is true, represent hydrogens as physical atoms, rather than "explicit" annotations (see below).

Note that due to implementation details, "neutralize = true" will not play well with "keep_hydro = true".

RDKit is "aware" of three types of hydrogens.

1) Physical hydrogens: actual atoms in the atom graph and can have coordinates. 2) "Explicit" hydrogens: don't have existence in the atom graph or coordinates, but are instead represented by a field on the heavy atom ("This atom has 3 hydrogens attached to it") 3) "Implicit" hydrogens: aren't annotated anywhere, but instead are implied by the difference in the expected valence of the heavy atom and the number of valences which are currently occupied by bonds and/or "explicit" hydrogens.

Most of RDKit is written around the assumption of non-physical hydrogens, the exception being things like energy minimization which needs coordinates. On the other hand, "implicit" hydrogens cause issues in certain cases with kekulization. Because of this, the default conversion here is to remove the physical hydrogens, and replace them with "explicit" hydrogen annotations.

Much of RDKit (especially the metric calculations) assumes neutral protonation. (e.g. what you'd see in an aprotic organic solvent), which is why we neutralize the residues by default.

References keep_hydro_, neutralize_, sanitize_, and core::chemical::rdkit::TR().

◆ RestypeToRDMol() [2/3]

core::chemical::rdkit::RestypeToRDMol::RestypeToRDMol ( MutableResidueType const &  res,
RestypeToRDMolOptions const &  options 
)

◆ RestypeToRDMol() [3/3]

core::chemical::rdkit::RestypeToRDMol::RestypeToRDMol ( )
private

Member Function Documentation

◆ get_atomIndexMap_Rd2Res()

std::map<core::Size, core::Size> const& core::chemical::rdkit::RestypeToRDMol::get_atomIndexMap_Rd2Res ( ) const
inline

References atomIndexMap_Rd2Res_.

◆ index_to_vd()

IndexVDMapping const& core::chemical::rdkit::RestypeToRDMol::index_to_vd ( ) const
inline

◆ Mol()

RDKit::RWMOL_SPTR core::chemical::rdkit::RestypeToRDMol::Mol ( )

◆ vd_to_index()

VDIndexMapping const& core::chemical::rdkit::RestypeToRDMol::vd_to_index ( ) const
inline

Return the corespondance from the input ResidueType VD to the RDKit atom index.

References vd_to_index_.

Member Data Documentation

◆ aro2double_

bool core::chemical::rdkit::RestypeToRDMol::aro2double_ = false
private

Referenced by Mol(), and RestypeToRDMol().

◆ atomIndexMap_Rd2Res_

std::map<core::Size, core::Size> core::chemical::rdkit::RestypeToRDMol::atomIndexMap_Rd2Res_
private

Referenced by get_atomIndexMap_Rd2Res(), and Mol().

◆ index_to_vd_

IndexVDMapping core::chemical::rdkit::RestypeToRDMol::index_to_vd_
private

Referenced by index_to_vd(), and Mol().

◆ keep_hydro_

bool core::chemical::rdkit::RestypeToRDMol::keep_hydro_
private

Referenced by Mol(), and RestypeToRDMol().

◆ neutralize_

bool core::chemical::rdkit::RestypeToRDMol::neutralize_
private

Referenced by Mol(), and RestypeToRDMol().

◆ noImplicitHs_

bool core::chemical::rdkit::RestypeToRDMol::noImplicitHs_
private

Referenced by Mol(), and RestypeToRDMol().

◆ options_

RestypeToRDMolOptions core::chemical::rdkit::RestypeToRDMol::options_
private

Referenced by RestypeToRDMol().

◆ res_

MutableResidueType const& core::chemical::rdkit::RestypeToRDMol::res_
private

Referenced by Mol().

◆ sanitize_

bool core::chemical::rdkit::RestypeToRDMol::sanitize_
private

Referenced by Mol(), and RestypeToRDMol().

◆ skipHs_

bool core::chemical::rdkit::RestypeToRDMol::skipHs_
private

Referenced by Mol(), and RestypeToRDMol().

◆ vd_to_index_

VDIndexMapping core::chemical::rdkit::RestypeToRDMol::vd_to_index_
private

Mapping of restype vertex descriptors to indices of the rdkit object.

Referenced by Mol(), and vd_to_index().


The documentation for this class was generated from the following files: