Commit 510b3780 authored by seyonechithrananda's avatar seyonechithrananda
Browse files

add **kwargs to subclasses

parent dc203da6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ class AtomicConformationFeaturizer(Featurizer):

  """

  def _featurize(self, datapoint: str) -> AtomicConformation:
  def _featurize(self, datapoint: str, **kwargs) -> AtomicConformation:
    """Calculate features for a single datapoint.

    Parameters
+2 −2
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ class MolecularFeaturizer(Featurizer):
          new_order = rdmolfiles.CanonicalRankAtoms(mol)
          mol = rdmolops.RenumberAtoms(mol, new_order)

        features.append(self._featurize(mol), **kwargs)
        features.append(self._featurize(mol, **kwargs))
      except Exception as e:
        if isinstance(mol, Chem.rdchem.Mol):
          mol = Chem.MolToSmiles(mol)
@@ -456,7 +456,7 @@ class DummyFeaturizer(Featurizer):
  """

  def featurize(self, datapoints: Iterable[Any],
                log_every_n: int = 1000) -> np.ndarray:
                log_every_n: int = 1000, **kwargs) -> np.ndarray:
    """Passes through dataset, and returns the datapoint.

    Parameters
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ class NeighborListComplexAtomicCoordinates(ComplexFeaturizer):
    # Type of data created by this featurizer
    self.dtype = object

  def _featurize(self, complex: Tuple[str, str]):
  def _featurize(self, complex: Tuple[str, str], **kwargs):
    """
    Compute neighbor list for complex.

+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ class ContactCircularFingerprint(ComplexFeaturizer):
    self.radius = radius
    self.size = size

  def _featurize(self, complex: Tuple[str, str]):
  def _featurize(self, complex: Tuple[str, str], **kwargs):
    """
    Compute featurization for a molecular complex

+6 −6
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ class ChargeVoxelizer(ComplexFeaturizer):
    self.voxel_width = voxel_width
    self.reduce_to_contacts = reduce_to_contacts

  def _featurize(self, complex: Tuple[str, str]) -> Optional[np.ndarray]:
  def _featurize(self, complex: Tuple[str, str], **kwargs) -> Optional[np.ndarray]:
    """
    Compute featurization for a single mol/protein complex

@@ -167,7 +167,7 @@ class SaltBridgeVoxelizer(ComplexFeaturizer):
    self.voxel_width = voxel_width
    self.reduce_to_contacts = reduce_to_contacts

  def _featurize(self, complex: Tuple[str, str]) -> Optional[np.ndarray]:
  def _featurize(self, complex: Tuple[str, str], **kwargs) -> Optional[np.ndarray]:
    """
    Compute featurization for a single mol/protein complex

@@ -252,7 +252,7 @@ class CationPiVoxelizer(ComplexFeaturizer):
    self.box_width = box_width
    self.voxel_width = voxel_width

  def _featurize(self, complex: Tuple[str, str]) -> Optional[np.ndarray]:
  def _featurize(self, complex: Tuple[str, str], **kwargs) -> Optional[np.ndarray]:
    """
    Compute featurization for a single mol/protein complex

@@ -343,7 +343,7 @@ class PiStackVoxelizer(ComplexFeaturizer):
    self.box_width = box_width
    self.voxel_width = voxel_width

  def _featurize(self, complex) -> Optional[np.ndarray]:
  def _featurize(self, complex, **kwargs) -> Optional[np.ndarray]:
    """
    Compute featurization for a single mol/protein complex

@@ -455,7 +455,7 @@ class HydrogenBondCounter(ComplexFeaturizer):
      self.angle_cutoffs = angle_cutoffs
    self.reduce_to_contacts = reduce_to_contacts

  def _featurize(self, complex: Tuple[str, str]) -> Optional[np.ndarray]:
  def _featurize(self, complex: Tuple[str, str], **kwargs) -> Optional[np.ndarray]:
    """
    Compute featurization for a single mol/protein complex

@@ -560,7 +560,7 @@ class HydrogenBondVoxelizer(ComplexFeaturizer):
    self.voxel_width = voxel_width
    self.reduce_to_contacts = reduce_to_contacts

  def _featurize(self, complex: Tuple[str, str]) -> Optional[np.ndarray]:
  def _featurize(self, complex: Tuple[str, str], **kwargs) -> Optional[np.ndarray]:
    """
    Compute featurization for a single mol/protein complex

Loading