├── .gitignore ├── README.md ├── assets └── textreact.png ├── environment.yml ├── main.py ├── preprocess ├── dedup_corpus.py ├── gen_uspto.py ├── get_templates.py ├── preprocess_retrosynthesis.py ├── raw_retro_year_split.py ├── reagent_Ionic_compound.txt ├── reagent_unknown.txt ├── retro_year_split.py ├── template_extraction │ ├── template_extract_utils.py │ └── template_extractor.py └── uspto_script │ ├── 1.get_condition_from_uspto.py │ ├── 2.0.clean_up_rxn_condition.py │ ├── 2.0.clean_up_rxn_condition.sh │ ├── 2.1.merge_clean_up_rxn_conditon.py │ ├── 3.0.split_condition_and_slect.py │ ├── 4.0.split_train_val_test.py │ ├── 5.0.convert_context_tokens.py │ ├── condition_classfication.ipynb │ ├── extract_nosmiles.py │ ├── gen_grant_corpus.py │ ├── get_aug_condition_data.py │ ├── get_dataset_for_condition.py │ ├── get_dummy_model_results.py │ ├── get_fragment_from_rxn_dataset.py │ ├── merge_comp.py │ ├── uspto_condition.md │ └── utils.py ├── retrieve ├── condition_year.sh ├── convert_format.py ├── retrieve.py ├── retrieve_faiss.py ├── retro.sh └── retro_year.sh ├── scripts ├── train_RCR.sh ├── train_RCR_TS.sh ├── train_RetroSyn_tb.sh ├── train_RetroSyn_tb_TS.sh ├── train_RetroSyn_tf.sh └── train_RetroSyn_tf_TS.sh └── textreact ├── __init__.py ├── configs └── bert_l6.json ├── dataset.py ├── evaluate.py ├── model.py ├── template_decoder.py ├── tokenizer.py ├── utils.py └── vocab ├── vocab_condition.txt └── vocab_smiles.txt /.gitignore: -------------------------------------------------------------------------------- 1 | **/.DS_Store 2 | scripts_old/* 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/README.md -------------------------------------------------------------------------------- /assets/textreact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/assets/textreact.png -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/environment.yml -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/main.py -------------------------------------------------------------------------------- /preprocess/dedup_corpus.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/dedup_corpus.py -------------------------------------------------------------------------------- /preprocess/gen_uspto.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/gen_uspto.py -------------------------------------------------------------------------------- /preprocess/get_templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/get_templates.py -------------------------------------------------------------------------------- /preprocess/preprocess_retrosynthesis.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/preprocess_retrosynthesis.py -------------------------------------------------------------------------------- /preprocess/raw_retro_year_split.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/raw_retro_year_split.py -------------------------------------------------------------------------------- /preprocess/reagent_Ionic_compound.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/reagent_Ionic_compound.txt -------------------------------------------------------------------------------- /preprocess/reagent_unknown.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/reagent_unknown.txt -------------------------------------------------------------------------------- /preprocess/retro_year_split.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/retro_year_split.py -------------------------------------------------------------------------------- /preprocess/template_extraction/template_extract_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/template_extraction/template_extract_utils.py -------------------------------------------------------------------------------- /preprocess/template_extraction/template_extractor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/template_extraction/template_extractor.py -------------------------------------------------------------------------------- /preprocess/uspto_script/1.get_condition_from_uspto.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/1.get_condition_from_uspto.py -------------------------------------------------------------------------------- /preprocess/uspto_script/2.0.clean_up_rxn_condition.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/2.0.clean_up_rxn_condition.py -------------------------------------------------------------------------------- /preprocess/uspto_script/2.0.clean_up_rxn_condition.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/2.0.clean_up_rxn_condition.sh -------------------------------------------------------------------------------- /preprocess/uspto_script/2.1.merge_clean_up_rxn_conditon.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/2.1.merge_clean_up_rxn_conditon.py -------------------------------------------------------------------------------- /preprocess/uspto_script/3.0.split_condition_and_slect.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/3.0.split_condition_and_slect.py -------------------------------------------------------------------------------- /preprocess/uspto_script/4.0.split_train_val_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/4.0.split_train_val_test.py -------------------------------------------------------------------------------- /preprocess/uspto_script/5.0.convert_context_tokens.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/5.0.convert_context_tokens.py -------------------------------------------------------------------------------- /preprocess/uspto_script/condition_classfication.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/condition_classfication.ipynb -------------------------------------------------------------------------------- /preprocess/uspto_script/extract_nosmiles.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/extract_nosmiles.py -------------------------------------------------------------------------------- /preprocess/uspto_script/gen_grant_corpus.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/gen_grant_corpus.py -------------------------------------------------------------------------------- /preprocess/uspto_script/get_aug_condition_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/get_aug_condition_data.py -------------------------------------------------------------------------------- /preprocess/uspto_script/get_dataset_for_condition.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/get_dataset_for_condition.py -------------------------------------------------------------------------------- /preprocess/uspto_script/get_dummy_model_results.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/get_dummy_model_results.py -------------------------------------------------------------------------------- /preprocess/uspto_script/get_fragment_from_rxn_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/get_fragment_from_rxn_dataset.py -------------------------------------------------------------------------------- /preprocess/uspto_script/merge_comp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/merge_comp.py -------------------------------------------------------------------------------- /preprocess/uspto_script/uspto_condition.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/uspto_condition.md -------------------------------------------------------------------------------- /preprocess/uspto_script/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/preprocess/uspto_script/utils.py -------------------------------------------------------------------------------- /retrieve/condition_year.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/retrieve/condition_year.sh -------------------------------------------------------------------------------- /retrieve/convert_format.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/retrieve/convert_format.py -------------------------------------------------------------------------------- /retrieve/retrieve.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/retrieve/retrieve.py -------------------------------------------------------------------------------- /retrieve/retrieve_faiss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/retrieve/retrieve_faiss.py -------------------------------------------------------------------------------- /retrieve/retro.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/retrieve/retro.sh -------------------------------------------------------------------------------- /retrieve/retro_year.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/retrieve/retro_year.sh -------------------------------------------------------------------------------- /scripts/train_RCR.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/scripts/train_RCR.sh -------------------------------------------------------------------------------- /scripts/train_RCR_TS.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/scripts/train_RCR_TS.sh -------------------------------------------------------------------------------- /scripts/train_RetroSyn_tb.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/scripts/train_RetroSyn_tb.sh -------------------------------------------------------------------------------- /scripts/train_RetroSyn_tb_TS.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/scripts/train_RetroSyn_tb_TS.sh -------------------------------------------------------------------------------- /scripts/train_RetroSyn_tf.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/scripts/train_RetroSyn_tf.sh -------------------------------------------------------------------------------- /scripts/train_RetroSyn_tf_TS.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/scripts/train_RetroSyn_tf_TS.sh -------------------------------------------------------------------------------- /textreact/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /textreact/configs/bert_l6.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/textreact/configs/bert_l6.json -------------------------------------------------------------------------------- /textreact/dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/textreact/dataset.py -------------------------------------------------------------------------------- /textreact/evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/textreact/evaluate.py -------------------------------------------------------------------------------- /textreact/model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/textreact/model.py -------------------------------------------------------------------------------- /textreact/template_decoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/textreact/template_decoder.py -------------------------------------------------------------------------------- /textreact/tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/textreact/tokenizer.py -------------------------------------------------------------------------------- /textreact/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/textreact/utils.py -------------------------------------------------------------------------------- /textreact/vocab/vocab_condition.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/textreact/vocab/vocab_condition.txt -------------------------------------------------------------------------------- /textreact/vocab/vocab_smiles.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomas0809/textreact/HEAD/textreact/vocab/vocab_smiles.txt --------------------------------------------------------------------------------