从lammps官网下载windows版本的程序:https://packages.lammps.org/windows.html,在Installing LAMMPS on Windows 标题下点击“64-bit Windows download area”,下载程序,我下载的是“LAMMPS-64bit-Python-latest-MPI.exe”,双击程序即可安装。
后面说在windows上并行运算LAMMPS,需要安装MPICH2,点击官网“mpich2-1.4.1p1-win-x86-64.msi”,下载后双击即可安装。
在安装目录下有文件夹Examples,其中是运行案例,拷贝Examples/peptide文件夹到桌面,启动命令行,进入peptide文件夹,输入:lmp -pk omp 8 -sf omp -in in.peptide.lmp;
C:\Users\li\Desktop\peptide>lmp -pk omp 8 -sf omp -in in.peptide.lmp
LAMMPS (28 Mar 2023)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
Loaded 1 plugins from D:\software\lammps\LAMMPS 64-bit 28Mar2023-MPI with Python\plugins
set 8 OpenMP thread(s) per MPI task
using multi-threaded neighbor list subroutines
Reading data file ...
orthogonal box = (36.840194 41.013691 29.768095) to (64.21156 68.385058 57.139462)
1 by 1 by 1 MPI processor grid
reading atoms ...
2004 atoms
reading velocities ...
2004 velocities
scanning bonds ...
3 = max bonds/atom
scanning angles ...
6 = max angles/atom
scanning dihedrals ...
14 = max dihedrals/atom
scanning impropers ...
1 = max impropers/atom
reading bonds ...
1365 bonds
reading angles ...
786 angles
reading dihedrals ...
207 dihedrals
reading impropers ...
12 impropers
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
4 = max # of 1-2 neighbors
7 = max # of 1-3 neighbors
14 = max # of 1-4 neighbors
18 = max # of special neighbors
special bonds CPU = 0.005 seconds
read_data CPU = 0.063 seconds
Finding SHAKE clusters ...
19 = # of size 2 clusters
6 = # of size 3 clusters
3 = # of size 4 clusters
640 = # of frozen angles
find clusters CPU = 0.001 seconds
84 atoms in group peptide
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 0.26872465
grid = 15 15 15
stencil order = 5
estimated absolute RMS force accuracy = 0.022820853
estimated relative force accuracy = 6.872432e-05
using double precision FFTW3
3d grid and FFT values/proc = 10648 3375
Generated 91 of 91 mixed pair_coeff terms from arithmetic mixing rule
Last active /omp style is kspace_style pppm/omp
Neighbor list info ...
update: every = 1 steps, delay = 5 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 12
ghost atom cutoff = 12
binsize = 6, bins = 5 5 5
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/charmm/coul/long/omp, perpetual
attributes: half, newton on, omp
pair build: half/bin/newton/omp
stencil: half/bin/3d
bin: standard
Setting up Verlet run ...
Unit style : real
Current step : 0
Time step : 2
SHAKE stats (type/ave/delta/count) on step 0
Bond: 4 1.111 1.44264e-05 9
Bond: 6 0.996998 7.26967e-06 6
Bond: 8 1.08 1.32536e-05 7
Bond: 10 1.111 1.22749e-05 8
Bond: 12 1.08 1.11767e-05 9
Bond: 14 0.96 0 1
Bond: 18 0.957206 4.37979e-05 1280
Angle: 31 104.519 0.00396029 640
Per MPI rank memory allocation (min/avg/max) = 22.54 | 22.54 | 22.54 Mbytes
------------ Step 0 ----- CPU = 0 (sec) -------------
TotEng = -5237.4580 KinEng = 1134.9186 Temp = 282.1005
PotEng = -6372.3766 E_bond = 16.5572 E_angle = 36.3726
E_dihed = 15.5190 E_impro = 1.9426 E_vdwl = 692.8945
E_coul = 26772.2646 E_long = -33907.9271 Press = -837.0112
------------ Step 50 ----- CPU = 0.192885 (sec) -------------
TotEng = -5247.5537 KinEng = 1132.4000 Temp = 281.4745
PotEng = -6379.9537 E_bond = 12.2118 E_angle = 31.7365
E_dihed = 18.8145 E_impro = 2.3611 E_vdwl = 658.1785
E_coul = 26804.4441 E_long = -33907.7003 Press = -1331.7946
SHAKE stats (type/ave/delta/count) on step 100
Bond: 4 1.111 7.80613e-07 9
Bond: 6 0.997 1.06181e-06 6
Bond: 8 1.08 6.20292e-07 7
Bond: 10 1.111 6.23284e-07 8
Bond: 12 1.08 2.67996e-07 9
Bond: 14 0.96 0 1
Bond: 18 0.957201 5.3796e-06 1280
Angle: 31 104.52 0.000502278 640
------------ Step 100 ----- CPU = 0.39917 (sec) -------------
TotEng = -5257.9979 KinEng = 1078.0553 Temp = 267.9663
PotEng = -6336.0532 E_bond = 14.4829 E_angle = 43.4429
E_dihed = 15.2569 E_impro = 2.3160 E_vdwl = 708.3273
E_coul = 26786.6829 E_long = -33906.5621 Press = -648.6819
------------ Step 150 ----- CPU = 0.613116 (sec) -------------
TotEng = -5287.2799 KinEng = 1098.6028 Temp = 273.0737
PotEng = -6385.8827 E_bond = 17.4925 E_angle = 32.8594
E_dihed = 15.1624 E_impro = 1.6522 E_vdwl = 736.9675
E_coul = 26717.2655 E_long = -33907.2821 Press = -333.1830
SHAKE stats (type/ave/delta/count) on step 200
Bond: 4 1.111 2.18698e-07 9
Bond: 6 0.997 1.50562e-07 6
Bond: 8 1.08 6.57498e-08 7
Bond: 10 1.111 5.54188e-07 8
Bond: 12 1.08 1.98839e-07 9
Bond: 14 0.96 0 1
Bond: 18 0.957201 3.59627e-06 1280
Angle: 31 104.52 0.000388336 640
命令解释:
-pk omp 8:使用多线程进行计算;
-sf omp:启用了多线程后,还必须在LAMMPS中选择启用了多线程的样式;
-in in.peptide.lmp:lammps的输入文件;