Skip to content

Commit

Permalink
Update test to include maximum_fraction_close
Browse files Browse the repository at this point in the history
  • Loading branch information
terwill committed Oct 4, 2021
1 parent e42b958 commit 8ef6a2c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions mmtbx/regression/tst_process_predicted_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def tst_01(log = sys.stdout):
# mark_atoms_to_ignore_with_occ_zero

print("\nConverting lddt to B values and using mark_atoms_to_ignore_with_occ_zero", file = log)
params.process_predicted_model.maximum_fraction_close = 0.5
params.process_predicted_model.b_value_field_is = 'lddt'
params.process_predicted_model.remove_low_confidence_residues = True
params.process_predicted_model.maximum_rmsd = 1.5
Expand All @@ -96,11 +97,10 @@ def tst_01(log = sys.stdout):
assert model_occ_values.count(1) == n1
assert model_occ_values.count(0) == n2



# use process_predicted_model to convert lddt or rmsd to B

print("\nConverting lddt to B values", file = log)
params.process_predicted_model.maximum_fraction_close = 0.5
params.process_predicted_model.b_value_field_is = 'lddt'
params.process_predicted_model.remove_low_confidence_residues = False
params.process_predicted_model.split_model_by_compact_regions = False
Expand All @@ -117,6 +117,7 @@ def tst_01(log = sys.stdout):
ph.atoms().set_b(fractional_lddt)
test_model = model.as_map_model_manager().model_from_hierarchy(ph,
return_as_model = True)
params.process_predicted_model.maximum_fraction_close = 0.5
params.process_predicted_model.b_value_field_is = 'lddt'
params.process_predicted_model.remove_low_confidence_residues = False
params.process_predicted_model.split_model_by_compact_regions = False
Expand All @@ -132,6 +133,7 @@ def tst_01(log = sys.stdout):
return_as_model = True)

print("\nConverting rmsd to B values", file = log)
params.process_predicted_model.maximum_fraction_close = 0.5
params.process_predicted_model.b_value_field_is = 'rmsd'
params.process_predicted_model.remove_low_confidence_residues = False
params.process_predicted_model.split_model_by_compact_regions = False
Expand All @@ -145,11 +147,13 @@ def tst_01(log = sys.stdout):
(model_b_values > 59).count(True), model_b_values.size()), file = log)

print("\nConverting rmsd to B values and selecting rmsd < 1.5", file = log)
params.process_predicted_model.maximum_fraction_close = 0.5
params.process_predicted_model.b_value_field_is = 'rmsd'
params.process_predicted_model.remove_low_confidence_residues = True
params.process_predicted_model.maximum_rmsd = 1.5
params.process_predicted_model.split_model_by_compact_regions = False
params.process_predicted_model.input_lddt_is_fractional = None

model_info = process_predicted_model(test_model, params)
model = model_info.model
print("Residues before: %s After: %s " %(
Expand All @@ -158,7 +162,8 @@ def tst_01(log = sys.stdout):

# Check splitting model into domains
print("\nSplitting model into domains", file = log)
model_info = split_model_into_compact_units(model, log = log)
model_info = split_model_into_compact_units(model,
maximum_fraction_close = 0.5, log = log)

chainid_list = model_info.chainid_list
print("Segments found: %s" %(" ".join(chainid_list)), file = log)
Expand All @@ -167,7 +172,7 @@ def tst_01(log = sys.stdout):
# Check processing and splitting model into domains
print("\nProcessing and splitting model into domains", file = log)


params.process_predicted_model.maximum_fraction_close = 0.5
params.process_predicted_model.b_value_field_is = 'lddt'
params.process_predicted_model.remove_low_confidence_residues = True
params.process_predicted_model.maximum_rmsd = 1.5
Expand Down Expand Up @@ -201,6 +206,7 @@ def tst_01(log = sys.stdout):
print("\nProcessing and splitting model into domains with pae", file = log)


params.process_predicted_model.maximum_fraction_close = 0.5
params.process_predicted_model.b_value_field_is = 'lddt'
params.process_predicted_model.remove_low_confidence_residues = True
params.process_predicted_model.maximum_rmsd = 0.7
Expand Down

0 comments on commit 8ef6a2c

Please sign in to comment.