diff --git a/README.md b/README.md index 969f8cff3a..b451ca9fd0 100644 --- a/README.md +++ b/README.md @@ -51,10 +51,7 @@ python ./custom_op_test.py 除少量 `deprecated` 相关的警告外,如果输出全部都是 True,则说明自定义算子安装成功并且运行正常。 -### 2.1 训练 - -> [!NOTE] -> 暂时只支持 water_se_e2_a 案例的训练 +### 2.2 训练 ``` sh # 进入案例目录 @@ -63,7 +60,7 @@ cd examples/water/se_e2_a dp train ./input.json ``` -### 2.2 评估 +### 2.3 评估 ``` sh # 进入案例目录 @@ -74,7 +71,7 @@ WEIGHT_PATH="path/to/your_model.pdparams" dp test -m ${WEIGHT_PATH} -s ../data/data_3/ -n 30 ``` -### 2.3 导出静态图模型 +### 2.4 导出静态图模型 ``` sh # 进入案例目录 @@ -87,7 +84,7 @@ DUMP_PATH="path/to/your_dump" dp freeze -i ${WEIGHT_PATH} -o ${DUMP_PATH} ``` -### 2.4 在 LAMMPS(GPU) 中推理 +### 2.5 在 LAMMPS(GPU) 中推理 1. 修改 `examples/water/lmp/in.lammps` 文件,将 `pair_style deepmd` 后面的路径改为 **2.3 导出静态图模型** 这一章节内设置好的 DUMP_PATH 的值 @@ -95,7 +92,7 @@ dp freeze -i ${WEIGHT_PATH} -o ${DUMP_PATH} pair_style deepmd "path/to/your_dump" ``` -2. 编译 Paddle,得到未裁剪算子的 Paddle 推理库(LAMMPS 推理涉及到 `xxx_grad` 反向算子,因而需要使用未裁剪的 Paddle 推理库) +2. 编译 Paddle,得到未裁剪算子的 Paddle 推理库(LAMMPS 推理涉及到 `xxx_grad` 反向算子,因而在此需要手动编译 Paddle,得到未裁剪的 Paddle 推理库) ``` sh git clone https://github.com/PaddlePaddle/Paddle.git -b develop @@ -105,10 +102,12 @@ dp freeze -i ${WEIGHT_PATH} -o ${DUMP_PATH} # 推荐使用 Anaconda 安装 python3.9 环境,并在该环境下执行编译命令 cmake .. -DPY_VERSION=3.9 -DWITH_GPU=ON -WITH_DISTRIBUTE=ON -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Release make -j$(nproc) - pip install python/dist/paddlepaddle_gpu-0.0.0-cp39-cp39-linux_x86_64.whl + + # 编译完成后,确认 paddle_inference_install_dir 推理库是否存在 + ls build/paddle_inference_install_dir ``` -3. 安装 LAMMPS 并运行推理 +3. Paddle 推理库和 LAMMPS 联合编译安装,并运行推理 ``` sh # 下载并解压 lammps 源码 @@ -166,7 +165,9 @@ dp freeze -i ${WEIGHT_PATH} -o ${DUMP_PATH} lmp_serial -in in.lammps ``` -4. 直接运行推理 +4. [可选]直接运行推理 + + 若已完成 **3. Paddle 推理库和 LAMMPS 联合编译安装,并运行推理**,且没有对 C++ 代码进行修改,则无需重新联合编译 Paddle 推理库和 LAMMPS,直接运行以下命令即可开始推理。 ``` sh # 设置推理时的 GPU 卡号 @@ -182,7 +183,7 @@ dp freeze -i ${WEIGHT_PATH} -o ${DUMP_PATH} lmp_serial -in in.lammps ``` ---- +-------------------------------------------------------------------------------- DeePMD-kit Manual ======== @@ -216,7 +217,8 @@ For more information, check the [documentation](https://deepmd.readthedocs.io/). # Highlights in DeePMD-kit v2.0 -* [Model compression](doc/freeze/compress.md). Accelerate the efficiency of model inference 4-15 times. +- [Model compression](doc/freeze/compress.md). Accelerate the efficiency of model inference 4-15 times. + - [New descriptors](doc/model/overall.md). Including [`se_e2_r`](doc/model/train-se-e2-r.md) and [`se_e3`](doc/model/train-se-e3.md). - [Hybridization of descriptors](doc/model/train-hybrid.md). Hybrid descriptor constructed from the concatenation of several descriptors. - [Atom type embedding](doc/model/train-se-e2-a-tebd.md). Enable atom-type embedding to decline training complexity and refine performance. @@ -226,7 +228,8 @@ For more information, check the [documentation](https://deepmd.readthedocs.io/). ## Highlighted features -* **interfaced with TensorFlow**, one of the most popular deep learning frameworks, making the training process highly automatic and efficient, in addition, Tensorboard can be used to visualize training procedures. +- **interfaced with TensorFlow**, one of the most popular deep learning frameworks, making the training process highly automatic and efficient, in addition, Tensorboard can be used to visualize training procedures. + - **interfaced with high-performance classical MD and quantum (path-integral) MD packages**, i.e., LAMMPS and i-PI, respectively. - **implements the Deep Potential series models**, which have been successfully applied to finite and extended systems including organic molecules, metals, semiconductors, insulators, etc. - **implements MPI and GPU supports**, making it highly efficient for high-performance parallel and distributed computing.