drugforge.ml.data_augmentation.PositionRandomize

class drugforge.ml.data_augmentation.PositionRandomize(which: str = 'both', rand_seed: int | None = None, dict_key: str = 'pos', lig_idx_key: str = 'lig', data_type: str = 'float')[source]

Bases: object

Randomize all atom coordinates. The new (random) coordinates will be drawn from a uniform distribution between the min and max of the passed data, on a per-coordinate basis (ie x, y, z).

__init__(which: str = 'both', rand_seed: int | None = None, dict_key: str = 'pos', lig_idx_key: str = 'lig', data_type: str = 'float')[source]
Parameters:
  • which (str, default=both) – Whether to shuffle ligand coordinates (“lig”), protein coordinates (“prot”), or both (“both”, default)

  • rand_seed (int, optional) – Random seed for noise generation

  • dict_key (str, default=”pos”) – If the inputs are a dict, this will be the key used to access the coords in the dict

  • lig_idx_key (str, default=”lig”) – If the inputs are a dict, this will be the key used to access the lig_idx in the dict

  • data_type (str, default=”float”) –

    What type of data to generate. Options are:
    • “float”: Random floats will be generated in the range of passed data

    on a per-column basis - “int”: Random ints will be generated in the range of passed data on a per-column basis - “onehot”: Random one-hot vectors will be generated with the same shape as the passed data

Methods

__init__([which, rand_seed, dict_key, ...])