Rosetta
Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
core::scoring::ScoreFunctionFactory Class Reference

A static singleton for making a single score_function. More...

#include <ScoreFunctionFactory.hh>

Inheritance diagram for core::scoring::ScoreFunctionFactory:
Inheritance graph
[legend]

Static Public Member Functions

static ScoreFunctionOP create_score_function (std::string const &weights_tag)
 Returns a ScoreFunction from the database weights file <weights_tag> More...
 
static ScoreFunctionOP create_score_function (utility::options::OptionCollection const &options, std::string const &weights_tag)
 
static ScoreFunctionOP create_score_function (std::string const &weights_tag, std::string const &patch_tag)
 Returns a ScoreFunction from the database weights file <weights_tag> with the patch <patch_tag> More...
 
static ScoreFunctionOP create_score_function (utility::options::OptionCollection const &options, std::string const &weights_tag, std::string const &patch_tag)
 
static ScoreFunctionOP create_score_function (std::string const &weights_tag, utility::vector1< std::string > const &patch_tags)
 Returns a ScoreFunction from the database weights file <weights_tag> with patches in <patch_tags> More...
 
static ScoreFunctionOP create_score_function (utility::options::OptionCollection const &options, std::string const &weights_tag, utility::vector1< std::string > const &patch_tags)
 
static void list_read_options (utility::options::OptionKeyList &opts)
 A documentation function which reports the set of options read by the create_score_function variants. More...
 
static bool validate_talaris (std::string const &weights_tag, utility::options::OptionCollection const &options)
 checks if the weights file is probably a talaris weights file and if it is consistent with the options system. static because C++ says it has to be; public because unit test spiritually const but you can't do that with static More...
 
static bool validate_beta (std::string const &weights_tag, utility::options::OptionCollection const &options)
 checks if the weights file is probably a beta_15 weights file and if it is consistent with the options system. static because C++ says it has to be; public because unit test spiritually const but you can't do that with static More...
 

Private Member Functions

 ScoreFunctionFactory ()=default
 
 ~ScoreFunctionFactory ()=default
 
ScoreFunctionOP create_score_function_nonstatic (utility::options::OptionCollection const &options, std::string const &weights_tag, utility::vector1< std::string > const &patch_tags)
 Nonstatic version for storing the loaded scorefunction in this object. More...
 

Static Private Member Functions

static core::scoring::ScoreFunctionOP load_score_function_from_disk (utility::options::OptionCollection const &options, std::string const &weights_tag_in, utility::vector1< std::string > const &patch_tags_in)
 Load a scorefunction from disk. More...
 
static void apply_user_defined_reweighting_ (utility::options::OptionCollection const &options, core::scoring::ScoreFunctionOP scorefxn)
 Applies user defined re-weighting from the options system. Reweights are applied as a factor of the original, so -rg_reweight 0.5 would result in half of the previously defined rg weight. More...
 
static void load_weights_file (std::string weights_tag, ScoreFunctionOP scorefxn)
 

Private Attributes

std::map< ScoreFunctionKey, core::scoring::ScoreFunctionOPloaded_scorefxns_
 A cache of all the scorefunctions we've loaded so far, by filename, so that we don't have to load them from disk again. More...
 

Friends

class utility::SingletonBase< ScoreFunctionFactory >
 

Detailed Description

A static singleton for making a single score_function.

Constructor & Destructor Documentation

◆ ScoreFunctionFactory()

core::scoring::ScoreFunctionFactory::ScoreFunctionFactory ( )
privatedefault

◆ ~ScoreFunctionFactory()

core::scoring::ScoreFunctionFactory::~ScoreFunctionFactory ( )
privatedefault

Member Function Documentation

◆ apply_user_defined_reweighting_()

void core::scoring::ScoreFunctionFactory::apply_user_defined_reweighting_ ( utility::options::OptionCollection const &  options,
core::scoring::ScoreFunctionOP  scorefxn 
)
staticprivate

Applies user defined re-weighting from the options system. Reweights are applied as a factor of the original, so -rg_reweight 0.5 would result in half of the previously defined rg weight.

References protocols::cluster::calibur::aa, core::scoring::apply_set_weights(), core::scoring::methods::EnergyMethodOptions::has_method_weights(), core::scoring::methods::EnergyMethodOptions::method_weights(), core::scoring::ref, core::scoring::rg, and core::scoring::methods::EnergyMethodOptions::set_method_weights().

Referenced by load_score_function_from_disk().

◆ create_score_function() [1/6]

ScoreFunctionOP core::scoring::ScoreFunctionFactory::create_score_function ( std::string const &  weights_tag)
static

Returns a ScoreFunction from the database weights file <weights_tag>

example(s): scorefxn = create_score_function('standard') See also: ScoreFunction ScoreFunction.show ScoreFunction.weights ScoreType

Referenced by protocols::simple_filters::ExtraScoreEvaluatorCreator::add_evaluators(), protocols::simple_filters::TruncatedScoreEvaluator::apply(), protocols::abinitio::AbrelaxMover::apply(), protocols::antibody::LHSnugFitLegacy::apply(), protocols::docking::SlideIntoContact::apply(), protocols::enzdes::PredesignPerturbMover::apply(), protocols::hybridization::BackboneTorsionPerturbation::apply(), protocols::hybridization::BackboneTorsionSampler::apply(), protocols::hybridization::CartesianHybridize::apply(), protocols::hybridization::CartesianSampler::apply(), protocols::legacy_sewing::LegacyAssemblyMover::apply(), protocols::loop_grower::FragmentExtension::apply(), protocols::membrane::benchmark::SampleTiltAngles::apply(), protocols::ncbb::oop::OopCreatorMover::apply(), protocols::membrane::HelixFromSequence::apply(), protocols::protein_interface_design::movers::DockWithHotspotMover::apply(), protocols::protein_interface_design::movers::PlaceStubMover::apply(), protocols::recces::scratch::ThermalSamplingMover::apply(), protocols::relax::membrane::MPFastRelaxMover::apply(), protocols::rna::denovo::movers::RNA_Relaxer::apply(), protocols::rna::denovo::movers::RNP_HighResMover::apply(), protocols::ligand_docking::ga_ligand_dock::LigandAligner::apply(), protocols::fldsgn::BluePrintBDR::apply(), protocols::flxbb::InterlockAroma::apply(), protocols::forge::remodel::RemodelLoopMover::apply(), protocols::rna::movers::ErraserMinimizerMover::apply(), protocols::symmetric_docking::membrane::MPSymDockMover::apply(), protocols::dna::argrot_dna_dis2(), protocols::simple_moves::asym_fold_and_dock::AsymFoldandDockRbTrialMover::AsymFoldandDockRbTrialMover(), protocols::rbsegment_relax::AutoRBMover::AutoRBMover(), protocols::boinc::boincOutputFilter(), protocols::simple_moves::StructProfileMover::calc_cenlist(), protocols::analysis::InterfaceAnalyzerMover::calc_centroid_dG(), protocols::ub_e2c::ubi_e2c_modeler::calc_interaction_energy(), protocols::relax::CentroidRelax::CentroidRelax(), protocols::rna::denovo::check_base_pair(), protocols::rna::denovo::classify_base_pairs_lores(), protocols::optimize_weights::IterativeOptEDriver::collect_decoy_discrimination_data(), protocols::protein_interface_design::filters::ClashWithTargetFilter::compute(), protocols::helical_bundle_predict::HelicalBundlePredictApplication::create_centroid_scorefunction(), create_score_function(), protocols::parser::ScoreFunctionLoader::create_scorefxn_from_tag(), protocols::ddG_main(), protocols::fold_from_loops::movers::NubInitioLoopClosureMover::default_centroid_scorefxn(), protocols::denovo_design::components::RemodelLoopMoverPoseFolder::default_score_function(), LigandDiscoverySearch::discover(), protocols::docking::DockingSlideIntoContact::DockingSlideIntoContact(), protocols::enzdes::EnzdesBaseProtocol::EnzdesBaseProtocol(), protocols::ub_e2c::ubi_e2c_modeler::evaluate_native(), protocols::enzdes::EnzdesScorefileFilter::examine_pose(), protocols::forge::remodel::RemodelLoopMover::fa_relax_stage(), protocols::hotspot_hashing::HotspotStubSet::fill(), protocols::nmr::filter_spinlabel_ensemble_by_packerenergy(), protocols::docking::DockingEnsemblePrepackProtocol::finalize_setup(), protocols::docking::DockingPrepackProtocol::finalize_setup(), protocols::docking::membrane::MPFindInterfaceMover::finalize_setup(), protocols::docking::membrane::QuickRelaxPartnersSeparately::finalize_setup(), protocols::membrane::MPMutateRelaxMover::finalize_setup(), protocols::floppy_tail::FloppyTailMover::FloppyTailMover(), protocols::abinitio::AbrelaxApplication::fold(), protocols::pose_length_moves::PossibleLoop::generate_output_pose(), protocols::abinitio::AbrelaxApplication::generate_scorefxn(), protocols::features::strand_assembly::SandwichFeatures::generate_scorefxn(), protocols::mainchain_potential::GenerateMainchainPotential::generate_sfxn(), protocols::antibody::design::get_ab_design_dock_high_scorefxn(), protocols::antibody::design::get_ab_design_dock_low_scorefxn(), protocols::antibody::get_Dock_ScoreFxn(), protocols::mpi_refinement::WorkUnit_Sampler::get_energy(), protocols::vip::VIP_Report::get_GOE_relaxed_report(), protocols::vip::VIP_Report::get_GOE_repack_report(), protocols::antibody::get_LoopCentral_ScoreFxn(), protocols::helix_capper::HelixNCapperMover::get_Ncap_scores(), protocols::rna::denovo::get_rna_hires_scorefxn(), core::scoring::get_score_function(), core::scoring::get_score_function_legacy(), core::pose::rna::get_scored_base_stack_list(), protocols::ligand_docking::ga_ligand_dock::GridScorer::GridScorer(), protocols::rbsegment_relax::IdealizeHelicesMover::IdealizeHelicesMover(), protocols::tcr::ind_remodel_tcr_cdr_loops(), protocols::antibody::RefineBetaBarrel::init(), protocols::hybridization::FoldTreeHybridize::init(), protocols::hybridization::HybridizeProtocol::init(), protocols::hybridization::MRMover::init(), protocols::seeded_abinitio::SegmentHybridizer::init(), protocols::docking::DockingProtocol::init(), protocols::docking::DockingLowRes::init(), protocols::docking::TemperedDocking::init_from_options(), protocols::abinitio::IterativeBase::initialize(), protocols::abinitio::IterativeFullatom::initialize(), protocols::dna::DnaInterfaceMultiStateDesign::initialize(), protocols::rosetta_scripts::RosettaScriptsParser::initialize_data_map(), protocols::canonical_sampling::HamiltonianExchange::initialize_from_file(), protocols::rna::movers::ErraserMinimizerMover::initialize_from_options(), protocols::rna::denovo::RNA_FragmentMonteCarlo::initialize_score_functions(), protocols::rna::denovo::RNA_DeNovoProtocol::initialize_scorefxn(), protocols::ligand_docking::LigandBaseProtocol::initialize_scorefxns(), protocols::loop_grower::LoopGrower::LoopGrower(), protocols::rna::denovo::movers::RNA_Relaxer::lores_monte_carlo(), protocols::forge::remodel::RemodelLigandHandler::minimize(), protocols::antibody::design::GeneralAntibodyModeler::minimize_cdrs(), protocols::vip::VIP_Mover::minimize_conformation(), protocols::ub_e2c::ubi_e2c_modeler::monoub_calc_interaction_energy(), core::pack::optimize_H_and_notify(), protocols::rbsegment_relax::OptimizeThreadingMover::OptimizeThreadingMover(), protocols::rna::movers::ErraserMinimizerMover::parse_my_tag(), protocols::docking::membrane::MPDockingMover::parse_my_tag(), protocols::membrane::OptimizeMembranePositionMover::parse_my_tag(), protocols::relax::membrane::MPRangeRelaxMover::parse_my_tag(), protocols::abinitio::abscript::AbscriptLoopCloserCM::parse_my_tag(), protocols::pose_reporters::EnergyReporter::parse_my_tag(), protocols::rbsegment_relax::ConfChangeMover::parse_my_tag(), protocols::pose_sewing::data_storage::TerminalDSSPSortedPoseVector::purge_missing_density(), protocols::RBSegmentRelaxImpl::RBSegmentRelaxImpl(), protocols::vip::VIP_Mover::relax_favorable_poses(), protocols::tcr::remodel_tcr_cdr_loops(), protocols::forge::remodel::RemodelMover::RemodelMover(), protocols::antibody_legacy::AntibodyModeler::repulsive_ramp(), protocols::relax::WorkUnit_BatchRelax_and_PostRescore::rescore_all_decoys(), protocols::abinitio::IterativeBase::rescore_nonlocal_archive(), protocols::rna::movers::RNA_DeNovoOptimizer::RNA_DeNovoOptimizer(), protocols::hybridization::DomainAssembly::run(), protocols::mpi_refinement::WorkUnit_NormalMode::run(), protocols::mpi_refinement::WorkUnit_RamaPerturber::run(), protocols::mpi_refinement::WorkUnit_bbGauss::run(), protocols::medal::MedalMover::score_function(), protocols::docking::SlideIntoContact::scorefunction(), protocols::simple_moves::ScoreMover::ScoreMover(), protocols::rna::denovo::movers::RNA_DeNovoMasterMover::search_rigid_body_orientation(), protocols::enzdes::SecondaryMatchProtocol::SecondaryMatchProtocol(), protocols::relax::CentroidRelax::set_cartesian(), protocols::antibody::LHRepulsiveRampLegacy::set_default(), protocols::ub_e2c::ubi_e2c_modeler::set_default(), protocols::flexpep_docking::FlexPepDockingProtocol::set_default(), protocols::mpi_refinement::StructAvrgMover::set_default(), protocols::simple_moves::CombinePoseMover::set_default(), protocols::symmetric_docking::SymDockProtocol::set_default(), protocols::abinitio::ClassicAbinitio::set_default_scores(), protocols::abinitio::FragmentSampler::set_default_scores(), protocols::abinitio::MembraneAbinitio::set_default_scores(), protocols::membrane::MPQuickRelaxMover::set_defaults(), protocols::membrane::OptimizeMembranePositionMover::set_defaults(), protocols::mpi_refinement::MultiObjective::set_defaults(), protocols::relax::membrane::MPRangeRelaxMover::set_defaults(), protocols::docking::membrane::MPDockingMover::set_defaults(), protocols::symmetry::SymmetrySlider::setup(), protocols::minimization_packing::RotamerizeMover::setup(), protocols::stepwise::modeler::protein::StepWiseProteinBackboneSampler::setup_centroid_screen(), protocols::loops::loop_closure::ccd::SlidingWindowLoopClosure::setup_frag_scorefxn(), protocols::antibody::snugdock::SnugDockProtocol::setup_loop_refinement_movers(), protocols::antibody::AntibodyModelerProtocol::setup_objects(), protocols::antibody::snugdock::SnugDock::setup_objects(), protocols::star::setup_score(), protocols::abinitio::abscript::setup_score(), protocols::mpi_refinement::WorkUnit_PartialAbinitio::setup_score(), protocols::flexpep_docking::FlexPepDockingProtocol::SlideIntoContact(), protocols::antibody_legacy::AntibodyModeler::snugfit_mcm_protocol(), protocols::vip::VIP_Mover::sort_fill_energies(), protocols::rbsegment_relax::ConfChangeMover::stage1(), protocols::rbsegment_relax::ConfChangeMover::stage2(), protocols::star::StarAbinitio::StarAbinitio(), protocols::symmetric_docking::SymDockBaseProtocol::SymDockBaseProtocol(), protocols::symmetry::SymDockingSlideIntoContact::SymDockingSlideIntoContact(), protocols::symmetric_docking::SymFoldandDockRbTrialMover::SymFoldandDockRbTrialMover(), protocols::symmetry::SymmetrySlider::SymmetrySlider(), and protocols::vip::VIP_Mover::try_point_mutants().

◆ create_score_function() [2/6]

ScoreFunctionOP core::scoring::ScoreFunctionFactory::create_score_function ( std::string const &  weights_tag,
std::string const &  patch_tag 
)
static

Returns a ScoreFunction from the database weights file <weights_tag> with the patch <patch_tag>

example(s): See also: ScoreFunction ScoreFunction.show ScoreFunction.weights ScoreType

References create_score_function().

◆ create_score_function() [3/6]

ScoreFunctionOP core::scoring::ScoreFunctionFactory::create_score_function ( std::string const &  weights_tag,
utility::vector1< std::string > const &  patch_tags 
)
static

Returns a ScoreFunction from the database weights file <weights_tag> with patches in <patch_tags>

References create_score_function().

◆ create_score_function() [4/6]

ScoreFunctionOP core::scoring::ScoreFunctionFactory::create_score_function ( utility::options::OptionCollection const &  options,
std::string const &  weights_tag 
)
static

◆ create_score_function() [5/6]

ScoreFunctionOP core::scoring::ScoreFunctionFactory::create_score_function ( utility::options::OptionCollection const &  options,
std::string const &  weights_tag,
std::string const &  patch_tag 
)
static

◆ create_score_function() [6/6]

ScoreFunctionOP core::scoring::ScoreFunctionFactory::create_score_function ( utility::options::OptionCollection const &  options,
std::string const &  weights_tag,
utility::vector1< std::string > const &  patch_tags 
)
static

◆ create_score_function_nonstatic()

ScoreFunctionOP core::scoring::ScoreFunctionFactory::create_score_function_nonstatic ( utility::options::OptionCollection const &  options,
std::string const &  weights_tag,
utility::vector1< std::string > const &  patch_tags 
)
private

Nonstatic version for storing the loaded scorefunction in this object.

Loads scorefunction from disk if it has not yet been loaded (and caches it), or retrieves cached copy if it has been loaded already. Returns clone of cached copy.

Author
Vikram K. Mulligan (vmull.nosp@m.igan.nosp@m.@flat.nosp@m.iron.nosp@m.insti.nosp@m.tute.nosp@m..org).

References load_score_function_from_disk(), and loaded_scorefxns_.

◆ list_read_options()

void core::scoring::ScoreFunctionFactory::list_read_options ( utility::options::OptionKeyList &  opts)
static

◆ load_score_function_from_disk()

core::scoring::ScoreFunctionOP core::scoring::ScoreFunctionFactory::load_score_function_from_disk ( utility::options::OptionCollection const &  options,
std::string const &  weights_tag_in,
utility::vector1< std::string > const &  patch_tags_in 
)
staticprivate

◆ load_weights_file()

void core::scoring::ScoreFunctionFactory::load_weights_file ( std::string  weights_tag,
ScoreFunctionOP  scorefxn 
)
staticprivate

◆ validate_beta()

bool core::scoring::ScoreFunctionFactory::validate_beta ( std::string const &  weights_tag,
utility::options::OptionCollection const &  options 
)
static

checks if the weights file is probably a beta_15 weights file and if it is consistent with the options system. static because C++ says it has to be; public because unit test spiritually const but you can't do that with static

If requested tag is beta_nov15 or beta_july15, but the user did not pass the relevant options-system option, ERROR! This is because this scorefunction family has overrides to parameters (LK solvation params, etc). Those are loaded from the command-line flag, not the weights file. Using only the weights file will give you mismatched weights/params and much sadness.

References core::scoring::BETA_GENPOT, core::scoring::BETA_JULY15, core::scoring::BETA_NOV16, and core::scoring::TR().

Referenced by load_score_function_from_disk().

◆ validate_talaris()

bool core::scoring::ScoreFunctionFactory::validate_talaris ( std::string const &  weights_tag,
utility::options::OptionCollection const &  options 
)
static

checks if the weights file is probably a talaris weights file and if it is consistent with the options system. static because C++ says it has to be; public because unit test spiritually const but you can't do that with static

If requested tag is talaris2013/talaris2014, but the user did not pass the relevant options-system option, ERROR! This is because this scorefunction family has overrides to parameters (LK solvation params, etc). Those are loaded from the command-line flag, not the weights file. Using only the weights file will give you mismatched weights/params and much sadness.

References core::scoring::TALARIS_2013, core::scoring::TALARIS_2014, and core::scoring::TR().

Referenced by load_score_function_from_disk().

Friends And Related Function Documentation

◆ utility::SingletonBase< ScoreFunctionFactory >

friend class utility::SingletonBase< ScoreFunctionFactory >
friend

Member Data Documentation

◆ loaded_scorefxns_

std::map< ScoreFunctionKey, core::scoring::ScoreFunctionOP > core::scoring::ScoreFunctionFactory::loaded_scorefxns_
mutableprivate

A cache of all the scorefunctions we've loaded so far, by filename, so that we don't have to load them from disk again.

This is indexed by weights tag, comma-separated patches, pointer to options collection.

Author
Vikram K. Mulligan (vmull.nosp@m.igan.nosp@m.@flat.nosp@m.iron.nosp@m.insti.nosp@m.tute.nosp@m..org).

Referenced by create_score_function_nonstatic().


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