Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
< BuildInstructionCAP
BuildInstructionCAPs
 
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

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

Constructor & Destructor Documentation

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

default constructor

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
protocols::forge::build::BuildInstruction::BuildInstruction ( BuildInstruction const &  rval)

copy constructor

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

default destructor

References detach_from().

Member Function Documentation

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

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

clear the list of dependencies

References dependencies_.

virtual BuildInstructionOP protocols::forge::build::BuildInstruction::clone ( ) const
pure virtual
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().

virtual bool protocols::forge::build::BuildInstruction::creates_undefined_backbone ( ) const
pure virtual
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::SegmentInsert, protocols::forge::build::ConnectRight, protocols::forge::build::SegmentRebuild, protocols::forge::build::GrowLeft, protocols::forge::build::GrowRight, protocols::forge::build::Bridge, and protocols::forge::build::SegmentSwap.

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

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

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::SegmentInsert, protocols::forge::build::ConnectRight, protocols::forge::build::SegmentRebuild, protocols::forge::build::GrowLeft, protocols::forge::build::GrowRight, protocols::forge::build::Bridge, and protocols::forge::build::SegmentSwap.

References dependencies_.

Referenced by modify().

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

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_.

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_.

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

bool protocols::forge::build::BuildInstruction::has_dependencies ( ) const
inline
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::SegmentInsert, protocols::forge::build::ConnectRight, protocols::forge::build::SegmentRebuild, protocols::forge::build::GrowLeft, protocols::forge::build::GrowRight, protocols::forge::build::Bridge, and protocols::forge::build::SegmentSwap.

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

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

BuildInstructionState::Enum protocols::forge::build::BuildInstruction::modify ( Pose pose)
virtual void protocols::forge::build::BuildInstruction::modify_impl ( Pose pose)
protectedpure virtual
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().

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::SegmentInsert, protocols::forge::build::ConnectRight, protocols::forge::build::SegmentRebuild, protocols::forge::build::GrowLeft, protocols::forge::build::GrowRight, protocols::forge::build::Bridge, and protocols::forge::build::SegmentSwap.

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

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

virtual Positions protocols::forge::build::BuildInstruction::new_positions ( ) const
pure virtual
void protocols::forge::build::BuildInstruction::on_length_change ( LengthEvent const &  event)
virtual void protocols::forge::build::BuildInstruction::on_residue_append ( LengthEvent const &  event)
pure virtual
virtual void protocols::forge::build::BuildInstruction::on_residue_delete ( LengthEvent const &  event)
pure virtual
virtual void protocols::forge::build::BuildInstruction::on_residue_prepend ( LengthEvent const &  event)
pure virtual
BuildInstruction & protocols::forge::build::BuildInstruction::operator= ( BuildInstruction const &  rval)
virtual Positions protocols::forge::build::BuildInstruction::original_deleted_positions ( ) const
pure virtual
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::SegmentInsert, protocols::forge::build::ConnectRight, protocols::forge::build::SegmentRebuild, protocols::forge::build::GrowLeft, protocols::forge::build::GrowRight, protocols::forge::build::Bridge, protocols::forge::build::SegmentSwap, and protocols::forge::build::RelativeConnectRight.

Referenced by compatible_with().

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::SegmentSwap::modify_impl(), protocols::forge::build::SegmentRebuild::modify_impl(), protocols::forge::build::SegmentInsert::modify_impl(), protocols::forge::build::BuildManager::original2modified_interval_endpoints(), protocols::forge::build::BuildManager::original2modified_intervals(), protocols::forge::build::SegmentSwap::original_deleted_positions(), protocols::forge::build::Bridge::original_deleted_positions(), protocols::forge::build::SegmentRebuild::original_deleted_positions(), protocols::forge::build::SegmentInsert::original_deleted_positions(), protocols::forge::build::Bridge::original_fixed_positions(), protocols::forge::build::GrowLeft::original_fixed_positions(), protocols::forge::build::GrowRight::original_fixed_positions(), protocols::forge::build::SegmentRebuild::original_fixed_positions(), protocols::forge::build::ConnectRight::original_fixed_positions(), protocols::forge::build::SegmentInsert::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::SegmentSwap::original_mutable_positions(), protocols::forge::build::Bridge::original_mutable_positions(), protocols::forge::build::SegmentRebuild::original_mutable_positions(), protocols::forge::build::SegmentInsert::performing_pure_insertion(), protocols::forge::build::SegmentSwap::reset_accounting_impl(), protocols::forge::build::Bridge::reset_accounting_impl(), protocols::forge::build::GrowRight::reset_accounting_impl(), protocols::forge::build::GrowLeft::reset_accounting_impl(), protocols::forge::build::SegmentRebuild::reset_accounting_impl(), protocols::forge::build::SegmentInsert::reset_accounting_impl(), and protocols::forge::build::ConnectRight::reset_accounting_impl().

virtual bool protocols::forge::build::BuildInstruction::original_interval_valid ( ) const
pure virtual
virtual Positions protocols::forge::build::BuildInstruction::original_kept_positions ( ) const
pure virtual
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::SegmentInsert, protocols::forge::build::ConnectRight, protocols::forge::build::SegmentRebuild, protocols::forge::build::GrowLeft, protocols::forge::build::GrowRight, protocols::forge::build::Bridge, and protocols::forge::build::SegmentSwap.

Referenced by compatible_with().

virtual Positions protocols::forge::build::BuildInstruction::preexisting_positions ( ) const
pure virtual
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_.

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

virtual void protocols::forge::build::BuildInstruction::reset_accounting_impl ( )
protectedpure virtual
ResidueTypeSet const& protocols::forge::build::BuildInstruction::residue_type_set ( ) const
inline
BuildInstructionState::Enum protocols::forge::build::BuildInstruction::state ( ) const
inline

return the state of this BuildInstruction

References state_.

Referenced by modify(), and reset_accounting().

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

set the BuildInstruction's current state

References state_.

virtual Positions protocols::forge::build::BuildInstruction::undefined_positions ( ) const
pure virtual
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

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

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=().

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

Conformation length observer link.

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

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

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

the residue type set to use

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

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: