Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
protocols::loops::GuardedLoopsFromFile Class Reference

This class ensures that the Loops object that is needed to run any of the various forms of loop modeling is correctly initialized from a Pose. If the residues specified from a loops file have not been resolved into the residue indices for a Pose, then this class will die with an assertion failure. More...

#include <LoopsFileIO.hh>

Inheritance diagram for protocols::loops::GuardedLoopsFromFile:
Inheritance graph
[legend]

Public Member Functions

 GuardedLoopsFromFile ()
 default ctor; sets the object in an "in charge" state. More...
 
 GuardedLoopsFromFile (LoopsFileData const &lfd)
 constructor from a loops-file-data object: sets this object in an "in charge" state. More...
 
 GuardedLoopsFromFile (loops_definers::LoopsDefinerOP ld)
 constructor from a loops-definer object: sets this object in an "in charge" state. More...
 
 GuardedLoopsFromFile (LoopsOP loops)
 constructor from loops pointer: sets this object in a "not in charge" state. More...
 
 GuardedLoopsFromFile (Loops const &loops)
 constructor from a loops object: set this object in an "in charge" state. More...
 
 GuardedLoopsFromFile (GuardedLoopsFromFile const &src)
 copy constructor; takes it's "in charge" state from src. More...
 
 GuardedLoopsFromFile (GuardedLoopsFromFile const &src, bool)
 copy constructor; takes it's "in charge" state from src. Set the copy as not-in-charge. More...
 
 ~GuardedLoopsFromFile () override
 virtual dstor More...
 
GuardedLoopsFromFileoperator= (GuardedLoopsFromFile const &rhs)
 assignment operator; takes it's "in charge" state from rhs More...
 
void in_charge (bool setting)
 set to "in charge" state. More...
 
bool in_charge () const
 get "in charge" state. More...
 
void resolve_loop_indices (core::pose::Pose const &)
 Resolve the loop indices, and mark the state as resolved, so that calls to loops() will succeed. This function will re-resolve loop indices with a new pose, which may be important if the same loop_file_data_ is being applied to a pose which has different PDB indices. If I am not in charge, this is a no-op. More...
 
void resolve_loop_indices_once (core::pose::Pose const &)
 
LoopsCOP loops () const
 request the LoopsCOP pointer; asserts that the loop indices have been resolved or that "I am not in charge". More...
 
LoopsOP loops ()
 request the LoopsOP pointer; asserts that the loop indices have been resolved or that "I am not in charge". More...
 
void set_loops_pointer (LoopsOP setting)
 set the loops owning pointer object directly More...
 
void loops (Loops const &setting)
 set the loops to copy the contents of settings into the existing Loops object More...
 
void loops (LoopsFileData const &setting)
 set the LoopsFileData object directly More...
 
LoopsFileDataCOP loops_file_data () const
 read access to the LoopsFileData More...
 
void loops (loops_definers::LoopsDefinerOP const &setting)
 set the LoopsDefiner object directly More...
 
loops_definers::LoopsDefinerCOP loops_definer () const
 read access to the LoopsFileData More...
 

Private Attributes

bool in_charge_
 
bool pose_has_resolved_loop_indices_
 
bool rely_on_loopfile_indices_
 
LoopsFileDataOP loops_file_data_
 
loops_definers::LoopsDefinerOP loops_definer_
 
LoopsOP loops_
 

Detailed Description

This class ensures that the Loops object that is needed to run any of the various forms of loop modeling is correctly initialized from a Pose. If the residues specified from a loops file have not been resolved into the residue indices for a Pose, then this class will die with an assertion failure.

Constructor & Destructor Documentation

protocols::loops::GuardedLoopsFromFile::GuardedLoopsFromFile ( )

default ctor; sets the object in an "in charge" state.

default constructor: set state to not expect a pose, but to return an empty Loops object

protocols::loops::GuardedLoopsFromFile::GuardedLoopsFromFile ( LoopsFileData const &  lfd)

constructor from a loops-file-data object: sets this object in an "in charge" state.

construct from LoopsFileData: set state to expect a Pose

protocols::loops::GuardedLoopsFromFile::GuardedLoopsFromFile ( loops_definers::LoopsDefinerOP  ld)

constructor from a loops-definer object: sets this object in an "in charge" state.

construct from LoopsFileData: set state to expect a Pose

protocols::loops::GuardedLoopsFromFile::GuardedLoopsFromFile ( LoopsOP  loops)

constructor from loops pointer: sets this object in a "not in charge" state.

construct from a LoopsOP

protocols::loops::GuardedLoopsFromFile::GuardedLoopsFromFile ( Loops const &  loops)

constructor from a loops object: set this object in an "in charge" state.

construct from a LoopsOP

protocols::loops::GuardedLoopsFromFile::GuardedLoopsFromFile ( GuardedLoopsFromFile const &  src)
default

copy constructor; takes it's "in charge" state from src.

Shallow copy of the LoopsOP data so that it can be shared between multiple objects; take the "in_charge_" bit from the source in the event that this is a called as part of a clone.

protocols::loops::GuardedLoopsFromFile::GuardedLoopsFromFile ( GuardedLoopsFromFile const &  src,
bool   
)

copy constructor; takes it's "in charge" state from src. Set the copy as not-in-charge.

Shallow copy of the LoopsOP data so that it can be shared between multiple objects – also assume that the GuardedLoopsFromFile object is the one that is in charge.

References in_charge_.

protocols::loops::GuardedLoopsFromFile::~GuardedLoopsFromFile ( )
overridedefault

virtual dstor

Member Function Documentation

void protocols::loops::GuardedLoopsFromFile::in_charge ( bool  setting)

set to "in charge" state.

References in_charge_.

bool protocols::loops::GuardedLoopsFromFile::in_charge ( ) const

get "in charge" state.

References in_charge_.

LoopsCOP protocols::loops::GuardedLoopsFromFile::loops ( ) const

request the LoopsCOP pointer; asserts that the loop indices have been resolved or that "I am not in charge".

References in_charge_, loops_, and pose_has_resolved_loop_indices_.

Referenced by resolve_loop_indices().

LoopsOP protocols::loops::GuardedLoopsFromFile::loops ( )

request the LoopsOP pointer; asserts that the loop indices have been resolved or that "I am not in charge".

References in_charge_, loops_, and pose_has_resolved_loop_indices_.

void protocols::loops::GuardedLoopsFromFile::loops ( Loops const &  setting)

set the loops to copy the contents of settings into the existing Loops object

Deep copy into the loops data; this updates the single Loops object that is / can be shared among multiple objects.

References loops_, pose_has_resolved_loop_indices_, and rely_on_loopfile_indices_.

void protocols::loops::GuardedLoopsFromFile::loops ( LoopsFileData const &  setting)
void protocols::loops::GuardedLoopsFromFile::loops ( loops_definers::LoopsDefinerOP const &  setting)

set the LoopsDefiner object directly

set the LoopsFileData object directly

References in_charge_, loops_definer_, pose_has_resolved_loop_indices_, and rely_on_loopfile_indices_.

loops_definers::LoopsDefinerCOP protocols::loops::GuardedLoopsFromFile::loops_definer ( ) const

read access to the LoopsFileData

References loops_definer_.

LoopsFileDataCOP protocols::loops::GuardedLoopsFromFile::loops_file_data ( ) const

read access to the LoopsFileData

References loops_file_data_.

GuardedLoopsFromFile & protocols::loops::GuardedLoopsFromFile::operator= ( GuardedLoopsFromFile const &  rhs)
default

assignment operator; takes it's "in charge" state from rhs

void protocols::loops::GuardedLoopsFromFile::resolve_loop_indices ( core::pose::Pose const &  pose)

Resolve the loop indices, and mark the state as resolved, so that calls to loops() will succeed. This function will re-resolve loop indices with a new pose, which may be important if the same loop_file_data_ is being applied to a pose which has different PDB indices. If I am not in charge, this is a no-op.

This will re-resolve the loop indices with the input pose, even if they had been resolved in the past.

References in_charge_, loops(), loops_definer_, loops_file_data_, pose_has_resolved_loop_indices_, and rely_on_loopfile_indices_.

Referenced by resolve_loop_indices_once().

void protocols::loops::GuardedLoopsFromFile::resolve_loop_indices_once ( core::pose::Pose const &  pose)

This will only resolve the loop indices once, so repeated calls to this will not alter the Loops object with (possibly) new loop indices.

References in_charge_, pose_has_resolved_loop_indices_, and resolve_loop_indices().

void protocols::loops::GuardedLoopsFromFile::set_loops_pointer ( LoopsOP  setting)

set the loops owning pointer object directly

Shallow copy of the loops data.

References in_charge_, loops_, pose_has_resolved_loop_indices_, and rely_on_loopfile_indices_.

Member Data Documentation

bool protocols::loops::GuardedLoopsFromFile::in_charge_
private
LoopsOP protocols::loops::GuardedLoopsFromFile::loops_
private

Referenced by loops(), and set_loops_pointer().

loops_definers::LoopsDefinerOP protocols::loops::GuardedLoopsFromFile::loops_definer_
private
LoopsFileDataOP protocols::loops::GuardedLoopsFromFile::loops_file_data_
private
bool protocols::loops::GuardedLoopsFromFile::pose_has_resolved_loop_indices_
private
bool protocols::loops::GuardedLoopsFromFile::rely_on_loopfile_indices_
private

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