Skip to content

Commit

Permalink
Add saving of the beautification diff to the test server. (#204)
Browse files Browse the repository at this point in the history
We should be able to save the full diff of the beautification test output, and present it on the benchmark server in the `Test files: 「file-tree-view」「file-list-view」` entries.

Additionally, beautify main.
  • Loading branch information
roccomoretti authored Oct 22, 2024
1 parent 9fa29fe commit 470f09a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
18 changes: 9 additions & 9 deletions source/src/core/simple_metrics/metrics/RMSDMetric.hh
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ namespace core {
namespace simple_metrics {
namespace metrics {

///@brief A metric to calculate the RMSD between two poses.
///@brief A metric to calculate the RMSD between two poses.
/// Please note that by default it doesn't align poses. You need to set set_run_superimpose() to True for performing alignment.
/// You Can set a subset of residues to calculate via ResidueSelector.
///
/// By default RMSD is calcualted between all atoms other than hydrogens (all_heavy). This can be changed via **set_rmsd_type**
///
/// By default RMSD is calcualted between all atoms other than hydrogens (all_heavy). This can be changed via **set_rmsd_type**
///
/// @details We match all corresponding atoms and do not fail if a residue does not match up.
///
class RMSDMetric : public core::simple_metrics::RealMetric{
Expand Down Expand Up @@ -131,19 +131,19 @@ public:
set_run_superimpose( bool super );

///@brief Set what we will be calculating the RMSD on.
///
///
/// By default RMSD is calcualted between all atoms other than hydrogens (all_heavy).
///
/// You can look up core/rms/rms_enum.hh for available options. Right now the available options are:
/// rmsd_protein_bb_heavy: backbone heavy atoms N,CA,C
/// rmsd_protein_bb_heavy_including_O: backbone heavy atoms N,CA,C,O
/// rmsd_protein_bb_heavy: backbone heavy atoms N,CA,C
/// rmsd_protein_bb_heavy_including_O: backbone heavy atoms N,CA,C,O
/// rmsd_protein_bb_ca: CA (C-alpha)
/// rmsd_sc_heavy: side chain heavy atoms
/// rmsd_sc: all side chain atoms (including H)
/// rmsd_sc: all side chain atoms (including H)
/// rmsd_all_heavy: all heavy atoms
/// rmsd_all: all atoms
///
/// Example:
///
/// Example:
/// metric = rosetta.core.simple_metrics.metrics.RMSDMetric(pose_1)
/// metric.set_rmsd_type(rosetta.core.scoring.rmsd_protein_bb_heavy)
/// metric.set_run_superimpose(True)
Expand Down
3 changes: 3 additions & 0 deletions tests/benchmark/tests/code_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,9 @@ def run_beautification_test(rosetta_dir, working_dir, platform, config, hpc_driv

if res:
state, output = _S_failed_, 'Some of the source code looks ugly!!! Script test_all_files_already_beautiful.py output:\n' + o
res_diff, diff = execute('Generating patch file for changes', 'cd {}/source && git --no-pager diff --no-color'.format(rosetta_dir), return_="tuple")
with open(working_dir+'/full_diff.patch', 'w') as f: f.write(diff)
output += "\n\nSee full_diff.patch in the `Test files` for the full list of changes\n"
else:
state = _S_passed_

Expand Down

0 comments on commit 470f09a

Please sign in to comment.