Rosetta
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
protocols::forge::build::BuildInstruction Class Referenceabstract

tracks modifications to be made and is capable of making residue length changes on a Pose More...

#include <BuildInstruction.hh>

Inheritance diagram for protocols::forge::build::BuildInstruction:
Inheritance graph
[legend]

Public Types

typedef core::Size Size
 
typedef core::Real Real
 
typedef core::chemical::ResidueTypeSet ResidueTypeSet
 
typedef core::chemical::ResidueTypeSetCAP ResidueTypeSetCAP
 
typedef core::chemical::ResidueTypeSetCOP ResidueTypeSetCOP
 
typedef core::conformation::signals::LengthEvent LengthEvent
 
typedef core::kinematics::MoveMap MoveMap
 
typedef core::pose::Pose Pose
 
typedef utility::vector1< BuildInstructionCAPBuildInstructionCAPs
 
typedef utility::signals::Link Link
 
typedef std::set< core::SizePositions
 
typedef std::string String
 

Public Member Functions

 BuildInstruction ()
 default constructor More...
 
 BuildInstruction (Interval const &i, ResidueTypeSetCAP rts=core::chemical::ChemicalManager::get_instance() ->residue_type_set(core::chemical::FA_STANDARD))
 interval constructor More...
 
 BuildInstruction (BuildInstruction const &rval)
 copy constructor More...
 
 ~BuildInstruction () override
 default destructor More...
 
BuildInstructionoperator= (BuildInstruction const &rval)
 copy assignment More...
 
virtual BuildInstructionOP clone () const =0
 clone this object More...
 
BuildInstructionState::Enum modify (Pose &pose)
 modify this pose More...
 
BuildInstructionState::Enum state () const
 return the state of this BuildInstruction More...
 
bool ready () const
 Is the BuildInstruction's state at READY? More...
 
bool waiting_on_dependencies () const
 Is the BuildInstruction's state at WAITING_ON_DEPENDENCIES? More...
 
bool modify_was_successful () const
 Is the BuildInstruction's state at MODIFY_WAS_SUCCESSFUL? More...
 
virtual void on_residue_append (LengthEvent const &event)=0
 update indexing on residue append More...
 
virtual void on_residue_prepend (LengthEvent const &event)=0
 update indexing on residue prepend More...
 
virtual void on_residue_delete (LengthEvent const &event)=0
 update indexing on residue delete More...
 
void attach_to (Pose &pose)
 attach to a Pose's conformation More...
 
void detach_from ()
 detach from a Pose's conformation More...
 
void on_length_change (LengthEvent const &event)
 update any indexing wrt length change to Pose/Conformation being watched More...
 
bool detach_after_modify () const
 detach after modify()? More...
 
Interval const & original_interval () const
 return original residue range of this instruction More...
 
ResidueTypeSet const & residue_type_set () const
 the residue type set being used More...
 
bool has_dependencies () const
 does this BuildInstruction have dependencies? More...
 
core::Size n_dependencies () const
 the number of dependencies this BuildInstruction has More...
 
BuildInstructionCAPs const & dependencies () const
 the list of instructions whose modify() must complete before the modify() for this instruction may be called successfully More...
 
virtual bool original_interval_valid () const =0
 is the original interval storing valid information, or is empty or being used for something else? More...
 
virtual Interval interval () const =0
 a copy of the working range of residues specifying the modified region More...
 
virtual Positions preexisting_positions () const =0
 return a copy of the set of positions within the new region that were pre-existing in the original Pose prior to modify() More...
 
virtual Positions new_positions () const =0
 return a copy of the set of positions that are "new" and did not exist in the original Pose. More...
 
virtual Positions defined_positions () const =0
 return a copy of the set of positions within the newly modified region that has a defined conformation. E.g. existing or copied residues. More...
 
virtual Positions undefined_positions () const =0
 return a copy of the set of positions within the newly modified region that has an undefined conformation. E.g. newly created residues. More...
 
virtual MoveMap movemap () const =0
 return a copy of the MoveMap that defines the moveable/fixed positions/dofs for this instruction More...
 
void detach_after_modify (bool const flag)
 set detach after modify() More...
 
void reset_accounting ()
 reset intervals, positions, etc to initial state and drop observers. State set to READY. More...
 
virtual void add_dependency_to (BuildInstructionCAP i)
 add an instruction to this BuildInstruction's dependency list More...
 
virtual bool dependent_on (BuildInstructionCAP i) const
 is this instruction dependent upon the given instruction? More...
 
void clear_dependencies ()
 clear the list of dependencies More...
 
virtual Positions original_kept_positions () const =0
 return the set of positions within the original interval that will be kept in this BuildInstruction More...
 
virtual Positions original_deleted_positions () const =0
 return set of positions within the original interval that will be deleted in this BuildInstruction More...
 
virtual bool compatible_with (BuildInstruction const &rval) const
 compares fixed and mutable positions to determine compatibility with another instruction More...
 
virtual Positions original_fixed_positions () const =0
 return set of any fixed positions necessary with respect to the original interval and original Pose numbering More...
 
virtual Positions original_mutable_positions () const =0
 return set of any mutable positions necessary with respect to the original interval and original Pose numbering More...
 
virtual bool creates_undefined_backbone () const =0
 does this object create undefined backbone in the modified region? More...
 

Protected Member Functions

Link const & length_obs_link () const
 access to the Conformation length observer link More...
 
virtual bool dependencies_satisfied () const
 are dependencies satisfied so that modify_impl() can complete successfully? More...
 
virtual void modify_impl (Pose &pose)=0
 do the actual work of modifying the Pose More...
 
void state (BuildInstructionState::Enum const s)
 set the BuildInstruction's current state More...
 
virtual void reset_accounting_impl ()=0
 do the actual reset of intervals, positions, etc to initial state More...
 

Private Types

typedef utility::VirtualBase Super
 

Private Attributes

BuildInstructionState::Enum state_
 Describes the state of the BuildInstruction. More...
 
Interval original_interval_
 defines the original residue range via closed interval [first, second] or an original anchor position [anchor, anchor] that's marked as invalid More...
 
ResidueTypeSetCAP rts_
 the residue type set to use More...
 
Link length_obs_link_
 Conformation length observer link. More...
 
bool detach_after_modify_
 detach after performing modify() More...
 
BuildInstructionCAPs dependencies_
 if this BuildInstruction's modify() is dependent on any other BuildInstructions whose modify() must complete first, we store access to those instructions here More...
 

Detailed Description

tracks modifications to be made and is capable of making residue length changes on a Pose

Member Typedef Documentation

◆ BuildInstructionCAPs

◆ LengthEvent

◆ Link

typedef utility::signals::Link protocols::forge::build::BuildInstruction::Link

◆ MoveMap

◆ Pose

◆ Positions

◆ Real

◆ ResidueTypeSet

◆ ResidueTypeSetCAP

◆ ResidueTypeSetCOP

◆ Size

◆ String

◆ Super

typedef utility::VirtualBase protocols::forge::build::BuildInstruction::Super
private

Constructor & Destructor Documentation

◆ BuildInstruction() [1/3]

protocols::forge::build::BuildInstruction::BuildInstruction ( )

default constructor

◆ BuildInstruction() [2/3]

protocols::forge::build::BuildInstruction::BuildInstruction ( Interval const &  i,
ResidueTypeSetCAP  rts = core::chemical::ChemicalManager::get_instance()->residue_type_setcore::chemical::FA_STANDARD ) 
)

interval constructor

Parameters
[in]ithe residue range to operate on
[in]rtsthe residue type set to use, default FA_STANDARD

◆ BuildInstruction() [3/3]

protocols::forge::build::BuildInstruction::BuildInstruction ( BuildInstruction const &  rval)

copy constructor

◆ ~BuildInstruction()

protocols::forge::build::BuildInstruction::~BuildInstruction ( )
override

default destructor

References detach_from().

Member Function Documentation

◆ add_dependency_to()

void protocols::forge::build::BuildInstruction::add_dependency_to ( BuildInstructionCAP  i)
virtual

add an instruction to this BuildInstruction's dependency list

Remarks
before this instruction's modify() may complete properly, all instructions in the dependency list must have completed modify() first

References dependencies_, and dependent_on().

◆ attach_to()

void protocols::forge::build::BuildInstruction::attach_to ( Pose pose)

◆ clear_dependencies()

void protocols::forge::build::BuildInstruction::clear_dependencies ( )
inline

clear the list of dependencies

References dependencies_.

◆ clone()

virtual BuildInstructionOP protocols::forge::build::BuildInstruction::clone ( ) const
pure virtual

◆ compatible_with()

bool protocols::forge::build::BuildInstruction::compatible_with ( BuildInstruction const &  rval) const
virtual

compares fixed and mutable positions to determine compatibility with another instruction

Remarks
override this to obtain custom compatibility check

References original_fixed_positions(), original_mutable_positions(), rts_, and protocols::forge::build::TR().

◆ creates_undefined_backbone()

virtual bool protocols::forge::build::BuildInstruction::creates_undefined_backbone ( ) const
pure virtual

◆ defined_positions()

virtual Positions protocols::forge::build::BuildInstruction::defined_positions ( ) const
pure virtual

return a copy of the set of positions within the newly modified region that has a defined conformation. E.g. existing or copied residues.

This set can change wrt length changes in Pose/Conformation being watched.

Implemented in protocols::forge::build::SegmentSwap, protocols::forge::build::SegmentRebuild, protocols::forge::build::SegmentInsert, protocols::forge::build::GrowRight, protocols::forge::build::GrowLeft, protocols::forge::build::ConnectRight, and protocols::forge::build::Bridge.

Referenced by protocols::forge::build::BuildManager::intervals_containing_defined_positions(), and protocols::forge::build::BuildManager::modified_i2p_defined().

◆ dependencies()

BuildInstructionCAPs const& protocols::forge::build::BuildInstruction::dependencies ( ) const
inline

the list of instructions whose modify() must complete before the modify() for this instruction may be called successfully

References dependencies_.

Referenced by protocols::forge::build::RelativeConnectRight::modify_impl().

◆ dependencies_satisfied()

bool protocols::forge::build::BuildInstruction::dependencies_satisfied ( ) const
protectedvirtual

are dependencies satisfied so that modify_impl() can complete successfully?

Returns
True if modify_impl() can be called, False otherwise.
Remarks
This function will automatically be checked within modify() prior to running modify_impl().

Reimplemented in protocols::forge::build::SegmentSwap, protocols::forge::build::SegmentRebuild, protocols::forge::build::SegmentInsert, protocols::forge::build::GrowRight, protocols::forge::build::GrowLeft, protocols::forge::build::ConnectRight, and protocols::forge::build::Bridge.

References dependencies_.

Referenced by modify().

◆ dependent_on()

bool protocols::forge::build::BuildInstruction::dependent_on ( BuildInstructionCAP  i) const
virtual

is this instruction dependent upon the given instruction?

References dependencies_.

Referenced by add_dependency_to().

◆ detach_after_modify() [1/2]

bool protocols::forge::build::BuildInstruction::detach_after_modify ( ) const
inline

detach after modify()?

Ordinarily a modify() call consists of attaching as a length obs of the Pose, actually doing the modify, and then detaching as a length obs of the Pose. This flag governs whether the last detach occurs.

References detach_after_modify_.

◆ detach_after_modify() [2/2]

void protocols::forge::build::BuildInstruction::detach_after_modify ( bool const  flag)
inline

set detach after modify()

Ordinarily a modify() call consists of attaching as a length obs of the Pose, actually doing the modify, and then detaching as a length obs of the Pose. This flag governs whether the last detach occurs.

References detach_after_modify_.

◆ detach_from()

void protocols::forge::build::BuildInstruction::detach_from ( )

detach from a Pose's conformation

References length_obs_link_.

Referenced by attach_to(), modify(), on_length_change(), reset_accounting(), and ~BuildInstruction().

◆ has_dependencies()

bool protocols::forge::build::BuildInstruction::has_dependencies ( ) const
inline

◆ interval()

virtual Interval protocols::forge::build::BuildInstruction::interval ( ) const
pure virtual

a copy of the working range of residues specifying the modified region

This residue range can change wrt length changes in Pose /Conformation being watched.

Implemented in protocols::forge::build::SegmentSwap, protocols::forge::build::SegmentRebuild, protocols::forge::build::SegmentInsert, protocols::forge::build::GrowRight, protocols::forge::build::GrowLeft, protocols::forge::build::ConnectRight, and protocols::forge::build::Bridge.

Referenced by protocols::forge::build::BuildManager::intervals(), protocols::forge::build::BuildManager::intervals_containing_defined_positions(), protocols::forge::build::BuildManager::intervals_containing_new_positions(), protocols::forge::build::BuildManager::intervals_containing_preexisting_positions(), protocols::forge::build::BuildManager::intervals_containing_undefined_positions(), protocols::forge::build::BuildManager::intervals_without_valid_original_equivalents(), protocols::forge::build::BuildManager::modified2original_interval_endpoints(), protocols::forge::build::BuildManager::modified2original_intervals(), protocols::forge::build::BuildManager::modified_i2p_defined(), protocols::forge::build::BuildManager::modified_i2p_new(), protocols::forge::build::BuildManager::modified_i2p_preexisting(), protocols::forge::build::BuildManager::modified_i2p_undefined(), protocols::forge::build::BuildManager::modified_interval2movemap(), protocols::forge::build::BuildManager::original2modified_interval_endpoints(), protocols::forge::build::BuildManager::original2modified_intervals(), and protocols::forge::build::BuildManager::union_of_intervals_containing_undefined_positions().

◆ length_obs_link()

Link const& protocols::forge::build::BuildInstruction::length_obs_link ( ) const
inlineprotected

access to the Conformation length observer link

References length_obs_link_.

Referenced by protocols::forge::build::SegmentRebuild::modify_impl().

◆ modify()

BuildInstructionState::Enum protocols::forge::build::BuildInstruction::modify ( Pose pose)

◆ modify_impl()

virtual void protocols::forge::build::BuildInstruction::modify_impl ( Pose pose)
protectedpure virtual

◆ modify_was_successful()

bool protocols::forge::build::BuildInstruction::modify_was_successful ( ) const

Is the BuildInstruction's state at MODIFY_WAS_SUCCESSFUL?

Remarks
MODIFY_WAS_SUCCESSFUL indicates the BuildInstruction has finished modifications to the Pose, and its residue indexing is now consistent with the newly modified Pose.

References protocols::forge::build::BuildInstructionState::MODIFY_WAS_SUCCESSFUL, and state_.

Referenced by modify(), protocols::forge::build::BuildManager::modify(), protocols::forge::build::ConnectRight::on_residue_append(), protocols::forge::build::ConnectRight::on_residue_delete(), and protocols::forge::build::ConnectRight::on_residue_prepend().

◆ movemap()

virtual MoveMap protocols::forge::build::BuildInstruction::movemap ( ) const
pure virtual

return a copy of the MoveMap that defines the moveable/fixed positions/dofs for this instruction

This set can change wrt length changes in Pose/Conformation being watched.

Implemented in protocols::forge::build::SegmentSwap, protocols::forge::build::SegmentRebuild, protocols::forge::build::SegmentInsert, protocols::forge::build::GrowRight, protocols::forge::build::GrowLeft, protocols::forge::build::ConnectRight, and protocols::forge::build::Bridge.

Referenced by protocols::forge::build::BuildManager::modified_interval2movemap().

◆ n_dependencies()

core::Size protocols::forge::build::BuildInstruction::n_dependencies ( ) const
inline

the number of dependencies this BuildInstruction has

References dependencies_.

Referenced by protocols::forge::build::RelativeConnectRight::modify_impl().

◆ new_positions()

virtual Positions protocols::forge::build::BuildInstruction::new_positions ( ) const
pure virtual

◆ on_length_change()

void protocols::forge::build::BuildInstruction::on_length_change ( LengthEvent const &  event)

◆ on_residue_append()

virtual void protocols::forge::build::BuildInstruction::on_residue_append ( LengthEvent const &  event)
pure virtual

◆ on_residue_delete()

virtual void protocols::forge::build::BuildInstruction::on_residue_delete ( LengthEvent const &  event)
pure virtual

◆ on_residue_prepend()

virtual void protocols::forge::build::BuildInstruction::on_residue_prepend ( LengthEvent const &  event)
pure virtual

◆ operator=()

BuildInstruction & protocols::forge::build::BuildInstruction::operator= ( BuildInstruction const &  rval)

◆ original_deleted_positions()

virtual Positions protocols::forge::build::BuildInstruction::original_deleted_positions ( ) const
pure virtual

◆ original_fixed_positions()

virtual Positions protocols::forge::build::BuildInstruction::original_fixed_positions ( ) const
pure virtual

return set of any fixed positions necessary with respect to the original interval and original Pose numbering

Remarks
Used for ensuring build regions for instructions do not overlap and so that jumps may be placed correctly.
Returns
empty set if no fixed positions necessary

Implemented in protocols::forge::build::SegmentSwap, protocols::forge::build::SegmentRebuild, protocols::forge::build::SegmentInsert, protocols::forge::build::RelativeConnectRight, protocols::forge::build::GrowRight, protocols::forge::build::GrowLeft, protocols::forge::build::ConnectRight, and protocols::forge::build::Bridge.

Referenced by compatible_with().

◆ original_interval()

Interval const& protocols::forge::build::BuildInstruction::original_interval ( ) const
inline

return original residue range of this instruction

References original_interval_.

Referenced by protocols::forge::build::BuildManager::modified2original_interval_endpoints(), protocols::forge::build::BuildManager::modified2original_intervals(), protocols::forge::build::SegmentInsert::modify_impl(), protocols::forge::build::SegmentRebuild::modify_impl(), protocols::forge::build::SegmentSwap::modify_impl(), protocols::forge::build::BuildManager::original2modified_interval_endpoints(), protocols::forge::build::BuildManager::original2modified_intervals(), protocols::forge::build::Bridge::original_deleted_positions(), protocols::forge::build::SegmentInsert::original_deleted_positions(), protocols::forge::build::SegmentRebuild::original_deleted_positions(), protocols::forge::build::SegmentSwap::original_deleted_positions(), protocols::forge::build::Bridge::original_fixed_positions(), protocols::forge::build::ConnectRight::original_fixed_positions(), protocols::forge::build::GrowLeft::original_fixed_positions(), protocols::forge::build::GrowRight::original_fixed_positions(), protocols::forge::build::SegmentInsert::original_fixed_positions(), protocols::forge::build::SegmentRebuild::original_fixed_positions(), protocols::forge::build::BuildManager::original_i2p_deleted(), protocols::forge::build::BuildManager::original_i2p_kept(), protocols::forge::build::BuildManager::original_intervals_containing_deleted_positions(), protocols::forge::build::BuildManager::original_intervals_containing_kept_positions(), protocols::forge::build::Bridge::original_kept_positions(), protocols::forge::build::Bridge::original_mutable_positions(), protocols::forge::build::SegmentRebuild::original_mutable_positions(), protocols::forge::build::SegmentSwap::original_mutable_positions(), protocols::forge::build::SegmentInsert::performing_pure_insertion(), protocols::forge::build::Bridge::reset_accounting_impl(), protocols::forge::build::ConnectRight::reset_accounting_impl(), protocols::forge::build::GrowLeft::reset_accounting_impl(), protocols::forge::build::GrowRight::reset_accounting_impl(), protocols::forge::build::SegmentInsert::reset_accounting_impl(), protocols::forge::build::SegmentRebuild::reset_accounting_impl(), and protocols::forge::build::SegmentSwap::reset_accounting_impl().

◆ original_interval_valid()

virtual bool protocols::forge::build::BuildInstruction::original_interval_valid ( ) const
pure virtual

◆ original_kept_positions()

virtual Positions protocols::forge::build::BuildInstruction::original_kept_positions ( ) const
pure virtual

◆ original_mutable_positions()

virtual Positions protocols::forge::build::BuildInstruction::original_mutable_positions ( ) const
pure virtual

return set of any mutable positions necessary with respect to the original interval and original Pose numbering

Remarks
Used for ensuring build regions for instructions do not overlap and so that jumps may be placed correctly.

Implemented in protocols::forge::build::SegmentSwap, protocols::forge::build::SegmentRebuild, protocols::forge::build::SegmentInsert, protocols::forge::build::GrowRight, protocols::forge::build::GrowLeft, protocols::forge::build::ConnectRight, and protocols::forge::build::Bridge.

Referenced by compatible_with().

◆ preexisting_positions()

virtual Positions protocols::forge::build::BuildInstruction::preexisting_positions ( ) const
pure virtual

◆ ready()

bool protocols::forge::build::BuildInstruction::ready ( ) const

Is the BuildInstruction's state at READY?

Remarks
READY indicates the BuildInstruction has been reset and is ready to modify a Pose.

References protocols::forge::build::BuildInstructionState::READY, and state_.

◆ reset_accounting()

void protocols::forge::build::BuildInstruction::reset_accounting ( )

reset intervals, positions, etc to initial state and drop observers. State set to READY.

Reset intervals, positions, etc to initial state and drop observers. State set to READY.

References detach_from(), protocols::forge::build::BuildInstructionState::READY, reset_accounting_impl(), and state().

◆ reset_accounting_impl()

virtual void protocols::forge::build::BuildInstruction::reset_accounting_impl ( )
protectedpure virtual

◆ residue_type_set()

ResidueTypeSet const& protocols::forge::build::BuildInstruction::residue_type_set ( ) const
inline

◆ state() [1/2]

BuildInstructionState::Enum protocols::forge::build::BuildInstruction::state ( ) const
inline

return the state of this BuildInstruction

References state_.

Referenced by modify(), and reset_accounting().

◆ state() [2/2]

void protocols::forge::build::BuildInstruction::state ( BuildInstructionState::Enum const  s)
inlineprotected

set the BuildInstruction's current state

References state_.

◆ undefined_positions()

virtual Positions protocols::forge::build::BuildInstruction::undefined_positions ( ) const
pure virtual

◆ waiting_on_dependencies()

bool protocols::forge::build::BuildInstruction::waiting_on_dependencies ( ) const

Is the BuildInstruction's state at WAITING_ON_DEPENDENCIES?

Remarks
WAITING_ON_DEPENDENCIES indicates the BuildInstruction is waiting for its dependencies to be satisfied before allowing modifications to proceed.

References state_, and protocols::forge::build::BuildInstructionState::WAITING_ON_DEPENDENCIES.

Member Data Documentation

◆ dependencies_

BuildInstructionCAPs protocols::forge::build::BuildInstruction::dependencies_
private

if this BuildInstruction's modify() is dependent on any other BuildInstructions whose modify() must complete first, we store access to those instructions here

Warning
Due to copy ambiguities, dependencies are currently not copied! They must be externally rebuilt, e.g. by the BuildManager.

Referenced by add_dependency_to(), clear_dependencies(), dependencies(), dependencies_satisfied(), dependent_on(), has_dependencies(), and n_dependencies().

◆ detach_after_modify_

bool protocols::forge::build::BuildInstruction::detach_after_modify_
private

detach after performing modify()

Ordinarily a modify() call consists of attaching as a length obs of the Pose, actually doing the modify, and then detaching as a length obs of the Pose. This flag governs whether the last detach occurs.

Referenced by detach_after_modify(), modify(), and operator=().

◆ length_obs_link_

Link protocols::forge::build::BuildInstruction::length_obs_link_
private

Conformation length observer link.

Referenced by attach_to(), detach_from(), and length_obs_link().

◆ original_interval_

Interval protocols::forge::build::BuildInstruction::original_interval_
private

defines the original residue range via closed interval [first, second] or an original anchor position [anchor, anchor] that's marked as invalid

Remarks
no mutable access to this data

Referenced by operator=(), and original_interval().

◆ rts_

ResidueTypeSetCAP protocols::forge::build::BuildInstruction::rts_
private

the residue type set to use

Referenced by compatible_with(), operator=(), and residue_type_set().

◆ state_

BuildInstructionState::Enum protocols::forge::build::BuildInstruction::state_
private

Describes the state of the BuildInstruction.

Remarks
See documentation of BuildInstructionState::Enum and the query state, set state, and modify() functions for more information.

Referenced by modify(), modify_was_successful(), operator=(), ready(), state(), and waiting_on_dependencies().


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