The two datasets used in the experiments can be found at:
- Protein fragments
- Google Drive
- 百度网盘(提取码: jymi)
- Electronic materials
- Google Drive
- 百度网盘(提取码:y21t)
Please put the downloaded dataset(s) in ./data/raw.
./data: Contains datasets used by RotNet../data/raw: (Needs to be downloaded beforehand. See above.) Contains our two datasets../data/atom_init_embedding.json: Initial embeddings for atoms.
./exp: (Will be created automatically on first run.) Contains training logs and saved model weights../dataset.py: Dataset class definition../evaluate.py: Evaluates a model. See./eval.shfor usage../loss_weights.py: Weights for loss terms../models.py: Model definition../train.py: Trains RotNet. See./run.shfor usage../transforms.py: Implements the rotationally invariant transformation (RIT)../utils.py: Helper functions or classes../eval.sh: Usage of./evaluate.sh../run.sh: Usage of./train.py../requirements.txt: Package specification for environment setup.
-
Clone this repository.
-
Set up an environment as per
./requirements.txt. -
Download our datasets and put them in
./data/raw. You may use custom datasets that have been formatted like ours. -
Process raw data. To process protein fragments, for example, run
python dataset.py --dataset_name protein_fragments --cutoff 4
If you want to overwrite previously processed datasets, run
python dataset.py --dataset_name protein_fragments --cutoff 5 --remake
-
(Optional) Modify weights for loss terms in
./loss_weights.py. You will need to modify them if another dataset is in use. -
Run
./run.shto train RotNet. You may modify arguments passed to./train.py. -
Run
./eval.shto evaluate models. Arguments passed to./evaluate.pymust be consistent with those passed to./train.py.
Distributed under the Apache 2.0 License. See LICENSE for more information.
This work was supported by the National Key R&D Program of China [No. 2021YFC2100100]; the National Natural Science Foundation of China [No. 21901157] and the Shanghai Science and Technology Project [No. 21JC1403400].
