Rosetta
|
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>
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) |
Pose & | last_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_ |
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
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_.
|
overridedefault |
Empty destructor in C++ file to reduce number of necessary includes.
void protocols::moves::MonteCarlo::attach_observer_to_last_accepted_conformation | ( | ConformationObserver & | obs | ) |
attach observer to last accepted conformation
ConformationObserver | any class implementing void attach_to( Conformation & ) |
References last_accepted_pose_.
void protocols::moves::MonteCarlo::attach_observer_to_last_accepted_pose | ( | PoseObserver & | obs | ) |
attach observer to last accepted pose
PoseObserver | any class implementing void attach_to( Pose & ) |
References last_accepted_pose_.
void protocols::moves::MonteCarlo::attach_observer_to_lowest_score_conformation | ( | ConformationObserver & | obs | ) |
attach observer to lowest score conformation
ConformationObserver | any class implementing void attach_to( Conformation & ) |
References lowest_score_pose_.
void protocols::moves::MonteCarlo::attach_observer_to_lowest_score_pose | ( | PoseObserver & | obs | ) |
attach observer to lowest score pose
PoseObserver | any class implementing void attach_to( Pose & ) |
References lowest_score_pose_.
|
protected |
References autotemp_, last_accept_, quench_temp_, set_temperature(), temperature_, and protocols::moves::TR().
Referenced by boltzmann().
|
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().
|
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, protocols::hybridization::score, score_function_, and update_boinc_.
|
virtual |
Applies the Metropolis Criterion on the inputted pose based on the supplied score delta.
example(s):
See also: MonteCarlo
References autotemp_accept(), autotemp_reject(), counter_, last_accepted_score_, last_score_, lowest_score(), lowest_score_, protocols::mean_field::max(), mc_accepted_, protocols::moves::MCA_accepted_score_beat_last, protocols::moves::MCA_accepted_score_beat_low, protocols::moves::MCA_accepted_thermally, protocols::moves::MCA_rejected, protocols::mean_field::min(), protocols::simple_moves::bb_sampler::probability, core::scoring::rg, protocols::hybridization::score, temperature_, total_score_of_last_considered_pose_, and update_boinc_.
|
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, protocols::hybridization::score, and update_boinc_.
|
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::moves::ReplicaExchangeMC, protocols::monte_carlo::MonteCarloInterface, and protocols::canonical_sampling::BiasedMonteCarlo.
References protocols::hotspot_hashing::accept, protocols::hybridization::score, score_function_, and update_boinc_.
Referenced by protocols::forge::remodel::RemodelLoopMover::abinitio_stage(), protocols::backrub::BackrubProtocol::apply(), protocols::coupled_moves::CoupledMovesProtocol::apply(), protocols::grafting::AnchoredGraftMover::apply(), protocols::grafting::CCDEndsGraftMover::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_Backrub::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_KIC::apply(), protocols::magnesium::MgMonteCarlo::apply(), protocols::protein_interface_design::movers::LoopRemodel::apply(), protocols::rna::denovo::RNA_FragmentMonteCarlo::apply(), protocols::enzdes::BackboneSampler::apply(), protocols::protein_interface_design::movers::BackrubDDMover::apply(), protocols::dna::DesignProteinBackboneAroundDNA::backrub(), protocols::moves::DualMonteCarlo::boltzmann(), protocols::moves::MixedMonteCarlo::boltzmann(), boltzmann(), protocols::canonical_sampling::BiasedMonteCarlo::boltzmann(), protocols::monte_carlo::MonteCarloInterface::boltzmann(), protocols::moves::ReplicaExchangeMC::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::rna::denovo::RNA_FragmentMonteCarlo::randomize_and_close_all_chains(), protocols::mpi_refinement::WorkUnit_RamaPerturber::run(), protocols::mpi_refinement::WorkUnit_bbGauss::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().
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_, and protocols::hybridization::t.
|
inline |
References check_frequency_.
Referenced by protocols::canonical_sampling::mc_convergence_checks::Heat_ConvergenceCheck::operator()().
void protocols::moves::MonteCarlo::clear_poses | ( | ) |
Removes last accepted pose and lowest score pose.
example(s): mc.clear_poses() See also: MonteCarlo MonteCarlo.last_accepted_pose MonteCarlo.lowest_score_pose MonteCarlo.recover_low MonteCarlo.reset MonteCarlo.set_last_accepted_pose MonteCarlo.set_lowest_score_pose
References last_accepted_pose_, and lowest_score_pose_.
Referenced by protocols::abinitio::ConstraintFragmentSampler::apply(), and protocols::abinitio::FragmentSampler::apply().
|
inlinevirtual |
Reimplemented in protocols::monte_carlo::MonteCarloInterface, and protocols::canonical_sampling::BiasedMonteCarlo.
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.
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_.
|
protected |
References check_frequency_, convergence_checks_, last_check_, and protocols::hotspot_hashing::reject.
Referenced by boltzmann(), protocols::canonical_sampling::BiasedMonteCarlo::boltzmann(), and eval_lowest_score_pose().
|
inline |
References update_boinc_.
Referenced by protocols::canonical_sampling::BiasedMonteCarlo::boltzmann().
|
inline |
no brief for now
References heat_after_cycles_.
Referenced by protocols::canonical_sampling::mc_convergence_checks::Heat_ConvergenceCheck::operator()().
|
inline |
Returns the number of trials since last acceptance.
example(s): mc.last_accept() See also: MonteCarlo MonteCarlo.show_counters MonteCarlo.last_accepted_pose MonteCarlo.last_accepted_score
References last_accept_.
Referenced by protocols::canonical_sampling::mc_convergence_checks::Heat_ConvergenceCheck::operator()().
|
inline |
Returns the last accepted pose.
example(s): mc.last_accepted_pose() See also: MonteCarlo MonteCarlo.last_accept MonteCarlo.last_accepted_score
References last_accepted_pose_.
Referenced by protocols::backrub::BackrubProtocol::apply(), protocols::coupled_moves::CoupledMovesProtocol::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_KIC::apply(), protocols::protein_interface_design::movers::LoopRemodel::apply(), protocols::dna::DesignProteinBackboneAroundDNA::backrub(), protocols::canonical_sampling::BiasedMonteCarlo::boltzmann(), protocols::checkpoint::CheckPointer::checkpoint(), protocols::enzdes::EnzdesFlexBBProtocol::generate_alc_ensemble_for_region(), protocols::enzdes::EnzdesFlexBBProtocol::generate_backrub_ensemble_for_region(), protocols::loops::loop_mover::perturb::LoopMover_Perturb_KIC::model_loop(), protocols::canonical_sampling::SilentTrajectoryRecorder::observe_after_metropolis(), protocols::checkpoint::CheckPointer::recover_checkpoint(), protocols::canonical_sampling::BiasedMonteCarlo::reset(), protocols::monte_carlo::MonteCarloInterface::reset(), protocols::canonical_sampling::PDBTrajectoryRecorder::reset(), protocols::canonical_sampling::BiasedMonteCarlo::score_function(), and protocols::canonical_sampling::TrajectoryRecorder::update_after_boltzmann().
|
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 boltzmann(), protocols::canonical_sampling::BiasedMonteCarlo::boltzmann(), protocols::moves::ReplicaExchangeMC::boltzmann(), eval_lowest_score_pose(), protocols::moves::MixedMonteCarlo::last_accepted_score(), protocols::moves::operator<<(), protocols::rna::denovo::RNA_FragmentMonteCarlo::randomize_and_close_all_chains(), and score_function().
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 |
Returns the score value of the lowest score pose encountered.
example(s): mc.lowest_score() See also: MonteCarlo MonteCarlo.lowest_score_pose MonteCarlo.show_counters MonteCarlo.show_scores MonteCarlo.show_state
References lowest_score_.
Referenced by protocols::coupled_moves::CoupledMovesProtocol::apply(), boltzmann(), protocols::canonical_sampling::BiasedMonteCarlo::boltzmann(), eval_lowest_score_pose(), protocols::moves::MixedMonteCarlo::lowest_score(), protocols::moves::operator<<(), and score_function().
|
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::backrub::BackrubProtocol::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::rna::denovo::RNA_FragmentMonteCarlo::apply(), protocols::enzdes::BackboneSampler::apply(), protocols::forge::remodel::RemodelLoopMover::apply(), protocols::protein_interface_design::movers::BackrubDDMover::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::rna::denovo::RNA_FragmentMonteCarlo::randomize_and_close_all_chains(), protocols::checkpoint::CheckPointer::recover_checkpoint(), protocols::forge::remodel::RemodelLoopMover::set_segment_stage(), 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(), protocols::moves::DualMonteCarlo::boltzmann(), and protocols::moves::MixedMonteCarlo::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().
|
private |
unimplemented – do not use
void protocols::moves::MonteCarlo::push_back | ( | moves::MonteCarloExceptionConvergeOP | check | ) |
no brief for now
References convergence_checks_.
Referenced by protocols::canonical_sampling::mc_convergence_checks::setup_convergence_checks_from_cmdline().
void protocols::moves::MonteCarlo::recover_low | ( | Pose & | pose | ) |
Sets the input <pose> and last accepted pose to the lowest score pose.
return the simulation state to the lowest energy structure we've seen
example(s): mc.recover_low( pose ) See also: MonteCarlo MonteCarlo.last_accept MonteCarlo.last_accepted_pose MonteCarlo.last_accepted_score MonteCarlo.lowest_score MonteCarlo.lowest_score_pose
References last_accepted_pose_, last_accepted_score_, and lowest_score_pose_.
Referenced by protocols::abinitio::MembraneAbinitio::apply(), protocols::grafting::AnchoredGraftMover::apply(), protocols::grafting::CCDEndsGraftMover::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_Backrub::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_KIC::apply(), protocols::magnesium::MgMonteCarlo::apply(), protocols::protein_interface_design::movers::LoopRemodel::apply(), protocols::rna::denovo::RNA_FragmentMonteCarlo::apply(), protocols::loops::loop_closure::ccd::LoopClosure::apply(), protocols::abinitio::FragmentSampler::checkpointed_cycle_block(), protocols::abinitio::FoldConstraints::do_stage2_cycles(), protocols::loops::loop_mover::refine::LoopMover_Refine_CCD::increase_chainbreak_weight_and_update_monte_carlo(), protocols::loops::loop_mover::perturb::LoopMover_Perturb_CCD::model_loop(), protocols::loops::loop_mover::perturb::LoopMover_Perturb_KIC::model_loop(), protocols::moves::DualMonteCarlo::recover_low(), protocols::moves::MixedMonteCarlo::recover_low(), protocols::abinitio::ConstraintFragmentSampler::set_max_seq_sep(), and protocols::abinitio::FoldConstraints::set_max_seq_sep().
|
virtual |
Sets lowest score pose and last accepted pose to the score of <pose>
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::abinitio::ConstraintFragmentSampler::apply(), protocols::abinitio::FoldConstraints::apply(), protocols::abinitio::FragmentSampler::apply(), protocols::backrub::BackrubProtocol::apply(), protocols::coupled_moves::CoupledMovesProtocol::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_Backrub::apply(), protocols::rna::denovo::RNA_FragmentMonteCarlo::apply(), protocols::loops::loop_closure::ccd::LoopClosure::apply(), protocols::enzdes::BackboneSampler::apply(), protocols::forge::remodel::RemodelLoopMover::apply(), protocols::protein_interface_design::movers::BackrubDDMover::apply(), protocols::forge::remodel::RemodelLoopMover::boost_closure_stage(), protocols::abinitio::ClassicAbinitio::do_stage1_cycles(), protocols::abinitio::FragmentSampler::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::moves::MixedMonteCarlo::reset(), protocols::canonical_sampling::BiasedMonteCarlo::reset(), reset_scorefxn(), protocols::abinitio::ConstraintFragmentSampler::set_max_seq_sep(), protocols::abinitio::FoldConstraints::set_max_seq_sep(), protocols::abinitio::KinematicAbinitio::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().
Sets lowest score pose and last accepted pose to the score of <pose>
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 | ( | ) |
Resets the mover counters.
example(s): mc.reset_counters() See alse: MonteCarlo MonteCarlo.show_counters
References counter_.
Referenced by protocols::forge::remodel::RemodelLoopMover::abinitio_stage(), protocols::abinitio::ClassicAbinitio::apply(), protocols::abinitio::MembraneAbinitio::apply(), protocols::rna::denovo::RNA_FragmentMonteCarlo::apply(), protocols::forge::remodel::RemodelLoopMover::boost_closure_stage(), protocols::abinitio::FragmentSampler::checkpointed_cycle_block(), protocols::forge::remodel::RemodelLoopMover::independent_stage(), protocols::forge::remodel::RemodelLoopMover::loophash_stage(), 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_scorefxn | ( | Pose const & | init_pose, |
ScoreFunction const & | scorefxn | ||
) |
Resets the ScoreFunction.
References core::scoring::ScoreFunction::clone(), reset(), and score_function_.
core::scoring::ScoreFunction const & protocols::moves::MonteCarlo::score_function | ( | ) | const |
Returns the MonteCarlo ScoreFunction.
example(s): mc.score_function() mc.score_function()( pose ) See also: MonteCarlo MonteCarlo.boltzmann MonteCarlo.set_temperature MonteCarlo.temperature ScoreFunction create_score_function
References score_function_.
Referenced by protocols::canonical_sampling::BiasedMonteCarlo::boltzmann(), protocols::monte_carlo::MonteCarloInterface::calculate_score(), protocols::monte_carlo::MonteCarloInterface::init_interface_analyzer(), protocols::canonical_sampling::BiasedMonteCarlo::score_function(), and protocols::monte_carlo::MonteCarloInterface::score_function().
|
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::rna::denovo::RNA_FragmentMonteCarlo::apply(), protocols::forge::remodel::RemodelLoopMover::apply(), protocols::forge::remodel::RemodelLoopMover::boost_closure_stage(), protocols::abinitio::ClassicAbinitio::current_scorefxn(), protocols::abinitio::FragmentSampler::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::ClassicAbinitio::output_debug_structure(), protocols::abinitio::MembraneAbinitio::output_debug_structure(), protocols::rna::denovo::RNA_FragmentMonteCarlo::randomize_and_close_all_chains(), protocols::abinitio::ClassicAbinitio::set_current_weight(), protocols::abinitio::FragmentSampler::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().
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().
|
inline |
no brief for now
References heat_after_cycles_.
Referenced by protocols::canonical_sampling::mc_convergence_checks::setup_convergence_checks_from_cmdline().
|
inline |
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.
References last_accepted_pose_, last_accepted_score_, and protocols::hybridization::score.
void protocols::moves::MonteCarlo::set_last_accepted_pose | ( | Pose const & | pose | ) |
Sets the last accepted pose to the score of <pose>
References last_accepted_pose_, and last_accepted_score_.
Referenced by protocols::canonical_sampling::SidechainMetropolisHastingsMover::apply(), protocols::coupled_moves::CoupledMovesProtocol::apply(), protocols::canonical_sampling::BiasedMonteCarlo::boltzmann(), protocols::checkpoint::CheckPointer::recover_checkpoint(), and protocols::monte_carlo::MonteCarloInterface::reset().
|
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().
|
inline |
References lowest_score_, and protocols::hybridization::score.
Referenced by protocols::monte_carlo::MonteCarloInterface::score_function().
void protocols::moves::MonteCarlo::set_lowest_score_pose | ( | core::pose::Pose const & | pose | ) |
References core::pose::Pose::energies(), lowest_score_, lowest_score_pose_, and core::scoring::Energies::total_energy().
Referenced by protocols::canonical_sampling::SidechainMetropolisHastingsMover::apply(), protocols::coupled_moves::CoupledMovesProtocol::apply(), protocols::canonical_sampling::BiasedMonteCarlo::boltzmann(), protocols::checkpoint::CheckPointer::recover_checkpoint(), and protocols::monte_carlo::MonteCarloInterface::reset().
void protocols::moves::MonteCarlo::set_lowest_score_pose | ( | core::pose::Pose const & | pose, |
core::Real | score | ||
) |
References lowest_score_, lowest_score_pose_, and protocols::hybridization::score.
|
inlineprotected |
References mc_accepted_.
Referenced by protocols::canonical_sampling::BiasedMonteCarlo::boltzmann().
|
virtual |
Sets the temperature value used in the Metropolis Criterion to <temp>
example(s): mc.set_temperature( temp ) See also: MonteCarlo MonteCarlo.temperature MonteCarlo.show_state
Reimplemented in protocols::canonical_sampling::BiasedMonteCarlo.
References temperature_.
Referenced by protocols::loops::loop_mover::refine::LoopMover_Refine_Backrub::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_KIC::apply(), autotemp_accept(), autotemp_reject(), protocols::moves::ReplicaExchangeMC::boltzmann(), protocols::enzdes::EnzdesFlexBBProtocol::generate_alc_ensemble_for_region(), protocols::enzdes::EnzdesFlexBBProtocol::generate_backrub_ensemble_for_region(), protocols::moves::ReplicaExchangeMC::init(), protocols::loops::loop_mover::perturb::LoopMover_Perturb_CCD::model_loop(), protocols::loops::loop_mover::perturb::LoopMover_Perturb_KIC::model_loop(), and protocols::canonical_sampling::BiasedMonteCarlo::set_temperature().
|
inline |
References protocols::hybridization::score, and total_score_of_last_considered_pose_.
|
inline |
no brief for now
References update_boinc_.
void protocols::moves::MonteCarlo::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")
example(s): mc.show_counters() Output as: protocols.moves.MonteCarlo: unk trials= X; accepts= Y; energy_drop/trial= Z See also: MonteCarlo MonteCarlo.show_scores MonteCarlo.show_state
Referenced by protocols::abinitio::ClassicAbinitio::apply(), protocols::abinitio::MembraneAbinitio::apply(), protocols::backrub::BackrubProtocol::apply(), protocols::coupled_moves::CoupledMovesProtocol::apply(), protocols::loops::loop_mover::refine::LoopMover_Refine_KIC::apply(), protocols::magnesium::MgMonteCarlo::apply(), protocols::protein_interface_design::movers::LoopRemodel::apply(), protocols::rna::denovo::RNA_FragmentMonteCarlo::apply(), protocols::enzdes::BackboneSampler::apply(), protocols::protein_interface_design::movers::BackrubDDMover::apply(), protocols::dna::DesignProteinBackboneAroundDNA::backrub(), protocols::abinitio::FragmentSampler::checkpointed_cycle_block(), protocols::enzdes::EnzdesFlexBBProtocol::generate_alc_ensemble_for_region(), protocols::enzdes::EnzdesFlexBBProtocol::generate_backrub_ensemble_for_region(), and protocols::canonical_sampling::SilentTrajectoryRecorder::observe_after_metropolis().
void protocols::moves::MonteCarlo::show_scores | ( | ) | const |
Displays the last accepted score and the lowest score.
example(s): mc.show_scores() Output as: protocols.moves.MonteCarlo: MonteCarlo:: last_accepted_score,lowest_score: X Y See also: MonteCarlo MonteCarlo.last_accepted_score MonteCarlo.lowest_score MonteCarlo.show_counters MonteCarlo.show_state
Referenced by protocols::loops::loop_mover::refine::LoopMover_Refine_KIC::apply(), protocols::loops::loop_mover::perturb::LoopMover_Perturb_CCD::model_loop(), and protocols::loops::loop_mover::perturb::LoopMover_Perturb_KIC::model_loop().
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 score_function_, temperature_, 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().
|
inline |
Returns the temperature value used in the Metropolis Criterion.
example(s): mc.temperature() See also: MonteCarlo MonteCarlo.set_temperature MonteCarlo.show_state
References temperature_.
Referenced by protocols::protein_interface_design::movers::LoopRemodel::apply(), protocols::canonical_sampling::BiasedMonteCarlo::BiasedMonteCarlo(), protocols::abinitio::KinematicAbinitio::create_bb_moves(), and protocols::moves::operator<<().
|
inline |
References total_score_of_last_considered_pose_.
core::Size protocols::moves::MonteCarlo::total_trials | ( | ) | const |
Set the counter to be used for this simulation.
@detail 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
example(s): mc.total_trials() See also: MonteCarlo MonteCarlo.last_accept MonteCarlo.show_counters MonteCarlo.show_state
References counter_.
Referenced by protocols::abinitio::ClassicAbinitio::apply(), protocols::abinitio::MembraneAbinitio::apply(), protocols::abinitio::FragmentSampler::checkpointed_cycle_block(), and protocols::moves::operator<<().
|
private |
For abinitio-style increasing the temperature after a large number of rejects:
Referenced by autotemp_accept(), autotemp_reject(), and set_autotemp().
|
private |
Referenced by check_frequency(), evaluate_convergence_checks(), and MonteCarlo().
|
private |
Referenced by evaluate_convergence_checks(), and push_back().
|
private |
diagnostics
Referenced by protocols::moves::ReplicaExchangeMC::boltzmann(), boltzmann(), eval_lowest_score_pose(), reset_counters(), and total_trials().
|
private |
Referenced by autotemp_reject(), heat_after_cycles(), and set_heat_after_cycles().
|
private |
Referenced by autotemp_accept(), autotemp_reject(), last_accept(), and set_autotemp().
|
private |
Latest accepted pose.
Referenced by attach_observer_to_last_accepted_conformation(), attach_observer_to_last_accepted_pose(), boltzmann(), clear_poses(), eval_lowest_score_pose(), last_accepted_pose(), last_accepted_pose_non_const(), MonteCarlo(), recover_low(), reset(), score_function(), and set_last_accepted_pose().
|
private |
|
private |
Referenced by evaluate_convergence_checks(), and MonteCarlo().
|
private |
Referenced by boltzmann(), eval_lowest_score_pose(), last_score(), reset(), and set_last_score().
|
private |
Referenced by boltzmann(), eval_lowest_score_pose(), lowest_score(), reset(), score_function(), set_lowest(), and set_lowest_score_pose().
|
private |
Lowest score pose encountered.
Referenced by attach_observer_to_lowest_score_conformation(), attach_observer_to_lowest_score_pose(), boltzmann(), clear_poses(), eval_lowest_score_pose(), lowest_score_pose(), MonteCarlo(), recover_low(), reset(), score_function(), and set_lowest_score_pose().
|
private |
Result of the last call to boltzmann.
Referenced by boltzmann(), eval_lowest_score_pose(), mc_accepted(), mc_accepted_string(), and set_mc_accepted().
|
private |
Referenced by autotemp_accept(), autotemp_reject(), and set_autotemp().
|
private |
Internal scoring function.
Referenced by boltzmann(), change_weight(), MonteCarlo(), reset(), reset_scorefxn(), score_function(), and show_state().
|
private |
Acceptance criterion temperature.
Referenced by autotemp_accept(), autotemp_reject(), boltzmann(), set_temperature(), show_state(), and temperature().
|
private |
|
private |
Referenced by boltzmann(), get_update_boinc(), and set_update_boinc().