SPONGE-2.0的安装与使用 安装与使用关于新版的SPONGE如果是Windows的机器建议可以使用Windows操作系统的就不要再套一层WSL会有一定的性能损失这里直接在Windows环境下做编译构建。安装pixi首先是需要安装一个pixi直接用powershell执行下述指令即可iwr -useb https://pixi.sh/install.ps1 | iexThis script will automatically download and install Pixi (latest) for you.Getting it from this url: https://github.com/prefix-dev/pixi/releases/latest/download/pixi-x86_64-pc-windows-msvc.zipThe binary will be installed into ‘C:\Users\dechi.pixi\bin’Adding C:\Users\dechi.pixi\bin to PATHYou may need to restart your shell安装完成后要重启powershell生效。重启后可以看一下pixi的版本pixi --versionpixi 0.73.0使用pixi安装开发环境先用git把项目clone到本地从powershell进入到项目的根目录ls目录: xxx\SPONGEMode LastWriteTime Length Named----- 2026/7/16 9:45 .gitd----- 2026/7/16 9:40 .githubd----- 2026/7/16 9:40 benchmarksd----- 2026/7/16 9:40 cmaked----- 2026/7/16 9:40 docsd----- 2026/7/16 9:40 packagingd----- 2026/7/16 9:40 pluginsd----- 2026/7/16 9:40 scriptsd----- 2026/7/16 9:40 skillsd----- 2026/7/16 9:40 SPONGE-a---- 2026/7/16 9:40 197 .clang-format-a---- 2026/7/16 9:40 311 .gitignore-a---- 2026/7/16 9:40 921 CMakeLists.txt-a---- 2026/7/16 9:40 5154 LICENSE-a---- 2026/7/16 9:40 19529 opt.log-a---- 2026/7/16 9:40 710089 pixi.lock-a---- 2026/7/16 9:40 9903 pixi.toml-a---- 2026/7/16 9:40 1261 README.md-a---- 2026/7/16 9:40 1317 README_en.md-a---- 2026/7/16 9:40 141 ruff.toml然后执行pixi的环境构建根据本地环境的硬件条件参数决定使用哪一个环境pixi install -e dev-cuda12WARN the lock file is up-to-date but uses an older format (v6), runpixi lockto upgrade to v7 for improved reproducibility⠄ preparing packages [━━━━━━━━────────────] 88/96 libcublas (7) 833.2 KiB/s ⠠ installing [━━━─────────────────] 88/96 queued: cuda-nvcc-dev_win-64具体的环境依赖表如下图所示然后就坐等安装完成即可安装完成会有如下信息提示✔ The dev-cuda12 environment has been installed.使用pixi环境编译构建SPONGE-2.0核心指令就是pixi run -e dev-cuda12 configure # CMake configurepixi run -e dev-cuda12 compile # build and install into the environment运行过程如下所示pixi run -e dev-cuda12 configureWARN the lock file is up-to-date but uses an older format (v6), runpixi lockto upgrade to v7 for improved reproducibility✨ Pixi task (configure in dev-cuda12): cmake -S . -B build-PIXIENVIRONMENTNAME−GNinja−DPARALLEL′cuda′−DCUDAARCH′all−major′−DCMAKEINSTALLPREFIXPIXI_ENVIRONMENT_NAME -G Ninja -DPARALLELcuda -DCUDA_ARCHall-major -DCMAKE_INSTALL_PREFIXPIXIE​NVIRONMENTN​AME−GNinja−DPARALLEL′cuda′−DCUDAA​RCH′all−major′−DCMAKEI​NSTALLP​REFIXCONDA_PREFIX– The C compiler identification is MSVC 19.44.35222.0– The CXX compiler identification is MSVC 19.44.35222.0– Detecting C compiler ABI info– Detecting C compiler ABI info - done…pixi run -e dev-cuda12 compileWARN the lock file is up-to-date but uses an older format (v6), runpixi lockto upgrade to v7 for improved reproducibility✨ Pixi task (compile in dev-cuda12): cmake --build build-$PIXI_ENVIRONMENT_NAME --config Release --target install --parallel 4[4/108] Building CUDA object CMakeFiles\SPONGE.dir\SPONGE\common.cpp.obj…安装验证通过运行以下两个指令可以查看SPONGE-2.0是否被正确安装pixi run -e dev-cuda12 which SPONGEWARN the lock file is up-to-date but uses an older format (v6), runpixi lockto upgrade to v7 for improved reproducibilityxxx/.pixi/envs/dev-cuda12/bin/SPONGEpixi run -e dev-cuda12 SPONGE --helpWARN the lock file is up-to-date but uses an older format (v6), runpixi lockto upgrade to v7 for improved reproducibility/|| _ \ / _ | \ | |/||_| |) | | | | | | |||) | __/| || | |\ | || | ||/|| _/|| _|_|___|SPONGE Version:v2.0.0-beta.1 2026-04-01 April Fools’ DaySub-package:SPONGE, for general-purpose molecular dynamics simulationsCitation:Huang, Y. - P., Xia, Y., Yang, L., Wei, J., Yang, Y.I.and Gao, Y.Q. (2022), SPONGE: A GPU - Accelerated Molecular Dynamics Package with Enhanced Sampling and AI - Driven Algorithms.Chin.J.Chem., 40 : 160 - 168. https /doi.org/10.1002/cjoc.202100456Working Directory:xxx\SPONGESPONGE Path:xxx\SPONGE.pixi\envs\dev-cuda12\bin\SPONGE.exeStart Wall Time:Thu Jul 16 12:20:01 2026MD TASK NAME:Default SPONGE MD Task NameSTART INITIALIZING CONTROLLERStart initializing GPUCompiled by CUDA 12.81 device(s) found:Device 0:Name: NVIDIA GeForce RTX 3080 Ti Laptop GPUMemory: 16.0 GBCompute Capability: 86Rank 0: Device 0Compiled by CUDA ARCH 8.0Runtime CUDA ARCH 8.6End initializing GPUMPI is not enabledstructure last modify date is 20260216END INITIALIZING CONTROLLERspongeErrorMissingCommand raised by Xponge::Native_Load_MassMissing required command(s)Reason:no atom_numbers found. No mass_in_file is providedSPONGE-2.0案例测试新建一个workspace路径在workspace路径下新建一个mdin.spg.toml文件内容如下md_name “NVT water”mode “nvt”step_limit 50000dt 0.002cutoff 8.0default_in_file_prefix “D:\xxx\SPONGE\benchmarks\performance\nonortho\statics\WAT_nonortho\WAT”constrain_mode “SHAKE”thermostat “middle_langevin”thermostat_tau 0.1thermostat_seed 2026target_temperature 300.0write_information_interval 1000这里要注意Windows系统和Linux系统下的路径写法不同。然后运行输出如下pixi run -e dev-cuda12 SPONGE -mdin workspace/mdin.spg.tomlWARN the lock file is up-to-date but uses an older format (v6), runpixi lockto upgrade to v7 for improved reproducibility/|| _ \ / _ | \ | |/||_| |) | | | | | | |||) | __/| || | |\ | || | ||/|| _/|| _|_|___|SPONGE Version:v2.0.0-beta.1 2026-04-01 April Fools’ DaySub-package:SPONGE, for general-purpose molecular dynamics simulationsCitation:Huang, Y. - P., Xia, Y., Yang, L., Wei, J., Yang, Y.I.and Gao, Y.Q. (2022), SPONGE: A GPU - Accelerated Molecular Dynamics Package with Enhanced Sampling and AI - Driven Algorithms.Chin.J.Chem., 40 : 160 - 168. https /doi.org/10.1002/cjoc.202100456Working Directory:D:\xxx\SPONGE\workspaceSPONGE Path:D:\xxx\SPONGE.pixi\envs\dev-cuda12\bin\SPONGE.exeStart Wall Time:Thu Jul 16 14:13:14 2026MD TASK NAME:NVTSTART INITIALIZING CONTROLLERStart initializing GPUCompiled by CUDA 12.81 device(s) found:Device 0:Name: NVIDIA GeForce RTX 3080 Ti Laptop GPUMemory: 16.0 GBCompute Capability: 86Rank 0: Device 0Compiled by CUDA ARCH 8.0Runtime CUDA ARCH 8.6End initializing GPUMPI is not enabledstructure last modify date is 20260216END INITIALIZING CONTROLLERSTART INITIALIZING CV CONTROLLER:CV CONTROLLER IS NOT INITIALIZINGSTART INITIALIZING MD CORE:Mode set to NVTskin set to 2.00 Angstromcutoff set to 8.00 AngstromStart reading excluded list from Xponge:End reading excluded list from XpongeStart reading residue list from Xponge: residue_numbers is 1081 End reading residue list from Xponge dt set to 0.002000 ps structure last modify date is 20260216END INITIALIZING MD CORESTART INITIALIZING MIDDLE LANGEVIN DYNAMICS:atom_numbers is 4324target temperature is 300.00 Kfriction coefficient is 10.00 ps^-1random seed is 2026structure last modify date is 20260216END INITIALIZING MIDDLE LANGEVIN DYNAMICSSTART INITIALIZING LENNADR JONES INFORMATION:atom_numbers is 4324atom_LJ_type_number is 2Start initializing long range LJ correctionTotal C6 factor is 4.279219e09long range correction factor is: -2.917440e06End initializing long range LJ correctionstructure last modify date is 20260216END INITIALIZING LENNADR JONES INFORMATIONSTART INITIALIZING FEP SOFT CORE FOR LJ AND COULOMB:END INITIALIZING LENNADR JONES SOFT CORE INFORMATIONSTART INITIALIZING PME:PME backend library: cuFFTgrid_spacing: 1.000000 Angstromfftx: 40ffty: 40fftz: 36beta: 0.348639structure last modify date is 20260216END INITIALIZING PMEPAIRWISE FORCE IS NOT INITIALIZEDNB14 IS NOT INITIALIZEDSTART INITIALIZING BOND (Xponge::system):bond_numbers is 3243structure last modify date is 20260216END INITIALIZING BONDSTART INITIALIZING CONSTRAIN:constrain pair number is 3243END INITIALIZING CONSTRAINSTART INITIALIZING SETTLE:rigid triangle numbers is 1081rigid pair numbers is 0remaining simple constrain pair numbers is 0END INITIALIZING SETTLESHAKE IS NOT INITIALIZEDSTART INITIALIZING VIRTUAL ATOMStart reading virtual levelsVirtual Atoms Max Level is 1Virtual Atoms Number is 1081FF Virtual Atoms Number is 1081CV Virtual Atoms Number is 0End reading virtual levelsStart reading virtual type numbers in different levelsVirutual level 0:Virtual type 2 atom numbers is 1081End reading virtual type numbers in different levelsStart reading information for every virtual atomEnd reading information for every virtual atomstructure last modify date is 20260216END INITIALIZING VIRTUAL ATOMSTART INITIALIZING NEIGHBOR LIST:Max number of neighbors for one atom: 1200initializing gridsNx: 7 Ny: 6 Nz: 5Max number of atoms in one grid: 150Max number of ghosts in one grid: 150initializing updatorThe interval to refresh the neighbor list: 0The permit of the skin to refresh the neighbor list: 0.500000is_needed_half: trueis_needed_full: falseEND INITIALIZING NEIGHBOR LISTSTART INITIALIZING STEER CV:0 CV(s) found for steerSTEER CV IS NOT INITIALIZEDSTART INITIALIZING RESTRAIN CV:0 CV(s) found for restrainRESTRAIN CV IS NOT INITIALIZEDMETA IS NOT INITIALIZEDMolecule numbers: 1081md_info-ug.ug_numbers: 1081START INITIALIZING SOLVENT LJ:the solvent is 4-pointthe number of solvent atoms is 4324 (started from Residue #0)structure last modify date is 20260216END INITIALIZING SOLVENT LJMPI process total: MPI_size1, PP_MPI_size1, PM_MPI_size1MPI process partition: MPI_rank0, PP_MPI_rank0, PM_MPI_rank0DOMAIN DECOMPOSITION BEGINdomain decomposition update_interval 100DOMAIN DECOMPOSITION ENDnx1, ny1, nz1pm_nx 1, pm_ny 1, pm_nz 1max_atom_numbers4324, max_res_numbers1081rank_id0, atom_numbers4324, residue_numbers1081step 1000, time 2.000, temperature 308.42, potential -10924.47, eff_pot -1.0924472e04, LJ_short 2101.51, LJ_long -88.68, LJ 2012.83, PM -12937.30, bond 0.00,step 50000, time 100.000, temperature 305.21, potential -11018.82, eff_pot -1.1018824e04, LJ_short 2082.22, LJ_long -88.68, LJ 1993.54, PM -13012.37, bond 0.00,Time Summary:Rank 0 | Initialization | 1.056046 secondsRank 0 | Iteration | 3.380093 secondsRank 0 | neighbor searching | 5.646920 secondsRank 0 | Calculate_Force | 17.161953 secondsStop Wall Time: Thu Jul 16 14:13:38 2026Core Run Wall Time: 22.457450 secondsCore Run Speed: 384.735260 ns/day这就表示运行成功了。总结概要分子动力学模拟是基于传统的分子力场对分子构象进行不断迭代演化的一个过程。虽然计算量相比于量子化学已经缩减了很多但是由于大型分子体系下近邻表的存在以及PME算法本身的复杂性所以实际上分子动力学模拟工具的计算性能会是使用者最为关注的要点之一。SPONGE版本可以支持GPU加速的分子动力学模拟计算凭借其极高的效率以及模块化的设计在一众的分子模拟软件中脱颖而出。本文着重介绍SPONGE-2.0版本的安装与基本使用。