Commit 139792e3 authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Removing some left over 'infinity' strings

parent e3f847cb
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -446,8 +446,7 @@ def max_pair_distance_pairs(mol: RDKitMol,
    max_distance = N
  elif max_pair_distance is not None and max_pair_distance <= 0:
    raise ValueError(
        "max_pair_distance must either be a positive integer or the string 'infinity'"
    )
        "max_pair_distance must either be a positive integer or None")
  elif max_pair_distance is not None:
    max_distance = max_pair_distance
  adj = rdmolops.GetAdjacencyMatrix(mol)
@@ -813,12 +812,9 @@ class WeaveFeaturizer(MolecularFeaturizer):
    self.explicit_H = explicit_H
    # If uses use_chirality
    self.use_chirality = use_chirality
    if (isinstance(max_pair_distance, int) and
        max_pair_distance <= 0) or (isinstance(max_pair_distance, str) and
                                    max_pair_distance != "infinity"):
    if isinstance(max_pair_distance, int) and max_pair_distance <= 0:
      raise ValueError(
          "max_pair_distance must either be a positive integer or the string 'infinity'"
      )
          "max_pair_distance must either be a positive integer or None")
    self.max_pair_distance = max_pair_distance
    if self.use_chirality:
      self.bt_len = int(GraphConvConstants.bond_fdim_base) + len(
+1 −1
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ class WeaveModel(KerasModel):
    pair_feat: np.ndarray
      Of shape `(N_pairs, N_pair_feat)`. Note that `N_pairs` will depend on
      the number of pairs being considered. If `max_pair_distance` is
      "infinity", then this will be `N_atoms**2`. Else it will be the number
      `None`, then this will be `N_atoms**2`. Else it will be the number
      of pairs within the specifed graph distance.
    pair_split: np.ndarray
      Of shape `(N_pairs,)`. The i-th entry in this array will tell you the