Skip to content

Commit

Permalink
Round to 2 decimal places
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Feb 15, 2024
1 parent 8c75b32 commit 01c0370
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/haddock/libs/libplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,13 @@ def clt_table_handler(clt_file, ss_file, is_cleaned=False):
clusters_df = read_capri_table(clt_file)
structs_df = read_capri_table(ss_file)

# Round all numbers to 2 decimal places
clusters_df = clusters_df.round(2)
structs_df = structs_df.round(2)

# if the run will be cleaned, the structures are going to be gzipped
if is_cleaned:
# substitute the values in the df by adding .gz at the end
# substitute the values in the df by adding .gz at the end
structs_df['model'] = structs_df['model'].replace(
to_replace=r"(\.pdb)$", value=r".pdb.gz", regex=True
)
Expand Down

0 comments on commit 01c0370

Please sign in to comment.