Merge pull request #3112 from RosettaCommons/everyday847/update_lores_potential
Initial merge from a branch for updating the lores potential -- just cleans up code
notify author
notify list [rosetta-logs@googlegroups.com]
Merge pull request #3105 from RosettaCommons/vmullig/goto_killer
Remove a bunch of unnecessary gotos.
The only gotos remaining in Rosetta after this are in pilot apps (which we won't touch) and in `numeric/linear_algebra/rgg.cc` (which is an incomprehensible mess of gotos that nobody will ever dare to change).
<img src="https://imgs.xkcd.com/comics/goto.png" />
notify author
notify list [rosetta-logs@googlegroups.com]
Merge pull request #3102 from RosettaCommons/BYachnin/global_SetupForSymmetry_option
Add option to disable setting symmetry globally during SetupForSymmetry parse_my_tag
This adds a new option, `set_global_symmetry_at_parsetime`, to the `<SetupForSymmetry>` mover. By default (true), the current behaviour is maintained. If set to false, the global option `symmetry_definition` is NOT set, which provides greater "safety" and flexibility for when symmetry should be used. This option is not backwards compatible with all symmetric protocols, however, necessitating the need to switch back and forth.
The following integration tests are expected to fail due to new tracer output. This is entirely the expected behaviour:
integration.mpi: threefold_symm_peptide_design
integration.release_debug: crosslinkermover_tma_symm, homodimer_fnd_ref2015_memb, make_symmdef_file, minimize_with_elec_dens, mirror_symm, oligourea_design, repack_with_elec_dens, resource_database_locator, symm_disulfidize, symm_rotamer_boltzmann, symmetry_data_resource, threefold_symm_peptide_design, threefoldlinkermover_tbmb_symmetric, voids_penalty_energy_symmetry
integration: crosslinkermover_tma_symm, homodimer_fnd_ref2015_memb, make_symmdef_file, minimize_with_elec_dens, mirror_symm, oligourea_design, repack_with_elec_dens, resource_database_locator, symm_disulfidize, symm_rotamer_boltzmann, symmetry_data_resource, threefold_symm_peptide_design, threefoldlinkermover_tbmb_symmetric, voids_penalty_energy_design_symmetry
notify author
notify list [rosetta-logs@googlegroups.com]
Merge pull request #3080 from RosettaCommons/jadolfbr/simple_metrics
SimpleMetrics for analysis, filters, and features
This PR adds **SimpleMetrics** to Rosetta, which I'm hoping will be the way we write metrics and filters going forward.
They are easy to write, easy to use and (IMO) powerful - as you can use them to analyze data, use all of them for filtering, and/or create features reporter databases. I have not rewritten all of the filters, as they do some really crazy stuff. Additionally, we can use this to revive the scientific benchmarks. These have all been tested.
Extras:
- MinMover now works with new the new MoveMapFactory in RS
- utility to define/limit RS option xsd as a vector of strings
- All simple metrics have code_templates
ToDo:
- [x] Test all code
- [x] Write integration tests
- [x] Write unit test suite
- [x] Write Documentation
# SimpleMetrics
Base Class: **SimpleMetric**
Main SubClasses:
**RealMetric**: Returns `Real`
**StringMetric**: Returns `string`
**CompositeRealMetric**: Returns `map< string, Real >`
**CompositeStringMetric**: Returns `map< string, string >`
## SimpleMetric code
- `core/simple_metrics`
- `core/simple_metrics/metrics`
- `protocols/analysis/simple_metrics`
The two main methods of these classes are ` calculate( const & pose ) const` which returns a value (listed above), and `void apply( & pose, prefix="", suffix="") const`, which runs calculate and adds data to the pose.
- `calculate( const pose )` : The calculate method is basically the only method you will need to code in your derived simple metric. The value depends on the type of subclass you are deriving from.
- `apply( pose, prefix="", suffix="")` : This method adds the data to the pose as setPoseExtraScore so EVERY metric can be easily output into the score file. This apply method is defined in each main class, **so you do not need to write it and can always rely on it**. The metric name that is output as the score tag is `prefix+metric()+suffix`. Additionally, each metric from a composite metric is named (the key from the map).
## Implemented SimpleMetrics
### Main
**RMSDMetric**:
- Calculate the RMSD between an input (native) or reference pose to the current pose. Accepts a `ResidueSelector`. Works for protein/ligands/glycans/etc. Can accept TWO `ResidueSelector`s in order to compare non-matching areas. More options code-wise. Many options accepted as a string to determine HOW the calculation is done. Default is to be robust against non-matching atoms in a residue, allowing comparison of post-traslational modifications and similar mutations (option `robust`). **DOES NOT SUPERIMPOSE ** (and nor should it)
RMSD Types (`rmsd_type` rosetta_script option)
```
rmsd_protein_bb_heavy,
rmsd_protein_bb_heavy_including_O,
rmsd_protein_bb_ca,
rmsd_sc_heavy,
rmsd_sc,
rmsd_all_heavy,
rmsd_all,
```
**DihedralDistanceMetric**:
- Return the normalized BB dihedral angle distance from directional statistics in degrees. This was used for North/Dunbrack CDR clustering, but can be useful for comparing loops or regions of interest. A good internal comparison of structural change - as lever-arms do not effect measurement too much, so natural fluctuation is compared well. This also does not require a superposition. Accepts a `ResidueSelector`. Works for proteins and glycans.
**TotalEnergyMetric**
- Returns the total energy of the score function. Can set a `ResidueSelector` to limit to only those residues (yes, the hbond-energy is decomposed). Can set input structure or reference pose to get **DELTAS**
**CompositeEnergyMetric**
- Returns the energy of each nonzero score term in a score function. Can set a 'ResidueSelector' to limit to only those residues (hbonds decomposed). Can set input structure or reference pose to get **DELTAS**.
**SasaMetric**:
- Calculate the SASA of the pose or set of residues from a `ResidueSelector`
### Utility
**TimingMetric**
- Safely output the time passed from construction till calculate/apply in minutes. Options for hours. Useful for getting runtimes or averaging runtimes for protocols. Using two between movers or sets of movers can allow you to calculate time between them.
**SelectedResiduesMetric**
- Output residues selected by a `ResidueSelector`. Either pose or PDB numbering. Useful to get at the pose-numbers of residues of interest.
**SelectedResiduesPyMOLMetric**
- Output residues selected by a `ResidueSelector` as a PYMOL selection. Useful for very complex selections such as Layer Selection.
# RunSimpleMetrics
Run the metrics defined in the the `<SIMPLE_METRICS>` block (or defined as sub tags) (or set via code). The RunSimpleMetrics (mover) takes a list of metrics and runs them, adding the data to the pose for direct output into the score file using any set prefix/suffix. In this way, we can use them to show differences between movers or sets of moves if desired. Recommended to use json-format score files.
# SimpleMetricFilter
Takes a single metric from to run as a filter (including strings and composites).
## General Use
You are required to give a `cutoff` value and `comparison_type` (eq, ne, lt, gt, lt_or_eq, gt_or_eq) to control the behavior of the filter (basically, when to return True). We do not define the cutoffs within the metrics - as filters currently work. If you want to write a filter that does this, write a `SimpleMetric` and use it within a classic filter with a cutoff.
Comparison is done as `value comparison_type cutoff`. So if your `cutoff=4.0` for RMSDMetric and your` comparison_type` is lt, we return true if the value is less than 4.0.
## StringMetrics
String metrics only work with eq and ne and this is checked. Instead of cutoff, StringMetrics require a `match` option to be set, which is simply a string. In this way, you can filter unwanted SS, sequence changes, or some other metric.
## CompositeMetrics
Composite metrics require an additional option, `composite_action`. This can be `any`, `all`, or a specific composite type. For example, the `CompositeEnergyMetric` can return the energy value or delta energy between an input pose for each energy term. If we set this to `any`, then we return TRUE if ANY composite matches. ALL only returns TRUE if all of the metrics match our filter criteria. Additionally, we can give, for example, 'chainbreak' to filter specifically on the chain break term.
# SimpleMetricFeatures
The SimpleMetricFeatures simply takes a list of metrics. You can control the table that they get written to and can run the same set multiple times. If the table columns do not match on subsequent runs, we will exit with an informative error message.
## Documentation:
https://www.rosettacommons.org/docs/wiki/scripting_documentation/RosettaScripts/RosettaScripts#rosettascript-sections_simple_metrics
https://www.rosettacommons.org/docs/wiki/scripting_documentation/RosettaScripts/SimpleMetrics/SimpleMetrics
Rocco Moretti 7 years It looks like the new simple_metric_features and simple_metric_filter integration tests are in a "perma-broke" state.
Jared Adolf-Bryfogle 7 years Thanks Rocco, I'll fix this after the commit freeze.
notify author
notify list [rosetta-logs@googlegroups.com]
Merge pull request #3107 from RosettaCommons/roccomoretti/only_for_extras_dummy
Add dummy cc file for 'only_for_extras' build.
It appears the static build doesn't like an empty source list when an 'only_for_extras' library isn't active. Add a dummy source file which will be used for that purpose. Should fix the mac.clang.static.build.release test on the test server
notify author
notify list [rosetta-logs@googlegroups.com]
Merge pull request #3090 from RosettaCommons/vmullig/fix_sidechain_conjugation
Just fix SIDECHAIN_CONJUGATION patch.
Since pull request #3089 generated controversy, I'm cherry-picking out the changes that actually seem to fix the problem that I'm seeing and leaving the others for later. This pull request corrects the SIDECHAIN_CONJUGATION patch, and fixes a few little things in the Patch and PatchOperation classes. It does not alter the Conformation class in any way. Cosmetic integration test changes are expected from the Patch tracer name correction, and some trajectory changes in those integration tests involving sidechain-conjugated ASP or GLU are expected too (e.g. the simple_cycpep_predict isopeptide tests).
notify author
notify list [rosetta-logs@googlegroups.com]
Merge pull request #3098 from RosettaCommons/vmullig/fix_nterm_proline_error
Fix bug in simple_cycpep_predict with N-terminal prolines and isopeptide bonds.
The issue was that the app is trying to sample the cis conformation of the peptide bond preceding the proline, which it can't do in the isopeptide case with proline at the N-terminus. Fixed.
notify author
notify list [rosetta-logs@googlegroups.com]
Merge pull request #3094 from RosettaCommons/roccomoretti/RotamerSetFactory_symmetry
Fix RotamerSetFactory
How RotamerSetFactory was handling symmetry was sub-optimal. I've removed SymmetricRotamerSetFactory and consolidated logic in RotamerSetFactory in a non-options-system dependent way.
notify author
notify list [rosetta-logs@googlegroups.com]