Rosetta 3.4
Public Member Functions | Static Public Member Functions | Protected Member Functions
core::fragment::Frame Class Reference

Frame couples a list of FragData-instances to a certain alignment frame, i.e., position in sequence space A frame may be continous, i.e., its fragment data will be applied to all residues between start() and end() or ( in a specialized version inheriting this interface) may contain a loose list of sequence positions. More...

#include <Frame.hh>

Inheritance diagram for core::fragment::Frame:
Inheritance graph
[legend]
Collaboration diagram for core::fragment::Frame:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Frame ()
 Frame (core::Size begin, core::Size end, core::Size nr_res)
 Frame (core::Size start, core::Size length)
 Frame (core::Size start)
 Frame (core::Size start, FragDataOP frag1)
 Frame (core::Size start, core::Size length, SingleResidueFragDataOP srfd)
virtual FrameOP clone () const
 clone method, new frame with same alignment position, fragments are not copied!
virtual FrameOP clone_with_frags ()
 clone method, new frame with same alignment position, fragments are not copied!
virtual FrameOP clone_with_template ()
 clone method, new frame with same alignment position, one fragments is copied as template ( valid() == false )
virtual std::string type () const
 type() is specifying the output name of the Frame in FragmentIO ("FRAME", "JUMPFRAME", etc)
core::Size add_fragment (FragDataOP new_frag)
 add a fragment .. return new frag_nr
bool add_fragment (FragDataList new_frags)
 add all fragments in list
FragData const & fragment (core::Size frag_num) const
 delete a fragment: Attention: all data in the FragCache is invalidated ( and deleted ) it would be complicated to change this behaviour. Thus, it is desirable to avoid using delete_fragment() altogether. Faster: Make a new Frame and add all fragments you are interested in.
FragDatafragment (core::Size frag_num)
 accessor for underlying FragData
FragDataCOP fragment_ptr (core::Size frag_num) const
 accessor for underlying FragData as owning ptr
FragDataOP fragment_ptr (core::Size frag_num)
 accessor for underlying FragData as owning ptr
bool is_valid () const
 a frame is considered valid if at least one fragment is contained and this fragment is also valid (not an empty template fragment)
core::Size apply (kinematics::MoveMap const &, core::Size frag_num, pose::Pose &pose) const
 insert fragment frag_num into pose
core::Size apply (core::Size frag_num, pose::Pose &pose) const
 insert fragment frag_num into pose --- ignore movemap
core::Size apply_ss (kinematics::MoveMap const &, core::Size frag_num, std::string &ss) const
 change ss-string according to sec-struct info in fragments
bool steal (pose::Pose const &pose)
 obtain fragment from pose at frame position
core::Size is_applicable (kinematics::MoveMap const &) const
 is the Frame applicable to the pose with the given movemap?
virtual core::Size seqpos (core::Size intra_pos) const
 translate intra-frame position into sequence position. (trivial for base-class)
core::Size frag_id (core::Size frag_num) const
 a unique id for every fragment in the list. his is silly, but would enable later on to avoid cache_clearence on deletion of FragData entries in this case, we would require that the ID of a certain fragment never changes, even if the position in FragList changes
void fragment_as_pose (core::Size frag_num, pose::Pose &pose, chemical::ResidueTypeSetCAP restype_set) const
 returns a (small) pose with fragment ( continous from seqpos 1 ... nr_res_affected() )
virtual bool is_continuous () const
 true if frame is continuous (always true for base class)
core::Size nr_frags () const
 number of fragments attached to this frame
void clear ()
 remove all valid fragments, a template fragment will be left over
bool contains_seqpos (core::Size seqpos) const
 whether this fragment contains a certain position
core::Size start () const
 first seqpos of this frame
void shift_to (core::Size setting)
 set start position
core::Size end () const
 last sequence position affected by this frame
core::Size stop () const
 ///
virtual bool moves_residue (core::Size pos) const
core::Size nr_res_affected (kinematics::MoveMap const &mm) const
 number of residues affected by this frame
core::Size length () const
 number of residues in this frame ( for continuous frames it is the same as end()-start() + 1 )
BaseCacheUnitcache (std::string tag, BaseCacheUnitOP const &new_cache) const
 return handle to cached data stored under "tag" shouldn't be called directly
void clone_cache_data (Frame const &source, core::Size sid, core::Size nid)
 copies all entries in the Frame-Cache for fragment "sid" of Frame "source" to fragment "nid" of "this" frame
virtual void show_classic (std::ostream &out) const
virtual void show (std::ostream &out) const
virtual void show_header (std::ostream &out) const
virtual void read (std::istream &in)
bool is_mergeable (Frame const &other) const
bool merge (Frame const &other)
virtual bool align (core::id::SequenceMapping const &map)
 change frames residue numbers accoriding to map
FrameOP generate_sub_frame (Size length, Size start=1)
 generate_sub_frame of length from start ( internal numbers )

Static Public Member Functions

static std::string _static_type_name ()

Protected Member Functions

virtual void show_fragments (std::ostream &out) const
 NOT IMPLEMENTED YET: generate_sub_frame according to mapping ( residue numbers ) returns NULL if mapping invalid.
virtual bool is_compatible (FragDataCOP new_frag) const
 is a FragData object compatible with the already stored ones ? you can only add instances of FragData to the same Frame that are compatible, i.e., that contain the same class of FragData, e.g., based on BBTorsionSRFD, if you want to have different fragment for other dof's at the same sequence position create a new Frame. Users of the fragment-core are aware that multiple Frames for the same sequence position may exist.
void init_length (core::Size start, core::Size end, core::Size length)

Detailed Description

Frame couples a list of FragData-instances to a certain alignment frame, i.e., position in sequence space A frame may be continous, i.e., its fragment data will be applied to all residues between start() and end() or ( in a specialized version inheriting this interface) may contain a loose list of sequence positions.

Instances of FragData (e.g., the Torsion-Angles of a specific Fragment) can be added and deleted via add_- or delete_fragment() methods.

a fragment is inserted into the structure via the apply() method and the steal() method is its inverse: an instance of FragData is created from the structure of the pose at the dof's specified in the other FragData's of the Frame. The new FragData is added as last fragment to the frame.

accessors to underlying FragData-instances are available as fragment() or fragment_ptr().

Frame supports the FragCache --> see FragCache for documentation.

MoveMaps: It should be possible to specify which dofs can be moved. In this case fragment-insertions should a) only be allowed if all dofs affected are moveable or b) only change those dofs that are moveable. this information could be handled by an extended version of the kinematics::movemap. The movemap would then have to functions: 1) which dofs are changed by a certain FragData/Frame 2) which dofs are moveable comparison of movemaps, i.e., M1 <= M2 could tell us if dofs tagged in M1 are also tagged in M2: i.e., the M_fragdata<= M_pose would tell us that the fragment is applicable to the Pose.


Constructor & Destructor Documentation

core::fragment::Frame::Frame ( )

Referenced by clone().

core::fragment::Frame::Frame ( core::Size  begin,
core::Size  end,
core::Size  nr_res 
)
core::fragment::Frame::Frame ( core::Size  start,
core::Size  length 
)
core::fragment::Frame::Frame ( core::Size  start)
core::fragment::Frame::Frame ( core::Size  start,
FragDataOP  frag1 
)

References add_fragment().

core::fragment::Frame::Frame ( core::Size  start,
core::Size  length,
SingleResidueFragDataOP  srfd 
)

References add_fragment().


Member Function Documentation

std::string core::fragment::Frame::_static_type_name ( ) [static]
core::Size core::fragment::Frame::add_fragment ( FragDataOP  new_frag)
bool core::fragment::Frame::add_fragment ( FragDataList  new_frags)

add all fragments in list

References add_fragment().

bool core::fragment::Frame::align ( core::id::SequenceMapping const &  map) [virtual]

change frames residue numbers accoriding to map

change frames residue numbers according to map

Reimplemented in core::fragment::NonContinuousFrame.

References end(), is_continuous(), length(), start(), and core::fragment::tr().

Referenced by protocols::enzdes::EnzdesFlexibleRegion::remap_resid().

core::Size core::fragment::Frame::apply ( kinematics::MoveMap const &  mm,
core::Size  frag_num,
pose::Pose pose 
) const
core::Size core::fragment::Frame::apply ( core::Size  frag_num,
pose::Pose pose 
) const

insert fragment frag_num into pose --- ignore movemap

References core::fragment::FragData::apply(), end(), fragment(), is_continuous(), and start().

core::Size core::fragment::Frame::apply_ss ( kinematics::MoveMap const &  mm,
core::Size  frag_num,
std::string &  ss 
) const

change ss-string according to sec-struct info in fragments

References core::fragment::FragData::apply_ss(), and fragment().

Referenced by core::fragment::FragID::apply_ss().

BaseCacheUnit & core::fragment::Frame::cache ( std::string  tag,
BaseCacheUnitOP const &  new_cache 
) const

return handle to cached data stored under "tag" shouldn't be called directly

Referenced by core::fragment::CacheWrapper< GunnTuple, MapCacheUnit< GunnTuple > >::cache(), and clone_cache_data().

void core::fragment::Frame::clear ( )

remove all valid fragments, a template fragment will be left over

References add_fragment(), and nr_frags().

Referenced by protocols::enzdes::EnzdesFlexibleRegion::minimize_region(), and protocols::enzdes::EnzdesFlexibleRegion::remap_resid().

FrameOP core::fragment::Frame::clone ( ) const [virtual]

clone method, new frame with same alignment position, fragments are not copied!

Reimplemented in core::fragment::JumpingFrame.

References end(), Frame(), length(), and start().

Referenced by clone_with_frags(), clone_with_template(), and generate_sub_frame().

void core::fragment::Frame::clone_cache_data ( Frame const &  source,
core::Size  sid,
core::Size  nid 
)

copies all entries in the Frame-Cache for fragment "sid" of Frame "source" to fragment "nid" of "this" frame

References cache(), and core::fragment::BaseCacheUnit::remap_value().

Referenced by merge().

FrameOP core::fragment::Frame::clone_with_frags ( ) [virtual]

clone method, new frame with same alignment position, fragments are not copied!

References clone().

FrameOP core::fragment::Frame::clone_with_template ( ) [virtual]

clone method, new frame with same alignment position, one fragments is copied as template ( valid() == false )

References clone(), and nr_frags().

bool core::fragment::Frame::contains_seqpos ( core::Size  seqpos) const
core::Size core::fragment::Frame::end ( ) const
core::Size core::fragment::Frame::frag_id ( core::Size  frag_num) const

a unique id for every fragment in the list. his is silly, but would enable later on to avoid cache_clearence on deletion of FragData entries in this case, we would require that the ID of a certain fragment never changes, even if the position in FragList changes

Referenced by core::fragment::CacheWrapper< GunnTuple, MapCacheUnit< GunnTuple > >::retrieve(), and core::fragment::CacheWrapper< GunnTuple, MapCacheUnit< GunnTuple > >::store().

FragData const & core::fragment::Frame::fragment ( core::Size  frag_num) const

delete a fragment: Attention: all data in the FragCache is invalidated ( and deleted ) it would be complicated to change this behaviour. Thus, it is desirable to avoid using delete_fragment() altogether. Faster: Make a new Frame and add all fragments you are interested in.

accesors for underlying FragData

Referenced by apply(), protocols::simple_moves::SymmetricFragmentMover::apply_fragment(), apply_ss(), core::fragment::chop_fragments(), protocols::simple_moves::GunnCost::compute_gunn(), core::fragment::FragID::fragment(), fragment_as_pose(), is_applicable(), is_compatible(), is_mergeable(), is_valid(), core::fragment::make_simple_fold_tree_from_jump_frame(), show_classic(), and show_fragments().

FragData & core::fragment::Frame::fragment ( core::Size  frag_num)

accessor for underlying FragData

void core::fragment::Frame::fragment_as_pose ( core::Size  frag_num,
pose::Pose pose,
chemical::ResidueTypeSetCAP  restype_set 
) const
FragDataCOP core::fragment::Frame::fragment_ptr ( core::Size  frag_num) const
FragDataOP core::fragment::Frame::fragment_ptr ( core::Size  frag_num)

accessor for underlying FragData as owning ptr

FrameOP core::fragment::Frame::generate_sub_frame ( Size  length,
Size  start = 1 
)

generate_sub_frame of length from start ( internal numbers )

References clone(), is_continuous(), length(), and nr_frags().

void core::fragment::Frame::init_length ( core::Size  start,
core::Size  end,
core::Size  length 
) [protected]
core::Size core::fragment::Frame::is_applicable ( kinematics::MoveMap const &  mm) const

is the Frame applicable to the pose with the given movemap?

References end(), fragment(), core::fragment::FragData::is_applicable(), is_continuous(), and start().

Referenced by nr_res_affected().

bool core::fragment::Frame::is_compatible ( FragDataCOP  new_frag) const [protected, virtual]

is a FragData object compatible with the already stored ones ? you can only add instances of FragData to the same Frame that are compatible, i.e., that contain the same class of FragData, e.g., based on BBTorsionSRFD, if you want to have different fragment for other dof's at the same sequence position create a new Frame. Users of the fragment-core are aware that multiple Frames for the same sequence position may exist.

References fragment(), length(), and nr_frags().

Referenced by add_fragment().

bool core::fragment::Frame::is_continuous ( ) const [virtual]
bool core::fragment::Frame::is_mergeable ( Frame const &  other) const
bool core::fragment::Frame::is_valid ( ) const

a frame is considered valid if at least one fragment is contained and this fragment is also valid (not an empty template fragment)

References fragment(), core::fragment::FragData::is_valid(), and nr_frags().

core::Size core::fragment::Frame::length ( ) const
bool core::fragment::Frame::merge ( Frame const &  other)
bool core::fragment::Frame::moves_residue ( core::Size  pos) const [virtual]

Reimplemented in core::fragment::NonContinuousFrame.

References start().

core::Size core::fragment::Frame::nr_frags ( ) const
core::Size core::fragment::Frame::nr_res_affected ( kinematics::MoveMap const &  mm) const

number of residues affected by this frame

References is_applicable().

void core::fragment::Frame::read ( std::istream &  in) [virtual]
core::Size core::fragment::Frame::seqpos ( core::Size  intra_pos) const [virtual]
void core::fragment::Frame::shift_to ( core::Size  setting)

set start position

shift to new start position ( change end accordingly )

void core::fragment::Frame::show ( std::ostream &  out) const [virtual]
void core::fragment::Frame::show_classic ( std::ostream &  out) const [virtual]
void core::fragment::Frame::show_fragments ( std::ostream &  out) const [protected, virtual]

NOT IMPLEMENTED YET: generate_sub_frame according to mapping ( residue numbers ) returns NULL if mapping invalid.

References fragment(), fragment_ptr(), nr_frags(), and core::fragment::FragData::show().

Referenced by show().

void core::fragment::Frame::show_header ( std::ostream &  out) const [virtual]

References end(), and start().

Referenced by show().

core::Size core::fragment::Frame::start ( ) const
bool core::fragment::Frame::steal ( pose::Pose const &  pose)

obtain fragment from pose at frame position

References nr_frags(), and core::fragment::tr().

Referenced by protocols::enzdes::EnzdesFlexibleRegion::minimize_region().

core::Size core::fragment::Frame::stop ( ) const

///

set stop position last sequence position affected by this frame

Referenced by is_mergeable(), and core::fragment::retain_top().

std::string core::fragment::Frame::type ( ) const [virtual]

type() is specifying the output name of the Frame in FragmentIO ("FRAME", "JUMPFRAME", etc)

Reimplemented in core::fragment::JumpingFrame.

References _static_type_name().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines