Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::frag_picker::scores::AtomBasedConstraintsScore Class Reference

A base class for all scoring methods that need atom coordinates. More...

#include <AtomBasedConstraintsScore.hh>

Inheritance diagram for protocols::frag_picker::scores::AtomBasedConstraintsScore:
Inheritance graph
[legend]

Public Member Functions

 AtomBasedConstraintsScore (core::Size, core::Real, bool, core::Size, utility::vector1< std::string >, std::string)
 Prepare an atom-based score that utilizes some user-defined atoms. More...
 
 AtomBasedConstraintsScore (core::Size, core::Real, bool, core::Size, std::string)
 Prepare an atom-based score that utilizes the following predefined atoms: N, CA, C, O and CB. More...
 
void do_caching (VallChunkOP) override
 In this case caching means copying coordinates of relevant atoms from a chunk's pose. More...
 
void clean_up () override
 Erases the internal array of coordinates. More...
 
bool has_atom (core::Size residue_id, core::Size atom_id)
 Returns true if a given atom has been successfully cached and one can use its coordinates. More...
 
numeric::xyzVector< core::Realget_atom_coordinates (core::Size residue_id, core::Size atom_id)
 Returns coordinates for a given atom. More...
 
std::map< std::string, core::Sizeget_constrainable_atoms_map ()
 Returns a map that defines all constrained atoms used by this scoring method. More...
 
core::Size get_constrained_atom_id (std::string atom_name)
 returns an internal ID assigned to a given atom name More...
 
std::string get_constrained_atom_name (core::Size atom_id)
 returns a name of a constrained atom when its internal ID is known More...
 
core::Size get_query_size ()
 provides an access to the size of the length of a query sequence More...
 
- Public Member Functions inherited from protocols::frag_picker::scores::CachingScoringMethod
 CachingScoringMethod (core::Size priority, core::Real lowest_acceptable_value, bool use_lowest, std::string name)
 
virtual bool cached_score (FragmentCandidateOP, FragmentScoreMapOP)
 
bool score (FragmentCandidateOP, FragmentScoreMapOP) override
 
- Public Member Functions inherited from protocols::frag_picker::scores::FragmentScoringMethod
 FragmentScoringMethod (core::Size priority, core::Real lowest_acceptable_value, bool use_lowest, std::string name)
 
std::string & get_score_name ()
 Returns a name of this scoring method. More...
 
core::Size get_id ()
 Returns an integer index assigned to this scoring method by a scoring manager. More...
 
void set_id (core::Size id)
 Sets a new integer index for this scoring method. More...
 
core::Size get_priority ()
 Returns a priority of this scoring method. More...
 
core::Real get_min_allowed_score ()
 Returns the lowest acceptable score value for this scoring method. More...
 
bool get_use_lowest ()
 Returns the boolean choice on using the above lowest acceptable score value. More...
 
void set_min_allowed_score (core::Real lowest_acceptable_value)
 Sets a new value of the lowest acceptable score. More...
 

Private Member Functions

core::Size get_atom_type (std::string atom_name)
 

Private Attributes

core::Size query_size_
 
utility::vector1
< utility::vector1
< numeric::xyzVector
< core::Real > > > 
chunk_atoms_xyz_
 
utility::vector1
< utility::vector1< bool > > 
atom_flags_
 
std::map< std::string, core::Sizeconstrainable_atoms_
 

Additional Inherited Members

- Protected Attributes inherited from protocols::frag_picker::scores::FragmentScoringMethod
core::Size id_
 
core::Size priority_
 
std::string name_
 
core::Real lowest_acceptable_value_
 
bool use_lowest_
 

Detailed Description

A base class for all scoring methods that need atom coordinates.

The base class provides an access to atom coordinates from the current chunk It takes care of caching proper atoms from the pose for fast access.

Constructor & Destructor Documentation

protocols::frag_picker::scores::AtomBasedConstraintsScore::AtomBasedConstraintsScore ( core::Size  priority,
core::Real  lowest_acceptable_value,
bool  use_lowest,
core::Size  query_size,
utility::vector1< std::string >  constrainable_atoms,
std::string  score_name 
)

Prepare an atom-based score that utilizes some user-defined atoms.

User may provide names of atoms that will be cached when a new chunk is considered (i.e. at every do_caching() call)

Parameters
priority- the priority for this scoring method. The lower the priority, the later the score will be evaluated Because a fragment may be discarded when a score is too low, the most accurate and meaningful scores should have the highest priority
lowest_acceptable_value- a fragment for which this score is below a certain threshold will be discarded
query_size- the number of residues in the query sequence
constrainable_atoms- a vector of strings providing names of constrained atoms. On every do_cahing() event these and only these atoms will be cached from a chunk's pose
score_name- name assigned to this scoring term; this string must show up in scores config file if the score is to be evaluated during picking

References constrainable_atoms_, and query_size_.

protocols::frag_picker::scores::AtomBasedConstraintsScore::AtomBasedConstraintsScore ( core::Size  priority,
core::Real  lowest_acceptable_value,
bool  use_lowest,
core::Size  query_size,
std::string  score_name 
)

Prepare an atom-based score that utilizes the following predefined atoms: N, CA, C, O and CB.

These atoms that will be cached when a new chunk is considered (i.e. at every do_caching() call)

Parameters
priority- the priority for this scoring method. The lower the priority, the later the score will be evaluated Because a fragment may be discarded when a score is too low, the most accurate and meaningful scores should have the highest priority
lowest_acceptable_value- a fragment for which this score is below a certain threshold will be discarded
query_size- the number of residues in the query sequence
score_name- name assigned to this scoring term; this string must show up in scores config file if the score is to be evaluated during picking

References constrainable_atoms_, and query_size_.

Member Function Documentation

void protocols::frag_picker::scores::AtomBasedConstraintsScore::clean_up ( )
overridevirtual

Erases the internal array of coordinates.

Implements protocols::frag_picker::scores::CachingScoringMethod.

References atom_flags_, and chunk_atoms_xyz_.

void protocols::frag_picker::scores::AtomBasedConstraintsScore::do_caching ( VallChunkOP  chunk)
overridevirtual
numeric::xyzVector<core::Real> protocols::frag_picker::scores::AtomBasedConstraintsScore::get_atom_coordinates ( core::Size  residue_id,
core::Size  atom_id 
)
inline

Returns coordinates for a given atom.

Parameters
residue_idthe residue order number. The first is 1, the last one depends on the size of a pose i.e. the size of the current chunk
atom_idthe residue order number, the first is 1

References chunk_atoms_xyz_.

Referenced by protocols::frag_picker::scores::AtomPairConstraintsScore::cached_score(), protocols::frag_picker::scores::InterbondAngleScore::cached_score(), and protocols::frag_picker::scores::DihedralConstraintsScore::cached_score().

core::Size protocols::frag_picker::scores::AtomBasedConstraintsScore::get_atom_type ( std::string  atom_name)
private
std::map<std::string, core::Size> protocols::frag_picker::scores::AtomBasedConstraintsScore::get_constrainable_atoms_map ( )
inline

Returns a map that defines all constrained atoms used by this scoring method.

Returned map defines the order of atoms as they are stored inside this object. Indexes defined y this map can be used as arguments for has_atom() and get_atom_coordinates() methods.

References constrainable_atoms_.

Referenced by protocols::frag_picker::scores::AtomPairConstraintsScore::read_constraints(), protocols::frag_picker::scores::InterbondAngleScore::read_constraints(), and protocols::frag_picker::scores::DihedralConstraintsScore::read_constraints().

core::Size protocols::frag_picker::scores::AtomBasedConstraintsScore::get_constrained_atom_id ( std::string  atom_name)
inline

returns an internal ID assigned to a given atom name

this ID remains the same for all residues

References constrainable_atoms_.

std::string protocols::frag_picker::scores::AtomBasedConstraintsScore::get_constrained_atom_name ( core::Size  atom_id)

returns a name of a constrained atom when its internal ID is known

this is the oposite to get_constrained_atom_id(std::string)

References constrainable_atoms_.

core::Size protocols::frag_picker::scores::AtomBasedConstraintsScore::get_query_size ( )
inline
bool protocols::frag_picker::scores::AtomBasedConstraintsScore::has_atom ( core::Size  residue_id,
core::Size  atom_id 
)
inline

Returns true if a given atom has been successfully cached and one can use its coordinates.

Parameters
residue_idthe residue order number. The first is 1, the last one depends on the size of a pose i.e. the size of the current chunk
atom_idthe residue order number, the first is 1

References atom_flags_.

Referenced by protocols::frag_picker::scores::AtomPairConstraintsScore::cached_score(), protocols::frag_picker::scores::InterbondAngleScore::cached_score(), and protocols::frag_picker::scores::DihedralConstraintsScore::cached_score().

Member Data Documentation

utility::vector1<utility::vector1<bool> > protocols::frag_picker::scores::AtomBasedConstraintsScore::atom_flags_
private

Referenced by clean_up(), do_caching(), and has_atom().

utility::vector1<utility::vector1<numeric::xyzVector<core::Real> > > protocols::frag_picker::scores::AtomBasedConstraintsScore::chunk_atoms_xyz_
private
std::map<std::string, core::Size> protocols::frag_picker::scores::AtomBasedConstraintsScore::constrainable_atoms_
private
core::Size protocols::frag_picker::scores::AtomBasedConstraintsScore::query_size_
private

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