diff --git a/README.md b/README.md index 782c14d..3a44fca 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Argenomic is an open-source implementation of an illumination algorithm for opti ## Getting Started -After installing the software and running the tests, a basic usage example of argenomic (i.e. the rediscovery of Celecoxib) can be called upon in the following manner: +After installing the software and running the tests, a basic usage example of argenomic (i.e. the rediscovery of Troglitazone) can be called upon in the following manner: ``` python3 illuminate.py generations=100 ``` diff --git a/argenomic/__pycache__/infrastructure.cpython-37.pyc b/argenomic/__pycache__/infrastructure.cpython-37.pyc index e7a54ca..5e8e75b 100644 Binary files a/argenomic/__pycache__/infrastructure.cpython-37.pyc and b/argenomic/__pycache__/infrastructure.cpython-37.pyc differ diff --git a/argenomic/infrastructure.py b/argenomic/infrastructure.py index 2c87aef..e9cf14c 100644 --- a/argenomic/infrastructure.py +++ b/argenomic/infrastructure.py @@ -68,7 +68,7 @@ def sample(self, size: int) -> List[Chem.Mol]: molecules, weights = map(list, zip(*pairs)) return random.choices(molecules, k=size, weights=weights) - def sample_pairs(self, size: int, generation: float) -> List[Tuple[Chem.Mol, Chem.Mol]]: + def sample_pairs(self, size: int) -> List[Tuple[Chem.Mol, Chem.Mol]]: """ Returns a list of pairs of elite molecules of the requisted length. The elite molecules are randomly drawn, weighted by their fitness. diff --git a/configuration/config.yaml b/configuration/config.yaml index 6fd3910..0136a7e 100644 --- a/configuration/config.yaml +++ b/configuration/config.yaml @@ -1,5 +1,5 @@ --- -data_file: data/smiles/guacamol_initial_rediscovery_celecoxib.smi +data_file: data/smiles/guacamol_intitial_rediscovery_troglitazone.smi batch_size: 40 initial_size: 100 workers: 1 @@ -25,7 +25,7 @@ descriptor: - - 40 - 130 fitness: - target: O=S(=O)(c3ccc(n1nc(cc1c2ccc(cc2)C)C(F)(F)F)cc3)N + target: "O=C1NC(=O)SC1Cc4ccc(OCC3(Oc2c(c(c(O)c(c2CC3)C)C)C)C)cc4" type: ECFP4 arbiter: rules: diff --git a/illuminate.py b/illuminate.py index eed42c8..b985891 100644 --- a/illuminate.py +++ b/illuminate.py @@ -34,7 +34,7 @@ def __init__(self, config) -> None: def __call__(self) -> None: self.initial_population() for generation in range(1, self.generations): - molecules = self.generate_molecules(generation) + molecules = self.generate_molecules() molecules = self.process_molecules(molecules) self.archive.add_to_archive(molecules) self.archive.store_data(generation) @@ -55,10 +55,10 @@ def load_from_database(self) -> List[Molecule]: molecules = [Molecule(Chem.CanonSmiles(smiles), pedigree) for smiles in smiles_list] return molecules - def generate_molecules(self, generation) -> List[Molecule]: + def generate_molecules(self) -> List[Molecule]: molecules = [] molecule_samples = self.archive.sample(self.batch_size) - molecule_sample_pairs = self.archive.sample_pairs(self.batch_size, generation) + molecule_sample_pairs = self.archive.sample_pairs(self.batch_size) for molecule in molecule_samples: molecules.extend(self.mutator(molecule)) for molecule_pair in molecule_sample_pairs: