33from pdconfig import Dataset , benchmark_dir , datasets , map_root
44
55
6- def soft_residue_range (number_of_residues_modelled : str | int | float ) -> tuple [int , int , int , int ]:
6+ def residue_ranges (number_of_residues_modelled : str | int | float ) -> tuple [int , int , int , int ]:
77 """Calculate soft/hard minimum and maximum residues based on modelled residues count.
88
99 Uses a range fraction of 0.1 (+- 10%) around the modelled residues.
@@ -15,10 +15,10 @@ def soft_residue_range(number_of_residues_modelled: str | int | float) -> tuple[
1515 Tuple of (soft_min_res, soft_max_res, hard_min_res, hard_max_res)
1616 """
1717 # TODO use better logic to determine min/max residues based on the volume of the unknown density
18- sorf_res_range_fraction = 0.1 # +- 10%
18+ soft_res_range_fraction = 0.1 # +- 10%
1919 base_count = float (number_of_residues_modelled )
20- soft_min_res = int (base_count * (1 - sorf_res_range_fraction ))
21- soft_max_res = int (base_count * (1 + sorf_res_range_fraction ))
20+ soft_min_res = int (base_count * (1 - soft_res_range_fraction ))
21+ soft_max_res = int (base_count * (1 + soft_res_range_fraction ))
2222 hard_min_res = int (base_count * (0.8 )) # at least 80%
2323 hard_max_res = int (base_count * (1.5 )) # at most 150%
2424 return soft_min_res , soft_max_res , hard_min_res , hard_max_res
@@ -35,7 +35,7 @@ def create_remote_script_content(row: Dataset, interaction_partner_seeds: set[st
3535 chain = row .Chain
3636 # Use a range around the modelled residues for filtering
3737 # TODO use better logic to determine min/max residues based on the volume of the unknown density
38- soft_min_res , _ , hard_min_res , hard_max_res = soft_residue_range (row .Number_of_residues_modelled )
38+ soft_min_res , _ , hard_min_res , hard_max_res = residue_ranges (row .Number_of_residues_modelled )
3939
4040 interaction_partner_exclude = uniprot
4141 interaction_partner_seed = " \\ \n " .join (f'--interaction-partner-seed "{ s } "' for s in interaction_partner_seeds )
@@ -87,7 +87,7 @@ def create_filter_script_content(row: Dataset) -> str:
8787 pdb_id = row .PDB_id
8888 chain = row .Chain
8989 # Use a range around the modelled residues for filtering
90- soft_min_res , soft_max_res , _ , _ = soft_residue_range (row .Number_of_residues_modelled )
90+ soft_min_res , soft_max_res , _ , _ = residue_ranges (row .Number_of_residues_modelled )
9191
9292 return dedent (f"""\
9393 #!/bin/bash
0 commit comments