Operations¶
This module contains various operations used in the GB-BI library.
Generator Class¶
- class illumination.operations.Generator(config)[source]¶
Bases:
object
A catalog class containing and implementing mutations to small molecules according to the principles of positional analogue scanning.
- Attributes:
archive: The archive of elite molecules used for generating new molecules. crossover: An instance of the Crossover class for generating molecule pairs. mutator: An instance of the Mutator class for mutating molecules. batch_size: The number of molecules to sample and mutate/crossover per batch. initial_data: The path to the initial data file containing molecule information. initial_size: The initial number of molecules to load from the database.
- Methods:
__init__(config): Initializes the Generator with the given configuration. set_archive(archive): Sets the archive for the Generator. __call__(): Generates a batch of new molecules by mutating and crossing over sampled molecules. load_from_database(): Loads a set of molecules from the initial data database.
Mutator Class¶
- class illumination.operations.Mutator(mutation_data: str)[source]¶
Bases:
object
A catalog class containing and implementing mutations to small molecules according to the principles of positional analogue scanning.
- Attributes:
mutation_data: A dataframe containing mutation SMARTS patterns and their associated probabilities.
- Methods:
__init__(mutation_data): Initializes the Mutator with the given mutation data. __call__(molecule): Applies a mutation to a given molecule and returns the resulting molecules.
Crossover Class¶
- class illumination.operations.Crossover[source]¶
Bases:
object
A strategy class implementing a parent-centric crossover of small molecules.
- Methods:
__init__(): Initializes the Crossover object. __call__(molecule_pair): Performs a crossover on a pair of molecules. merge(molecule_pair): Merges the fragments of a molecule pair. fragment(molecule_pair): Fragments a molecule pair into cores and sidechains.