Rosetta
Public Member Functions | Private Attributes | List of all members
protocols::drug_design::MoleculeSubstitution Class Reference

A class representing a substitution of a molecule from an original molecule through a pair of matched templates to a substituted molecule. More...

#include <substitution_support.hh>

Public Member Functions

 MoleculeSubstitution ()
 
 MoleculeSubstitution (::RDKit::ROMolOP mol)
 Construct a MoleculeSubstitution from an RDKit molecule (The source molecule.) More...
 
void add_template (::RDKit::ROMolOP templt, ::RDKit::MatchVectType const &pairings)
 Add a template to this MoleculeSubstitution. More...
 
::RDKit::MatchVectType make_match_vector () const
 Reconstitute the original pairings. This is a vector of pairs of (tdx, mdx) More...
 
core::chemical::IndexIndexMapping find_mdx_to_ndx_mapping () const
 Create a mapping from mdx to ndx. More...
 
MoleculeSubstitutionOP add_replacement (::RDKit::ROMolOP replacement, std::map< unsigned int, unsigned int > &r_to_t_mapping) const
 Make a new MoleculeSubstitution class with the replacement information. More...
 
void add_newmol (::RDKit::RWMolOP newmol)
 
::RDKit::ROMolOP get_romol (MoleculeSelection sele)
 
::RDKit::ROMolOP mol ()
 
::RDKit::ROMolOP templt ()
 
::RDKit::ROMolOP replace ()
 
::RDKit::RWMolOP newmol ()
 
AtomSubstitutionsubstitution_for_idx (MoleculeSelection sele, unsigned int idx)
 
AtomSubstitutionsubstitution_for_mdx (unsigned int idx)
 
AtomSubstitutionsubstitution_for_tdx (unsigned int idx)
 
AtomSubstitutionsubstitution_for_rdx (unsigned int idx)
 
bool tdx_is_dummy (unsigned int tdx) const
 
bool rdx_is_dummy (unsigned int rdx) const
 
utility::vector1< unsigned int > const & template_dummies () const
 The indexes for dummy atoms on the matching template. More...
 
utility::vector1< unsigned int > const & replace_dummies () const
 The indexes for dummy atoms on the replacement template. More...
 

Private Attributes

::RDKit::ROMolOP mol_
 
::RDKit::ROMolOP templt_
 
::RDKit::ROMolOP replace_
 
::RDKit::RWMolOP newmol_
 
std::map< unsigned int, AtomSubstitutionOPby_mdx_
 
std::map< unsigned int, AtomSubstitutionOPby_tdx_
 
std::map< unsigned int, AtomSubstitutionOPby_rdx_
 
utility::vector1< unsigned int > template_dummies_
 What idx's correspond to dummy atoms? More...
 
utility::vector1< unsigned int > replace_dummies_
 
utility::vector1< AtomSubstitutionOPatom_substitutions_
 Storage for the individual atom substitutions. More...
 

Detailed Description

A class representing a substitution of a molecule from an original molecule through a pair of matched templates to a substituted molecule.

The MoleculeSubstitution can be made progressively from molecule outwards. It should contain an indexed entry for each item in all four molecules (At least for those molecules which it's currently aware of.)

Constructor & Destructor Documentation

◆ MoleculeSubstitution() [1/2]

protocols::drug_design::MoleculeSubstitution::MoleculeSubstitution ( )
inline

◆ MoleculeSubstitution() [2/2]

protocols::drug_design::MoleculeSubstitution::MoleculeSubstitution ( ::RDKit::ROMolOP  mol)

Construct a MoleculeSubstitution from an RDKit molecule (The source molecule.)

References atom_substitutions_, by_mdx_, and mol().

Member Function Documentation

◆ add_newmol()

void protocols::drug_design::MoleculeSubstitution::add_newmol ( ::RDKit::RWMolOP  newmol)
inline

References newmol(), and newmol_.

◆ add_replacement()

MoleculeSubstitutionOP protocols::drug_design::MoleculeSubstitution::add_replacement ( ::RDKit::ROMolOP  replacement,
std::map< unsigned int, unsigned int > &  r_to_t_mapping 
) const

Make a new MoleculeSubstitution class with the replacement information.

Make a new AtomSubstitution class with the replacement information.

Assumes that the new (post-replacement) molecule hasn't been set.

References atom_substitutions_, protocols::drug_design::find_dummies(), mol_, template_dummies_, and templt_.

◆ add_template()

void protocols::drug_design::MoleculeSubstitution::add_template ( ::RDKit::ROMolOP  templt,
::RDKit::MatchVectType const &  pairings 
)

◆ find_mdx_to_ndx_mapping()

core::chemical::IndexIndexMapping protocols::drug_design::MoleculeSubstitution::find_mdx_to_ndx_mapping ( ) const

Create a mapping from mdx to ndx.

References atom_substitutions_, and protocols::drug_design::AtomSubstitution::invalid_index.

◆ get_romol()

RDKit::ROMolOP protocols::drug_design::MoleculeSubstitution::get_romol ( MoleculeSelection  sele)

◆ make_match_vector()

RDKit::MatchVectType protocols::drug_design::MoleculeSubstitution::make_match_vector ( ) const

Reconstitute the original pairings. This is a vector of pairs of (tdx, mdx)

References atom_substitutions_, and protocols::drug_design::AtomSubstitution::invalid_index.

◆ mol()

::RDKit::ROMolOP protocols::drug_design::MoleculeSubstitution::mol ( )
inline

References mol_.

Referenced by get_romol(), and MoleculeSubstitution().

◆ newmol()

::RDKit::RWMolOP protocols::drug_design::MoleculeSubstitution::newmol ( )
inline

◆ rdx_is_dummy()

bool protocols::drug_design::MoleculeSubstitution::rdx_is_dummy ( unsigned int  rdx) const

◆ replace()

::RDKit::ROMolOP protocols::drug_design::MoleculeSubstitution::replace ( )
inline

References replace_.

Referenced by get_romol().

◆ replace_dummies()

utility::vector1< unsigned int > const& protocols::drug_design::MoleculeSubstitution::replace_dummies ( ) const
inline

The indexes for dummy atoms on the replacement template.

References replace_dummies_.

◆ substitution_for_idx()

AtomSubstitution & protocols::drug_design::MoleculeSubstitution::substitution_for_idx ( MoleculeSelection  sele,
unsigned int  idx 
)

◆ substitution_for_mdx()

AtomSubstitution & protocols::drug_design::MoleculeSubstitution::substitution_for_mdx ( unsigned int  idx)

References by_mdx_.

Referenced by substitution_for_idx().

◆ substitution_for_rdx()

AtomSubstitution & protocols::drug_design::MoleculeSubstitution::substitution_for_rdx ( unsigned int  idx)

References by_rdx_.

Referenced by substitution_for_idx().

◆ substitution_for_tdx()

AtomSubstitution & protocols::drug_design::MoleculeSubstitution::substitution_for_tdx ( unsigned int  idx)

References by_tdx_.

Referenced by substitution_for_idx().

◆ tdx_is_dummy()

bool protocols::drug_design::MoleculeSubstitution::tdx_is_dummy ( unsigned int  tdx) const

◆ template_dummies()

utility::vector1< unsigned int > const& protocols::drug_design::MoleculeSubstitution::template_dummies ( ) const
inline

The indexes for dummy atoms on the matching template.

References template_dummies_.

◆ templt()

::RDKit::ROMolOP protocols::drug_design::MoleculeSubstitution::templt ( )
inline

References templt_.

Referenced by add_template(), and get_romol().

Member Data Documentation

◆ atom_substitutions_

utility::vector1< AtomSubstitutionOP > protocols::drug_design::MoleculeSubstitution::atom_substitutions_
private

Storage for the individual atom substitutions.

Referenced by add_replacement(), find_mdx_to_ndx_mapping(), make_match_vector(), and MoleculeSubstitution().

◆ by_mdx_

std::map< unsigned int, AtomSubstitutionOP > protocols::drug_design::MoleculeSubstitution::by_mdx_
private

◆ by_rdx_

std::map< unsigned int, AtomSubstitutionOP > protocols::drug_design::MoleculeSubstitution::by_rdx_
private

Referenced by substitution_for_rdx().

◆ by_tdx_

std::map< unsigned int, AtomSubstitutionOP > protocols::drug_design::MoleculeSubstitution::by_tdx_
private

◆ mol_

::RDKit::ROMolOP protocols::drug_design::MoleculeSubstitution::mol_
private

Referenced by add_replacement(), and mol().

◆ newmol_

::RDKit::RWMolOP protocols::drug_design::MoleculeSubstitution::newmol_
private

Referenced by add_newmol(), and newmol().

◆ replace_

::RDKit::ROMolOP protocols::drug_design::MoleculeSubstitution::replace_
private

Referenced by rdx_is_dummy(), and replace().

◆ replace_dummies_

utility::vector1< unsigned int > protocols::drug_design::MoleculeSubstitution::replace_dummies_
private

Referenced by replace_dummies().

◆ template_dummies_

utility::vector1< unsigned int > protocols::drug_design::MoleculeSubstitution::template_dummies_
private

What idx's correspond to dummy atoms?

Referenced by add_replacement(), add_template(), and template_dummies().

◆ templt_

::RDKit::ROMolOP protocols::drug_design::MoleculeSubstitution::templt_
private

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