![]() |
Rosetta
2020.46
|
#include <RestypeToRDMol.hh>
Public Member Functions | |
RestypeToRDMol (MutableResidueType const &res, bool neutralize=true, bool keep_hydro=false) | |
Convert ResidueType to an RDKit RWMol object. More... | |
VDIndexMapping const & | vd_to_index () const |
Return the corespondance from the input ResidueType VD to the RDKit atom index. More... | |
::RDKit::RWMOL_SPTR | Mol () |
Return an RDKit RWMol object which represents the residue type. More... | |
Private Member Functions | |
RestypeToRDMol () | |
Private Attributes | |
MutableResidueType const & | res_ |
bool | neutralize_ |
bool | keep_hydro_ |
VDIndexMapping | vd_to_index_ |
Mapping of restype vertex descriptors to indices of the rdkit object. More... | |
core::chemical::rdkit::RestypeToRDMol::RestypeToRDMol | ( | MutableResidueType const & | res, |
bool | neutralize = true , |
||
bool | keep_hydro = 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_, and neutralize_.
|
private |
RDKit::RWMOL_SPTR core::chemical::rdkit::RestypeToRDMol::Mol | ( | ) |
Return an RDKit RWMol object which represents the residue type.
References core::pose::motif::a(), core::chemical::MutableResidueType::all_atoms(), core::chemical::AROMATIC, core::chemical::MutableResidueType::atom(), core::chemical::MutableResidueType::atom_index(), core::chemical::MutableResidueType::bond(), core::chemical::Bond::bond_name(), core::chemical::AtomRefMapping< FromRef, ToRef >::clear(), core::chemical::rdkit::convert_to_rdkit_bondtype(), protocols::simple_filters::coords(), core::chemical::Atom::element_type(), core::chemical::Atom::formal_charge(), core::chemical::MutableResidueType::graph(), core::chemical::Atom::ideal_xyz(), core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_entry(), core::chemical::Atom::is_virtual(), keep_hydro_, core::chemical::Atom::name(), core::chemical::ResidueTypeBase::name(), neutralize_, core::chemical::rdkit::neutralize_rdmol(), core::chemical::Bond::order(), core::chemical::PseudoBondOrder, res_, core::chemical::rdkit::TR(), and vd_to_index_.
Referenced by protocols::drug_design::RDKitMetricsMover::add_scores_for_residue(), and protocols::drug_design::RDKitMetric::calculate().
|
inline |
Return the corespondance from the input ResidueType VD to the RDKit atom index.
References vd_to_index_.
|
private |
Referenced by Mol(), and RestypeToRDMol().
|
private |
Referenced by Mol(), and RestypeToRDMol().
|
private |
Referenced by Mol().
|
private |
Mapping of restype vertex descriptors to indices of the rdkit object.
Referenced by Mol(), and vd_to_index().