Commit 5231d757 authored by nd-02110114's avatar nd-02110114
Browse files

♻️ refactor docs

parent bec9a6b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ class Docker(object):
    centroid: np.ndarray, optional (default None)
      The centroid to dock against. Is computed if not specified.
    box_dims: np.ndarray, optional (default None)
      Of shape `(3,)` holding the size of the box to dock. If not
      A numpy array of shape `(3,)` holding the size of the box to dock. If not
      specified is set to size of molecular complex plus 5 angstroms.
    exhaustiveness: int, optional (default 10)
      Tells pose generator how exhaustive it should be with pose
+2 −2
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ class PoseGenerator(object):
    centroid: np.ndarray, optional (default None)
      The centroid to dock against. Is computed if not specified.
    box_dims: np.ndarray, optional (default None)
      Of shape `(3,)` holding the size of the box to dock. If not
      A numpy array of shape `(3,)` holding the size of the box to dock. If not
      specified is set to size of molecular complex plus 5 angstroms.
    exhaustiveness: int, optional (default 10)
      Tells pose generator how exhaustive it should be with pose
@@ -172,7 +172,7 @@ class VinaPoseGenerator(PoseGenerator):
    centroid: np.ndarray, optional
      The centroid to dock against. Is computed if not specified.
    box_dims: np.ndarray, optional
      Of shape `(3,)` holding the size of the box to dock. If not
      A numpy array of shape `(3,)` holding the size of the box to dock. If not
      specified is set to size of molecular complex plus 5 angstroms.
    exhaustiveness: int, optional (default 10)
      Tells Autodock Vina how exhaustive it should be with pose
+12 −12
Original line number Diff line number Diff line
@@ -10,9 +10,9 @@ def pairwise_distances(coords1: np.ndarray, coords2: np.ndarray) -> np.ndarray:
  Parameters
  ----------
  coords1: np.ndarray
    Of shape `(N, 3)`
    A numpy array of shape `(N, 3)`
  coords2: np.ndarray
    Of shape `(M, 3)`
    A numpy array of shape `(M, 3)`

  Returns
  -------
@@ -28,7 +28,7 @@ def cutoff_filter(d: np.ndarray, x: np.ndarray, cutoff=8.0) -> np.ndarray:
  Parameters
  ----------
  d: np.ndarray
    Pairwise distances matrix. Of shape `(N, M)`
    Pairwise distances matrix. A numpy array of shape `(N, M)`
  x: np.ndarray
    Matrix of shape `(N, M)`
  cutoff: float, optional (default 8)
@@ -48,7 +48,7 @@ def vina_nonlinearity(c: np.ndarray, w: float, Nrot: int) -> np.ndarray:
  Parameters
  ----------
  c: np.ndarray
    Of shape `(N, M)`
    A numpy array of shape `(N, M)`
  w: float
    Weighting term
  Nrot: int
@@ -69,7 +69,7 @@ def vina_repulsion(d: np.ndarray) -> np.ndarray:
  Parameters
  ----------
  d: np.ndarray
    Of shape `(N, M)`.
    A numpy array of shape `(N, M)`.

  Returns
  -------
@@ -87,7 +87,7 @@ def vina_hydrophobic(d: np.ndarray) -> np.ndarray:
  Parameters
  ----------
  d: np.ndarray
    Of shape `(N, M)`.
    A numpy array of shape `(N, M)`.

  Returns
  -------
@@ -113,7 +113,7 @@ def vina_hbond(d: np.ndarray) -> np.ndarray:
  Parameters
  ----------
  d: np.ndarray
    Of shape `(N, M)`.
    A numpy array of shape `(N, M)`.

  Returns
  -------
@@ -140,7 +140,7 @@ def vina_gaussian_first(d: np.ndarray) -> np.ndarray:
  Parameters
  ----------
  d: np.ndarray
    Of shape `(N, M)`.
    A numpy array of shape `(N, M)`.

  Returns
  -------
@@ -165,7 +165,7 @@ def vina_gaussian_second(d: np.ndarray) -> np.ndarray:
  Parameters
  ----------
  d: np.ndarray
    Of shape `(N, M)`.
    A numpy array of shape `(N, M)`.

  Returns
  -------
@@ -188,9 +188,9 @@ def weighted_linear_sum(w: np.ndarray, x: np.ndarray) -> np.ndarray:
  Parameters
  ----------
  w: np.ndarray
    Of shape `(N,)`
    A numpy array of shape `(N,)`
  x: np.ndarray
    Of shape `(N,)`
    A numpy array of shape `(N,)`

  Returns
  -------
@@ -211,7 +211,7 @@ def vina_energy_term(coords1: np.ndarray, coords2: np.ndarray,
  coords2: np.ndarray
    Molecular coordinates of shape `(M, 3)`
  weights: np.ndarray
    Of shape `(5,)`
    A numpy array of shape `(5,)`
  wrot: float
    The scaling factor for nonlinearity
  Nrot: int
+9 −9
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ class CoordinateBox(object):

    Parameters
    ----------
    other: `CoordinateBox`
    other: CoordinateBox
      Compare this coordinate box to the other one.

    Returns
@@ -175,7 +175,7 @@ class CoordinateBox(object):

    Parameters
    ----------
    other: `CoordinateBox`
    other: CoordinateBox
      The box to check is contained in this box.

    Returns
@@ -236,14 +236,14 @@ def intersection(box1: CoordinateBox, box2: CoordinateBox) -> CoordinateBox:

  Parameters
  ----------
  box1: `CoordinateBox`
  box1: CoordinateBox
    First `CoordinateBox`
  box2: `CoordinateBox`
  box2: CoordinateBox
    Another `CoordinateBox` to intersect first one with.

  Returns
  -------
  `CoordinateBox`
  CoordinateBox
    A `CoordinateBox` containing the intersection. If the intersection is empty,
    returns the box with 0 bounds.
  """
@@ -260,14 +260,14 @@ def union(box1: CoordinateBox, box2: CoordinateBox) -> CoordinateBox:

  Parameters
  ----------
  box1: `CoordinateBox`
  box1: CoordinateBox
    First box to merge in
  box2: `CoordinateBox`
  box2: CoordinateBox
    Second box to merge into this box

  Returns
  -------
  `CoordinateBox`
  CoordinateBox
    Smallest `CoordinateBox` that contains both `box1` and `box2`
  """
  x_min = min(box1.x_range[0], box2.x_range[0])
@@ -332,7 +332,7 @@ def get_face_boxes(coords: np.ndarray, pad: float = 5.0) -> List[CoordinateBox]:
  Parameters
  ----------
  coords: np.ndarray
    Of shape `(N, 3)`. The coordinates of a molecule.
    A numpy array of shape `(N, 3)`. The coordinates of a molecule.
  pad: float, optional (default 5.0)
    The number of angstroms to pad.

+5 −5
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ def seq_one_hot_encode(sequences: Union[np.ndarray, Iterator[Iterable[str]]],

  Parameters
  ----------
  sequences: np.ndarray or Iterator[`Bio.SeqRecord`]
  sequences: np.ndarray or Iterator[Bio.SeqRecord]
    Iterable object of genetic sequences
  letters: str, optional (default "ATCGN")
    String with the set of possible letters in the sequences.
@@ -27,7 +27,7 @@ def seq_one_hot_encode(sequences: Union[np.ndarray, Iterator[Iterable[str]]],
  Returns
  -------
  np.ndarray
    Shape `(N_sequences, N_letters, sequence_length, 1)`.
    A numpy array of shape `(N_sequences, N_letters, sequence_length, 1)`.
  """

  # The label encoder is given characters for ACGTN
@@ -68,7 +68,7 @@ def _seq_to_encoded(seq: Union[str, Iterable[str]],

  Parameters
  ----------
  seq: str or `Bio.SeqRecord`
  seq: str or Bio.SeqRecord
    a genetic sequence
  letter_encoder: Dict[str, int]
    The keys are letters and the values are unique int values (like 0, 1, 2...).
@@ -80,7 +80,7 @@ def _seq_to_encoded(seq: Union[str, Iterable[str]],
  Returns
  -------
  encoded_seq: np.ndarray
    Shape `(N_letters, sequence_length)`.
    A numpy array of shape `(N_letters, sequence_length)`.
  """
  encoded_seq = np.zeros((alphabet_length, sequence_length))
  seq_ints = [letter_encoder[s] for s in seq]
@@ -107,7 +107,7 @@ def encode_bio_sequence(fname: str,
  Returns
  -------
  np.ndarray
    Shape `(N_sequences, N_letters, sequence_length, 1)`.
    A numpy array of shape `(N_sequences, N_letters, sequence_length, 1)`.

  Note
  ----
Loading