Skip to content

Commit

Permalink
Reworked HB .2
Browse files Browse the repository at this point in the history
  • Loading branch information
mwojcikowski committed May 30, 2017
1 parent c2a9325 commit 9b027a3
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions oddt/docking/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,12 +547,18 @@ def score_inter(self, coords=None):
np.add.at(theta2, self.mask_inter['da'], theta2_2.flatten())

f_d = ((d_h <= d_h0 - 0.7).astype(float) +
((d_h0 - d_h) * ((d_h > d_h0 - 0.7) & (d_h < d_h0)).astype(float) / 0.7))

f_theta1 = ((theta1 >= 120).astype(float) +
(theta1 * ((theta1 < 120) & (theta1 >= 60)).astype(float) / 60 - 1))
f_theta2 = ((theta2 >= 120).astype(float) +
(theta2 * ((theta2 < 120) & (theta2 >= 60)).astype(float) / 60 - 1))
((d_h0 - d_h) * ((d_h > d_h0 - 0.7) & (d_h < d_h0)) / 0.7))

f_theta1 = np.clip(((theta1 >= 120) +
(theta1 * ((theta1 < 120) & (theta1 >= 60)) / 60 - 1)), 0, 1)
f_theta2 = np.clip(((theta2 >= 120) +
(theta2 * ((theta2 < 120) & (theta2 >= 60)) / 60 - 1)), 0, 1)

# print(f_theta1.min(), f_theta1.max())
# print(f_theta2.min(), f_theta2.max())
#
# print(theta1.min(), theta1.max())
# print(theta2.min(), theta2.max())

out = f_d * f_theta1 * f_theta2

Expand Down

0 comments on commit 9b027a3

Please sign in to comment.