Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::moves::MonteCarlo Class Reference

This object is responsible for all of the major functions needed in a Monte Carlo simulation. Its main purpose is to apply the Metropolis Criterion on a pose, based on a ScoreFunction, temperature, and the previously accepted pose. It stores the lowest-energy pose ecountered, the last-accepted pose in the simulation, and various other statistics. More...

#include <MonteCarlo.hh>

Inheritance diagram for protocols::moves::MonteCarlo:
Inheritance graph
[legend]

Public Types

typedef
core::scoring::ScoreFunction 
ScoreFunction
 
typedef
core::scoring::ScoreFunctionOP 
ScoreFunctionOP
 
typedef
core::scoring::ScoreFunctionCOP 
ScoreFunctionCOP
 
typedef core::pose::Pose Pose
 
typedef core::pose::PoseOP PoseOP
 
typedef core::pose::PoseCOP PoseCOP
 
typedef core::Real Real
 
typedef core::Size Size
 

Public Member Functions

 MonteCarlo (MonteCarlo const &)
 Copy constructor. More...
 
 MonteCarlo (Pose const &init_pose, ScoreFunction const &scorefxn, Real const temperature)
 Constructs a useable MonteCarlo object. More...
 
 MonteCarlo (Pose const &init_pose, Real const init_score, Real const temperature)
 Constructor for external scoring. More...
 
 MonteCarlo (ScoreFunction const &scorefxn, Real const temperature)
 Constructor without Pose – call reset(pose) before first use. More...
 
 ~MonteCarlo () override
 Empty destructor in C++ file to reduce number of necessary includes. More...
 
virtual MonteCarloOP clone ()
 
void reset_scorefxn (Pose const &init_pose, ScoreFunction const &scorefxn)
 Resets the ScoreFunction. More...
 
void change_weight (core::scoring::ScoreType const &t, Real const &setting)
 Change the weight on a score term in the object's scorefunction. Useful when we don't want to reset the whole scorefunction during an annealing step. More...
 
virtual void set_temperature (Real const temp)
 Sets the temperature value used in the Metropolis Criterion to <temp> More...
 
Real temperature () const
 Returns the temperature value used in the Metropolis Criterion. More...
 
void set_autotemp (bool const setting, core::Real const quench_temp)
 Sets autotemp to quench_temp example(s): See also: MonteCarlo MonteCarlo.autotemp MonteCarlo.show_state. More...
 
virtual bool boltzmann (Pose &pose, std::string const &move_type="unk", core::Real const proposal_density_ratio=1, core::Real const inner_score_delta_over_temperature=0)
 Applies the Metropolis Criterion on pose based on the ScoreFunction, temperature, and the last accepted pose. This method evaluates the change in score, compares the trial pose to the last accepted pose, and updates the pose structure and simulation statistics appropriately. More...
 
virtual bool boltzmann (Pose &pose, core::Real const score, std::string const &move_type="unk", core::Real const proposal_density_ratio=1, core::Real const inner_score_temperature_delta=0)
 Applies the Metropolis Criterion on pose based on the externally computes score, temperature, and the last accepted pose. This method evaluates the change in score, compares the trial pose to the last accepted pose, and updates the pose structure and simulation statistics appropriately. More...
 
virtual bool boltzmann (core::Real score, std::string const &move_type="unk", core::Real const proposal_density_ratio=1, core::Real const inner_score_delta_over_temperature=0, bool check_lowest_score=true)
 Applies the Metropolis Criterion on the inputted pose based on the supplied score delta. More...
 
virtual bool boltzmann (core::Real score, Pose &pose, std::string const &move_type="unk", core::Real const proposal_density_ratio=1, core::Real const inner_score_delta_over_temperature=0, bool check_lowest_score=true)
 Applies the Metropolis Criterion on the inputted pose based on the supplied score delta. Updates the Pose Structure accordingly. More...
 
virtual void reset (Pose const &pose)
 Sets lowest score pose and last accepted pose to the score of <pose> More...
 
virtual void reset (Pose const &pose, Real const score)
 Sets lowest score pose and last accepted pose to the score of <pose> More...
 
void set_last_accepted_pose (Pose const &pose)
 Sets the last accepted pose to the score of <pose> More...
 
void set_last_accepted_pose (core::pose::Pose const &pose, core::Real score)
 Sets the last accepted pose and last accepted score. More...
 
void set_lowest_score_pose (core::pose::Pose const &pose)
 
void set_lowest_score_pose (core::pose::Pose const &pose, core::Real score)
 
void set_last_score (core::Real score)
 Set the last score. More...
 
Pose const & last_accepted_pose () const
 Returns the last accepted pose. More...
 
Pose const & lowest_score_pose () const
 Returns the lowest score pose encountered. More...
 
bool eval_lowest_score_pose (Pose &pose, bool score_pose=true, bool update_stats=false, std::string const &move_type="unk")
 Compares score of <pose> to the lowest score found. If lower, sets the current lowest score pose and lowest score. Use internal pose energies if score_pose is false. Used to evaluate lowest score without boltzmann. Does not change pose structure. More...
 
template<typename ConformationObserver >
void attach_observer_to_last_accepted_conformation (ConformationObserver &obs)
 attach observer to last accepted conformation More...
 
template<typename ConformationObserver >
void attach_observer_to_lowest_score_conformation (ConformationObserver &obs)
 attach observer to lowest score conformation More...
 
template<typename PoseObserver >
void attach_observer_to_last_accepted_pose (PoseObserver &obs)
 attach observer to last accepted pose More...
 
template<typename PoseObserver >
void attach_observer_to_lowest_score_pose (PoseObserver &obs)
 attach observer to lowest score pose More...
 
void recover_low (Pose &pose)
 Sets the input <pose> and last accepted pose to the lowest score pose. More...
 
virtual void score_function (ScoreFunction const &scorefxn)
 Sets the ScoreFunction to <scorefxn> , re-scores last accepted pose and lowest score pose. More...
 
ScoreFunction const & score_function () const
 Returns the MonteCarlo ScoreFunction. More...
 
void show_scores () const
 Displays the last accepted score and the lowest score. More...
 
void reset_counters ()
 Resets the mover counters. More...
 
void show_state () const
 Displays the entire MonteCarlo state temperature, scores, annealing settings, move statistics, move counters (show_counters) More...
 
void show_counters () const
 Displays the number of trials performed, fraction of trial moves accepted, and the average energy drop per accepted trial by mover types applied (unknown movers or perturbations are listed as "unktrials") More...
 
core::Size total_trials () const
 Set the counter to be used for this simulation. More...
 
Real last_accepted_score () const
 Manually record that a move was attempted. More...
 
Real last_score () const
 Returns the score value of the last score. More...
 
Real lowest_score () const
 Returns the score value of the lowest score pose encountered. More...
 
MCA mc_accepted () const
 Returns mc_accepted, informative of the last move applied. More...
 
std::string mc_accepted_string () const
 Returns mc_accepted as a human-readable string, informative of the last move applied. More...
 
void clear_poses ()
 Removes last accepted pose and lowest score pose. More...
 
void set_update_boinc (bool setting)
 no brief for now More...
 
bool get_update_boinc () const
 
Real total_score_of_last_considered_pose () const
 
core::Size last_accept () const
 Returns the number of trials since last acceptance. More...
 
core::Size heat_after_cycles () const
 no brief for now More...
 
void set_heat_after_cycles (core::Size setting)
 no brief for now More...
 
void push_back (moves::MonteCarloExceptionConvergeOP)
 no brief for now More...
 
core::Size check_frequency () const
 
void set_total_score_last_considered (core::Real score)
 
void set_last_accepted (core::Real score)
 
void set_lowest (core::Real score)
 

Protected Member Functions

void autotemp_reject ()
 for managing the temperature, if we need to do so More...
 
void autotemp_accept ()
 
void evaluate_convergence_checks (core::pose::Pose const &pose, bool reject, bool final)
 
Poselast_accepted_pose_non_const ()
 Returns the non-const last accepted pose (for subclasses) More...
 
void set_last_accepted_score (core::Real score)
 
void set_mc_accepted (MCA value)
 

Private Member Functions

MonteCarlo const & operator= (MonteCarlo const &)
 unimplemented – do not use More...
 

Private Attributes

PoseOP last_accepted_pose_
 Latest accepted pose. More...
 
PoseOP lowest_score_pose_
 Lowest score pose encountered. More...
 
core::Real temperature_
 Acceptance criterion temperature. More...
 
ScoreFunctionOP score_function_
 Internal scoring function. More...
 
bool autotemp_
 For abinitio-style increasing the temperature after a large number of rejects: More...
 
core::Real quench_temp_
 
int last_accept_
 
MCA mc_accepted_
 Result of the last call to boltzmann. More...
 
TrialCounterOP counter_
 diagnostics More...
 
bool update_boinc_
 
Real total_score_of_last_considered_pose_
 
Real last_accepted_score_
 
Real last_score_
 
Real lowest_score_
 
core::Size heat_after_cycles_
 
utility::vector1
< moves::MonteCarloExceptionConvergeOP
convergence_checks_
 
core::Size last_check_
 
core::Size check_frequency_
 

Detailed Description

This object is responsible for all of the major functions needed in a Monte Carlo simulation. Its main purpose is to apply the Metropolis Criterion on a pose, based on a ScoreFunction, temperature, and the previously accepted pose. It stores the lowest-energy pose ecountered, the last-accepted pose in the simulation, and various other statistics.

Output Methods: MonteCarlo.show_counters() MonteCarlo.show_scores() MonteCarlo.show_state() Common Methods: MonteCarlo.last_accepted_score MonteCarlo.last_accepted_pose MonteCarlo.lowest_score MonteCarlo.lowest_score_pose MonteCarlo.score_function MonteCarlo.set_temperature MonteCarlo.temperature

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::moves::MonteCarlo::MonteCarlo ( MonteCarlo const &  src)

Copy constructor.

The copy constructor does not copy the OPs, but rather creates new objects using the copy constructors or the clone() methods of the objects being pointed at. This is important, since otherwise, a copy of a Monte Carlo object could corrupt the state held in the original MonteCarlo object.

protocols::moves::MonteCarlo::MonteCarlo ( Pose const &  init_pose,
ScoreFunction const &  scorefxn,
Real const  temperature 
)

Constructs a useable MonteCarlo object.

mc = MonteCarlo( init_pose , scorefxn , temp )

Pose init_pose /manipulated during the simulation ScoreFunction scorefxn /evaluates pose scores Real (float) temp /used in the Metropolis Criterion

References check_frequency_, core::scoring::ScoreFunction::clone(), last_accepted_pose_, last_check_, lowest_score_pose_, reset(), and score_function_.

protocols::moves::MonteCarlo::MonteCarlo ( Pose const &  init_pose,
Real const  init_score,
Real const  temperature 
)

Constructor for external scoring.

Pose init_pose /manipulated during the simulation Real init_score /externally computed initial score Real (float) temp /used in the Metropolis Criterion

References check_frequency_, last_accepted_pose_, last_check_, lowest_score_pose_, and reset().

protocols::moves::MonteCarlo::MonteCarlo ( ScoreFunction const &  scorefxn,
Real const  temperature 
)

Constructor without Pose – call reset(pose) before first use.

References check_frequency_, core::scoring::ScoreFunction::clone(), last_accepted_pose_, last_check_, lowest_score_pose_, and score_function_.

protocols::moves::MonteCarlo::~MonteCarlo ( )
overridedefault

Empty destructor in C++ file to reduce number of necessary includes.

Member Function Documentation

template<typename ConformationObserver >
void protocols::moves::MonteCarlo::attach_observer_to_last_accepted_conformation ( ConformationObserver &  obs)

attach observer to last accepted conformation

Template Parameters
ConformationObserverany class implementing void attach_to( Conformation & )

References last_accepted_pose_.

template<typename PoseObserver >
void protocols::moves::MonteCarlo::attach_observer_to_last_accepted_pose ( PoseObserver &  obs)

attach observer to last accepted pose

Template Parameters
PoseObserverany class implementing void attach_to( Pose & )

References last_accepted_pose_.

template<typename ConformationObserver >
void protocols::moves::MonteCarlo::attach_observer_to_lowest_score_conformation ( ConformationObserver &  obs)

attach observer to lowest score conformation

Template Parameters
ConformationObserverany class implementing void attach_to( Conformation & )

References lowest_score_pose_.

template<typename PoseObserver >
void protocols::moves::MonteCarlo::attach_observer_to_lowest_score_pose ( PoseObserver &  obs)

attach observer to lowest score pose

Template Parameters
PoseObserverany class implementing void attach_to( Pose & )

References lowest_score_pose_.

void protocols::moves::MonteCarlo::autotemp_accept ( )
protected
void protocols::moves::MonteCarlo::autotemp_reject ( )
protected

for managing the temperature, if we need to do so

References autotemp_, heat_after_cycles_, last_accept_, protocols::mean_field::min(), quench_temp_, set_temperature(), temperature_, and protocols::moves::TR().

Referenced by boltzmann().

bool protocols::moves::MonteCarlo::boltzmann ( Pose pose,
std::string const &  move_type = "unk",
core::Real const  proposal_density_ratio = 1,
core::Real const  inner_score_delta_over_temperature = 0 
)
virtual

Applies the Metropolis Criterion on pose based on the ScoreFunction, temperature, and the last accepted pose. This method evaluates the change in score, compares the trial pose to the last accepted pose, and updates the pose structure and simulation statistics appropriately.

example(s): mc.boltzmann( pose ) See also: MonteCarlo MonteCarlo.last_accepted_score MonteCarlo.lowest_score

Reimplemented in protocols::monte_carlo::MonteCarloInterface, protocols::canonical_sampling::BiasedMonteCarlo, and protocols::moves::ReplicaExchangeMC.

References protocols::hotspot_hashing::accept, protocols::hybridization::score, score_function_, and update_boinc_.

Referenced by protocols::forge::remodel::RemodelLoopMover::abinitio_stage(), protocols::enzdes::BackboneSampler::apply(), protocols::magnesium::MgMonteCarlo::apply(), protocols::backrub::BackrubProtocol::apply(), protocols::protein_interface_design::movers::BackrubDDMover::apply(), protocols::coupled_moves::CoupledMovesProtocol::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_Backrub::apply(), protocols::protein_interface_design::movers::LoopRemodel::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_KIC::apply(), protocols::grafting::CCDEndsGraftMover::apply(), protocols::grafting::AnchoredGraftMover::apply(), protocols::dna::DesignProteinBackboneAroundDNA::backrub(), protocols::moves::ReplicaExchangeMC::boltzmann(), protocols::moves::DualMonteCarlo::boltzmann(), protocols::canonical_sampling::BiasedMonteCarlo::boltzmann(), protocols::monte_carlo::MonteCarloInterface::boltzmann(), boltzmann(), protocols::forge::remodel::RemodelLoopMover::boost_closure_stage(), protocols::enzdes::EnzdesFlexBBProtocol::generate_alc_ensemble_for_region(), protocols::enzdes::EnzdesFlexBBProtocol::generate_backrub_ensemble_for_region(), protocols::forge::remodel::RemodelLoopMover::independent_stage(), protocols::forge::remodel::RemodelLoopMover::loophash_stage(), protocols::loops::loop_mover::perturb::LoopMover_Perturb_CCD::model_loop(), protocols::loops::loop_mover::perturb::LoopMover_Perturb_KIC::model_loop(), protocols::mpi_refinement::WorkUnit_bbGauss::run(), protocols::mpi_refinement::WorkUnit_RamaPerturber::run(), protocols::antibody::design::AntibodyDesignMover::run_optimization_cycle(), protocols::carbohydrates::run_shear_min_pack(), protocols::abinitio::ConstraintFragmentSampler::set_max_seq_sep(), protocols::forge::remodel::RemodelLoopMover::simultaneous_stage(), and protocols::forge::remodel::RemodelLoopMover::small_move_stage().

bool protocols::moves::MonteCarlo::boltzmann ( Pose pose,
core::Real const  score,
std::string const &  move_type = "unk",
core::Real const  proposal_density_ratio = 1,
core::Real const  inner_score_temperature_delta = 0 
)
virtual

Applies the Metropolis Criterion on pose based on the externally computes score, temperature, and the last accepted pose. This method evaluates the change in score, compares the trial pose to the last accepted pose, and updates the pose structure and simulation statistics appropriately.

example(s): mc.boltzmann( pose, score ) See also: MonteCarlo MonteCarlo.last_accepted_score MonteCarlo.lowest_score

References protocols::hotspot_hashing::accept, boltzmann(), evaluate_convergence_checks(), last_accepted_pose_, last_accepted_score(), lowest_score(), lowest_score_pose_, mc_accepted_, protocols::moves::MCA_accepted_score_beat_low, and update_boinc_.

bool protocols::moves::MonteCarlo::boltzmann ( core::Real  score,
std::string const &  move_type = "unk",
core::Real const  proposal_density_ratio = 1,
core::Real const  inner_score_delta_over_temperature = 0,
bool  check_lowest_score = true 
)
virtual
bool protocols::moves::MonteCarlo::boltzmann ( core::Real  score,
Pose pose,
std::string const &  move_type = "unk",
core::Real const  proposal_density_ratio = 1,
core::Real const  inner_score_delta_over_temperature = 0,
bool  check_lowest_score = true 
)
virtual

Applies the Metropolis Criterion on the inputted pose based on the supplied score delta. Updates the Pose Structure accordingly.

example(s):

See also: MonteCarlo

References protocols::hotspot_hashing::accept, boltzmann(), evaluate_convergence_checks(), last_accepted_pose_, last_accepted_score(), lowest_score(), lowest_score_pose_, mc_accepted_, protocols::moves::MCA_accepted_score_beat_low, score_function_, and update_boinc_.

void protocols::moves::MonteCarlo::change_weight ( core::scoring::ScoreType const &  t,
Real const &  setting 
)

Change the weight on a score term in the object's scorefunction. Useful when we don't want to reset the whole scorefunction during an annealing step.

References score_function_.

core::Size protocols::moves::MonteCarlo::check_frequency ( ) const
inline
void protocols::moves::MonteCarlo::clear_poses ( )
virtual MonteCarloOP protocols::moves::MonteCarlo::clone ( )
inlinevirtual
bool protocols::moves::MonteCarlo::eval_lowest_score_pose ( Pose pose,
bool  score_pose = true,
bool  update_stats = false,
std::string const &  move_type = "unk" 
)

Compares score of <pose> to the lowest score found. If lower, sets the current lowest score pose and lowest score. Use internal pose energies if score_pose is false. Used to evaluate lowest score without boltzmann. Does not change pose structure.

Note
Does not update simulation statistics or last accepts by default.

example(s): mc.eval_lowest_score_pose( pose ) See also: MonteCarlo MonteCarlo.lowest_score MonteCarlo.lowest_score_pose MonteCarlo.recover_low

References counter_, core::pose::Pose::energies(), evaluate_convergence_checks(), last_accepted_pose_, last_accepted_score(), last_accepted_score_, last_score_, lowest_score(), lowest_score_, lowest_score_pose_, mc_accepted_, protocols::moves::MCA_accepted_score_beat_low, protocols::moves::MCA_rejected, protocols::hybridization::score, core::scoring::Energies::total_energy(), and total_score_of_last_considered_pose_.

void protocols::moves::MonteCarlo::evaluate_convergence_checks ( core::pose::Pose const &  pose,
bool  reject,
bool  final 
)
protected
bool protocols::moves::MonteCarlo::get_update_boinc ( ) const
inline
core::Size protocols::moves::MonteCarlo::heat_after_cycles ( ) const
inline
core::Size protocols::moves::MonteCarlo::last_accept ( ) const
inline
Pose const& protocols::moves::MonteCarlo::last_accepted_pose ( ) const
inline
Pose& protocols::moves::MonteCarlo::last_accepted_pose_non_const ( )
inlineprotected

Returns the non-const last accepted pose (for subclasses)

example(s): mc.last_accepted_pose() See also: MonteCarlo MonteCarlo.last_accept MonteCarlo.last_accepted_score

References last_accepted_pose_.

Referenced by protocols::monte_carlo::MonteCarloInterface::reset(), and protocols::monte_carlo::MonteCarloInterface::score_function().

Real protocols::moves::MonteCarlo::last_accepted_score ( ) const

Manually record that a move was attempted.

This is intended for moves that are made outside to context of MonteCarlo itself. Temperature moves are a good example. Manually record that a move was accepted.

This is intended for moves that are made outside to context of MonteCarlo itself. Temperature moves are a good example. Manually record that a move produced a change in energy.

This is intended for moves that are made outside to context of MonteCarlo itself. Temperature moves are a good example. Returns the score value of the last accepted pose

example(s): mc.last_accepted_score() See also: MonteCarlo MonteCarlo.last_accept MonteCarlo.last_accepted_pose MonteCarlo.show_counters MonteCarlo.show_scores MonteCarlo.show_state

References last_accepted_score_.

Referenced by protocols::moves::ReplicaExchangeMC::boltzmann(), protocols::canonical_sampling::BiasedMonteCarlo::boltzmann(), boltzmann(), eval_lowest_score_pose(), protocols::moves::operator<<(), score_function(), show_scores(), and show_state().

Real protocols::moves::MonteCarlo::last_score ( ) const

Returns the score value of the last score.

example(s): mc.last_accepted_score() See also: MonteCarlo MonteCarlo.last_accept MonteCarlo.last_accepted_pose MonteCarlo.show_counters MonteCarlo.show_scores MonteCarlo.show_state

References last_score_.

Referenced by set_last_score().

Real protocols::moves::MonteCarlo::lowest_score ( ) const
Pose const& protocols::moves::MonteCarlo::lowest_score_pose ( ) const
inline

Returns the lowest score pose encountered.

example(s): mc.lowest_score_pose() See also: MonteCarlo MonteCarlo.last_accepted_pose MonteCarlo.lowest_score

References lowest_score_pose_.

Referenced by protocols::forge::remodel::RemodelLoopMover::abinitio_stage(), protocols::enzdes::BackboneSampler::apply(), protocols::backrub::BackrubProtocol::apply(), protocols::protein_interface_design::movers::BackrubDDMover::apply(), protocols::coupled_moves::CoupledMovesProtocol::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_Backrub::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_KIC::apply(), protocols::forge::remodel::RemodelLoopMover::apply(), protocols::forge::remodel::RemodelLoopMover::boost_closure_stage(), protocols::checkpoint::CheckPointer::checkpoint(), protocols::enzdes::EnzdesFlexBBProtocol::generate_alc_ensemble_for_region(), protocols::enzdes::EnzdesFlexBBProtocol::generate_backrub_ensemble_for_region(), protocols::forge::remodel::RemodelLoopMover::independent_stage(), protocols::forge::remodel::RemodelLoopMover::loophash_stage(), protocols::loops::loop_mover::perturb::LoopMover_Perturb_CCD::model_loop(), protocols::loops::loop_mover::perturb::LoopMover_Perturb_KIC::model_loop(), protocols::checkpoint::CheckPointer::recover_checkpoint(), protocols::forge::remodel::RemodelLoopMover::set_segment_stage(), protocols::minimization_packing::EnergyCutRotamerTrialsMover::setup_energycut_task(), protocols::minimization_packing::EnergyCutRotamerTrialsMinMover::setup_energycut_task(), protocols::forge::remodel::RemodelLoopMover::simultaneous_stage(), and protocols::forge::remodel::RemodelLoopMover::small_move_stage().

MCA protocols::moves::MonteCarlo::mc_accepted ( ) const

Returns mc_accepted, informative of the last move applied.

Note: Returns true for an accept, false otherwise 3 = accepted:score beat low score and last_accepted score 2 = accepted:score beat last_accepted score 1 = thermally accepted: score worse than last_accepted score 0 = not accepted example(s): mc.mc_accepted() See also: MonteCarlo MonteCarlo.show_state

References mc_accepted_.

Referenced by protocols::metal_interface::ZincHeterodimerMover::apply(), and protocols::moves::DualMonteCarlo::boltzmann().

std::string protocols::moves::MonteCarlo::mc_accepted_string ( ) const

Returns mc_accepted as a human-readable string, informative of the last move applied.

References mc_accepted_, and protocols::moves::to_string().

MonteCarlo const& protocols::moves::MonteCarlo::operator= ( MonteCarlo const &  )
private

unimplemented – do not use

void protocols::moves::MonteCarlo::push_back ( moves::MonteCarloExceptionConvergeOP  check)
void protocols::moves::MonteCarlo::recover_low ( Pose pose)
void protocols::moves::MonteCarlo::reset ( Pose const &  pose)
virtual

Sets lowest score pose and last accepted pose to the score of <pose>

Note
(does not reset counters)

example(s): mc.reset(pose) See also: MonteCarlo MonteCarlo.last_accepted_pose MonteCarlo.last_accepted_score MonteCarlo.lowest_score MonteCarlo.lowest_scored_pose

Reimplemented in protocols::monte_carlo::MonteCarloInterface, and protocols::canonical_sampling::BiasedMonteCarlo.

References last_accepted_pose_, last_accepted_score_, last_score_, lowest_score_, lowest_score_pose_, protocols::hybridization::score, and score_function_.

Referenced by protocols::forge::remodel::RemodelLoopMover::abinitio_stage(), protocols::enzdes::BackboneSampler::apply(), protocols::backrub::BackrubProtocol::apply(), protocols::protein_interface_design::movers::BackrubDDMover::apply(), protocols::coupled_moves::CoupledMovesProtocol::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_Backrub::apply(), protocols::loops::loop_closure::ccd::LoopClosure::apply(), protocols::abinitio::FoldConstraints::apply(), protocols::abinitio::ConstraintFragmentSampler::apply(), protocols::abinitio::FragmentSampler::apply(), protocols::forge::remodel::RemodelLoopMover::apply(), protocols::forge::remodel::RemodelLoopMover::boost_closure_stage(), protocols::abinitio::FragmentSampler::do_stage1_cycles(), protocols::abinitio::ClassicAbinitio::do_stage1_cycles(), protocols::abinitio::MembraneAbinitio::do_stage1_cycles(), protocols::abinitio::ClassicAbinitio::do_stage5_cycles(), protocols::enzdes::EnzdesFlexBBProtocol::generate_alc_ensemble_for_region(), protocols::enzdes::EnzdesFlexBBProtocol::generate_backrub_ensemble_for_region(), protocols::forge::remodel::RemodelLoopMover::independent_stage(), protocols::forge::remodel::RemodelLoopMover::loophash_stage(), protocols::abinitio::FoldConstraints::min_trial(), MonteCarlo(), protocols::moves::DualMonteCarlo::reset(), protocols::canonical_sampling::BiasedMonteCarlo::reset(), reset_scorefxn(), protocols::abinitio::KinematicAbinitio::set_max_seq_sep(), protocols::abinitio::FoldConstraints::set_max_seq_sep(), protocols::abinitio::ConstraintFragmentSampler::set_max_seq_sep(), protocols::forge::remodel::RemodelLoopMover::set_segment_stage(), protocols::forge::remodel::RemodelLoopMover::simultaneous_stage(), and protocols::forge::remodel::RemodelLoopMover::small_move_stage().

void protocols::moves::MonteCarlo::reset ( Pose const &  pose,
Real const  score 
)
virtual

Sets lowest score pose and last accepted pose to the score of <pose>

Note
(does not reset counters)

example(s): mc.reset(pose, score) See also: MonteCarlo MonteCarlo.last_accepted_pose MonteCarlo.last_accepted_score MonteCarlo.lowest_score MonteCarlo.lowest_scored_pose

References last_accepted_pose_, last_accepted_score_, lowest_score_, lowest_score_pose_, and protocols::hybridization::score.

void protocols::moves::MonteCarlo::reset_counters ( )
void protocols::moves::MonteCarlo::reset_scorefxn ( Pose const &  init_pose,
ScoreFunction const &  scorefxn 
)

Resets the ScoreFunction.

References core::scoring::ScoreFunction::clone(), reset(), and score_function_.

void protocols::moves::MonteCarlo::score_function ( ScoreFunction const &  scorefxn)
virtual

Sets the ScoreFunction to <scorefxn> , re-scores last accepted pose and lowest score pose.

set the scorefxn, re-scores last-accepted and lowest-score pose

example(s): mc.score_function( scorefxn ) See also: MonteCarlo MonteCarlo.boltzmann MonteCarlo.set_temperature MonteCarlo.temperature ScoreFunction create_score_function

Reimplemented in protocols::monte_carlo::MonteCarloInterface, and protocols::canonical_sampling::BiasedMonteCarlo.

References core::scoring::Energies::clear(), core::scoring::ScoreFunction::clone(), core::pose::Pose::energies(), last_accepted_pose_, last_accepted_score(), last_accepted_score_, lowest_score(), lowest_score_, lowest_score_pose_, score_function_, core::scoring::EMapVector::show_if_nonzero_weight(), core::scoring::Energies::total_energies(), and protocols::moves::TR().

Referenced by protocols::forge::remodel::RemodelLoopMover::abinitio_stage(), protocols::loops::loop_mover::refine::LoopMover_Refine_Backrub::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_KIC::apply(), protocols::forge::remodel::RemodelLoopMover::apply(), protocols::forge::remodel::RemodelLoopMover::boost_closure_stage(), protocols::abinitio::FragmentSampler::current_scorefxn(), protocols::abinitio::ClassicAbinitio::current_scorefxn(), protocols::abinitio::MembraneAbinitio::current_scorefxn(), protocols::loops::loop_mover::refine::LoopMover_Refine_CCD::increase_chainbreak_weight_and_update_monte_carlo(), protocols::forge::remodel::RemodelLoopMover::independent_stage(), protocols::forge::remodel::RemodelLoopMover::loophash_stage(), protocols::abinitio::MembraneAbinitio::output_debug_structure(), protocols::abinitio::ClassicAbinitio::output_debug_structure(), protocols::rna::denovo::RNA_FragmentMonteCarlo::randomize_and_close_all_chains(), protocols::abinitio::FragmentSampler::set_current_weight(), protocols::abinitio::ClassicAbinitio::set_current_weight(), protocols::abinitio::MembraneAbinitio::set_current_weight(), protocols::forge::remodel::RemodelLoopMover::set_segment_stage(), protocols::forge::remodel::RemodelLoopMover::simultaneous_stage(), and protocols::forge::remodel::RemodelLoopMover::small_move_stage().

core::scoring::ScoreFunction const & protocols::moves::MonteCarlo::score_function ( ) const
void protocols::moves::MonteCarlo::set_autotemp ( bool const  setting,
core::Real const  quench_temp 
)

Sets autotemp to quench_temp example(s): See also: MonteCarlo MonteCarlo.autotemp MonteCarlo.show_state.

References autotemp_, last_accept_, and quench_temp_.

Referenced by protocols::protein_interface_design::movers::LoopRemodel::apply().

void protocols::moves::MonteCarlo::set_heat_after_cycles ( core::Size  setting)
inline
void protocols::moves::MonteCarlo::set_last_accepted ( core::Real  score)
inline
void protocols::moves::MonteCarlo::set_last_accepted_pose ( Pose const &  pose)
void protocols::moves::MonteCarlo::set_last_accepted_pose ( core::pose::Pose const &  pose,
core::Real  score 
)

Sets the last accepted pose and last accepted score.

Note
(does not reset counters)

References last_accepted_pose_, last_accepted_score_, and protocols::hybridization::score.

void protocols::moves::MonteCarlo::set_last_accepted_score ( core::Real  score)
inlineprotected
void protocols::moves::MonteCarlo::set_last_score ( core::Real  score)

Set the last score.

References last_score(), and last_score_.

Referenced by protocols::monte_carlo::MonteCarloInterface::reset().

void protocols::moves::MonteCarlo::set_lowest ( core::Real  score)
inline
void protocols::moves::MonteCarlo::set_lowest_score_pose ( core::pose::Pose const &  pose)
void protocols::moves::MonteCarlo::set_lowest_score_pose ( core::pose::Pose const &  pose,
core::Real  score 
)
void protocols::moves::MonteCarlo::set_mc_accepted ( MCA  value)
inlineprotected
void protocols::moves::MonteCarlo::set_temperature ( Real const  temp)
virtual
void protocols::moves::MonteCarlo::set_total_score_last_considered ( core::Real  score)
inline
void protocols::moves::MonteCarlo::set_update_boinc ( bool  setting)
inline

no brief for now

References update_boinc_.

void protocols::moves::MonteCarlo::show_counters ( ) const
void protocols::moves::MonteCarlo::show_scores ( ) const
void protocols::moves::MonteCarlo::show_state ( ) const

Displays the entire MonteCarlo state temperature, scores, annealing settings, move statistics, move counters (show_counters)

example(s): mc.show_state() Output as: protocols.moves.MonteCarlo: MC: t l1 l2 las lws la au qu mca t= temperature l1= (*score_function_)(*last_accepted_pose_) l2= (*score_function_)(*lowest_score_pose_) las= last accepted score lws= lowest score la= last_accept_ au= autotemp_ qu= quench_temp_ mca= mc_accepted_ See also: MonteCarlo MonteCarlo.show_counters MonteCarlo.show_scores MonteCarlo.last_accepted_score MonteCarlo.lowest_score MonteCarlo.temperature

References autotemp_, last_accept_, last_accepted_score(), lowest_score(), mc_accepted_, quench_temp_, score_function_, show_counters(), temperature_, protocols::moves::to_string(), and protocols::moves::TR().

Referenced by protocols::forge::remodel::RemodelLoopMover::abinitio_stage(), protocols::forge::remodel::RemodelLoopMover::boost_closure_stage(), protocols::forge::remodel::RemodelLoopMover::independent_stage(), protocols::forge::remodel::RemodelLoopMover::loophash_stage(), protocols::forge::remodel::RemodelLoopMover::simultaneous_stage(), and protocols::forge::remodel::RemodelLoopMover::small_move_stage().

Real protocols::moves::MonteCarlo::temperature ( ) const
inline
Real protocols::moves::MonteCarlo::total_score_of_last_considered_pose ( ) const
inline
core::Size protocols::moves::MonteCarlo::total_trials ( ) const

Set the counter to be used for this simulation.

return number of trials since last reset

Return statistics for each type of move that has been attempted during this simulation.

example(s): mc.counters() See also: MonteCarlo MonteCarlo.show_counters MonteCarlo.reset_counters Returns the total number of trials since the last reset

Note
: MonteCarlo.boltzmann(pose) updates the number of trials

example(s): mc.total_trials() See also: MonteCarlo MonteCarlo.last_accept MonteCarlo.show_counters MonteCarlo.show_state

References counter_.

Referenced by protocols::abinitio::MembraneAbinitio::apply(), protocols::abinitio::ClassicAbinitio::apply(), protocols::abinitio::FragmentSampler::checkpointed_cycle_block(), and protocols::moves::operator<<().

Member Data Documentation

bool protocols::moves::MonteCarlo::autotemp_
private

For abinitio-style increasing the temperature after a large number of rejects:

Referenced by autotemp_accept(), autotemp_reject(), set_autotemp(), and show_state().

core::Size protocols::moves::MonteCarlo::check_frequency_
private
utility::vector1< moves::MonteCarloExceptionConvergeOP > protocols::moves::MonteCarlo::convergence_checks_
private
TrialCounterOP protocols::moves::MonteCarlo::counter_
private
core::Size protocols::moves::MonteCarlo::heat_after_cycles_
private
int protocols::moves::MonteCarlo::last_accept_
private
PoseOP protocols::moves::MonteCarlo::last_accepted_pose_
private
Real protocols::moves::MonteCarlo::last_accepted_score_
private
core::Size protocols::moves::MonteCarlo::last_check_
private
Real protocols::moves::MonteCarlo::last_score_
private
Real protocols::moves::MonteCarlo::lowest_score_
private
PoseOP protocols::moves::MonteCarlo::lowest_score_pose_
private
MCA protocols::moves::MonteCarlo::mc_accepted_
private

Result of the last call to boltzmann.

Referenced by boltzmann(), eval_lowest_score_pose(), mc_accepted(), mc_accepted_string(), set_mc_accepted(), and show_state().

core::Real protocols::moves::MonteCarlo::quench_temp_
private
ScoreFunctionOP protocols::moves::MonteCarlo::score_function_
private

Internal scoring function.

Referenced by boltzmann(), change_weight(), MonteCarlo(), reset(), reset_scorefxn(), score_function(), and show_state().

core::Real protocols::moves::MonteCarlo::temperature_
private

Acceptance criterion temperature.

Referenced by autotemp_accept(), autotemp_reject(), boltzmann(), set_temperature(), show_state(), and temperature().

Real protocols::moves::MonteCarlo::total_score_of_last_considered_pose_
private
bool protocols::moves::MonteCarlo::update_boinc_
private

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