-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from rxn4chemistry/1k_tpl
MLM and classification tutorial, USPTO 1k TPL data set, new results
- Loading branch information
Showing
21 changed files
with
251,893 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ For all installations, we recommend using `conda` to get the necessary `rdkit` a | |
```console | ||
conda create -n rxnfp python=3.6 -y | ||
conda activate rxnfp | ||
conda install -c rdkit rdkit | ||
conda install -c tmap tmap | ||
conda install -c rdkit rdkit=2020.03.3 -y | ||
conda install -c tmap tmap -y | ||
pip install rxnfp | ||
``` | ||
|
||
|
@@ -22,8 +22,8 @@ pip install rxnfp | |
```console | ||
conda create -n rxnfp python=3.6 -y | ||
conda activate rxnfp | ||
conda install -c rdkit rdkit | ||
conda install -c tmap tmap | ||
conda install -c rdkit rdkit=2020.03.3 -y | ||
conda install -c tmap tmap -y | ||
git clone [email protected]:rxn4chemistry/rxnfp.git | ||
cd rxnfp | ||
pip install -e . | ||
|
@@ -35,7 +35,7 @@ Compute a fingerprint from a reaction SMILES | |
```python | ||
``` | ||
|
||
``` | ||
```python | ||
from rxnfp.transformer_fingerprints import ( | ||
RXNBERTFingerprintGenerator, get_default_model_and_tokenizer, generate_fingerprints | ||
) | ||
|
@@ -57,7 +57,7 @@ print(fp[:5]) | |
|
||
Or for a list of reactions: | ||
|
||
``` | ||
```python | ||
rxns = [example_rxn, example_rxn] | ||
fps = rxnfp_generator.convert_batch(rxns) | ||
print(len(fps), len(fps[0])) | ||
|
@@ -89,6 +89,12 @@ Where you will find different reaction properties highlighted in the different l | |
<p style="text-align: center;"> <b>Figure:</b> Reaction atlas of 50k data set with different properties highlighted. </p> | ||
</div> | ||
|
||
## USPTO 1k TPL (reaction classification data set) | ||
|
||
We introduce a new data set for chemical reaction classification called USPTO 1k TPL. USPTO 1k TPL is derived from the [USPTO data base](https://figshare.com/articles/Chemical_reactions_from_US_patents_1976-Sep2016_/5104873) by Lowe. It consists of 445k reactions divided into 1000 template labels. The data set was randomly split into train/valid 90% and test 10%. The labels were obtained by atom-mapping the USPTO data set with [RXNMapper](http://rxnmapper.ai), then applying the [template extraction workflow](https://github.com/reymond-group/CASP-and-dataset-performance) by Thakkar et al. and finally, selecting reactions belonging to the 1000 most frequent template hashes. Those template hashes were taken as class labels. Similarly to the Pistachio data set, USPTO 1k TPL is strongly imbalanced. | ||
|
||
The data set can be downloaded from: [MappingChemicalReactions](https://ibm.box.com/v/MappingChemicalReactions). | ||
|
||
## Citation | ||
|
||
Our work was first presented in the NeurIPS 2019 workshop for [Machine Learning and the Physical Sciences](https://ml4physicalsciences.github.io). The most recent version of our preprint can be found on [ChemRxiv](https://chemrxiv.org/articles/Data-Driven_Chemical_Reaction_Classification_with_Attention-Based_Neural_Networks/9897365). | ||
|
1,002 changes: 1,002 additions & 0 deletions
1,002
data/uspto_1k_TPL/individual_files/label_template.json
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.