Rosetta Protocols  2014.35
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>

Public Member Functions

 AtomBasedConstraintsScore (Size, Real, bool, Size, utility::vector1< std::string >, std::string)
 Prepare an atom-based score that utilizes some user-defined atoms. More...
 
 AtomBasedConstraintsScore (Size, Real, bool, 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)
 In this case caching means copying coordinates of relevant atoms from a chunk's pose. More...
 
void clean_up ()
 Erases the internal array of coordinates. More...
 
bool has_atom (Size residue_id, Size atom_id)
 Returns true if a given atom has been successfully cached and one can use its coordinates. More...
 
numeric::xyzVector< Realget_atom_coordinates (Size residue_id, Size atom_id)
 Returns coordinates for a given atom. More...
 
std::map< std::string, Sizeget_constrainable_atoms_map ()
 Returns a map that defines all constrained atoms used by this scoring method. More...
 
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 (Size atom_id)
 returns a name of a constrained atom when its internal ID is known More...
 
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 (Size priority, Real lowest_acceptable_value, bool use_lowest, std::string name)
 
virtual bool cached_score (FragmentCandidateOP, FragmentScoreMapOP)
 
virtual bool score (FragmentCandidateOP fragment, FragmentScoreMapOP scores)
 
- Public Member Functions inherited from protocols::frag_picker::scores::FragmentScoringMethod
 FragmentScoringMethod (Size priority, Real lowest_acceptable_value, bool use_lowest, std::string name)
 
std::stringget_score_name ()
 Returns a name of this scoring method. More...
 
Size get_id ()
 Returns an integer index assigned to this scoring method by a scoring manager. More...
 
void set_id (Size id)
 Sets a new integer index for this scoring method. More...
 
Size get_priority ()
 Returns a priority of this scoring method. More...
 
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 (Real lowest_acceptable_value)
 Sets a new value of the lowest acceptable score. More...
 

Private Member Functions

Size get_atom_type (std::string atom_name)
 

Private Attributes

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

Additional Inherited Members

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

Detailed Description

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

Detailed: 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 ( Size  priority,
Real  lowest_acceptable_value,
bool  use_lowest,
Size  query_size,
utility::vector1< std::string constrainable_atoms,
std::string  score_name 
)

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

Detailed: 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 ( Size  priority,
Real  lowest_acceptable_value,
bool  use_lowest,
Size  query_size,
std::string  score_name 
)

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

Detailed: 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 ( )
virtual
void protocols::frag_picker::scores::AtomBasedConstraintsScore::do_caching ( VallChunkOP  chunk)
virtual
numeric::xyzVector<Real> protocols::frag_picker::scores::AtomBasedConstraintsScore::get_atom_coordinates ( Size  residue_id,
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_, and size().

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

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

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

Detailed: 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().

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

Detailed: this ID remains the same for all residues

References constrainable_atoms_.

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

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

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

References constrainable_atoms_.

Size protocols::frag_picker::scores::AtomBasedConstraintsScore::get_query_size ( )
inline
bool protocols::frag_picker::scores::AtomBasedConstraintsScore::has_atom ( Size  residue_id,
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_, and size().

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<Real> > > protocols::frag_picker::scores::AtomBasedConstraintsScore::chunk_atoms_xyz_
private
std::map<std::string, Size> protocols::frag_picker::scores::AtomBasedConstraintsScore::constrainable_atoms_
private
Size protocols::frag_picker::scores::AtomBasedConstraintsScore::query_size_
private

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