「view this page in B3 βῆτα server」

Revisions №61897

branch: master 「№61897」
Commited by: Vikram K. Mulligan
GitHub commit link: 「cd16be2910907fd8」 「№6069」
Difference from previous tested commit:  code diff
Commit date: 2022-06-29 22:22:46
linux.clang linux.gcc linux.srlz mac.clang
debug
release
unit
PyRosetta.notebook gcc-9.gcc.python37.PyRosetta.unit linux.clang.cxx11thread.serialization.python37.PyRosetta.unit linux.gcc.python36.PyRosetta.unit m1.clang.python38.PyRosetta.unit m1.clang.python39.PyRosetta.unit mac.clang.python36.PyRosetta.unit build.clean.debug alpine.gcc.build.debug clang-10.clang.cxx11thread.mpi.serialization.tensorflow.build.debug gcc-10.gcc.build.debug gcc-11.gcc.python39.build.debug gcc-9.gcc.build.debug linux.clang.bcl.build.debug linux.clang.hdf5.build.debug mysql postgres linux.clang.python36.build.debug linux.zeromq.debug linux.gcc.bcl.build.debug mpi mpi.serialization linux.icc.build.debug mac.clang.bcl.build.debug OpenCL mac.clang.python36.build.debug ubuntu.clang.bcl.build.debug ubuntu.gcc.bcl.build.debug build.header build.levels build.ninja_debug graphics static mac.clang.static.build.release beautification code_quality.clang_analysis code_quality.clang_tidy code_quality.cppcheck code_quality.merge_size serialization code_quality.submodule_regression integration.mpi integration.release_debug integration.tensorflow integration.thread integration.ubsan integration maintenance.documentation performance profile linux.clang.python38.release.PyRosetta.Debug linux.clang.python39.release.PyRosetta.Debug linux.clang.python36.release.PyRosetta.MinSizeRel m1.clang.python38.release.PyRosetta.MinSizeRel m1.clang.python39.release.PyRosetta.MinSizeRel linux.clang.python36.release.PyRosetta.Release linux.clang.python37.release.PyRosetta.Release linux.clang.python38.release.PyRosetta.Release linux.clang.python39.release.PyRosetta.Release m1.clang.python38.release.PyRosetta.Release m1.clang.python39.release.PyRosetta.Release ubuntu.clang.python36.release.PyRosetta.Release ubuntu.clang.python38.release.PyRosetta.Release ubuntu.clang.python39.release.PyRosetta.Release release.source scientific.mp_relax scientific.sb_score12_loop_modeling_kic_fragments_12res scientific.sb_talaris13_loop_modeling_ccd_12res linux.clang.score linux.gcc.score mac.clang.score linux.scripts.pyrosetta scripts.rosetta.parse scripts.rosetta.validate scripts.rosetta.verify linux.clang.unit.release linux.gcc.unit.release mac.clang.unit.release gcc-10.gcc.unit gcc-11.gcc.python39.unit gcc-9.gcc.unit m1.clang.python39.unit util.apps windows.build.debug windows.build.release

Merge pull request #6069 from RosettaCommons/vmullig/custom_real_valued_metric Add a CustomRealValueMetric class, analogous to the CustomStringValueMetric It is convenient to have an easy way to cache an arbitrary floating-point value in a pose from code, without doing a lot of manual steps. Simple metrics let you _compute_ particular types of floating-point values (scores, RMSDs, _etc._) and cache them, but if you've already computed whatever you want to compute, it's not easy to get that stored as a metric. This pull request adds a `CustomRealValueMetric` class, which lets you add an arbitrary input value and label to a pose. For instance, you might be testing an idea in a pilot app: ```c++ core::pose::PoseOP pose( utility::pointer::make_shared< core::pose::Pose >() ); // Create the pose and manipulate it. core::Real const my_computed_value = /*some new calculation to analyze the pose that's experimental enough or specialized enough that it's not worth turning into its own simple metric*/; core::simple_metrics::metrics::CustomRealValueMetric my_metric; my_metric.set_value( my_computed_value ); //I don't want the computation to be done by the metric. my_metric.apply( "custom_computed_value", *pose ); //Cache the computed value in the pose, and give it the label "custom_computed_value". ``` We already have this for string metrics. This pull request adds it for float-valued metrics. Note: this also gives you a way to pass in information from the commandline in RosettaScripts and cache it in the pose. For instance: ```xml <ROSETTASCRIPTS> <SIMPLE_METRICS> <CustomRealValueMetric name="my_metric" value="%%extrernal_val%%" /> </SIMPLE_METRICS> <PROTOCOLS> <Add metrics="my_metric" /> </PROTOCOLS> </ROSETTASCRIPTS> ``` ```sh ~/Rosetta/main/source/src/rosetta_scripts.default.linuxgccrelease -parser:protocol my_script.xml -script_vars external_val=25.3 -in:file:s first_file.pdb ~/Rosetta/main/source/src/rosetta_scripts.default.linuxgccrelease -parser:protocol my_script.xml -script_vars external_val=-12.9 -in:file:s second_file.pdb ``` It should also make it easier to put custom information into a Pose in PyRosetta. TODO: - [x] Unit test. - [x] Beauty. - [x] Documentation. Pull request RosettaCommons/documentation#59 has this.