|
1 | 1 | # Installation |
2 | 2 |
|
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. |
4 | 6 |
|
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 |
9 | 25 | pip install -r requirements.txt |
10 | | -## clone repo |
| 26 | + |
| 27 | +## Clone repository |
11 | 28 | git clone https://github.com/dptech-corp/Uni-Mol.git |
12 | | -cd Uni-Mol/unimol_tools/unimol_tools |
| 29 | +cd Uni-Mol/unimol_tools |
13 | 30 |
|
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 | +``` |
21 | 34 |
|
22 | | -mkdir -p weights |
23 | | -mv *.pt weights/ |
| 35 | +### Models in Huggingface |
24 | 36 |
|
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 |
28 | 43 | ``` |
29 | 44 |
|
| 45 | +Setting the `HF_ENDPOINT` environment variable specifies the mirror address for the Hugging Face Hub to use when downloading models. |
| 46 | + |
30 | 47 | ## Bohrium notebook |
31 | 48 |
|
32 | 49 | Uni-Mol images can be avaliable on the online notebook platform [Bohirum notebook](https://nb.bohrium.dp.tech/). |
|
0 commit comments