Unverified Commit d33cc476 authored by Bharath Ramsundar's avatar Bharath Ramsundar Committed by GitHub
Browse files

Merge pull request #2132 from nd-02110114/fix-issue

Fix weighted_linear_sum
parents 9c55f5bc 30a27724
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -190,14 +190,14 @@ def weighted_linear_sum(w: np.ndarray, x: np.ndarray) -> np.ndarray:
  w: np.ndarray
    A numpy array of shape `(N,)`
  x: np.ndarray
    A numpy array of shape `(N,)`
    A numpy array of shape `(N, M, L)`

  Returns
  -------
  np.ndarray
    A scalar value
    A numpy array of shape `(M, L)`
  """
  return np.sum(np.dot(w, x))
  return np.tensordot(w, x, axes=1)


def vina_energy_term(coords1: np.ndarray, coords2: np.ndarray,
@@ -211,7 +211,9 @@ def vina_energy_term(coords1: np.ndarray, coords2: np.ndarray,
  coords2: np.ndarray
    Molecular coordinates of shape `(M, 3)`
  weights: np.ndarray
    A numpy array of shape `(5,)`
    A numpy array of shape `(5,)`. The 5 values are weights for repulsion interaction term,
    hydrophobic interaction term, hydrogen bond interaction term,
    first Gaussian interaction term and second Gaussian interaction term.
  wrot: float
    The scaling factor for nonlinearity
  Nrot: int