Skip to content

Commit

Permalink
update nmrnet doc
Browse files Browse the repository at this point in the history
  • Loading branch information
link89 committed Jan 22, 2025
1 parent a737059 commit 3aa2c4f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions doc/manual/nmrnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ pip install rdkit
# Install pytorch
# You can find your CUDA version from
# https://pytorch.org/get-started/previous-versions/
# for example:

pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118


# Install unicore
# You should download the version that matches your CUDA and Python from:
# https://github.com/dptech-corp/Uni-Core/releases
# for example:

wget https://github.com/dptech-corp/Uni-Core/releases/download/0.0.3/unicore-0.0.1+cu118torch2.0.0-cp39-cp39-linux_x86_64.whl
pip install unicore-0.0.1+cu118torch2.0.0-cp39-cp39-linux_x86_64.whl
Expand Down Expand Up @@ -56,9 +55,22 @@ ai2-kit feat nmrnet predict \
--saved_dir ./weight \
--nmr_type solid --selected_atom H \
--data_file tmp/nmr-demo.xyz
--fig_save_to nmr.png
```

The above command will predict the NMR of the `H` atom in the `tmp/nmr-demo.xyz` file.
The prediction result will be print to stdout as the below:

```
[25.572277 29.441292 29.615028 29.896814 29.590061 30.400713 29.576017
15.920061 29.084885 29.069242 28.565197 28.77764 28.510954 28.849863
14.738946 24.312784]
```

Since `--fig_save_to` is specified, the prediction result will be saved to `nmr.png`.

<img src="../res/nmr.png" width="80%" style="display: block; margin: 0 auto;">

The above command will predict the NMR of the `H` atom in the `tmp/nmr-demo.xyz` file using the NMRNet model in the `./weight/cv_seed_42_fold_0/checkpoint_best.pt` file.


## Citation
Expand Down
Binary file added doc/res/nmr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3aa2c4f

Please sign in to comment.