@@ -1270,14 +1270,15 @@ def setUp(self):
1270
1270
self .residxs , self .fragidxs = residues_from_descriptors (self .residues ,
1271
1271
self .fragments ,
1272
1272
self .geom .top )
1273
+ self .ctc_cutoff_Ang = 3
1273
1274
1274
1275
def test_select_and_report_residue_neighborhood_idxs_just_works (self ):
1275
1276
ctc_freqs = [1 , .5 ]
1276
1277
ctc_residxs_pairs = [[0 , 1 ], [2 , 1 ]]
1277
1278
1278
1279
input_values = (val for val in ["1" , "2" ])
1279
1280
with mock .patch ('builtins.input' , lambda * x : next (input_values )): # Checking against the input 1 and 1
1280
- per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freqs , self .residxs ,
1281
+ per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freqs , self .ctc_cutoff_Ang , self . residxs ,
1281
1282
self .fragments , ctc_residxs_pairs ,
1282
1283
self .geom .top ,
1283
1284
interactive = True )
@@ -1290,7 +1291,7 @@ def test_select_and_report_residue_neighborhood_idxs_select_by_resSeq(self):
1290
1291
1291
1292
input_values = (val for val in ["2" ])
1292
1293
with mock .patch ('builtins.input' , lambda * x : next (input_values )): # Checking against the input 1 and 1
1293
- per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freqs , self .residxs ,
1294
+ per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freqs , self .ctc_cutoff_Ang , self . residxs ,
1294
1295
self .fragments , ctc_residxs_pairs ,
1295
1296
self .geom .top ,
1296
1297
restrict_to_resSeq = [31 ],
@@ -1304,7 +1305,7 @@ def test_select_and_report_residue_neighborhood_idxs_hit_enter(self):
1304
1305
1305
1306
input_values = (val for val in ["" , "" ])
1306
1307
with mock .patch ('builtins.input' , lambda * x : next (input_values )):
1307
- per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freq , self .residxs ,
1308
+ per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freq , self .ctc_cutoff_Ang , self . residxs ,
1308
1309
self .fragments , ctc_residxs_pairs ,
1309
1310
self .geom .top ,
1310
1311
interactive = True )
@@ -1313,7 +1314,7 @@ def test_select_and_report_residue_neighborhood_idxs_hit_enter(self):
1313
1314
def test_select_and_report_residue_neighborhood_idxs_no_interactive (self ):
1314
1315
ctc_freq = [1. ,.5 ]
1315
1316
ctc_residxs_pairs = [[0 , 1 ], [2 , 1 ]]
1316
- per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freq , self .residxs ,
1317
+ per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freq , self .ctc_cutoff_Ang , self . residxs ,
1317
1318
self .fragments , ctc_residxs_pairs ,
1318
1319
self .geom .top ,
1319
1320
interactive = False )
@@ -1324,7 +1325,7 @@ def test_select_and_report_residue_neighborhood_idxs_no_interactive_true_ctc_per
1324
1325
ctc_freq = [1. ,.5 ]
1325
1326
ctc_residxs_pairs = [[0 , 1 ], [2 , 1 ]]
1326
1327
1327
- per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freq , self .residxs ,
1328
+ per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freq , self .ctc_cutoff_Ang , self . residxs ,
1328
1329
self .fragments , ctc_residxs_pairs ,
1329
1330
self .geom .top ,
1330
1331
ctcs_kept = .5 , restrict_to_resSeq = None ,
@@ -1336,7 +1337,7 @@ def test_select_and_report_residue_neighborhood_idxs_no_interactive_ctc_percenta
1336
1337
ctc_freq = [0 , 0 ]
1337
1338
ctc_residxs_pairs = [[0 , 1 ], [2 , 1 ]]
1338
1339
1339
- per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freq , self .residxs ,
1340
+ per_residx_ctc_idxs = contacts .select_and_report_residue_neighborhood_idxs (ctc_freq , self .ctc_cutoff_Ang , self . residxs ,
1340
1341
self .fragments , ctc_residxs_pairs ,
1341
1342
self .geom .top ,
1342
1343
ctcs_kept = .5 , restrict_to_resSeq = None ,
@@ -1351,7 +1352,7 @@ def test_select_and_report_residue_neighborhood_idxs_keyboard_interrupt(self):
1351
1352
resname2residx , resname2fragidx = residues_from_descriptors ("GLU30" , self .fragments ,
1352
1353
self .geom .top )
1353
1354
1354
- ctc_freq = contacts .select_and_report_residue_neighborhood_idxs (ctc_freq , resname2residx ,
1355
+ ctc_freq = contacts .select_and_report_residue_neighborhood_idxs (ctc_freq , self . ctc_cutoff_Ang , resname2residx ,
1355
1356
self .fragments , per_residx_ctc_idxs ,
1356
1357
self .geom .top ,
1357
1358
ctcs_kept = 5 , restrict_to_resSeq = None ,
0 commit comments