1. Lammps 安装-简单运行

从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的输入文件;

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在CentOS操作系统上安装LAMMPS可以分为以下几个步骤: 1. 安装必要的软件包:首先,要确保系统上已经安装了必要的软件包,包括C++编译器(如gcc、g++)、MPI(如openmpi)和一些辅助工具(如make和cmake)。 2. 下载和解压LAMMPS源代码:从LAMMPS的官方网站(https://lammps.sandia.gov/)下载最新的源代码压缩包,并将其解压到指定的目录。 3. 配置和构建LAMMPS:进入解压后的LAMMPS源代码目录,并执行以下命令: ``` mkdir build cd build cmake ../cmake make ``` 这将创建一个名为build的目录,进入该目录,并使用cmake配置LAMMPS的构建过程,然后使用make命令进行编译和构建。 4. 设置环境变量:为了能够方便地运行LAMMPS,需要将其可执行文件所在的目录添加到系统的环境变量中。可以通过编辑bash配置文件(如~/.bashrc)并添加以下行来完成: ``` export PATH=/path/to/lammps/build/bin:$PATH ``` 将/path/to/lammps替换为解压后的LAMMPS源代码目录的路径。 5. 测试LAMMPS:执行以下命令来验证LAMMPS是否成功安装: ``` lmp_mpi -in bench/in.lj ``` 上述命令将运行一个简单的分子动力学模拟示例,如果成功运行并输出了一些结果,那么说明LAMMPS已经安装并可以正常运行。 以上就是在CentOS上安装LAMMPS的一般步骤。然而,由于系统环境和配置的复杂性,可能还需要根据具体情况进行一些额外的配置和调整。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值