{"id":7024,"date":"2026-05-14T11:08:51","date_gmt":"2026-05-14T02:08:51","guid":{"rendered":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/?page_id=7024"},"modified":"2026-05-14T17:23:11","modified_gmt":"2026-05-14T08:23:11","slug":"gromacs-2026-2-torchani-2-2-4-torch-2-7-0cu128-nnpops-0-6","status":"publish","type":"page","link":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/gromacs-2026-2-torchani-2-2-4-torch-2-7-0cu128-nnpops-0-6\/","title":{"rendered":"Gromacs 2026.2 + TorchANI 2.2.4 + Torch 2.7.0+cu128 + NNPops 0.6"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Creating python environment and installing libraries<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Source: <a href=\"https:\/\/github.com\/lmuellender\/gmx-nnpot-tools\">https:\/\/github.com\/lmuellender\/gmx-nnpot-tools<\/a>, <a href=\"https:\/\/doi.org\/10.48550\/arXiv.2604.21441\">https:\/\/doi.org\/10.48550\/arXiv.2604.21441<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">OS, AlmaLinux 8; GPU, NVIDIA TITAN-RTX.<\/p>\n\n\n\n<pre class=\"prettyprint\">git clone https:&#47;&#47;github.com&#47;lmuellender&#47;gmx-nnpot-tools.git\ncd gmx-nnpot-tools\nconda env create -f environment.yaml \nconda activate nnpot\n# To use NVIDIA TITAN-RTX\npip install torch==2.7 --upgrade --index-url https:&#47;&#47;download.pytorch.org&#47;whl&#47;cu128\nconda install conda-forge::jupyterlab\ncd ..\ngit clone https:&#47;&#47;github.com&#47;chemle&#47;emle-engine.git\ncd emle-engine\nconda install conda-forge::ambertools \\\n              conda-forge::ase \\\n              conda-forge::loguru \\\n              conda-forge::psutil \\\n              conda-forge::pygit2 \\\n              conda-forge::pyyaml \\\n              conda-forge::xtb-python \\\n              --no-update-deps\n\npip install deepmd-kit --no-deps\npip install -e .\n\ncd ..&#47;gmx-nnpot-tools\nsed -i &#39;s&#47;self\\.model(atomic_numbers, charges_mm, positions_nn, positions_mm, qm_charge)&#47;self.model(atomic_numbers, charges_mm, positions_nn, positions_mm, None, qm_charge)&#47;&#39; \\\n    &#47;home&#47;user&#47;data&#47;gromacs&#47;NNPOT&#47;gmx-nnpot-tools&#47;models&#47;gmx_emle.py\njupyter-lab --no-browser --ip=xxx.xx.xxx.xx\n# Open export.ipynb, conduct the script, and we got ani2x.pt, ani2x_nnpops.pt, mace.pt, emle_ani2x_ala2.pt, and emle_mace_ala2.pt in the &#34;models&#34; directory.\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Gromacs 2026.2\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<pre class=\"prettyprint\">\nconda activate nnpot\nwget https:&#47;&#47;ftp.gromacs.org&#47;gromacs&#47;gromacs-2026.2.tar.gz\nwget https:&#47;&#47;www.fftw.org&#47;fftw-3.3.10.tar.gz\ntar xvzf gromacs-2026.2.tar.gz\ncd gromacs-2026.2\nmkdir build_nnpot && cd build_nnpot\nexport FFTW_PATH=${BASEDIR}&#47;fftw-3.3.10.tar.gz\nconda install cmake\nexport Torch_DIR=$(python -c &#34;import torch; print(torch.utils.cmake_prefix_path)&#34;)&#47;Torch\ncmake .. -DCMAKE_PREFIX_PATH=&#34;${Torch_DIR};${CONDA_PREFIX}&#34;\\\n -DCMAKE_INSTALL_PREFIX=&#47;usr&#47;local&#47;gromacs&#47;2026.2_cuda_torch27 -DGMX_GPU=CUDA -DGMX_USE_CUFFTMP=OFF\\\n -DGMX_NNPOT=TORCH -DCAFFE2_USE_CUDNN=ON -DCAFFE2_USE_CUSPARSELT=ON -DUSE_CUDSS=ON\\\n -DPython_EXECUTABLE=&#47;home&#47;user&#47;miniforge3&#47;envs&#47;nnpot&#47;bin&#47;python -DGMX_BUILD_OWN_FFTW=ON\\\n -DGMX_BUILD_OWN_FFTW_URL=${FFTW_PATH} -DCMAKE_CUDA_COMPILER=&#47;usr&#47;local&#47;cuda-12.9&#47;bin&#47;nvcc\\\n -DCMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES=&#47;usr&#47;local&#47;cuda-12.9&#47;targets&#47;x86_64-linux&#47;lib\\\n -DCUDA_TOOLKIT_ROOT_DIR=&#47;usr&#47;local&#47;cuda-12.9 -DGMX_INSTALL_NBLIB_API=OFF\\\n -DCUDA_NVRTC_SHORTHASH=c3430e8b -DREGRESSIONTEST_DOWNLOAD=ON\\\n -Dnvtx3_dir=&#47;usr&#47;local&#47;cuda-12.9&#47;targets&#47;x86_64-linux&#47;include&#47;nvtx3 -DGMX_USE_TNG=OFF\nmake -j 37\nmake check -j 37\n# 100% tests passed, 0 tests failed out of 98\nsudo make install\nsource &#47;usr&#47;local&#47;gromacs&#47;2026.2_cuda_torch27&#47;bin&#47;GMXRC\ngmx --version\n\n                         :-) GROMACS - gmx, 2026.2 (-:\n\nExecutable:   &#47;usr&#47;local&#47;gromacs&#47;2026.2_cuda_torchcu129&#47;bin&#47;gmx\nData prefix:  &#47;usr&#47;local&#47;gromacs&#47;2026.2_cuda_torchcu129\nCommand line:\n  gmx --version\n\nGROMACS version:     2026.2\nPrecision:           mixed\nMemory model:        64 bit\nMPI library:         thread_mpi\nMPI version:         built in\nOpenMP support:      enabled (GMX_OPENMP_MAX_THREADS = 128)\nGPU support:         CUDA\nNBNxM GPU setup:     super-cluster 2x2x2 &#47; cluster 8 (cluster-pair splitting on)\nSIMD instructions:   AVX_512\nCPU FFT library:     fftw-3.3.10-sse2-avx-avx2-avx2_128-avx512\nGPU FFT library:     cuFFT\nMulti-GPU FFT:       none\nRDTSCP:              enabled\nTNG support:         enabled\nHwloc support:       disabled\nTracing support:     disabled\nColvars support:     enabled (version 2025-10-13)\nCP2K support:        disabled\nTorch support:       enabled (version 2.7.0)\nPlumed support:      enabled\nC compiler:          &#47;home&#47;user&#47;miniforge3&#47;envs&#47;nnpot&#47;bin&#47;x86_64-conda-linux-gnu-cc GNU 14.3.0\nC compiler flags:    -fexcess-precision=fast -funroll-all-loops -march=skylake-avx512 -Wno-missing-field-initializers -D_GLIBCXX_USE_CXX11_ABI=1 -O3 -DNDEBUG\nC++ compiler:        &#47;home&#47;user&#47;miniforge3&#47;envs&#47;nnpot&#47;bin&#47;x86_64-conda-linux-gnu-c++ GNU 14.3.0\nC++ compiler flags:  -fexcess-precision=fast -funroll-all-loops -march=skylake-avx512 -Wno-missing-field-initializers -D_GLIBCXX_USE_CXX11_ABI=1 -Wno-stringop-truncation -Wno-cast-function-type-strict SHELL:-fopenmp -O3 -DNDEBUG\nBLAS library:        External - detected on the system\nLAPACK library:      External - detected on the system\nCUDA compiler:       &#47;usr&#47;local&#47;cuda-12.9&#47;bin&#47;nvcc (NVIDIA 12.9.86)\nCUDA compiler flags:  -D_FORCE_INLINES -DONNX_NAMESPACE=onnx_c2 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_100,code=sm_100 -gencode arch=compute_120,code=sm_120 -gencode arch=compute_50,code=compute_50 -gencode arch=compute_120,code=compute_120 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda -O3 -DNDEBUG -use_fast_math -static-global-template-stub=false -Xptxas=-warn-double-usage -Xptxas=-Werror -diag-suppress=177 -O3 -DNDEBUG\nCUDA targets:        50;52-real;60-real;61-real;70-real;75-real;80-real;86-real;89-real;90-real;100-real;120\nCUDA driver:         13.0\nCUDA runtime:        12.90\nNVSHMEM:             disabled<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Test (<em>N<\/em>-acetyl-L-alanine methylamide in water\uff09<br><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Source: <a href=\"https:\/\/github.com\/lmuellender\/gmx-nnpot-tools\">https:\/\/github.com\/lmuellender\/gmx-nnpot-tools<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Using ani2x.pt with CUDA (passed)<\/h3>\n\n\n\n<pre class=\"prettyprint\">$ cd gmx-nnpot-tools&#47;example\n$ cp md.mdp nvt_nnpot.mdp\n$ export GMX_NN_DEVICE=gpu\n$ LD_PRELOAD=$CONDA_PREFIX&#47;lib&#47;python3.13&#47;site-packages&#47;torchani&#47;cuaev.cpython-313-x86_64-linux-gnu.so gmx grompp -f nvt_nnpot.mdp -c conf.gro -p topol.top -o nvt_nnpot\nNeural network potential interface is active, topology was modified!\nNumber of embedded NNP atoms: 22\nNumber of regular atoms: 6765\nNumber of exclusions made: 22\nNumber of bonds removed: 62\nNumber of InteractionFunction::ConnectBonds (type 5 bonds) added: 21\nNumber of angles removed: 36\nNumber of dihedrals removed: 42\n$ gmx mdrun -v -deffnm npt_nnpot -ntmpi 1 -ntomp 1\nstep 10000, remaining wall clock time:     0 s          \n               Core t (s)   Wall t (s)        (%)\n       Time:      228.351      228.351      100.0\n                 (ns&#47;day)    (hour&#47;ns)    (ms&#47;step)  (Matom*steps&#47;s) \nPerformance:        3.784        6.342       22.833            0.297 \n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Using ani2x_nnpops.pt  (passed)<\/h3>\n\n\n\n<pre class=\"prettyprint\">$ sed &#39;s&#47;ani2x.pt&#47;ani2x_nnpops.pt&#47;g&#39; npt_nnpot.mdp &gt; npt_nnpops.mdp\n$ gmx grompp -f npt_nnpops.mdp -c conf.gro -p topol.top -o npt_nnpops -maxwarn 1\nWARNING 1 &#91;file npt_nnpops.mdp&#93;:\n  There was an error while checking NN model with a dummy input: Error\n  during evaluation of the neural network model: The following operation\n  failed in the TorchScript interpreter.\n$ gmx mdrun -v -deffnm npt_nnpops -ntmpi 1 -ntomp 1\nstep 10000, remaining wall clock time:     0 s          \n               Core t (s)   Wall t (s)        (%)\n       Time:       15.254       15.254      100.0\n                 (ns&#47;day)    (hour&#47;ns)    (ms&#47;step)  (Matom*steps&#47;s) \nPerformance:       56.646        0.424        1.525            4.450 \n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Using mace.pt  (passed)<\/h3>\n\n\n\n<pre class=\"prettyprint\">$ sed &#39;s&#47;ani2x.pt&#47;mace.pt&#47;g&#39; npt_nnpot.mdp &gt; npt_mace.mdp\n# Edit npt_mace.mdp\nnnpot-active\t\t= yes\nnnpot-modelfile \t= ..&#47;models&#47;mace.pt\nnnpot-input-group\t= protein\nnnpot-pair-cutoff   = 0.45\nnnpot-model-input1  = atom-positions\nnnpot-model-input2  = atom-numbers\nnnpot-model-input3 \t= atom-pairs\nnnpot-model-input4\t= pair-shifts\nnnpot-model-input5 \t= box\nnnpot-model-input6\t= pbc\n$ gmx grompp -f npt_mace.mdp -c conf.gro -p topol.top -o npt_mace\n$ gmx mdrun -v -deffnm npt_mace -ntmpi 1 -ntomp 1\nstep 10000, remaining wall clock time:     0 s          \n               Core t (s)   Wall t (s)        (%)\n       Time:      115.923      115.923      100.0\n                 (ns&#47;day)    (hour&#47;ns)    (ms&#47;step)  (Matom*steps&#47;s) \nPerformance:        7.454        3.220       11.591            0.586 <\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Using emle_ani2x_ala2.pt  (failed)<\/h3>\n\n\n\n<pre class=\"prettyprint\">$ cp npt_nnpot.mdp npt_emle_ani2x.mdp\n# Edit npt_emle_ani2x.mdp\nnnpot-modelfile         = ..&#47;models&#47;emle_ani2x_ala2.pt\nnnpot-embedding = electrostatic-model\n$ LD_PRELOAD=$CONDA_PREFIX&#47;lib&#47;python3.13&#47;site-packages&#47;NNPOps&#47;libNNPOpsPyTorch.so gmx grompp -f npt_emle_ani2x.mdp -c conf.gro -p topol.top -o npt_emle_ani2x -maxwarn 2\nWARNING 1 &#91;file npt_emle_ani2x.mdp&#93;:\n  There was an error while checking NN model with a dummy input: Error\n  during evaluation of the neural network model: The following operation\n  failed in the TorchScript interpreter.\n\nWARNING 2 &#91;file npt_emle_ani2x.mdp&#93;:\n  Embedding scheme is set to Electrostatic model, but MM positions and&#47;or\n  charges are not requested as model input. Is this intended?\n\n$ LD_PRELOAD=$CONDA_PREFIX&#47;lib&#47;python3.13&#47;site-packages&#47;NNPOps&#47;libNNPOpsPyTorch.so gmx mdrun -v -deffnm npt_emle_ani2x -ntmpi 1 -ntomp 1\n\nInternal error in destructor of UpdateConstrainGpu: Freeing of the device buffer failed. CUDA error #1 (cudaErrorInvalidValue): invalid argument.\nInternal error in destructor of LeapFrogGpu: Freeing of the device buffer failed. CUDA error #1 (cudaErrorInvalidValue): invalid argument.\n\nWARNING: Could not free page-locked memory. An unhandled error from a previous CUDA operation was detected. CUDA error #1 (cudaErrorInvalidValue): invalid argument. <\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Using emle_mace_ala2.pt  (failed)<\/h3>\n\n\n\n<pre class=\"prettyprint\">$ cp npt_mace.mdp npt_emle_mace.mdp\n# Edit npt_emle_ani2x.mdp\nnnpot-modelfile         = ..&#47;models&#47;emle_mace_ala2.pt\nnnpot-embedding = electrostatic-model\n\n$ LD_PRELOAD=$CONDA_PREFIX&#47;lib&#47;python3.13&#47;site-packages&#47;NNPOps&#47;libNNPOpsPyTorch.so  gmx grompp -f npt_emle_mace.mdp -c conf.gro -p topol.top -o npt_emle_mace -maxwarn 2\nWARNING 1 &#91;file npt_emle_mace.mdp&#93;:\n  There was an error while checking NN model with a dummy input: Expected\n  at most 6 argument(s) for operator &#39;forward&#39;, but received 7 argument(s).\n\nWARNING 2 &#91;file npt_emle_mace.mdp&#93;:\n  Embedding scheme is set to Electrostatic model, but MM positions and&#47;or\n  charges are not requested as model input. Is this intended?\n\n$ LD_PRELOAD=$CONDA_PREFIX&#47;lib&#47;python3.13&#47;site-packages&#47;NNPOps&#47;libNNPOpsPyTorch.so gmx mdrun -v -deffnm npt_emle_mace -ntmpi 1 -ntomp 1\n\nInternal error in destructor of UpdateConstrainGpu: Freeing of the device buffer failed. CUDA error #1 (cudaErrorInvalidValue): invalid argument.\nInternal error in destructor of LeapFrogGpu: Freeing of the device buffer failed. CUDA error #1 (cudaErrorInvalidValue): invalid argument.\n\nWARNING: Could not free page-locked memory. An unhandled error from a previous CUDA operation was detected. CUDA error #1 (cudaErrorInvalidValue): invalid argument.\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Creating python environment an &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"_uag_custom_page_level_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_locale":"ja","_original_post":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/?page_id=7024","footnotes":""},"class_list":["post-7024","page","type-page","status-publish","hentry","ja"],"aioseo_notices":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"onepress-blog-small":false,"onepress-small":false,"onepress-medium":false},"uagb_author_info":{"display_name":"RCY","author_link":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/author\/charlesy\/"},"uagb_comment_info":0,"uagb_excerpt":"Creating python environment an ...","_links":{"self":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/pages\/7024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/comments?post=7024"}],"version-history":[{"count":13,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/pages\/7024\/revisions"}],"predecessor-version":[{"id":7044,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/pages\/7024\/revisions\/7044"}],"wp:attachment":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/media?parent=7024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}