Rosetta
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::kinematic_closure::BalancedKicMover Class Reference

Make a kinematic closure move that obeys detailed balance. More...

#include <BalancedKicMover.hh>

Inheritance diagram for protocols::kinematic_closure::BalancedKicMover:
Inheritance graph
[legend]

Public Member Functions

 BalancedKicMover ()
 Default constructor. More...
 
protocols::moves::MoverOP clone () const override
 Return a clone of the Mover object. More...
 
protocols::moves::MoverOP fresh_instance () const override
 Generates a new Mover object freshly created with the default ctor. More...
 
 ~BalancedKicMover () override
 Default destructor. More...
 
void apply (Pose &pose) override
 Sample the pose in the regions specified by get_loops(). More...
 
std::string get_name () const override
 Each derived class must specify its name. The class name. More...
 
void parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &data) override
 Called by MoverFactory when constructing new Movers. Takes care of the specific mover's parsing. More...
 
void set_loop (Loop const &loop)
 Set the loop to be sampled on the next call to apply(). More...
 
void set_loops (protocols::loops::LoopsOP const loops)
 Set the loops to be sampled on the next call to apply(). More...
 
void add_perturber (perturbers::PerturberOP perturber)
 Specify how the non-pivot torsions should be sampled. More...
 
void set_pivot_picker (pivot_pickers::PivotPickerOP picker)
 Specify how the pivot residues should be chosen. More...
 
void set_residue_selector (core::select::residue_selector::ResidueSelectorCOP selector)
 Set the residue_selector to use. More...
 
core::select::residue_selector::ResidueSelectorCOP residue_selector () const
 Get the residue selector that this mover uses. More...
 
bool preserve_detailed_balance () const override
 Return true, because this mover always obeys detailed balance. More...
 
void set_preserve_detailed_balance (bool) override
 This mover always obeys detailed balance, so this is a no-op. More...
 
Real last_proposal_density_ratio () override
 
utility::vector1< core::id::TorsionID_Rangetorsion_id_ranges (Pose &pose) override
 Indicate that each torsion in the loop may take on any value. More...
 
- Public Member Functions inherited from protocols::canonical_sampling::ThermodynamicMover
 ThermodynamicMover ()
 Default constructor. More...
 
 ~ThermodynamicMover () override
 Default destructor. More...
 
virtual void initialize_simulation (core::pose::Pose &pose, protocols::canonical_sampling::MetropolisHastingsMover const &metropolis_hastings_mover, core::Size cycle)
 Callback executed before any Monte Carlo trials are attempted. More...
 
virtual void observe_after_metropolis (protocols::canonical_sampling::MetropolisHastingsMover const &metropolis_hastings_mover)
 Callback executed after the Metropolis criterion is evaluated. More...
 
virtual void finalize_simulation (core::pose::Pose &pose, protocols::canonical_sampling::MetropolisHastingsMover const &metropolis_hastings_mover)
 Callback executed after all Monte Carlo trials are completed. More...
 
virtual bool is_multi_trial ()
 Return true if the move performs multiple trials on each apply. More...
 
virtual core::Real last_inner_score_delta_over_temperature ()
 If this is a multi-trial move, return the change in internal score/temperature caused by the last call to apply(). More...
 
virtual protocols::canonical_sampling::MetropolisHastingsMoverAP metropolis_hastings_mover ()
 If this is a multi-trial move, return the MetropolisHastingsMover being used internally. More...
 
virtual void set_metropolis_hastings_mover (protocols::canonical_sampling::MetropolisHastingsMoverAP metropolis_hastings_mover)
 If this is a multi-trial move, set the MetropolisHastingsMover to be used internally. More...
 
virtual utility::vector1< core::id::DOF_ID_Rangedof_id_ranges (core::pose::Pose &pose)
 Return a list specifying which degrees of freedom may be perturbed by apply(), and the in what range each perturbation may be. More...
 
- Public Member Functions inherited from protocols::moves::Mover
 Mover ()
 
virtual MoverOP create ()
 
MoverCOP get_self_ptr () const
 
MoverOP get_self_ptr ()
 
MoverCAP get_self_weak_ptr () const
 
MoverAP get_self_weak_ptr ()
 
 Mover (std::string const &type_name)
 sets the type for a mover; name_ has been removed (2010/05/14) More...
 
virtual void test_move (Pose &pose)
 : Unit test support function. Apply one move to a given pose. Allows extra test specific functions to be called before applying More...
 
virtual bool reinitialize_for_each_job () const
 Inform the Job Distributor (August '08 vintage) whether this object needs to be freshly regenerated on each use. More...
 
virtual bool reinitialize_for_new_input () const
 Inform the Job Distributor (August '08 vintage) whether this object needs to be regenerated when the input pose is about to change, (for example, if the Mover has special code on the first apply() that is only valid for that one input pose). More...
 
MoverStatus get_last_move_status () const
 end parser interface, start Job Distributor interface///////////// More...
 
void reset_status ()
 resets status to SUCCESS, meant to be used before an apply(). The job distributor (august 08 vintage) uses this to ensure non-accumulation of status across apply()s. More...
 
virtual core::pose::PoseOP get_additional_output ()
 Mechanism by which a mover may return multiple output poses from a single input pose. More...
 
void set_type (std::string const &setting)
 Set the 'type' string. More...
 
std::string get_type () const
 
void type (const std::string &type_in)
 Set the 'type' string. More...
 
std::string const & type () const
 Get the set 'type' string. More...
 
virtual void set_input_pose (PoseCOP pose)
 setter for poses contained for rms More...
 
virtual void set_native_pose (PoseCOP pose)
 setter for native poses contained for rms -— we should get rid of this method? it is widely used, but a bit unsafe More...
 
PoseCOP get_input_pose () const
 
PoseCOP get_native_pose () const
 
void set_current_job (protocols::jobdist::BasicJobCOP job)
 
jobdist::BasicJobCOP get_current_job () const
 
virtual void set_current_tag (std::string const &new_tag)
 
std::string get_current_tag () const
 A tag is a unique identifier used to identify structures produced by this Mover. get_current_tag() returns the tag, and set_current_tag( std::string tag ) sets the tag. This functionality is not intended for use with the 2008 job distributor. More...
 
virtual void show (std::ostream &output=std::cout) const
 Outputs details about the Mover, including current settings. More...
 
virtual void clear_info ()
 Strings container can be used to return miscellaneous info (as std::string) from a mover, such as notes about the results of apply(). The job distributor (Apr 09 vintage) will check this function to see if your protocol wants to add string info to the Job that ran this mover. One way this can be useful is that later, a JobOutputter may include/append this info to an output file. More...
 
virtual Stringsinfo ()
 non-const accessor More...
 
virtual Strings const & info () const
 const accessor More...
 
virtual void provide_citation_info (basic::citation_manager::CitationCollectionList &) const
 Provide citations to the passed CitationCollectionList Subclasses should add the info for themselves and any other classes they use. More...
 

Static Public Member Functions

static std::string mover_name ()
 
static void provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd)
 
static utility::tag::XMLSchemaComplexTypeGeneratorOP complex_type_generator_for_balancedKIC_mover (utility::tag::XMLSchemaDefinition &xsd)
 
static ClosureSolutionCOP pick_solution (SolutionList const &unperturbed_solutions, SolutionList const &perturbed_solutions)
 Pick a solution in a way that cancels out the geometrical bias of the kinematic closure algorithm. More...
 
static bool is_solution_trivial (ClosureProblemCOP problem, ClosureSolutionCOP solution, SolutionList const &unperturbed_solutions, SolutionList const &perturbed_solutions)
 Return true if the given solution is the same as the input pose. This allows for a more accurate reporting of Monte Carlo statistics. More...
 
- Static Public Member Functions inherited from protocols::moves::Mover
static std::string name ()
 
static void register_options ()
 Overload this static method if you access options within the mover. More...
 

Private Member Functions

void init_from_options ()
 Methods. More...
 

Private Attributes

bool is_fold_tree_stale_
 
bool selector_on_
 
std::string loops_file_
 
protocols::loops::Loop loop_
 
protocols::loops::LoopsOP loops_
 
perturbers::PerturberSetOP perturbers_
 
pivot_pickers::PivotPickerOP pivot_picker_
 
core::select::residue_selector::ResidueSelectorCOP residue_selector_
 

Additional Inherited Members

- Public Types inherited from protocols::moves::Mover
typedef utility::tag::TagCOP TagCOP
 
typedef core::pose::Pose Pose
 
typedef core::pose::PoseCOP PoseCOP
 
typedef std::list< std::string > Strings
 
- Protected Member Functions inherited from protocols::moves::Mover
void set_last_move_status (MoverStatus status)
 nonvirtual setter for MoverStatus last_status_. Protected means that only the mover itself will be able to change its own status. The job distributor (august 08 vintage) is aware of status set with this function and will do what the MoverStatus says. More...
 

Detailed Description

Make a kinematic closure move that obeys detailed balance.

This class is very conceptually similar to KicMover, so check out its documentation for a general overview of the kinematic closure algorithm. Here I will just highlight some details associated with making a balanced version of the move. Detailed balance is a useful property, because it allows a Monte Carlo simulation to recapitulate ensembles with correct equilibrium populations (so long as sampling is good, of course). There are a two reasons why the standard KicMover algorithm does not obey detailed balance. The first is that the geometry of the closure move itself introduces some inherent bias which has to be explicitly canceled out. The second is that care needs to be taken to perturb the non-pivot torsions in a way that also obeys detailed balance, as well.

The add_perturber() method works much like it does in KicMover. The only conceptual difference is that when the added perturbers are used internally within apply(), perturbers::Perturber::perturb_with_balance() is called instead of perturbers::Perturber::perturb(). This makes it easy to make variants of the perturber algorithms which obey detailed balance. The set_pivot_picker() method is no different from the KicMover version.

Constructor & Destructor Documentation

◆ BalancedKicMover()

protocols::kinematic_closure::BalancedKicMover::BalancedKicMover ( )

Default constructor.

◆ ~BalancedKicMover()

protocols::kinematic_closure::BalancedKicMover::~BalancedKicMover ( )
overridedefault

Default destructor.

Member Function Documentation

◆ add_perturber()

void protocols::kinematic_closure::BalancedKicMover::add_perturber ( perturbers::PerturberOP  perturber)

Specify how the non-pivot torsions should be sampled.

The KicMover starts off with a default set of perturbers. Then first time this method is called, all of the default perturbers are cleared and only the specified perturber is kept. Subsequent calls to this method simply add the specified perturbers. Nothing you add manually gets erased.

◆ apply()

void protocols::kinematic_closure::BalancedKicMover::apply ( Pose pose)
overridevirtual

Sample the pose in the regions specified by get_loops().

The parent class apply() method automatically sets up a fold tree (if necessary) and keeps track of whether or not the move succeeded. Child classes should reimplement do_apply() instead of this method.

Implements protocols::moves::Mover.

References core::pose::Pose::fold_tree(), protocols::loops::set_single_loop_fold_tree(), and TR().

◆ clone()

protocols::moves::MoverOP protocols::kinematic_closure::BalancedKicMover::clone ( ) const
overridevirtual

Return a clone of the Mover object.

clone is meant to return an OP'ed deep copy of this object. This really should be a pure virtual in the base class, but adding pure virtuals to Mover would massively disrupt the code. This default implementation crashes at runtime instead of compiletime if you try to call it. If this code is causing you problems, your Mover needs to override this function.

Reimplemented from protocols::moves::Mover.

◆ complex_type_generator_for_balancedKIC_mover()

utility::tag::XMLSchemaComplexTypeGeneratorOP protocols::kinematic_closure::BalancedKicMover::complex_type_generator_for_balancedKIC_mover ( utility::tag::XMLSchemaDefinition &  xsd)
static

◆ fresh_instance()

protocols::moves::MoverOP protocols::kinematic_closure::BalancedKicMover::fresh_instance ( ) const
overridevirtual

Generates a new Mover object freshly created with the default ctor.

fresh_instance is meant to return a new object of this class, created with the default constructor. This really should be a pure virtual in the base class, but adding pure virtuals to Mover would massively disrupt the code. This default implementation crashes at runtime instead of compiletime if you try to call it. If this code is causing you problems, your Mover needs to override this function. This is used by the August 08 job distributor.

Reimplemented from protocols::moves::Mover.

◆ get_name()

std::string protocols::kinematic_closure::BalancedKicMover::get_name ( ) const
overridevirtual

Each derived class must specify its name. The class name.

Implements protocols::moves::Mover.

◆ init_from_options()

void protocols::kinematic_closure::BalancedKicMover::init_from_options ( )
private

Methods.

◆ is_solution_trivial()

bool protocols::kinematic_closure::BalancedKicMover::is_solution_trivial ( ClosureProblemCOP  problem,
ClosureSolutionCOP  picked_solution,
SolutionList const &  unperturbed_solutions,
SolutionList const &  perturbed_solutions 
)
static

Return true if the given solution is the same as the input pose. This allows for a more accurate reporting of Monte Carlo statistics.

In order to obey detailed balance, the set of unperturbed solutions must contain one solution that is identical to the input pose. When this solution is picked and applied, the resulting move will pass the Metropolis criterion and lead to an artificially inflated acceptance rate. This method provides a way to report what really happened in the move, so that an accurate acceptance rate can be conveyed. Note that this is a static method, so it can be used outside the context of this class. The input pose conformation is inferred from the given problem.

References core::kinematics::distance().

◆ last_proposal_density_ratio()

Real protocols::kinematic_closure::BalancedKicMover::last_proposal_density_ratio ( )
inlineoverridevirtual

Right now the proposal probabilities are balanced internally, so this ratio will always be unity. This could change eventually, though.

Reimplemented from protocols::canonical_sampling::ThermodynamicMover.

◆ mover_name()

std::string protocols::kinematic_closure::BalancedKicMover::mover_name ( )
static

◆ parse_my_tag()

void protocols::kinematic_closure::BalancedKicMover::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap data 
)
overridevirtual

Called by MoverFactory when constructing new Movers. Takes care of the specific mover's parsing.

Some movers need not be parsed, so we shouldn't force people to reimplement this method. However, we should be chatty about the fact that someone is using a RosettaScripts interface to a mover which didn't define parse_my_tag()

Reimplemented from protocols::moves::Mover.

References core::select::residue_selector::parse_residue_selector(), and TR().

◆ pick_solution()

ClosureSolutionCOP protocols::kinematic_closure::BalancedKicMover::pick_solution ( SolutionList const &  unperturbed_solutions,
SolutionList const &  perturbed_solutions 
)
static

Pick a solution in a way that cancels out the geometrical bias of the kinematic closure algorithm.

Note that this is a static method, which means that it can be used outside the context of this class. The inputs are two sets of closure solutions. The first set should contain the starting conformation, and the second should contain novel conformations. The first set can be generated by running the KIC algorithm without perturbing the non-pivot torsions. For each solution in these two sets, a jacobian will have to be calculated. The solution that is returned will be free of bias. See apply() for an example of how this method is used.

◆ preserve_detailed_balance()

bool protocols::kinematic_closure::BalancedKicMover::preserve_detailed_balance ( ) const
inlineoverridevirtual

Return true, because this mover always obeys detailed balance.

Implements protocols::canonical_sampling::ThermodynamicMover.

◆ provide_xml_schema()

void protocols::kinematic_closure::BalancedKicMover::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static

◆ residue_selector()

core::select::residue_selector::ResidueSelectorCOP protocols::kinematic_closure::BalancedKicMover::residue_selector ( ) const
inline

Get the residue selector that this mover uses.

References residue_selector_.

◆ set_loop()

void protocols::kinematic_closure::BalancedKicMover::set_loop ( Loop const &  loop)

Set the loop to be sampled on the next call to apply().

◆ set_loops()

void protocols::kinematic_closure::BalancedKicMover::set_loops ( protocols::loops::LoopsOP const  loops)

Set the loops to be sampled on the next call to apply().

◆ set_pivot_picker()

void protocols::kinematic_closure::BalancedKicMover::set_pivot_picker ( pivot_pickers::PivotPickerOP  picker)

Specify how the pivot residues should be chosen.

◆ set_preserve_detailed_balance()

void protocols::kinematic_closure::BalancedKicMover::set_preserve_detailed_balance ( bool  )
inlineoverridevirtual

This mover always obeys detailed balance, so this is a no-op.

Implements protocols::canonical_sampling::ThermodynamicMover.

◆ set_residue_selector()

void protocols::kinematic_closure::BalancedKicMover::set_residue_selector ( core::select::residue_selector::ResidueSelectorCOP  selector)

Set the residue_selector to use.

◆ torsion_id_ranges()

vector1< TorsionID_Range > protocols::kinematic_closure::BalancedKicMover::torsion_id_ranges ( Pose pose)
overridevirtual

Indicate that each torsion in the loop may take on any value.

Implements protocols::canonical_sampling::ThermodynamicMover.

References core::id::BB, core::scoring::omega, protocols::loops::Loop::start(), and protocols::loops::Loop::stop().

Member Data Documentation

◆ is_fold_tree_stale_

bool protocols::kinematic_closure::BalancedKicMover::is_fold_tree_stale_
private

◆ loop_

protocols::loops::Loop protocols::kinematic_closure::BalancedKicMover::loop_
private

◆ loops_

protocols::loops::LoopsOP protocols::kinematic_closure::BalancedKicMover::loops_
private

◆ loops_file_

std::string protocols::kinematic_closure::BalancedKicMover::loops_file_
private

◆ perturbers_

perturbers::PerturberSetOP protocols::kinematic_closure::BalancedKicMover::perturbers_
private

◆ pivot_picker_

pivot_pickers::PivotPickerOP protocols::kinematic_closure::BalancedKicMover::pivot_picker_
private

◆ residue_selector_

core::select::residue_selector::ResidueSelectorCOP protocols::kinematic_closure::BalancedKicMover::residue_selector_
private

Referenced by residue_selector().

◆ selector_on_

bool protocols::kinematic_closure::BalancedKicMover::selector_on_
private

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