安装
windows安装
安装分为三步:
- 下载安装包,lammps,lammps-mpi,mpich2,这里的安装包是64位的,32位对应的包去上面提到的网站去下载对应的包。lammps的包可以选择较新的版本来安装。
- 双击安装,注意第三个包是为lammps运行提供一些基本文件的,假如第三个不安装会提示dll文件缺失,从而无法运行。
- 检查运行,在shell命令行中运行lmp_mpi,假如没有报错就表明没有问题。
linux安装(centos7)
linux下暂时未使用
利用命令行安装
- 安装库
首先安装对应的库,这样就可以利用yum对稳定发布的包进行安装
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm - 安装包
yum -y install lammps-openmpi
使用
运行格式
软件的操作使用命令行来具体执行。 命令+参数(基本参数为 -in,这个参数可以利用<来取代)为基本的格式,in参数里给的文件是运行命令的基本参数,里面对运行模拟的环境,力场等参数进行了详细的规定。想要具体尝试一下可以利用安装目录下的example文件中提供的in文件。
运行示例
E:\Program\project\LAMMPS\test_run_program>lmp_mpi < calc_fcc.in
LAMMPS (24 Jan 2020)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:94)
using 1 OpenMP thread(s) per MPI task
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:94)
using 1 OpenMP thread(s) per MPI task
Lattice spacing in x,y,z = 4 4 4
Created orthogonal box = (0 0 0) to (4 4 4)
1 by 1 by 1 MPI processor grid
Lattice spacing in x,y,z = 4 4 4
Created 4 atoms
create_atoms CPU = 0.000262619 secs
Replicating atoms ...
orthogonal box = (0 0 0) to (4 4 4)
1 by 1 by 1 MPI processor grid
4 atoms
replicate CPU = 0.0034794 secs
WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (../min.cpp:178)
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 8.28721
ghost atom cutoff = 8.28721
binsize = 4.1436, bins = 1 1 1
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair eam/alloy, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d/newton
bin: standard
Setting up cg style minimization ...
Unit style : metal
Current step : 0
WARNING: Energy due to 1 extra global DOFs will be included in minimizer energies
Per MPI rank memory allocation (min/avg/max) = 4.495 | 4.495 | 4.495 Mbytes
Step PotEng Lx Ly Lz Press Pxx Pyy Pzz c_eatoms
0 -13.417787 4 4 4 29590.11 29590.11 29590.11 29590.11 -13.417787
10 -13.439104 4.04 4.04 4.04 5853.9553 5853.9553 5853.9553 5853.9553 -13.439104
20 -13.44 4.0500047 4.0500047 4.0500047 2.1131131e-10 2.2023682e-10 2.142121e-10 1.9948502e-10 -13.44
29 -13.44 4.0500047 4.0500047 4.0500047 4.7215918e-10 4.8063841e-10 4.5787837e-10 4.7796075e-10 -13.44
Loop time of 0.0152524 on 1 procs for 29 steps with 4 atoms
0.0% CPU use with 1 MPI tasks x 1 OpenMP threads
Minimization stats:
Stopping criterion = energy tolerance
Energy initial, next-to-last, final =
-13.4177872966 -13.4399999527 -13.4399999527
Force two-norm initial, final = 3.54599 5.81382e-14
Force max component initial, final = 3.54599 5.80057e-14
Final line search alpha, max atom move = 1 5.80057e-14
Iterations, force evaluations = 29 46
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.00060776 | 0.00060776 | 0.00060776 | 0.0 | 3.98
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00013824 | 0.00013824 | 0.00013824 | 0.0 | 0.91
Output | 0.009788 | 0.009788 | 0.009788 | 0.0 | 64.17
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 0.004718 | | | 30.94
Nlocal: 4 ave 4 max 4 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 662 ave 662 max 662 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 280 ave 280 max 280 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 280
Ave neighs/atom = 70
Neighbor list builds = 0
Dangerous builds = 0
Total energy (eV) = -13.4399999527352;
Number of atoms = 4;
Lattice constant (Angstoms) = 4.05000466178543;
Cohesive energy (eV) = -3.3599999881838;
All done!
Total wall time: 0:00:00