新建
【DeePMD-kit v3教程3】DeePMD-GNN


更新于 2024-11-26
推荐镜像 :Basic Image:ubuntu:22.04-py3.10-cuda12.1
推荐机型 :c12_m92_1 * NVIDIA V100
赞
目录
详细内容请参见深度势能公众号。
代码
文本
[1]
!nvidia-smi
Tue Nov 26 13:52:39 2024 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 525.85.12 Driver Version: 525.85.12 CUDA Version: 12.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 Tesla V100-SXM2... Off | 00000000:00:09.0 Off | 0 | | N/A 32C P0 41W / 300W | 0MiB / 32768MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+
代码
文本
安装环境
代码
文本
[2]
!wget https://mirror.nju.edu.cn/github-release/deepmodeling/deepmd-kit/v3.0.0/deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.0 -O deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.0
!wget https://mirror.nju.edu.cn/github-release/deepmodeling/deepmd-kit/v3.0.0/deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.1 -O deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.1
!cat deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.0 deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.1 > deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh
--2024-11-26 13:55:49-- https://mirror.nju.edu.cn/github-release/deepmodeling/deepmd-kit/v3.0.0/deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.0 Resolving ga.dp.tech (ga.dp.tech)... 10.255.254.18, 10.255.254.37, 10.255.254.7 Connecting to ga.dp.tech (ga.dp.tech)|10.255.254.18|:8118... connected. Proxy request sent, awaiting response... 200 OK Length: 1593874464 (1.5G) [application/octet-stream] Saving to: ‘deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.0’ deepmd-kit-3.0.0-cu 100%[===================>] 1.48G 10.1MB/s in 4m 32s 2024-11-26 14:00:21 (5.59 MB/s) - ‘deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.0’ saved [1593874464/1593874464] --2024-11-26 14:00:21-- https://mirror.nju.edu.cn/github-release/deepmodeling/deepmd-kit/v3.0.0/deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.1 Resolving ga.dp.tech (ga.dp.tech)... 10.255.254.37, 10.255.254.7, 10.255.254.18 Connecting to ga.dp.tech (ga.dp.tech)|10.255.254.37|:8118... connected. Proxy request sent, awaiting response... 200 OK Length: 1593874465 (1.5G) [application/octet-stream] Saving to: ‘deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.1’ deepmd-kit-3.0.0-cu 100%[===================>] 1.48G 9.22MB/s in 2m 31s 2024-11-26 14:02:53 (10.1 MB/s) - ‘deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh.1’ saved [1593874465/1593874465]
代码
文本
[4]
!sh deepmd-kit-3.0.0-cuda126-Linux-x86_64.sh -b
PREFIX=/root/deepmd-kit Unpacking payload ... Notes: The off-line packages and conda packages require the GNU C Library 2.17 or above[1]. The GPU version requires compatible NVIDIA driver to be installed in advance[2]. It is possible to force conda to override detection when installation[3] (such as CONDA_OVERRIDE_CUDA), but these requirements are still necessary during runtime. [1] The GNU C Library. https://www.gnu.org/software/libc/ [2] Minor Version Compatibility. NVIDIA Data Center GPU Driver Documentation. https://docs.nvidia.com/deploy/cuda-compatibility/index.html#minor-version-compatibility [3] Overriding detected packages. conda documentation. https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-virtual.html#overriding-detected-packages Installing base environment... Preparing transaction: ...working... done Executing transaction: ...working... By downloading and using the cuDNN conda packages, you accept the terms and conditions of the NVIDIA cuDNN EULA - https://docs.nvidia.com/deeplearning/cudnn/sla/index.html To enable CUDA support, UCX requires the CUDA Runtime library (libcudart). The library can be installed with the appropriate command below: * For CUDA 11, run: conda install cudatoolkit cuda-version=11 * For CUDA 12, run: conda install cuda-cudart cuda-version=12 To enable CUDA support, please follow UCX's instruction above. To additionally enable NCCL support, run: conda install nccl On Linux, Open MPI is built with CUDA awareness but it is disabled by default. To enable it, please set the environment variable OMPI_MCA_opal_cuda_support=true before launching your MPI processes. Equivalently, you can set the MCA parameter in the command line: mpiexec --mca opal_cuda_support 1 ... Note that you might also need to set UCX_MEMTYPE_CACHE=n for CUDA awareness via UCX. Please consult UCX documentation for further details. done Please activate the environment before using the packages: source /path/to/deepmd-kit/bin/activate /path/to/deepmd-kit This package enables TensorFlow, PyTorch, and JAX backends. The following executable files have been installed: 1. DeePMD-kit CLi: dp -h 2. LAMMPS: lmp -h 3. DeePMD-kit i-Pi interface: dp_ipi 4. MPICH: mpirun -h 5. Horovod: horovod -h The following Python libraries have been installed: 1. deepmd 2. dpdata 3. pylammps If you have any questions, seek help from https://github.com/deepmodeling/deepmd-kit/discussions installation finished.
代码
文本
[5]
%%bash
source /root/deepmd-kit/bin/activate /root/deepmd-kit
dp -h
usage: dp [-h] [-b {pytorch,pt,tensorflow,tf,jax} | --pytorch | --tensorflow | --jax] [--version] {transfer,train,freeze,test,compress,doc-train-input,model-devi,convert-from,neighbor-stat,change-bias,train-nvnmd,gui,convert-backend,show} ... DeePMD-kit: A deep learning package for many-body potential energy representation and molecular dynamics options: -h, --help show this help message and exit -b {pytorch,pt,tensorflow,tf,jax}, --backend {pytorch,pt,tensorflow,tf,jax} The backend of the model. Default can be set by environment variable DP_BACKEND. (default: tensorflow) --pytorch, --pt Alias for --backend pytorch (default: None) --tensorflow, --tf Alias for --backend tensorflow (default: None) --jax Alias for --backend jax (default: None) --version show program's version number and exit Valid subcommands: {transfer,train,freeze,test,compress,doc-train-input,model-devi,convert-from,neighbor-stat,change-bias,train-nvnmd,gui,convert-backend,show} transfer (Supported backend: TensorFlow) pass parameters to another model
train train a model freeze freeze the model test test the model compress Compress a model doc-train-input print the documentation (in rst format) of input training parameters. model-devi calculate model deviation convert-from (Supported backend: TensorFlow) convert lower model version to supported version neighbor-stat Calculate neighbor statistics change-bias (Supported backend: PyTorch) Change model out bias according to the input data. train-nvnmd (Supported backend: TensorFlow) train nvnmd model gui Serve DP-GUI. convert-backend Convert model to another backend. show Show the information of a model Use --tf or --pt to choose the backend: dp --tf train input.json dp --pt train input.json
代码
文本
[18]
%%bash
source /root/deepmd-kit/bin/activate /root/deepmd-kit
export CMAKE_PREFIX_PATH=$(python -c "import torch;print(torch.utils.cmake_prefix_path)")
CUDA_BIN_PATH=/usr/local/cuda CUDACXX=/usr/local/cuda/bin/nvcc pip install -v deepmd-gnn --no-binary deepmd-gnn
Using pip 24.3.1 from /root/deepmd-kit/lib/python3.12/site-packages/pip (python 3.12) Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting deepmd-gnn Downloading https://pypi.tuna.tsinghua.edu.cn/packages/66/26/90d816a912b50a4ee091ab8a79d2087924e59ad90e45c89bbb60569a9bae/deepmd_gnn-0.1.0.tar.gz (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 5.4 MB/s eta 0:00:00ta 0:00:01 Installing build dependencies: started Running command pip subprocess to install build dependencies Using pip 24.3.1 from /root/deepmd-kit/lib/python3.12/site-packages/pip (python 3.12) Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting scikit-build-core>=0.3.0 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/88/fe/90476c4f6a1b2f922efa00d26e876dd40c7279e28ec18f08f0851ad21ba6/scikit_build_core-0.10.7-py3-none-any.whl (165 kB) Collecting packaging>=21.3 (from scikit-build-core>=0.3.0) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl (65 kB) Collecting pathspec>=0.10.1 (from scikit-build-core>=0.3.0) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl (31 kB) Installing collected packages: pathspec, packaging, scikit-build-core Successfully installed packaging-24.2 pathspec-0.12.1 scikit-build-core-0.10.7 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Running command Getting requirements to build wheel Getting requirements to build wheel: finished with status 'done' Installing backend dependencies: started Running command pip subprocess to install backend dependencies Using pip 24.3.1 from /root/deepmd-kit/lib/python3.12/site-packages/pip (python 3.12) Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting setuptools-scm Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a0/b9/1906bfeb30f2fc13bb39bf7ddb8749784c05faadbd18a21cf141ba37bff2/setuptools_scm-8.1.0-py3-none-any.whl (43 kB) Collecting ninja>=1.5 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/62/54/787bb70e6af2f1b1853af9bab62a5e7cb35b957d72daf253b7f3c653c005/ninja-1.11.1.2-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (422 kB) Collecting packaging>=20 (from setuptools-scm) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl (65 kB) Collecting setuptools (from setuptools-scm) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/55/21/47d163f615df1d30c094f6c8bbb353619274edccf0327b185cc2493c2c33/setuptools-75.6.0-py3-none-any.whl (1.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/1.2 MB ? eta -:--:-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 24.7 MB/s eta 0:00:00 Installing collected packages: setuptools, packaging, ninja, setuptools-scm Successfully installed ninja-1.11.1.2 packaging-24.2 setuptools-75.6.0 setuptools-scm-8.1.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. Installing backend dependencies: finished with status 'done' Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) *** scikit-build-core 0.10.7 using CMake 3.22.1 (metadata_wheel) Preparing metadata (pyproject.toml): finished with status 'done' Requirement already satisfied: torch in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-gnn) (2.4.1.post302) Requirement already satisfied: deepmd-kit>=3.0.0b2 in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (3.0.0) Collecting mace-torch>=0.3.5 (from deepmd-gnn) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5c/e0/1bf067dbfa5399afe00b6c86a4dc7d023e35cded6f9b7260ce97c6add591/mace_torch-0.3.8-py3-none-any.whl (140 kB) Collecting nequip (from deepmd-gnn) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a8/61/af868b7e7efc0ee8903a13dcedfd0f7502ee93c392ae06f09fa854f49c78/nequip-0.6.1-py3-none-any.whl (175 kB) Collecting e3nn (from deepmd-gnn) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/9b/74/0ddc27c458c48890e5e668879df2987e1126a60529f175843cfc0fa42b4f/e3nn-0.5.4-py3-none-any.whl (447 kB) Requirement already satisfied: dargs in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-gnn) (0.4.10) Requirement already satisfied: numpy>=1.21 in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (1.26.4) Requirement already satisfied: scipy in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (1.14.1) Requirement already satisfied: pyyaml in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (6.0.2) Requirement already satisfied: h5py in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (3.12.1) Requirement already satisfied: wcmatch in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (10.0) Requirement already satisfied: packaging in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (24.2) Requirement already satisfied: ml_dtypes in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (0.4.0) Requirement already satisfied: mendeleev in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (0.19.0) Requirement already satisfied: array-api-compat in /root/deepmd-kit/lib/python3.12/site-packages (from deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (1.9.1) Requirement already satisfied: typeguard>=4 in /root/deepmd-kit/lib/python3.12/site-packages (from dargs->deepmd-gnn) (4.4.1) Requirement already satisfied: filelock in /root/deepmd-kit/lib/python3.12/site-packages (from torch->deepmd-gnn) (3.16.1) Requirement already satisfied: typing-extensions>=4.8.0 in /root/deepmd-kit/lib/python3.12/site-packages (from torch->deepmd-gnn) (4.12.2) Requirement already satisfied: sympy in /root/deepmd-kit/lib/python3.12/site-packages (from torch->deepmd-gnn) (1.13.3) Requirement already satisfied: networkx in /root/deepmd-kit/lib/python3.12/site-packages (from torch->deepmd-gnn) (3.4.2) Requirement already satisfied: jinja2 in /root/deepmd-kit/lib/python3.12/site-packages (from torch->deepmd-gnn) (3.1.4) Requirement already satisfied: fsspec in /root/deepmd-kit/lib/python3.12/site-packages (from torch->deepmd-gnn) (2024.10.0) Requirement already satisfied: setuptools in /root/deepmd-kit/lib/python3.12/site-packages (from torch->deepmd-gnn) (75.6.0) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9a/b6/c8327065d1dd8bca28521fe65ff72b649ed17ca8a1f0c1f498006d7567b7/e3nn-0.4.4-py3-none-any.whl (387 kB) Requirement already satisfied: opt-einsum in /root/deepmd-kit/lib/python3.12/site-packages (from mace-torch>=0.3.5->deepmd-gnn) (3.4.0) Collecting ase (from mace-torch>=0.3.5->deepmd-gnn) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/02/81/2c339c920fb1be1caa0b7efccb14452c9f4f0dbe3837f33519610611f57b/ase-3.23.0-py3-none-any.whl (2.9 MB) Collecting torch-ema (from mace-torch>=0.3.5->deepmd-gnn) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c0/f1/a47c831436595cffbfd69a19ea129a23627120b13f4886499e58775329d1/torch_ema-0.3-py3-none-any.whl (5.5 kB) Collecting prettytable (from mace-torch>=0.3.5->deepmd-gnn) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/73/19/4bb9530512432774fdd7cb7c020851d4decbb811d95f86fd4f6a870a6d3e/prettytable-3.12.0-py3-none-any.whl (31 kB) Collecting matscipy (from mace-torch>=0.3.5->deepmd-gnn) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a7/e2/51247a22f02979020cb95b6480822478c8491b7fb6f792eff125dd15fb1a/matscipy-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (449 kB) Collecting torchmetrics (from mace-torch>=0.3.5->deepmd-gnn) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/46/1a/9728a502f377ab8cff1fd15c625aa2919a183fa113ebcefa2cd38edff28b/torchmetrics-1.6.0-py3-none-any.whl (926 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 926.4/926.4 kB 11.7 MB/s eta 0:00:00 Collecting python-hostlist (from mace-torch>=0.3.5->deepmd-gnn) Using cached python_hostlist-2.0.0-py3-none-any.whl Collecting configargparse (from mace-torch>=0.3.5->deepmd-gnn) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6f/b3/b4ac838711fd74a2b4e6f746703cf9dd2cf5462d17dac07e349234e21b97/ConfigArgParse-1.7-py3-none-any.whl (25 kB) Collecting GitPython (from mace-torch>=0.3.5->deepmd-gnn) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e9/bd/cc3a402a6439c15c3d4294333e13042b915bbeab54edc457c723931fed3f/GitPython-3.1.43-py3-none-any.whl (207 kB) Requirement already satisfied: tqdm in /root/deepmd-kit/lib/python3.12/site-packages (from mace-torch>=0.3.5->deepmd-gnn) (4.67.0) Requirement already satisfied: matplotlib in /root/deepmd-kit/lib/python3.12/site-packages (from mace-torch>=0.3.5->deepmd-gnn) (3.9.2) Requirement already satisfied: pandas in /root/deepmd-kit/lib/python3.12/site-packages (from mace-torch>=0.3.5->deepmd-gnn) (2.2.3) Collecting opt-einsum-fx>=0.1.4 (from e3nn->deepmd-gnn) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/8d/4c/e0370709aaf9d7ceb68f975cac559751e75954429a77e83202e680606560/opt_einsum_fx-0.1.4-py3-none-any.whl (13 kB) Collecting torch-runstats>=0.2.0 (from nequip->deepmd-gnn) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/4f/81/021f56cdddce39a04c51abfd17af52f3fba91d30b699af5e5352f8abbff6/torch_runstats-0.2.0-py3-none-any.whl (8.1 kB) Requirement already satisfied: contourpy>=1.0.1 in /root/deepmd-kit/lib/python3.12/site-packages (from matplotlib->mace-torch>=0.3.5->deepmd-gnn) (1.3.1) Requirement already satisfied: cycler>=0.10 in /root/deepmd-kit/lib/python3.12/site-packages (from matplotlib->mace-torch>=0.3.5->deepmd-gnn) (0.12.1) Requirement already satisfied: fonttools>=4.22.0 in /root/deepmd-kit/lib/python3.12/site-packages (from matplotlib->mace-torch>=0.3.5->deepmd-gnn) (4.55.0) Requirement already satisfied: kiwisolver>=1.3.1 in /root/deepmd-kit/lib/python3.12/site-packages (from matplotlib->mace-torch>=0.3.5->deepmd-gnn) (1.4.7) Requirement already satisfied: pillow>=8 in /root/deepmd-kit/lib/python3.12/site-packages (from matplotlib->mace-torch>=0.3.5->deepmd-gnn) (11.0.0) Requirement already satisfied: pyparsing>=2.3.1 in /root/deepmd-kit/lib/python3.12/site-packages (from matplotlib->mace-torch>=0.3.5->deepmd-gnn) (3.2.0) Requirement already satisfied: python-dateutil>=2.7 in /root/deepmd-kit/lib/python3.12/site-packages (from matplotlib->mace-torch>=0.3.5->deepmd-gnn) (2.9.0.post0) Collecting gitdb<5,>=4.0.1 (from GitPython->mace-torch>=0.3.5->deepmd-gnn) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fd/5b/8f0c4a5bb9fd491c277c21eff7ccae71b47d43c4446c9d0c6cff2fe8c2c4/gitdb-4.0.11-py3-none-any.whl (62 kB) Requirement already satisfied: MarkupSafe>=2.0 in /root/deepmd-kit/lib/python3.12/site-packages (from jinja2->torch->deepmd-gnn) (3.0.2) Requirement already satisfied: Pygments<3.0.0,>=2.11.2 in /root/deepmd-kit/lib/python3.12/site-packages (from mendeleev->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (2.18.0) Requirement already satisfied: SQLAlchemy>=1.4.0 in /root/deepmd-kit/lib/python3.12/site-packages (from mendeleev->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (2.0.36) Requirement already satisfied: colorama<0.5.0,>=0.4.6 in /root/deepmd-kit/lib/python3.12/site-packages (from mendeleev->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (0.4.6) Requirement already satisfied: deprecated<2.0.0,>=1.2.14 in /root/deepmd-kit/lib/python3.12/site-packages (from mendeleev->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (1.2.15) Requirement already satisfied: pydantic<3.0.0,>=2.9.2 in /root/deepmd-kit/lib/python3.12/site-packages (from mendeleev->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (2.10.1) Requirement already satisfied: pyfiglet<0.9,>=0.8.post1 in /root/deepmd-kit/lib/python3.12/site-packages (from mendeleev->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (0.8.post1) Requirement already satisfied: pytz>=2020.1 in /root/deepmd-kit/lib/python3.12/site-packages (from pandas->mace-torch>=0.3.5->deepmd-gnn) (2024.1) Requirement already satisfied: tzdata>=2022.7 in /root/deepmd-kit/lib/python3.12/site-packages (from pandas->mace-torch>=0.3.5->deepmd-gnn) (2024.2) Collecting wcwidth (from prettytable->mace-torch>=0.3.5->deepmd-gnn) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl (34 kB) Requirement already satisfied: mpmath<1.4,>=1.1.0 in /root/deepmd-kit/lib/python3.12/site-packages (from sympy->torch->deepmd-gnn) (1.3.0) Collecting lightning-utilities>=0.8.0 (from torchmetrics->mace-torch>=0.3.5->deepmd-gnn) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/85/f3/1305321a12c984405e26fc64b5d521569e9872fb811f4aace8e168099160/lightning_utilities-0.11.9-py3-none-any.whl (28 kB) Requirement already satisfied: bracex>=2.1.1 in /root/deepmd-kit/lib/python3.12/site-packages (from wcmatch->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (2.2.1) Requirement already satisfied: wrapt<2,>=1.10 in /root/deepmd-kit/lib/python3.12/site-packages (from deprecated<2.0.0,>=1.2.14->mendeleev->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (1.16.0) Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->GitPython->mace-torch>=0.3.5->deepmd-gnn) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/a5/10f97f73544edcdef54409f1d839f6049a0d79df68adbc1ceb24d1aaca42/smmap-5.0.1-py3-none-any.whl (24 kB) Requirement already satisfied: annotated-types>=0.6.0 in /root/deepmd-kit/lib/python3.12/site-packages (from pydantic<3.0.0,>=2.9.2->mendeleev->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (0.7.0) Requirement already satisfied: pydantic-core==2.27.1 in /root/deepmd-kit/lib/python3.12/site-packages (from pydantic<3.0.0,>=2.9.2->mendeleev->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (2.27.1) Requirement already satisfied: six>=1.5 in /root/deepmd-kit/lib/python3.12/site-packages (from python-dateutil>=2.7->matplotlib->mace-torch>=0.3.5->deepmd-gnn) (1.16.0) Requirement already satisfied: greenlet!=0.4.17 in /root/deepmd-kit/lib/python3.12/site-packages (from SQLAlchemy>=1.4.0->mendeleev->deepmd-kit>=3.0.0b2->deepmd-kit[torch]>=3.0.0b2->deepmd-gnn) (3.1.1) Building wheels for collected packages: deepmd-gnn Building wheel for deepmd-gnn (pyproject.toml): started Running command Building wheel for deepmd-gnn (pyproject.toml) *** scikit-build-core 0.10.7 using CMake 3.22.1 (wheel) *** Configuring CMake... loading initial cache file /tmp/tmpc69fz1wa/build/CMakeInit.txt -- The CXX compiler identification is GNU 11.4.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) -- Looking for C++ include pthread.h -- Looking for C++ include pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Caffe2: Found protobuf with new-style protobuf targets. -- Caffe2: Protobuf version 27.5.0 -- Found CUDA: /usr/local/cuda (found version "12.1") -- The CUDA compiler identification is NVIDIA 12.1.105 -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped -- Detecting CUDA compile features -- Detecting CUDA compile features - done -- Found CUDAToolkit: /usr/local/cuda/include (found version "12.1.105") -- Caffe2: CUDA detected: 12.1 -- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr/local/cuda -- Caffe2: Header version is: 12.1 -- /usr/local/cuda/lib64/libnvrtc.so shorthash is b51b459d -- USE_CUDNN is set to 0. Compiling without cuDNN support -- USE_CUSPARSELT is set to 0. Compiling without cuSPARSELt support -- Autodetected CUDA architecture(s): 7.0 -- Added CUDA NVCC flags for: -gencode;arch=compute_70,code=sm_70 -- Found Torch: /root/deepmd-kit/lib/python3.12/site-packages/torch/lib/libtorch.so -- PyTorch CXX11 ABI: 1 -- Configuring done -- Generating done -- Build files have been written to: /tmp/tmpc69fz1wa/build *** Building project with Ninja... [1/2] Building CXX object op/CMakeFiles/deepmd_gnn.dir/edge_index.cc.o [2/2] Linking CXX shared module op/libdeepmd_gnn.so *** Installing project into wheel... -- Install configuration: "Release" -- Installing: /tmp/tmpc69fz1wa/wheel/platlib/deepmd_gnn/lib/libdeepmd_gnn.so -- Set runtime path of "/tmp/tmpc69fz1wa/wheel/platlib/deepmd_gnn/lib/libdeepmd_gnn.so" to "$ORIGIN" -- Installing: /tmp/tmpc69fz1wa/wheel/platlib/deepmd_gnn/lib/__init__.py *** Making wheel... *** Created deepmd_gnn-0.1.0-py2.py3-none-linux_x86_64.whl Building wheel for deepmd-gnn (pyproject.toml): finished with status 'done' Created wheel for deepmd-gnn: filename=deepmd_gnn-0.1.0-py2.py3-none-linux_x86_64.whl size=47345 sha256=13ecb62c218aa134549942fdea1ed303fd485c3a68bc70bc9158fc4efb0e10e5 Stored in directory: /root/.cache/pip/wheels/b7/07/0b/d9685756b9bb203f96e25df50668aad18e2bb9c06fb3d20d8a Successfully built deepmd-gnn Installing collected packages: wcwidth, python-hostlist, torch-runstats, smmap, prettytable, lightning-utilities, configargparse, gitdb, torchmetrics, torch-ema, opt-einsum-fx, GitPython, ase, matscipy, e3nn, nequip, mace-torch, deepmd-gnn changing mode of /root/deepmd-kit/bin/ase to 755 changing mode of /root/deepmd-kit/bin/matscipy-rms to 755 changing mode of /root/deepmd-kit/bin/matscipy-quench to 755 changing mode of /root/deepmd-kit/bin/matscipy-continuous2discrete to 755 changing mode of /root/deepmd-kit/bin/matscipy-poisson-nernst-planck to 755 changing mode of /root/deepmd-kit/bin/matscipy-stericify to 755 changing mode of /root/deepmd-kit/bin/matscipy-quasistatic-crack to 755 changing mode of /root/deepmd-kit/bin/matscipy-sinclair-continuation to 755 changing mode of /root/deepmd-kit/bin/matscipy-sinclair-crack to 755 changing mode of /root/deepmd-kit/bin/matscipy-average-eam-potential to 755 changing mode of /root/deepmd-kit/bin/nequip-benchmark to 755 changing mode of /root/deepmd-kit/bin/nequip-deploy to 755 changing mode of /root/deepmd-kit/bin/nequip-evaluate to 755 changing mode of /root/deepmd-kit/bin/nequip-train to 755 changing mode of /root/deepmd-kit/bin/mace_active_learning_md to 755 changing mode of /root/deepmd-kit/bin/mace_convert_device to 755 changing mode of /root/deepmd-kit/bin/mace_create_lammps_model to 755 changing mode of /root/deepmd-kit/bin/mace_eval_configs to 755 changing mode of /root/deepmd-kit/bin/mace_finetuning to 755 changing mode of /root/deepmd-kit/bin/mace_plot_train to 755 changing mode of /root/deepmd-kit/bin/mace_prepare_data to 755 changing mode of /root/deepmd-kit/bin/mace_run_train to 755 changing mode of /root/deepmd-kit/bin/mace_select_head to 755 Successfully installed GitPython-3.1.43 ase-3.23.0 configargparse-1.7 deepmd-gnn-0.1.0 e3nn-0.4.4 gitdb-4.0.11 lightning-utilities-0.11.9 mace-torch-0.3.8 matscipy-1.1.1 nequip-0.6.1 opt-einsum-fx-0.1.4 prettytable-3.12.0 python-hostlist-2.0.0 smmap-5.0.1 torch-ema-0.3 torch-runstats-0.2.0 torchmetrics-1.6.0 wcwidth-0.2.13 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
代码
文本
训练MACE模型
代码
文本
[39]
!git clone https://github.com/njzjz/deepmd-gnn
Cloning into 'deepmd-gnn'... remote: Enumerating objects: 299, done. remote: Counting objects: 100% (89/89), done. remote: Compressing objects: 100% (53/53), done. remote: Total 299 (delta 62), reused 37 (delta 36), pack-reused 210 (from 1) Receiving objects: 100% (299/299), 1.73 MiB | 1.80 MiB/s, done. Resolving deltas: 100% (139/139), done.
代码
文本
[45]
%cd deepmd-gnn/examples/water/mace
/deepmd-gnn/examples/water/mace
代码
文本
[46]
! sed -i "s/1000000/2000/g" input.json
! cat input.json
{ "_comment1": " model parameters", "model": { "type": "mace", "type_map": [ "O", "H" ], "r_max": 6.0, "sel": "auto", "hidden_irreps": "64x0e", "_comment2": " that's all" }, "learning_rate": { "type": "exp", "decay_steps": 5000, "start_lr": 0.001, "stop_lr": 3.51e-8, "_comment3": "that's all" }, "loss": { "type": "ener", "start_pref_e": 0.02, "limit_pref_e": 1, "start_pref_f": 1000, "limit_pref_f": 1, "start_pref_v": 0, "limit_pref_v": 0, "_comment4": " that's all" }, "training": { "training_data": { "systems": [ "../data/data_0/", "../data/data_1/", "../data/data_2/" ], "batch_size": "auto", "_comment5": "that's all" }, "validation_data": { "systems": [ "../data/data_3" ], "batch_size": 1, "numb_btch": 3, "_comment6": "that's all" }, "numb_steps": 2000, "seed": 10, "disp_file": "lcurve.out", "disp_freq": 100, "save_freq": 1000, "_comment7": "that's all" }, "_comment8": "that's all" }
代码
文本
[47]
%%bash
source /root/deepmd-kit/bin/activate /root/deepmd-kit
# fix matplotlib issue
export MPLBACKEND=svg
dp --pt train input.json
To get the best performance, it is recommended to adjust the number of threads by setting the environment variables OMP_NUM_THREADS, DP_INTRA_OP_PARALLELISM_THREADS, and DP_INTER_OP_PARALLELISM_THREADS. See https://deepmd.rtfd.io/parallelism/ for more information. /root/deepmd-kit/lib/python3.12/site-packages/e3nn/o3/_wigner.py:10: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. _Jd, _W3j_flat, _W3j_indices = torch.load(os.path.join(os.path.dirname(__file__), 'constants.pt')) /root/deepmd-kit/lib/python3.12/site-packages/nequip/__init__.py:20: UserWarning: !! PyTorch version 2.4.1.post302 found. Upstream issues in PyTorch versions 1.13.* and 2.* have been seen to cause unusual performance degredations on some CUDA systems that become worse over time; see https://github.com/mir-group/nequip/discussions/311. The best tested PyTorch version to use with CUDA devices is 1.11; while using other versions if you observe this problem, an unexpected lack of this problem, or other strange behavior, please post in the linked GitHub issue. warnings.warn( [2024-11-26 14:50:53,157] DEEPMD INFO DeePMD version: 3.0.0 [2024-11-26 14:50:53,158] DEEPMD INFO Configuration path: input.json [bohrium-156-1226702:01165] shmem: mmap: an error occurred while determining whether or not /tmp/ompi.bohrium-156-1226702.0/jf.0/4238868480/shared_mem_cuda_pool.bohrium-156-1226702 could be created. [bohrium-156-1226702:01165] create_and_attach: unable to create shared memory BTL coordinating structure :: size 134217728 [2024-11-26 14:50:54,374] DEEPMD INFO _____ _____ __ __ _____ _ _ _ [2024-11-26 14:50:54,375] DEEPMD INFO | __ \ | __ \ | \/ || __ \ | | (_)| | [2024-11-26 14:50:54,375] DEEPMD INFO | | | | ___ ___ | |__) || \ / || | | | ______ | | __ _ | |_ [2024-11-26 14:50:54,375] DEEPMD INFO | | | | / _ \ / _ \| ___/ | |\/| || | | ||______|| |/ /| || __| [2024-11-26 14:50:54,375] DEEPMD INFO | |__| || __/| __/| | | | | || |__| | | < | || |_ [2024-11-26 14:50:54,375] DEEPMD INFO |_____/ \___| \___||_| |_| |_||_____/ |_|\_\|_| \__| [2024-11-26 14:50:54,375] DEEPMD INFO Please read and cite: [2024-11-26 14:50:54,375] DEEPMD INFO Wang, Zhang, Han and E, Comput.Phys.Comm. 228, 178-184 (2018) [2024-11-26 14:50:54,375] DEEPMD INFO Zeng et al, J. Chem. Phys., 159, 054801 (2023) [2024-11-26 14:50:54,375] DEEPMD INFO See https://deepmd.rtfd.io/credits/ for details. [2024-11-26 14:50:54,375] DEEPMD INFO --------------------------------------------------------------------------------------------------------- [2024-11-26 14:50:54,375] DEEPMD INFO installed to: /root/deepmd-kit/lib/python3.12/site-packages/deepmd [2024-11-26 14:50:54,375] DEEPMD INFO source: [2024-11-26 14:50:54,375] DEEPMD INFO source branch: HEAD [2024-11-26 14:50:54,375] DEEPMD INFO source commit: b1be266 [2024-11-26 14:50:54,375] DEEPMD INFO source commit at: 2024-11-23 01:37:55 -0800 [2024-11-26 14:50:54,375] DEEPMD INFO use float prec: double [2024-11-26 14:50:54,375] DEEPMD INFO build variant: cuda [2024-11-26 14:50:54,375] DEEPMD INFO Backend: PyTorch [2024-11-26 14:50:54,375] DEEPMD INFO PT ver: v2.4.1.post302-gUnknown [2024-11-26 14:50:54,375] DEEPMD INFO Enable custom OP: True [2024-11-26 14:50:54,375] DEEPMD INFO build with PT ver: 2.4.1 [2024-11-26 14:50:54,375] DEEPMD INFO build with PT inc: /root/deepmd-kit/lib/python3.12/site-packages/torch/include [2024-11-26 14:50:54,375] DEEPMD INFO /root/deepmd-kit/lib/python3.12/site-packages/torch/include/torch/csrc/api/include [2024-11-26 14:50:54,375] DEEPMD INFO build with PT lib: /root/deepmd-kit/lib/python3.12/site-packages/torch/lib [2024-11-26 14:50:54,375] DEEPMD INFO running on: bohrium-156-1226702 [2024-11-26 14:50:54,375] DEEPMD INFO computing device: cuda:0 [2024-11-26 14:50:54,375] DEEPMD INFO CUDA_VISIBLE_DEVICES: unset [2024-11-26 14:50:54,375] DEEPMD INFO Count of visible GPUs: 1 [2024-11-26 14:50:54,375] DEEPMD INFO num_intra_threads: 0 [2024-11-26 14:50:54,375] DEEPMD INFO num_inter_threads: 0 [2024-11-26 14:50:54,375] DEEPMD INFO --------------------------------------------------------------------------------------------------------- [2024-11-26 14:50:54,439] DEEPMD INFO Calculate neighbor statistics... (add --skip-neighbor-stat to skip this step) [2024-11-26 14:50:58,062] DEEPMD INFO Adjust batch size from 1024 to 2048 [2024-11-26 14:50:58,184] DEEPMD INFO Adjust batch size from 2048 to 4096 [2024-11-26 14:50:58,280] DEEPMD INFO Adjust batch size from 4096 to 8192 [2024-11-26 14:50:58,657] DEEPMD INFO Adjust batch size from 8192 to 16384 [2024-11-26 14:50:58,726] DEEPMD INFO training data with min nbor dist: 0.8854385688525499 [2024-11-26 14:50:58,727] DEEPMD INFO training data with max nbor size: [108] /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/mace/modules/blocks.py:154: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). torch.tensor(atomic_energies, dtype=torch.get_default_dtype()), /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( [2024-11-26 14:51:00,341] DEEPMD INFO Packing data for statistics from 3 systems [2024-11-26 14:51:00,406] DEEPMD INFO RMSE of energy per atom after linear regression is: 0.0034933501089485374 in the unit of energy. [2024-11-26 14:51:01,021] DEEPMD INFO ---Summary of DataSystem: training ----------------------------------------------- [2024-11-26 14:51:01,021] DEEPMD INFO found 3 system(s): [2024-11-26 14:51:01,021] DEEPMD INFO system natoms bch_sz n_bch prob pbc [2024-11-26 14:51:01,021] DEEPMD INFO ../data/data_0/ 192 1 80 2.500e-01 T [2024-11-26 14:51:01,021] DEEPMD INFO ../data/data_1/ 192 1 160 5.000e-01 T [2024-11-26 14:51:01,021] DEEPMD INFO ../data/data_2/ 192 1 80 2.500e-01 T [2024-11-26 14:51:01,021] DEEPMD INFO -------------------------------------------------------------------------------------- [2024-11-26 14:51:01,024] DEEPMD INFO ---Summary of DataSystem: validation ----------------------------------------------- [2024-11-26 14:51:01,025] DEEPMD INFO found 1 system(s): [2024-11-26 14:51:01,025] DEEPMD INFO system natoms bch_sz n_bch prob pbc [2024-11-26 14:51:01,025] DEEPMD INFO ../data/data_3 192 1 80 1.000e+00 T [2024-11-26 14:51:01,025] DEEPMD INFO -------------------------------------------------------------------------------------- [2024-11-26 14:51:01,030] DEEPMD INFO Start to train 2000 steps. [2024-11-26 14:51:07,180] DEEPMD INFO batch 1: trn: rmse = 2.66e+01, rmse_e = 7.67e-03, rmse_f = 8.41e-01, lr = 1.00e-03 [2024-11-26 14:51:07,180] DEEPMD INFO batch 1: val: rmse = 2.49e+01, rmse_e = 4.53e-03, rmse_f = 7.89e-01 [2024-11-26 14:51:07,180] DEEPMD INFO batch 1: total wall time = 6.15 s [2024-11-26 14:51:31,475] DEEPMD INFO batch 100: trn: rmse = 1.85e+01, rmse_e = 3.84e-01, rmse_f = 5.85e-01, lr = 1.00e-03 [2024-11-26 14:51:31,476] DEEPMD INFO batch 100: val: rmse = 1.67e+01, rmse_e = 4.06e-01, rmse_f = 5.28e-01 [2024-11-26 14:51:31,476] DEEPMD INFO batch 100: total wall time = 24.30 s [2024-11-26 14:51:42,337] DEEPMD INFO batch 200: trn: rmse = 7.67e+00, rmse_e = 2.31e-01, rmse_f = 3.02e-01, lr = 5.99e-04 [2024-11-26 14:51:42,337] DEEPMD INFO batch 200: val: rmse = 7.58e+00, rmse_e = 2.24e-01, rmse_f = 2.99e-01 [2024-11-26 14:51:42,338] DEEPMD INFO batch 200: total wall time = 10.86 s [2024-11-26 14:51:53,211] DEEPMD INFO batch 300: trn: rmse = 5.74e+00, rmse_e = 4.10e-02, rmse_f = 3.02e-01, lr = 3.59e-04 [2024-11-26 14:51:53,211] DEEPMD INFO batch 300: val: rmse = 5.34e+00, rmse_e = 3.45e-02, rmse_f = 2.81e-01 [2024-11-26 14:51:53,211] DEEPMD INFO batch 300: total wall time = 10.87 s [2024-11-26 14:52:04,127] DEEPMD INFO batch 400: trn: rmse = 4.03e+00, rmse_e = 1.78e-02, rmse_f = 2.74e-01, lr = 2.15e-04 [2024-11-26 14:52:04,128] DEEPMD INFO batch 400: val: rmse = 4.07e+00, rmse_e = 1.79e-02, rmse_f = 2.77e-01 [2024-11-26 14:52:04,128] DEEPMD INFO batch 400: total wall time = 10.92 s [2024-11-26 14:52:14,987] DEEPMD INFO batch 500: trn: rmse = 3.22e+00, rmse_e = 1.12e-02, rmse_f = 2.83e-01, lr = 1.29e-04 [2024-11-26 14:52:14,988] DEEPMD INFO batch 500: val: rmse = 2.98e+00, rmse_e = 8.02e-03, rmse_f = 2.62e-01 [2024-11-26 14:52:14,988] DEEPMD INFO batch 500: total wall time = 10.86 s [2024-11-26 14:52:25,847] DEEPMD INFO batch 600: trn: rmse = 2.38e+00, rmse_e = 1.24e-03, rmse_f = 2.69e-01, lr = 7.70e-05 [2024-11-26 14:52:25,848] DEEPMD INFO batch 600: val: rmse = 2.47e+00, rmse_e = 6.16e-03, rmse_f = 2.80e-01 [2024-11-26 14:52:25,848] DEEPMD INFO batch 600: total wall time = 10.86 s [2024-11-26 14:52:36,771] DEEPMD INFO batch 700: trn: rmse = 1.77e+00, rmse_e = 6.96e-03, rmse_f = 2.58e-01, lr = 4.61e-05 [2024-11-26 14:52:36,772] DEEPMD INFO batch 700: val: rmse = 1.78e+00, rmse_e = 5.67e-03, rmse_f = 2.59e-01 [2024-11-26 14:52:36,772] DEEPMD INFO batch 700: total wall time = 10.92 s [2024-11-26 14:52:47,628] DEEPMD INFO batch 800: trn: rmse = 1.40e+00, rmse_e = 7.32e-03, rmse_f = 2.62e-01, lr = 2.76e-05 [2024-11-26 14:52:47,629] DEEPMD INFO batch 800: val: rmse = 1.42e+00, rmse_e = 1.95e-03, rmse_f = 2.67e-01 [2024-11-26 14:52:47,629] DEEPMD INFO batch 800: total wall time = 10.86 s [2024-11-26 14:52:58,494] DEEPMD INFO batch 900: trn: rmse = 1.20e+00, rmse_e = 2.30e-03, rmse_f = 2.87e-01, lr = 1.65e-05 [2024-11-26 14:52:58,495] DEEPMD INFO batch 900: val: rmse = 1.06e+00, rmse_e = 6.49e-03, rmse_f = 2.52e-01 [2024-11-26 14:52:58,495] DEEPMD INFO batch 900: total wall time = 10.87 s [2024-11-26 14:53:09,407] DEEPMD INFO batch 1000: trn: rmse = 8.92e-01, rmse_e = 9.33e-03, rmse_f = 2.68e-01, lr = 9.89e-06 [2024-11-26 14:53:09,408] DEEPMD INFO batch 1000: val: rmse = 8.88e-01, rmse_e = 5.43e-03, rmse_f = 2.68e-01 [2024-11-26 14:53:09,408] DEEPMD INFO batch 1000: total wall time = 10.91 s [2024-11-26 14:53:09,428] DEEPMD INFO Saved model to model.ckpt-1000.pt [2024-11-26 14:53:20,323] DEEPMD INFO batch 1100: trn: rmse = 6.84e-01, rmse_e = 3.79e-03, rmse_f = 2.59e-01, lr = 5.92e-06 [2024-11-26 14:53:20,323] DEEPMD INFO batch 1100: val: rmse = 7.15e-01, rmse_e = 5.26e-04, rmse_f = 2.72e-01 [2024-11-26 14:53:20,323] DEEPMD INFO batch 1100: total wall time = 10.92 s [2024-11-26 14:53:31,201] DEEPMD INFO batch 1200: trn: rmse = 5.74e-01, rmse_e = 4.24e-03, rmse_f = 2.68e-01, lr = 3.55e-06 [2024-11-26 14:53:31,201] DEEPMD INFO batch 1200: val: rmse = 5.92e-01, rmse_e = 6.23e-03, rmse_f = 2.74e-01 [2024-11-26 14:53:31,201] DEEPMD INFO batch 1200: total wall time = 10.88 s [2024-11-26 14:53:42,080] DEEPMD INFO batch 1300: trn: rmse = 5.03e-01, rmse_e = 4.98e-03, rmse_f = 2.82e-01, lr = 2.12e-06 [2024-11-26 14:53:42,081] DEEPMD INFO batch 1300: val: rmse = 4.93e-01, rmse_e = 1.93e-03, rmse_f = 2.78e-01 [2024-11-26 14:53:42,081] DEEPMD INFO batch 1300: total wall time = 10.88 s [2024-11-26 14:53:53,013] DEEPMD INFO batch 1400: trn: rmse = 4.24e-01, rmse_e = 1.95e-03, rmse_f = 2.81e-01, lr = 1.27e-06 [2024-11-26 14:53:53,014] DEEPMD INFO batch 1400: val: rmse = 4.27e-01, rmse_e = 4.54e-03, rmse_f = 2.80e-01 [2024-11-26 14:53:53,014] DEEPMD INFO batch 1400: total wall time = 10.93 s [2024-11-26 14:54:03,891] DEEPMD INFO batch 1500: trn: rmse = 3.64e-01, rmse_e = 1.54e-03, rmse_f = 2.74e-01, lr = 7.62e-07 [2024-11-26 14:54:03,891] DEEPMD INFO batch 1500: val: rmse = 3.64e-01, rmse_e = 3.46e-03, rmse_f = 2.71e-01 [2024-11-26 14:54:03,891] DEEPMD INFO batch 1500: total wall time = 10.88 s [2024-11-26 14:54:14,754] DEEPMD INFO batch 1600: trn: rmse = 3.51e-01, rmse_e = 3.90e-04, rmse_f = 2.91e-01, lr = 4.56e-07 [2024-11-26 14:54:14,754] DEEPMD INFO batch 1600: val: rmse = 3.27e-01, rmse_e = 3.94e-03, rmse_f = 2.63e-01 [2024-11-26 14:54:14,754] DEEPMD INFO batch 1600: total wall time = 10.86 s [2024-11-26 14:54:25,667] DEEPMD INFO batch 1700: trn: rmse = 2.88e-01, rmse_e = 2.73e-03, rmse_f = 2.53e-01, lr = 2.73e-07 [2024-11-26 14:54:25,667] DEEPMD INFO batch 1700: val: rmse = 3.08e-01, rmse_e = 3.71e-03, rmse_f = 2.68e-01 [2024-11-26 14:54:25,667] DEEPMD INFO batch 1700: total wall time = 10.91 s [2024-11-26 14:54:36,573] DEEPMD INFO batch 1800: trn: rmse = 2.97e-01, rmse_e = 1.43e-03, rmse_f = 2.75e-01, lr = 1.63e-07 [2024-11-26 14:54:36,573] DEEPMD INFO batch 1800: val: rmse = 3.04e-01, rmse_e = 1.28e-03, rmse_f = 2.81e-01 [2024-11-26 14:54:36,573] DEEPMD INFO batch 1800: total wall time = 10.91 s [2024-11-26 14:54:47,471] DEEPMD INFO batch 1900: trn: rmse = 3.01e-01, rmse_e = 2.08e-03, rmse_f = 2.86e-01, lr = 9.79e-08 [2024-11-26 14:54:47,471] DEEPMD INFO batch 1900: val: rmse = 3.02e-01, rmse_e = 3.24e-03, rmse_f = 2.84e-01 [2024-11-26 14:54:47,471] DEEPMD INFO batch 1900: total wall time = 10.90 s [2024-11-26 14:54:58,354] DEEPMD INFO batch 2000: trn: rmse = 2.86e-01, rmse_e = 2.17e-03, rmse_f = 2.76e-01, lr = 5.86e-08 [2024-11-26 14:54:58,355] DEEPMD INFO batch 2000: val: rmse = 2.78e-01, rmse_e = 1.41e-03, rmse_f = 2.69e-01 [2024-11-26 14:54:58,355] DEEPMD INFO batch 2000: total wall time = 10.88 s [2024-11-26 14:54:58,373] DEEPMD INFO Saved model to model.ckpt-2000.pt [2024-11-26 14:54:58,375] DEEPMD INFO average training time: 0.1034 s/batch [2024-11-26 14:54:58,375] DEEPMD INFO Trained model has been saved to: model.ckpt
代码
文本
[48]
%%bash
source /root/deepmd-kit/bin/activate /root/deepmd-kit
# fix matplotlib issue
export MPLBACKEND=svg
DP_GNN_USE_MAPPING=1 dp --pt freeze
To get the best performance, it is recommended to adjust the number of threads by setting the environment variables OMP_NUM_THREADS, DP_INTRA_OP_PARALLELISM_THREADS, and DP_INTER_OP_PARALLELISM_THREADS. See https://deepmd.rtfd.io/parallelism/ for more information. /root/deepmd-kit/lib/python3.12/site-packages/e3nn/o3/_wigner.py:10: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. _Jd, _W3j_flat, _W3j_indices = torch.load(os.path.join(os.path.dirname(__file__), 'constants.pt')) /root/deepmd-kit/lib/python3.12/site-packages/nequip/__init__.py:20: UserWarning: !! PyTorch version 2.4.1.post302 found. Upstream issues in PyTorch versions 1.13.* and 2.* have been seen to cause unusual performance degredations on some CUDA systems that become worse over time; see https://github.com/mir-group/nequip/discussions/311. The best tested PyTorch version to use with CUDA devices is 1.11; while using other versions if you observe this problem, an unexpected lack of this problem, or other strange behavior, please post in the linked GitHub issue. warnings.warn( [2024-11-26 14:55:06,721] DEEPMD INFO DeePMD version: 3.0.0 /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/mace/modules/blocks.py:154: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). torch.tensor(atomic_energies, dtype=torch.get_default_dtype()), /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( /root/deepmd-kit/lib/python3.12/site-packages/torch/jit/_check.py:178: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`. warnings.warn( [2024-11-26 14:55:10,232] DEEPMD INFO Saved frozen model to frozen_model.pth
代码
文本
[49]
%%bash
source /root/deepmd-kit/bin/activate /root/deepmd-kit
# fix matplotlib issue
export MPLBACKEND=svg
dp test -m frozen_model.pth -s ../data
[2024-11-26 14:55:14,548] DEEPMD WARNING To get the best performance, it is recommended to adjust the number of threads by setting the environment variables OMP_NUM_THREADS, DP_INTRA_OP_PARALLELISM_THREADS, and DP_INTER_OP_PARALLELISM_THREADS. See https://deepmd.rtfd.io/parallelism/ for more information. /root/deepmd-kit/lib/python3.12/site-packages/e3nn/o3/_wigner.py:10: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. _Jd, _W3j_flat, _W3j_indices = torch.load(os.path.join(os.path.dirname(__file__), 'constants.pt')) /root/deepmd-kit/lib/python3.12/site-packages/nequip/__init__.py:20: UserWarning: !! PyTorch version 2.4.1.post302 found. Upstream issues in PyTorch versions 1.13.* and 2.* have been seen to cause unusual performance degredations on some CUDA systems that become worse over time; see https://github.com/mir-group/nequip/discussions/311. The best tested PyTorch version to use with CUDA devices is 1.11; while using other versions if you observe this problem, an unexpected lack of this problem, or other strange behavior, please post in the linked GitHub issue. warnings.warn( [2024-11-26 14:55:19,663] DEEPMD INFO # ---------------output of dp test--------------- [2024-11-26 14:55:19,664] DEEPMD INFO # testing system : ../data/data_0 [2024-11-26 14:55:22,360] DEEPMD INFO Adjust batch size from 1024 to 2048 [2024-11-26 14:55:23,712] DEEPMD INFO Adjust batch size from 2048 to 4096 [2024-11-26 14:55:25,173] DEEPMD INFO Adjust batch size from 4096 to 2048 [2024-11-26 14:55:34,284] DEEPMD INFO # number of test data : 80 [2024-11-26 14:55:34,284] DEEPMD INFO Energy MAE : 5.991981e-01 eV [2024-11-26 14:55:34,284] DEEPMD INFO Energy RMSE : 7.495066e-01 eV [2024-11-26 14:55:34,284] DEEPMD INFO Energy MAE/Natoms : 3.120823e-03 eV [2024-11-26 14:55:34,284] DEEPMD INFO Energy RMSE/Natoms : 3.903680e-03 eV [2024-11-26 14:55:34,284] DEEPMD INFO Force MAE : 2.138180e-01 eV/A [2024-11-26 14:55:34,284] DEEPMD INFO Force RMSE : 2.741595e-01 eV/A [2024-11-26 14:55:34,284] DEEPMD INFO Virial MAE : 5.309256e+01 eV [2024-11-26 14:55:34,284] DEEPMD INFO Virial RMSE : 8.842711e+01 eV [2024-11-26 14:55:34,284] DEEPMD INFO Virial MAE/Natoms : 2.765238e-01 eV [2024-11-26 14:55:34,284] DEEPMD INFO Virial RMSE/Natoms : 4.605579e-01 eV [2024-11-26 14:55:34,284] DEEPMD INFO # ----------------------------------------------- [2024-11-26 14:55:34,284] DEEPMD INFO # ---------------output of dp test--------------- [2024-11-26 14:55:34,284] DEEPMD INFO # testing system : ../data/data_3 [2024-11-26 14:55:38,736] DEEPMD INFO # number of test data : 80 [2024-11-26 14:55:38,737] DEEPMD INFO Energy MAE : 6.394387e-01 eV [2024-11-26 14:55:38,737] DEEPMD INFO Energy RMSE : 8.184914e-01 eV [2024-11-26 14:55:38,737] DEEPMD INFO Energy MAE/Natoms : 3.330410e-03 eV [2024-11-26 14:55:38,737] DEEPMD INFO Energy RMSE/Natoms : 4.262976e-03 eV [2024-11-26 14:55:38,737] DEEPMD INFO Force MAE : 2.132759e-01 eV/A [2024-11-26 14:55:38,737] DEEPMD INFO Force RMSE : 2.741950e-01 eV/A [2024-11-26 14:55:38,737] DEEPMD INFO Virial MAE : 5.326480e+01 eV [2024-11-26 14:55:38,737] DEEPMD INFO Virial RMSE : 8.885984e+01 eV [2024-11-26 14:55:38,737] DEEPMD INFO Virial MAE/Natoms : 2.774209e-01 eV [2024-11-26 14:55:38,737] DEEPMD INFO Virial RMSE/Natoms : 4.628117e-01 eV [2024-11-26 14:55:38,737] DEEPMD INFO # ----------------------------------------------- [2024-11-26 14:55:38,737] DEEPMD INFO # ---------------output of dp test--------------- [2024-11-26 14:55:38,737] DEEPMD INFO # testing system : ../data/data_2 [2024-11-26 14:55:43,197] DEEPMD INFO # number of test data : 80 [2024-11-26 14:55:43,197] DEEPMD INFO Energy MAE : 5.846051e-01 eV [2024-11-26 14:55:43,197] DEEPMD INFO Energy RMSE : 7.266745e-01 eV [2024-11-26 14:55:43,197] DEEPMD INFO Energy MAE/Natoms : 3.044818e-03 eV [2024-11-26 14:55:43,197] DEEPMD INFO Energy RMSE/Natoms : 3.784763e-03 eV [2024-11-26 14:55:43,197] DEEPMD INFO Force MAE : 2.146874e-01 eV/A [2024-11-26 14:55:43,197] DEEPMD INFO Force RMSE : 2.753202e-01 eV/A [2024-11-26 14:55:43,197] DEEPMD INFO Virial MAE : 5.306633e+01 eV [2024-11-26 14:55:43,197] DEEPMD INFO Virial RMSE : 8.846988e+01 eV [2024-11-26 14:55:43,198] DEEPMD INFO Virial MAE/Natoms : 2.763871e-01 eV [2024-11-26 14:55:43,198] DEEPMD INFO Virial RMSE/Natoms : 4.607806e-01 eV [2024-11-26 14:55:43,198] DEEPMD INFO # ----------------------------------------------- [2024-11-26 14:55:43,198] DEEPMD INFO # ---------------output of dp test--------------- [2024-11-26 14:55:43,198] DEEPMD INFO # testing system : ../data/data_1 [2024-11-26 14:55:52,100] DEEPMD INFO # number of test data : 160 [2024-11-26 14:55:52,100] DEEPMD INFO Energy MAE : 6.981322e-01 eV [2024-11-26 14:55:52,100] DEEPMD INFO Energy RMSE : 8.735210e-01 eV [2024-11-26 14:55:52,100] DEEPMD INFO Energy MAE/Natoms : 3.636105e-03 eV [2024-11-26 14:55:52,100] DEEPMD INFO Energy RMSE/Natoms : 4.549589e-03 eV [2024-11-26 14:55:52,100] DEEPMD INFO Force MAE : 2.125663e-01 eV/A [2024-11-26 14:55:52,100] DEEPMD INFO Force RMSE : 2.730179e-01 eV/A [2024-11-26 14:55:52,100] DEEPMD INFO Virial MAE : 5.321527e+01 eV [2024-11-26 14:55:52,100] DEEPMD INFO Virial RMSE : 8.857804e+01 eV [2024-11-26 14:55:52,100] DEEPMD INFO Virial MAE/Natoms : 2.771629e-01 eV [2024-11-26 14:55:52,100] DEEPMD INFO Virial RMSE/Natoms : 4.613439e-01 eV [2024-11-26 14:55:52,100] DEEPMD INFO # ----------------------------------------------- [2024-11-26 14:55:52,101] DEEPMD INFO # ----------weighted average of errors----------- [2024-11-26 14:55:52,101] DEEPMD INFO # number of systems : 4 [2024-11-26 14:55:52,101] DEEPMD INFO Energy MAE : 6.439013e-01 eV [2024-11-26 14:55:52,101] DEEPMD INFO Energy RMSE : 8.106568e-01 eV [2024-11-26 14:55:52,101] DEEPMD INFO Energy MAE/Natoms : 3.353652e-03 eV [2024-11-26 14:55:52,101] DEEPMD INFO Energy RMSE/Natoms : 4.222171e-03 eV [2024-11-26 14:55:52,101] DEEPMD INFO Force MAE : 2.133828e-01 eV/A [2024-11-26 14:55:52,101] DEEPMD INFO Force RMSE : 2.739435e-01 eV/A [2024-11-26 14:55:52,101] DEEPMD INFO Virial MAE : 5.317085e+01 eV [2024-11-26 14:55:52,101] DEEPMD INFO Virial RMSE : 8.858271e+01 eV [2024-11-26 14:55:52,101] DEEPMD INFO Virial MAE/Natoms : 2.769315e-01 eV [2024-11-26 14:55:52,101] DEEPMD INFO Virial RMSE/Natoms : 4.613683e-01 eV [2024-11-26 14:55:52,101] DEEPMD INFO # -----------------------------------------------
代码
文本
LAMMPS
代码
文本
[50]
%cd /
/ /opt/mamba/lib/python3.10/site-packages/IPython/core/magics/osm.py:417: UserWarning: using dhist requires you to install the `pickleshare` library. self.shell.db['dhist'] = compress_dhist(dhist)[-100:]
代码
文本
[35]
!git clone https://github.com/deepmodeling/deepmd-kit
Cloning into 'deepmd-kit'... remote: Enumerating objects: 36554, done. remote: Counting objects: 100% (1538/1538), done. remote: Compressing objects: 100% (1027/1027), done. remote: Total 36554 (delta 828), reused 948 (delta 505), pack-reused 35016 (from 1) Receiving objects: 100% (36554/36554), 63.97 MiB | 4.60 MiB/s, done. Resolving deltas: 100% (27124/27124), done.
代码
文本
[51]
%cd deepmd-kit/examples/water/lmp
/deepmd-kit/examples/water/lmp
代码
文本
[52]
!cp /deepmd-gnn/examples/water/mace/frozen_model.pth .
代码
文本
[62]
%%bash
source /root/deepmd-kit/bin/activate /root/deepmd-kit
cat<<EOF > mace.in
units metal
boundary p p p
atom_style atomic
atom_modify map yes
neighbor 0.0 bin
neigh_modify every 50 delay 0 check no
read_data water.lmp
mass 1 16
mass 2 2
replicate 4 4 4
pair_style deepmd frozen_model.pth
pair_coeff * *
velocity all create 330.0 23456789
timestep 0.0005
thermo_style custom step pe ke etotal temp press vol
thermo 20
run 100
run 500
EOF
DP_PLUGIN_PATH=$CONDA_PREFIX/lib/python3.12/site-packages/deepmd_gnn/lib/libdeepmd_gnn.so lmp -in mace.in
[bohrium-156-1226702:01512] shmem: mmap: an error occurred while determining whether or not /tmp/ompi.bohrium-156-1226702.0/jf.0/2389704704/shared_mem_cuda_pool.bohrium-156-1226702 could be created. [bohrium-156-1226702:01512] create_and_attach: unable to create shared memory BTL coordinating structure :: size 134217728 LAMMPS (29 Aug 2024) OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task DeePMD-kit: Successfully load libcudart.so.12 2024-11-26 15:01:16.941735: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-11-26 15:01:16.961344: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-11-26 15:01:16.967427: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered DeePMD-kit WARNING: Environmental variable DP_INTRA_OP_PARALLELISM_THREADS is not set. Tune DP_INTRA_OP_PARALLELISM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information. DeePMD-kit WARNING: Environmental variable DP_INTER_OP_PARALLELISM_THREADS is not set. Tune DP_INTER_OP_PARALLELISM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information. DeePMD-kit WARNING: Environmental variable OMP_NUM_THREADS is not set. Tune OMP_NUM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information. Loaded 1 plugins from /root/deepmd-kit/lib/deepmd_lmp Reading data file ... triclinic box = (0 0 0) to (12.4447 12.4447 12.4447) with tilt (0 0 0) 1 by 1 by 1 MPI processor grid reading atoms ... 192 atoms read_data CPU = 0.001 seconds Replication is creating a 4x4x4 = 64 times larger system... triclinic box = (0 0 0) to (49.7788 49.7788 49.7788) with tilt (0 0 0) 1 by 1 by 1 MPI processor grid 12288 atoms replicate CPU = 0.001 seconds Summary of lammps deepmd module ... >>> Info of deepmd-kit: installed to: /root/deepmd-kit source: source branch: HEAD source commit: b1be266 source commit at: 2024-11-23 01:37:55 -0800 support model ver.: 1.1 build variant: cuda build with tf inc: /root/deepmd-kit/lib/python3.12/site-packages/tensorflow/include;/root/deepmd-kit/include build with tf lib: /root/deepmd-kit/lib/python3.12/site-packages/tensorflow/libtensorflow_cc.so.2 build with pt lib: torch;torch_library;/root/deepmd-kit/lib/python3.12/site-packages/torch/lib/libc10.so;/home/conda/feedstock_root/build_artifacts/deepmd-kit_1732355244818/_build_env/targets/x86_64-linux/lib/stubs/libcuda.so;/root/deepmd-kit/lib/libnvrtc.so;/root/deepmd-kit/lib/libnvToolsExt.so;/root/deepmd-kit/lib/libcudart.so;/root/deepmd-kit/lib/python3.12/site-packages/torch/lib/libc10_cuda.so set tf intra_op_parallelism_threads: 0 set tf inter_op_parallelism_threads: 0 >>> Info of lammps module: Loading customized plugin defined in DP_PLUGIN_PATH: /root/deepmd-kit/lib/python3.12/site-packages/deepmd_gnn/lib/libdeepmd_gnn.so use deepmd-kit at: /root/deepmd-kitload model from: frozen_model.pth to gpu 0 DeePMD-kit WARNING: Environmental variable DP_INTRA_OP_PARALLELISM_THREADS is not set. Tune DP_INTRA_OP_PARALLELISM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information. DeePMD-kit WARNING: Environmental variable DP_INTER_OP_PARALLELISM_THREADS is not set. Tune DP_INTER_OP_PARALLELISM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information. DeePMD-kit WARNING: Environmental variable OMP_NUM_THREADS is not set. Tune OMP_NUM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information. >>> Info of model(s): using 1 model(s): frozen_model.pth rcut in model: 6 ntypes in model: 2 CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Your simulation uses code contributions which should be cited: - Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 - USER-DEEPMD package: The log file lists these citations in BibTeX format. CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule Neighbor list info ... update: every = 50 steps, delay = 0 steps, check = no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 6 ghost atom cutoff = 6 binsize = 3, bins = 17 17 17 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair deepmd, perpetual attributes: full, newton on pair build: full/bin/atomonly stencil: full/bin/3d bin: standard Setting up Verlet run ... Unit style : metal Current step : 0 Time step : 0.0005 Per MPI rank memory allocation (min/avg/max) = 9.202 | 9.202 | 9.202 Mbytes Step PotEng KinEng TotEng Temp Press Volume 0 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 20 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 40 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 60 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 80 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 100 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 Loop time of 57.522 on 1 procs for 100 steps with 12288 atoms Performance: 0.075 ns/day, 319.567 hours/ns, 1.738 timesteps/s, 21.362 katom-step/s 60.3% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 57.433 | 57.433 | 57.433 | 0.0 | 99.84 Neigh | 0.065962 | 0.065962 | 0.065962 | 0.0 | 0.11 Comm | 0.016848 | 0.016848 | 0.016848 | 0.0 | 0.03 Output | 0.00051596 | 0.00051596 | 0.00051596 | 0.0 | 0.00 Modify | 0.00013413 | 0.00013413 | 0.00013413 | 0.0 | 0.00 Other | | 0.005854 | | | 0.01 Nlocal: 12288 ave 12288 max 12288 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 11142 ave 11142 max 11142 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 1.08749e+06 ave 1.08749e+06 max 1.08749e+06 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 1087488 Ave neighs/atom = 88.5 Neighbor list builds = 2 Dangerous builds not checked WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule Setting up Verlet run ... Unit style : metal Current step : 100 Time step : 0.0005 Per MPI rank memory allocation (min/avg/max) = 9.202 | 9.202 | 9.202 Mbytes Step PotEng KinEng TotEng Temp Press Volume 100 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 120 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 140 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 160 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 180 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 200 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 220 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 240 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 260 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 280 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 300 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 320 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 340 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 360 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 380 -1916392.1 524.1124 -1915868 330 133139.89 123348.33 400 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 420 -1916392.1 524.1124 -1915868 330 133139.89 123348.33 440 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 460 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 480 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 500 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 520 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 540 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 560 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 580 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 600 -1916392.1 524.1124 -1915868 330 133139.9 123348.33 Loop time of 271.127 on 1 procs for 500 steps with 12288 atoms Performance: 0.080 ns/day, 301.252 hours/ns, 1.844 timesteps/s, 22.661 katom-step/s 57.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 270.68 | 270.68 | 270.68 | 0.0 | 99.84 Neigh | 0.33132 | 0.33132 | 0.33132 | 0.0 | 0.12 Comm | 0.083801 | 0.083801 | 0.083801 | 0.0 | 0.03 Output | 0.0025498 | 0.0025498 | 0.0025498 | 0.0 | 0.00 Modify | 0.00068837 | 0.00068837 | 0.00068837 | 0.0 | 0.00 Other | | 0.02849 | | | 0.01 Nlocal: 12288 ave 12288 max 12288 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 11142 ave 11142 max 11142 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 1.08749e+06 ave 1.08749e+06 max 1.08749e+06 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 1087488 Ave neighs/atom = 88.5 Neighbor list builds = 10 Dangerous builds not checked Total wall time: 0:05:37
代码
文本
点个赞吧