Skip to content

Commit

Permalink
Merge pull request #16 from jcorreia11/develop
Browse files Browse the repository at this point in the history
[UPDATE] readme
  • Loading branch information
jcorreia11 authored Jun 9, 2022
2 parents ec4d67a + 4a85ef4 commit 0fff43d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,34 @@ enumerator = SmilesRandomizer(smiles=smiles,
enumerated_smiles = enumerator.enumerate(n_max=10)
```

### Randomized SELFIES Augmentation

It's very simple to perform SELFIES augmentation using the SMILESAugmentation tool.

You only need to provide the SELFIES strings and the maximum number of SELFIES that you want to generate (only 1 by
default).

In the end you will get a list of lists with the enumerated SELFIES for each one of the SELFIES you provide.

```python
from smiles_augmentation.selfies_enumerators import SelfiesRandomizer

# Get you SELFIES data
selfies = ['[C][=C][C][=C][Branch1][Branch1][C][=C][Ring1][=Branch1][C][=C][C][=C][C][=C][Ring1][=Branch1][C][=Branch1][C][=O][N][C][=C][C][=Branch1][=Branch2][=C][Branch1][Branch1][C][=C][Ring1][=Branch1][F][F]',
'[C][=C][C][=C][C][=C][Ring1][=Branch1]',
'[C][C][=Branch1][C][=O][O]']

# Create a SELFIES randomizer object with the desired parameters (only your SELFIES data is required)
enumerator = SelfiesRandomizer(selfies=selfies,
remove_duplicates=True,
seed=123,
n_jobs=1,
verbose=0)

# Call the enumerate method with the maximum number of SELFIES you want to generate
enumerated_selfies = enumerator.enumerate(n_max=10)
```

### Randomized Reaction SMILES Augmentation

It's also very simple to perform reaction SMILES augmentation using the SMILESAugmentation tool.
Expand Down
9 changes: 7 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SMILESAugmentation Examples:

This folder contains examples on how SMILESAugmentation can be used to perform data augmentation for SMILES and
reaction SMILES.
This folder contains examples on how SMILESAugmentation can be used to perform data augmentation for SMILES, SELFIES
and reaction SMILES.

## Jupyter Notebooks

Expand All @@ -25,3 +25,8 @@ reaction SMILES.

Quick example on how to use SMILESAugmentation for reaction SMILES data augmentation using reactants
and products permutations.


- [SELFIES Randomizer](selfies_augmentation_example.ipynb):

Quick example on how to use SMILESAugmentation for compound SELFIES data augmentation.

0 comments on commit 0fff43d

Please sign in to comment.