Skip to content

Commit

Permalink
Cosmetic improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas-Verhellen committed Feb 27, 2021
1 parent fae912e commit 3855702
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
Binary file modified argenomic/__pycache__/infrastructure.cpython-37.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion argenomic/infrastructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions configuration/config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions illuminate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit 3855702

Please sign in to comment.