Skip to content

Commit e9590c2

Browse files
committed
renamed binding_site_idxs to receptor_idxs in UnbindingBC
Binding site indices was a misleading name. Receptor is better. This drove an error in the examples where the whole protein idxs should have been used but the binding site idxs were being used
1 parent 46cc331 commit e9590c2

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

examples/Lennard_Jones_Pair/we.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def image_distance(self, image_a, image_b):
192192
initial_state=init_state,
193193
topology=mdtraj_topology,
194194
ligand_idxs=np.array(test_sys.ligand_indices),
195-
binding_site_idxs=np.array(test_sys.receptor_indices))
195+
receptor_idxs=np.array(test_sys.receptor_indices))
196196

197197
## Reporters
198198

examples/seh_tppu_unbinding/we.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def main(n_runs, n_cycles, steps, n_walkers, n_workers=1, debug_prints=False, se
330330
initial_state=omm_state,
331331
topology=crystal_traj.topology,
332332
ligand_idxs=lig_idxs,
333-
binding_site_idxs=bs_idxs)
333+
receptor_idxs=prot_idxs)
334334

335335

336336
## make the reporters

examples/seh_tppu_unbinding/we_timed.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def main(runtime, steps, n_walkers, n_workers=1, debug_prints=False, seed=None):
330330
initial_state=omm_state,
331331
topology=crystal_traj.topology,
332332
ligand_idxs=lig_idxs,
333-
binding_site_idxs=bs_idxs)
333+
receptor_idxs=prot_idxs)
334334

335335

336336
## make the reporters

wepy/boundary_conditions/unbinding.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@ def __init__(self, initial_state=None,
3737
cutoff_distance=1.0,
3838
topology=None,
3939
ligand_idxs=None,
40-
binding_site_idxs=None):
40+
receptor_idxs=None):
4141

4242
super().__init__()
4343

4444
# test input
4545
assert initial_state is not None, "Must give an initial state"
4646
assert topology is not None, "Must give a reference topology"
4747
assert ligand_idxs is not None
48-
assert binding_site_idxs is not None
48+
assert receptor_idxs is not None
4949
assert type(cutoff_distance) is float
5050

5151
self.initial_state = initial_state
5252
self.cutoff_distance = cutoff_distance
5353
self.topology = topology
5454

5555
self.ligand_idxs = ligand_idxs
56-
self.binding_site_idxs = binding_site_idxs
56+
self.receptor_idxs = receptor_idxs
5757

5858
def _calc_angle(self, v1, v2):
5959
return np.degrees(np.arccos(np.dot(v1, v2)/(la.norm(v1) * la.norm(v2))))
@@ -83,7 +83,7 @@ def _calc_min_distance(self, walker):
8383
# and get hte minimum distance
8484
min_distance = np.min(mdj.compute_distances(walker_traj,
8585
it.product(self.ligand_idxs,
86-
self.binding_site_idxs)))
86+
self.receptor_idxs)))
8787
return min_distance
8888

8989
def check_boundaries(self, walker):

0 commit comments

Comments
 (0)