【Lammps】Zhou势函数拟合(python程序)

【Lammps】Zhou势函数拟合(python程序)

Zhou合金势主要用于金属的分子动力学模拟 ,下面将主要对lammps自带程序生成相关合金势函数。

早期的Zhou势用Fortran编写,在使用之前需要进行对源代码进行编译,操作较为麻烦,后期lammps提供了一个python版本的Zhou势拟合程序。下面是官方对Zhou势函数拟合的说明文档。

https://github.com/lammps/lammps/blob/develop/tools/eam_database/README

EAM database tool

Fortran version (create.f) by Xiaowang Zhou (Sandia), xzhou at sandia.gov
with revisions by Lucas Hale lucas.hale at nist.gov from https://www.ctcms.nist.gov/potentials/entry/2004--Zhou-X-W-Johnson-R-A-Wadley-H-N-G--Al/

Python version (create_eam.py) by Germain Clavier germain.clavier at gmail.com

Most parameters based on this paper:

X. W. Zhou, R. A. Johnson, and H. N. G. Wadley, Phys. Rev. B, 69,
144113 (2004).

Parameters for Cr were taken from:
Lin Z B, Johnson R A and Zhigilei L V, Phys. Rev. B 77 214108 (2008)

This tool can be used to create an DYNAMO-formatted EAM
setfl file for alloy systems, using any combination
of the elements discussed in the paper and listed in
the EAM_code file, namely:

Cu, Ag, Au, Ni, Pd, Pt, Al, Pb, Fe, Mo, Ta, W, Mg, Co, Ti, Zr, Cr

WARNING: Please note that the parameter sets used here are all optimized
for the pure metals of the individual elements and that mixing rules will
be applied for creating the inter-element interactions.  Those are inferior
to models where the mixed terms were specifically optimized for particular
alloys.  Thus any potential files created with this tool should be used
with care and test calculations (e.g. on multiple binary mixtures) performed
to gauge the error.

Steps (create.f):

1) compile create.f -> a.out  (e.g. gfortran create.f)
2) edit the input file EAM.input to list 2 or more desired elements to include
3) a.out < EAM.input will create an *.eam.alloy potential file

Steps (create_eam.py):

Usage: create_eam.py [-h] [-n NAME [NAME ...]] [-nr NR] [-nrho NRHO]

options:
  -n NAME [NAME ...], --names NAME [NAME ...]
                        Element names
  -nr NR                Number of point in r space [default 2000]
  -nrho NRHO            Number of point in rho space [default 2000]

1) you must have numpy installed
2) run "python create_eam.py -n Ta Cu" with the list of desired elements
3) this will create an *.eam.alloy potential file

in DYNAMO or LAMMPS context the created file is referred to as a setfl file
  that can be used with the LAMMPS pair_style eam/alloy command

操作步骤

  1. 首先进入lammps源码中的 eam_database文件夹
    在这里插入图片描述

文件夹中存在下述程序,其中 create_eam.py 就是我们需要的。

在这里插入图片描述

  1. 运行通过python运行 create_eam.py 程序。

语法如下所示:

Usage: create_eam.py [-h] [-n NAME [NAME ...]] [-nr NR] [-nrho NRHO]

options:
  -n NAME [NAME ...], --names NAME [NAME ...]
                        Element names
  -nr NR                Number of point in r space [default 2000]
  -nrho NRHO            Number of point in rho space [default 2000]

演示:运行如下命令:

python create_eam.py -n Al Mg Au

在这里插入图片描述

拟合好的势函数在eam_database文件夹中,打开如下图所示。

在这里插入图片描述

  • 10
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

何为xl

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值