Rosetta
|
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>
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::Real > | 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. 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::Real > | 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. 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::Size > | 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 |
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::Size > | make_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::Real > | thresholds_ = { 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... | |
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.
|
private |
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().
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().
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.
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().
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.
|
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().
|
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().
|
private |
Turn the counts in lDDT_Data structure into fractions.
References core::scoring::lDDT_Calculator::lDDT_Data::atom_ndist, core::scoring::lDDT_Calculator::lDDT_Data::atom_nmatch, core::scoring::lDDT_Calculator::lDDT_Data::global_lddt(), core::scoring::lDDT_Calculator::lDDT_Data::res_ndist, core::scoring::lDDT_Calculator::lDDT_Data::res_nmatch, and core::scoring::TR().
Referenced by get_stats().
|
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().
|
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().
|
private |
References core::scoring::lDDT_Calculator::lDDT_Cache::get_mapping_state(), core::scoring::lDDT_Calculator::lDDT_Data::global_ndist, core::scoring::lDDT_Calculator::lDDT_Data::global_nmatch, core::scoring::lDDT_Calculator::lDDT_Cache::identity_map_, 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 determine_alt_states(), and get_stats().
|
inline |
The default is to ignore any interactions with the OXT atom.
References ignore_oxt_.
|
private |
References core::chemical::ResidueType::is_virtual_residue(), core::pose::Pose::residue_type(), and core::pose::Pose::size().
Referenced by all_lDDT(), atom_lDDT(), operator()(), and residue_lDDT().
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().
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.
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().
|
inline |
The inclusion radius: the cutoff to determine which distances are "local".
References R0_, and protocols::hybridization::val.
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().
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.
|
private |
References core::scoring::lDDT_Calculator::lDDT_Data::atom_ndist, core::scoring::lDDT_Calculator::lDDT_Data::atom_nmatch, core::scoring::lDDT_Calculator::lDDT_Cache::atoms_matching_predicate(), core::scoring::lDDT_Calculator::lDDT_Data::do_atomistic, core::scoring::lDDT_Calculator::lDDT_Data::do_residue, get_matching_atom(), core::scoring::lDDT_Calculator::lDDT_Data::global_ndist, core::scoring::lDDT_Calculator::lDDT_Data::global_nmatch, R0_, core::scoring::ref, core::scoring::lDDT_Calculator::lDDT_Data::res_ndist, core::scoring::lDDT_Calculator::lDDT_Data::res_nmatch, core::pose::Pose::residue(), thresholds_, and core::conformation::Residue::xyz().
Referenced by determine_alt_states(), and get_stats_for_state().
|
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_.
|
inline |
The distance similarity threasholds to use. The reported value will be an average of the lDDT for each individual threshold.
References thresholds_.
|
private |
Consider automorphic residue states.
Referenced by consider_alt_states(), and get_stats().
|
private |
Ignore OXT on terminal residues.
Referenced by get_stats(), ignore_oxt(), and core::scoring::lDDT_Calculator::lDDT_Cache::make_mapping_states().
|
private |
The predicate for which atoms to include.
Referenced by get_stats(), and predicate().
|
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().
|
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().
|
private |
The distance similarity threasholds to use.
Referenced by residue_pair_stats(), and thresholds().