Rosetta
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
core::scoring::lDDT_Calculator Class Reference

Calculate the lDDT between the reference and the model. https://dx.doi.org/10.1093/bioinformatics/btt473 Uses the same defaults as https://swissmodel.expasy.org/lddt/ Not implemented is any consideration for stereochemical/bond/angle deviation penalties. More...

#include <lddt.hh>

Inheritance diagram for core::scoring::lDDT_Calculator:
Inheritance graph
[legend]

Classes

class  lDDT_Cache
 A class to handle caching the calculations for the lddt, to speed things. More...
 
struct  lDDT_Data
 A class to store information about the various statistic counts. More...
 

Public Member Functions

 lDDT_Calculator (PredicateCOP predicate=nullptr)
 Create an lDDR_Calculator The predicate indicates which atoms to operate over. The default is all heavy atoms. More...
 
void predicate (PredicateCOP predicate)
 Set the predicate for which atoms to consider The default is all heavy atoms. Note the default of considering alternate chemical states is (currently) incompatible with including hydrogen atoms, so it is recommended to turn that off with any predicate which includes (potentially equivalent) hydrogens. More...
 
void thresholds (utility::vector1< core::Real > const &setting)
 The distance similarity threasholds to use. The reported value will be an average of the lDDT for each individual threshold. More...
 
void R0 (core::Real val)
 The inclusion radius: the cutoff to determine which distances are "local". More...
 
void seqsep (core::Size ss)
 Only consider pairs if the polymeric sequence separation is seqsep or greater (different chains are infinite) This is different (one more) from the reference, to allow 0 to include distances within the same residue. More...
 
void ignore_oxt (bool setting)
 The default is to ignore any interactions with the OXT atom. More...
 
void consider_alt_states (bool setting)
 When doing the calculation, use exact matching of atoms (false), Or consider chemically-equivaleint (automorphic) states to get the best value. Turning this off will speed calculations where alternate states aren't relevant (e.g. Calpha or backbone-only) More...
 
core::Real operator() (core::pose::Pose const &ref, core::pose::Pose const &model) const
 Get the summary lDDT Assumes reference and model are the same length and match 1:1. More...
 
core::Real operator() (core::pose::Pose const &ref, core::pose::Pose const &model, std::map< core::Size, core::Size > const &res_map) const
 Get the summary lDDT, for the pairing specified in res_map. Only reference residues in res_map are considered for pairings. To include residues but set them unmatched, map them to zero. More...
 
utility::vector1< core::Realresidue_lDDT (core::pose::Pose const &ref, core::pose::Pose const &model) const
 Get the residue lDDTs, for all atoms in the pose Assumes reference and model are the same length and match 1:1. More...
 
void residue_lDDT (core::pose::Pose const &ref, core::pose::Pose const &model, std::map< core::Size, core::Size > const &res_map, std::map< core::Size, core::Real > &residue_lddt) const
 Get the residue lDDTs, for the pairing specified in res_map. Only reference residues in res_map are considered for pairings. To include residues but set them unmatched, map them to zero. The indicies for the returned residue_lddt are based on the reference structure. More...
 
std::map< core::id::AtomID, core::Realatom_lDDT (core::pose::Pose const &ref, core::pose::Pose const &model) const
 Get the atom lDDTs for all atoms in the poses Assumes reference and model are the same length and match 1:1 The atom IDs for the returned value are based on the reference structure. More...
 
void atom_lDDT (core::pose::Pose const &ref, core::pose::Pose const &model, std::map< core::Size, core::Size > const &res_map, std::map< core::id::AtomID, core::Real > &atom_lddt) const
 Get the atom lDDTs, for the residue pairings specified in res_map. Only reference residues in res_map are considered for pairings. To include residues but set them unmatched, map them to zero. The atom IDs for the returned atom_lddt value are based on the reference structure. More...
 
core::Real all_lDDT (core::pose::Pose const &ref, core::pose::Pose const &model, std::map< core::Size, core::Real > &residue_lddt, std::map< core::id::AtomID, core::Real > &atom_lddt) const
 Get all lDDT statistics (global, residue and atom) Assumes reference and model are the same length and match 1:1 The residue/atom IDs for the returned values are based on the reference structure. More...
 
core::Real all_lDDT (core::pose::Pose const &ref, core::pose::Pose const &model, std::map< core::Size, core::Size > const &res_map, std::map< core::Size, core::Real > &residue_lddt, std::map< core::id::AtomID, core::Real > &atom_lddt) const
 Get all lDDT statistics (global, residue and atom) Only reference residues in res_map are considered for pairings. To include residues but set them unmatched, map them to zero. The residue/atom IDs for the returned values are based on the reference structure. More...
 

Private Types

using lDDT_DataOP = utility::pointer::shared_ptr< lDDT_Data >
 

Private Member Functions

core::Real get_stats (core::pose::Pose const &ref, core::pose::Pose const &model, std::map< core::Size, core::Size > const &res_map, bool do_residue, std::map< core::Size, core::Real > &residue_stats, bool do_atomistic, std::map< core::id::AtomID, core::Real > &atom_stats) const
 Get the statistics, dispatching based on parameters. More...
 
utility::vector1< core::Sizedetermine_alt_states (core::pose::Pose const &ref, core::pose::Pose const &model, std::map< core::Size, core::Size > const &res_map, lDDT_Cache &cache) const
 Determine which states (from the cache) for each residue give the best overall lDDT. More...
 
core::Real get_stats_for_state (core::pose::Pose const &ref, core::pose::Pose const &model, std::map< core::Size, core::Size > const &res_map, utility::vector1< core::Size > const &state_assignment, lDDT_Cache &cache, lDDT_Data &data) const
 
void residue_pair_stats (core::pose::Pose const &ref, core::pose::Pose const &model, core::Size rres1_no, core::Size rres2_no, core::Size mres1_no, core::Size mres2_no, lDDT_Data &data, lDDT_Cache &cache, utility::vector1< core::Size > const &mres1_map=lDDT_Cache::identity_map_, utility::vector1< core::Size > const &mres2_map=lDDT_Cache::identity_map_) const
 
core::Real do_division (lDDT_Data &data, std::map< core::Size, core::Real > &residue_stats, std::map< core::id::AtomID, core::Real > &atom_stats) const
 Turn the counts in lDDT_Data structure into fractions. More...
 
std::map< core::Size, core::Sizemake_identity_map (core::pose::Pose const &pose) const
 
core::Size get_matching_atom (core::conformation::Residue const &rres, core::conformation::Residue const &mres, core::Size ratm, utility::vector1< core::Size > const &mres_map) const
 Get the matching atom from two residues. Will return 0 if there is no matching atom. More...
 

Private Attributes

utility::vector1< core::Realthresholds_ = { 0.5, 1, 2, 4 }
 The distance similarity threasholds to use. More...
 
core::Real R0_ = 15.0
 inclusion radius: the cutoff to determine which distances are "local" More...
 
core::Size seqsep_ = 1
 Only consider pairs if the polymeric sequence separation is seqsep or greater (different chains are infinite) This is different (one more) from the reference, to allow 0 to include distances within the same residue. More...
 
bool ignore_oxt_ = true
 Ignore OXT on terminal residues. More...
 
bool consider_alt_ = true
 Consider automorphic residue states. More...
 
PredicateCOP predicate_ = nullptr
 The predicate for which atoms to include. More...
 

Detailed Description

Calculate the lDDT between the reference and the model. https://dx.doi.org/10.1093/bioinformatics/btt473 Uses the same defaults as https://swissmodel.expasy.org/lddt/ Not implemented is any consideration for stereochemical/bond/angle deviation penalties.

Member Typedef Documentation

◆ lDDT_DataOP

using core::scoring::lDDT_Calculator::lDDT_DataOP = utility::pointer::shared_ptr< lDDT_Data >
private

Constructor & Destructor Documentation

◆ lDDT_Calculator()

core::scoring::lDDT_Calculator::lDDT_Calculator ( PredicateCOP  predicate = nullptr)

Create an lDDR_Calculator The predicate indicates which atoms to operate over. The default is all heavy atoms.

References predicate().

Member Function Documentation

◆ all_lDDT() [1/2]

core::Real core::scoring::lDDT_Calculator::all_lDDT ( core::pose::Pose const &  ref,
core::pose::Pose const &  model,
std::map< core::Size, core::Real > &  residue_lddt,
std::map< core::id::AtomID, core::Real > &  atom_lddt 
) const

Get all lDDT statistics (global, residue and atom) Assumes reference and model are the same length and match 1:1 The residue/atom IDs for the returned values are based on the reference structure.

References make_identity_map(), core::scoring::ref, and core::pose::Pose::size().

◆ all_lDDT() [2/2]

core::Real core::scoring::lDDT_Calculator::all_lDDT ( core::pose::Pose const &  ref,
core::pose::Pose const &  model,
std::map< core::Size, core::Size > const &  res_map,
std::map< core::Size, core::Real > &  residue_lddt,
std::map< core::id::AtomID, core::Real > &  atom_lddt 
) const

Get all lDDT statistics (global, residue and atom) Only reference residues in res_map are considered for pairings. To include residues but set them unmatched, map them to zero. The residue/atom IDs for the returned values are based on the reference structure.

References get_stats(), and core::scoring::ref.

◆ atom_lDDT() [1/2]

std::map< core::id::AtomID, core::Real > core::scoring::lDDT_Calculator::atom_lDDT ( core::pose::Pose const &  ref,
core::pose::Pose const &  model 
) const

Get the atom lDDTs for all atoms in the poses Assumes reference and model are the same length and match 1:1 The atom IDs for the returned value are based on the reference structure.

Get the atom lDDTs for all atoms in the poses.

References make_identity_map(), core::scoring::ref, and core::pose::Pose::size().

◆ atom_lDDT() [2/2]

void core::scoring::lDDT_Calculator::atom_lDDT ( core::pose::Pose const &  ref,
core::pose::Pose const &  model,
std::map< core::Size, core::Size > const &  res_map,
std::map< core::id::AtomID, core::Real > &  atom_lddt 
) const

Get the atom lDDTs, for the residue pairings specified in res_map. Only reference residues in res_map are considered for pairings. To include residues but set them unmatched, map them to zero. The atom IDs for the returned atom_lddt value are based on the reference structure.

Get the atom lDDTs, for the residue pairings specified in res_map. Only reference residues in res_map are considered for pairings. To include residues but set them unmatched, map them to zero.

References get_stats(), and core::scoring::ref.

◆ consider_alt_states()

void core::scoring::lDDT_Calculator::consider_alt_states ( bool  setting)
inline

When doing the calculation, use exact matching of atoms (false), Or consider chemically-equivaleint (automorphic) states to get the best value. Turning this off will speed calculations where alternate states aren't relevant (e.g. Calpha or backbone-only)

References consider_alt_.

Referenced by core::scoring::lddt(), and core::scoring::per_res_lddt().

◆ determine_alt_states()

utility::vector1< core::Size > core::scoring::lDDT_Calculator::determine_alt_states ( core::pose::Pose const &  ref,
core::pose::Pose const &  model,
std::map< core::Size, core::Size > const &  res_map,
lDDT_Cache cache 
) const
private

Determine which states (from the cache) for each residue give the best overall lDDT.

The approach here is to go through the full matching process, but only with the global statistics Then the calling function is responsible to re-do the interation with the selected states if they need the per-residue and per-atom statistics.

References core::scoring::lDDT_Calculator::lDDT_Cache::get_mapping_state(), core::scoring::lDDT_Calculator::lDDT_Cache::get_n_maps(), get_stats_for_state(), core::scoring::lDDT_Calculator::lDDT_Data::global_lddt(), protocols::mean_field::max(), protocols::mean_field::min(), core::conformation::Residue::nbr_atom_xyz(), core::conformation::Residue::nbr_radius(), core::conformation::Residue::polymeric_sequence_distance(), R0_, core::scoring::ref, residue_pair_stats(), core::pose::Pose::residue_type(), and seqsep_.

Referenced by get_stats().

◆ do_division()

core::Real core::scoring::lDDT_Calculator::do_division ( lDDT_Data data,
std::map< core::Size, core::Real > &  residue_stats,
std::map< core::id::AtomID, core::Real > &  atom_stats 
) const
private

◆ get_matching_atom()

core::Size core::scoring::lDDT_Calculator::get_matching_atom ( core::conformation::Residue const &  rres,
core::conformation::Residue const &  mres,
core::Size  ratm,
utility::vector1< core::Size > const &  mres_map 
) const
private

Get the matching atom from two residues. Will return 0 if there is no matching atom.

References core::conformation::Residue::atom_index(), core::conformation::Residue::atom_name(), core::conformation::Residue::has(), and core::conformation::Residue::type().

Referenced by residue_pair_stats().

◆ get_stats()

core::Real core::scoring::lDDT_Calculator::get_stats ( core::pose::Pose const &  ref,
core::pose::Pose const &  model,
std::map< core::Size, core::Size > const &  res_map,
bool  do_residue,
std::map< core::Size, core::Real > &  residue_stats,
bool  do_atomistic,
std::map< core::id::AtomID, core::Real > &  atom_stats 
) const
private

Get the statistics, dispatching based on parameters.

References consider_alt_, determine_alt_states(), do_division(), get_stats_for_state(), ignore_oxt_, predicate_, and core::scoring::ref.

Referenced by all_lDDT(), atom_lDDT(), operator()(), and residue_lDDT().

◆ get_stats_for_state()

core::Real core::scoring::lDDT_Calculator::get_stats_for_state ( core::pose::Pose const &  ref,
core::pose::Pose const &  model,
std::map< core::Size, core::Size > const &  res_map,
utility::vector1< core::Size > const &  state_assignment,
lDDT_Cache cache,
lDDT_Data data 
) const
private

◆ ignore_oxt()

void core::scoring::lDDT_Calculator::ignore_oxt ( bool  setting)
inline

The default is to ignore any interactions with the OXT atom.

References ignore_oxt_.

◆ make_identity_map()

std::map< core::Size, core::Size > core::scoring::lDDT_Calculator::make_identity_map ( core::pose::Pose const &  pose) const
private

◆ operator()() [1/2]

core::Real core::scoring::lDDT_Calculator::operator() ( core::pose::Pose const &  ref,
core::pose::Pose const &  model 
) const

Get the summary lDDT Assumes reference and model are the same length and match 1:1.

References make_identity_map(), core::scoring::ref, and core::pose::Pose::size().

◆ operator()() [2/2]

core::Real core::scoring::lDDT_Calculator::operator() ( core::pose::Pose const &  ref,
core::pose::Pose const &  model,
std::map< core::Size, core::Size > const &  res_map 
) const

Get the summary lDDT, for the pairing specified in res_map. Only reference residues in res_map are considered for pairings. To include residues but set them unmatched, map them to zero.

References get_stats(), and core::scoring::ref.

◆ predicate()

void core::scoring::lDDT_Calculator::predicate ( PredicateCOP  predicate)

Set the predicate for which atoms to consider The default is all heavy atoms. Note the default of considering alternate chemical states is (currently) incompatible with including hydrogen atoms, so it is recommended to turn that off with any predicate which includes (potentially equivalent) hydrogens.

References predicate_.

Referenced by lDDT_Calculator().

◆ R0()

void core::scoring::lDDT_Calculator::R0 ( core::Real  val)
inline

The inclusion radius: the cutoff to determine which distances are "local".

References R0_, and protocols::hybridization::val.

◆ residue_lDDT() [1/2]

utility::vector1< core::Real > core::scoring::lDDT_Calculator::residue_lDDT ( core::pose::Pose const &  ref,
core::pose::Pose const &  model 
) const

Get the residue lDDTs, for all atoms in the pose Assumes reference and model are the same length and match 1:1.

References make_identity_map(), core::scoring::ref, and core::pose::Pose::size().

Referenced by core::scoring::per_res_lddt().

◆ residue_lDDT() [2/2]

void core::scoring::lDDT_Calculator::residue_lDDT ( core::pose::Pose const &  ref,
core::pose::Pose const &  model,
std::map< core::Size, core::Size > const &  res_map,
std::map< core::Size, core::Real > &  residue_lddt 
) const

Get the residue lDDTs, for the pairing specified in res_map. Only reference residues in res_map are considered for pairings. To include residues but set them unmatched, map them to zero. The indicies for the returned residue_lddt are based on the reference structure.

References get_stats(), and core::scoring::ref.

◆ residue_pair_stats()

void core::scoring::lDDT_Calculator::residue_pair_stats ( core::pose::Pose const &  ref,
core::pose::Pose const &  model,
core::Size  rres1_no,
core::Size  rres2_no,
core::Size  mres1_no,
core::Size  mres2_no,
lDDT_Data data,
lDDT_Cache cache,
utility::vector1< core::Size > const &  mres1_map = lDDT_Cache::identity_map_,
utility::vector1< core::Size > const &  mres2_map = lDDT_Cache::identity_map_ 
) const
private

◆ seqsep()

void core::scoring::lDDT_Calculator::seqsep ( core::Size  ss)
inline

Only consider pairs if the polymeric sequence separation is seqsep or greater (different chains are infinite) This is different (one more) from the reference, to allow 0 to include distances within the same residue.

References seqsep_.

◆ thresholds()

void core::scoring::lDDT_Calculator::thresholds ( utility::vector1< core::Real > const &  setting)
inline

The distance similarity threasholds to use. The reported value will be an average of the lDDT for each individual threshold.

References thresholds_.

Member Data Documentation

◆ consider_alt_

bool core::scoring::lDDT_Calculator::consider_alt_ = true
private

Consider automorphic residue states.

Referenced by consider_alt_states(), and get_stats().

◆ ignore_oxt_

bool core::scoring::lDDT_Calculator::ignore_oxt_ = true
private

◆ predicate_

PredicateCOP core::scoring::lDDT_Calculator::predicate_ = nullptr
private

The predicate for which atoms to include.

Referenced by get_stats(), and predicate().

◆ R0_

core::Real core::scoring::lDDT_Calculator::R0_ = 15.0
private

inclusion radius: the cutoff to determine which distances are "local"

Referenced by determine_alt_states(), get_stats_for_state(), R0(), and residue_pair_stats().

◆ seqsep_

core::Size core::scoring::lDDT_Calculator::seqsep_ = 1
private

Only consider pairs if the polymeric sequence separation is seqsep or greater (different chains are infinite) This is different (one more) from the reference, to allow 0 to include distances within the same residue.

Referenced by determine_alt_states(), get_stats_for_state(), and seqsep().

◆ thresholds_

utility::vector1< core::Real > core::scoring::lDDT_Calculator::thresholds_ = { 0.5, 1, 2, 4 }
private

The distance similarity threasholds to use.

Referenced by residue_pair_stats(), and thresholds().


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