|
Rosetta
|
#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::Size > | atomIndexMap_Rd2Res_ |
| 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().
| core::chemical::rdkit::RestypeToRDMol::RestypeToRDMol | ( | MutableResidueType const & | res, |
| RestypeToRDMolOptions const & | options | ||
| ) |
References core::chemical::rdkit::RestypeToRDMolOptions::aro2double, aro2double_, core::chemical::rdkit::RestypeToRDMolOptions::keep_hydro, keep_hydro_, core::chemical::rdkit::RestypeToRDMolOptions::neutralize, neutralize_, core::chemical::rdkit::RestypeToRDMolOptions::noImplicitHs, noImplicitHs_, options_, core::chemical::rdkit::RestypeToRDMolOptions::sanitize, sanitize_, core::chemical::rdkit::RestypeToRDMolOptions::skipHs, and skipHs_.
|
private |
|
inline |
References atomIndexMap_Rd2Res_.
|
inline |
References index_to_vd_.
Referenced by protocols::ligand_docking::ga_ligand_dock::MCSAligner::apply().
| RDKit::RWMOL_SPTR core::chemical::rdkit::RestypeToRDMol::Mol | ( | ) |
Return an RDKit RWMol object which represents the residue type.
References core::chemical::MutableResidueType::all_atoms(), aro2double_, core::chemical::AROMATIC, core::chemical::MutableResidueType::atom(), core::chemical::MutableResidueType::atom_index(), atomIndexMap_Rd2Res_, 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::rdkit::final_neutralize(), core::chemical::Atom::formal_charge(), core::chemical::MutableResidueType::graph(), core::chemical::Atom::ideal_xyz(), index_to_vd_, 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(), noImplicitHs_, core::chemical::Bond::order(), core::chemical::PseudoBondOrder, res_, sanitize_, skipHs_, core::chemical::rdkit::TR(), and vd_to_index_.
Referenced by protocols::drug_design::RDKitMetricsMover::add_scores_for_residue(), protocols::drug_design::ReactionBasedAnalogSampler::apply(), protocols::drug_design::ReactionFragment::apply(), protocols::drug_design::ReactionGrow::apply(), protocols::drug_design::ReactionMultiTransform::apply(), protocols::drug_design::SubstituentReplace::apply(), protocols::drug_design::SubstructureReplace::apply(), protocols::ligand_docking::ga_ligand_dock::MCSAligner::apply(), protocols::drug_design::RDKitMetric::calculate(), protocols::drug_design::RDKitMetricFilter::compute(), protocols::drug_design::SAScoreFilter::compute(), protocols::rotamer_gen::RDKitRotamers::generate_conformers(), and protocols::ligand_evolution::FragmentLibrary::generate_rotamers().
|
inline |
Return the corespondance from the input ResidueType VD to the RDKit atom index.
References vd_to_index_.
Referenced by protocols::drug_design::ReactionBasedAnalogSampler::apply(), protocols::drug_design::ReactionFragment::apply(), protocols::drug_design::ReactionGrow::apply(), protocols::drug_design::ReactionMultiTransform::apply(), protocols::drug_design::SubstituentReplace::apply(), protocols::drug_design::SubstructureReplace::apply(), protocols::rotamer_gen::RDKitRotamers::generate_conformers(), and protocols::ligand_evolution::FragmentLibrary::generate_rotamers().
|
private |
Referenced by Mol(), and RestypeToRDMol().
|
private |
Referenced by get_atomIndexMap_Rd2Res(), and Mol().
|
private |
Referenced by index_to_vd(), and Mol().
|
private |
Referenced by Mol(), and RestypeToRDMol().
|
private |
Referenced by Mol(), and RestypeToRDMol().
|
private |
Referenced by Mol(), and RestypeToRDMol().
|
private |
Referenced by RestypeToRDMol().
|
private |
Referenced by Mol().
|
private |
Referenced by Mol(), and RestypeToRDMol().
|
private |
Referenced by Mol(), and RestypeToRDMol().
|
private |
Mapping of restype vertex descriptors to indices of the rdkit object.
Referenced by Mol(), and vd_to_index().