Skip to content

Commit 1078be7

Browse files
authored
Docs update (#244)
* update docs * update docs install
1 parent 00fb953 commit 1078be7

File tree

1 file changed

+36
-19
lines changed

1 file changed

+36
-19
lines changed

docs/source/installation.md

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,49 @@
11
# Installation
22

3-
## Overview
3+
## Install
4+
- pytorch is required, please install pytorch according to your environment. if you are using cuda, please install pytorch with cuda. More details can be found at https://pytorch.org/get-started/locally/
5+
- currently, rdkit needs with numpy<2.0.0, please install rdkit with numpy<2.0.0.
46

5-
[Uni-Mol](https://github.com/dptech-corp/Uni-Mol/tree/main)
6-
now can be installed from source.
7-
```shell
8-
## unicore and other dependencies installation
7+
### Option 1: Installing from PyPi (Recommended)
8+
9+
```bash
10+
pip install unimol_tools
11+
```
12+
13+
We recommend installing ```huggingface_hub``` so that the required unimol models can be automatically downloaded at runtime! It can be install by
14+
15+
```bash
16+
pip install huggingface_hub
17+
```
18+
19+
`huggingface_hub` allows you to easily download and manage models from the Hugging Face Hub, which is key for using UniMol models.
20+
21+
### Option 2: Installing from source
22+
23+
```python
24+
## Dependencies installation
925
pip install -r requirements.txt
10-
## clone repo
26+
27+
## Clone repository
1128
git clone https://github.com/dptech-corp/Uni-Mol.git
12-
cd Uni-Mol/unimol_tools/unimol_tools
29+
cd Uni-Mol/unimol_tools
1330

14-
## download pretrained weights
15-
wget https://github.com/dptech-corp/Uni-Mol/releases/download/v0.1/mol_pre_all_h_220816.pt
16-
wget https://github.com/dptech-corp/Uni-Mol/releases/download/v0.1/mol_pre_no_h_220816.pt
17-
wget https://github.com/dptech-corp/Uni-Mol/releases/download/v0.1/pocket_pre_220816.pt
18-
wget https://github.com/dptech-corp/Uni-Mol/releases/download/v0.1/mof_pre_no_h_CORE_MAP_20230505.pt
19-
wget https://github.com/dptech-corp/Uni-Mol/releases/download/v0.1/mp_all_h_230313.pt
20-
wget https://github.com/dptech-corp/Uni-Mol/releases/download/v0.1/oled_pre_no_h_230101.pt
31+
## Install
32+
python setup.py install
33+
```
2134

22-
mkdir -p weights
23-
mv *.pt weights/
35+
### Models in Huggingface
2436

25-
## install
26-
cd ..
27-
python setup.py install
37+
The UniMol pretrained models can be found at [dptech/Uni-Mol-Models](https://huggingface.co/dptech/Uni-Mol-Models/tree/main).
38+
39+
If the download is slow, you can use other mirrors, such as:
40+
41+
```bash
42+
export HF_ENDPOINT=https://hf-mirror.com
2843
```
2944

45+
Setting the `HF_ENDPOINT` environment variable specifies the mirror address for the Hugging Face Hub to use when downloading models.
46+
3047
## Bohrium notebook
3148

3249
Uni-Mol images can be avaliable on the online notebook platform [Bohirum notebook](https://nb.bohrium.dp.tech/).

0 commit comments

Comments
 (0)