From e9b11e3673a383f1e52e02b10caf570b9f3446b6 Mon Sep 17 00:00:00 2001 From: Germain Clavier Date: Sat, 12 Feb 2022 12:42:54 +0100 Subject: [PATCH 01/16] Added Python version of Zhou04_create_v2.f: create_eam.py and eamDatabase.py in tools/eam_database --- tools/eam_database/create_eam.py | 173 +++++++++ tools/eam_database/eamDatabase.py | 610 ++++++++++++++++++++++++++++++ 2 files changed, 783 insertions(+) create mode 100644 tools/eam_database/create_eam.py create mode 100644 tools/eam_database/eamDatabase.py diff --git a/tools/eam_database/create_eam.py b/tools/eam_database/create_eam.py new file mode 100644 index 0000000000..975774466d --- /dev/null +++ b/tools/eam_database/create_eam.py @@ -0,0 +1,173 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Python version of the code Zhou04_create_v2.f +original author: X. W. Zhou, xzhou@sandia.gov +based on updates by: Lucas Hale lucas.hale@nist.gov +written by: Germain Clavier g.m.g.c.clavier@tue.nl +This script requires the numpy library. +""" + +import sys +import argparse as ap +import numpy as np +from eamDatabase import Database + + +def prof(at, r): + atom = Database[at] + f = np.zeros(r.shape) + f = atom.fe * np.exp(-atom.beta1 * (r[r >= 0.5] / atom.re - 1.0)) + f = f / (1.0 + (r / atom.re - atom.ramda1) ** 20) + return f + + +def pair(at1, at2, r): + atom = Database[at1] + psi1 = atom.A * np.exp(-atom.alpha * (r / atom.re - 1.0)) + psi1 /= 1.0 + (r / atom.re - atom.cai) ** 20 + psi2 = atom.B * np.exp(-atom.beta * (r / atom.re - 1.0)) + psi2 /= 1.0 + (r / atom.re - atom.ramda) ** 20 + if at1 == at2: + psi = psi1 - psi2 + else: + psia = psi1 - psi2 + atom2 = Database[at2] + psi1 = atom2.A * np.exp(-atom2.alpha * (r / atom2.re - 1.0)) + psi1 /= 1.0 + (r / atom2.re - atom2.cai) ** 20 + psi2 = atom2.B * np.exp(-atom2.beta * (r / atom2.re - 1.0)) + psi2 /= 1.0 + (r / atom2.re - atom2.ramda) ** 20 + psib = psi1 - psi2 + prof1 = prof(at1, r) + prof2 = prof(at2, r) + psi = 0.5 * (prof2 / prof1 * psia + prof1 / prof2 * psib) + return psi + + +def embed(at, rho): + atom = Database[at] + Fm33 = np.zeros(rho.shape) + Fm33[rho < atom.rhoe] = atom.Fm3 + Fm33[rho >= atom.rhoe] = atom.Fm4 + emb = np.zeros(rho.shape) + for i, r in enumerate(rho): + if r == 0: + emb[i] = 0 + elif r < atom.rhoin: + dr = r / atom.rhoin - 1 + emb[i] = atom.Fi0 + atom.Fi1 * dr + atom.Fi2 * dr**2 + atom.Fi3 * dr**3 + elif r < atom.rhoout: + dr = r / atom.rhoe - 1 + emb[i] = atom.Fm0 + atom.Fm1 * dr + atom.Fm2 * dr**2 + Fm33[i] * dr**3 + else: + dr = r / atom.rhos + emb[i] = atom.Fn * (1.0 - atom.fnn * np.log(dr)) * dr**atom.fnn + return emb + + +def write_file(attypes, filename, Fr, rhor, z2r, nrho, drho, nr, dr, rc): + struc = "fcc" + with open(filename, "w") as f: + f.write("DATE: 2022-02-11") + f.write(" CONTRIBUTORS: Xiaowang Zhou xzhou@sandia.gov and") + f.write(" Lucas Hale lucas.hale@nist.gov") + f.write(" Germain Clavier g.m.g.c.clavier@tue.nl/germain.clavier@gmail.com\n") + f.write(" CITATION: X. W. Zhou, R. A. Johnson, H. N. G. Wadley, Phys. Rev. B, 69, 144113(2004)\n") + f.write("Generated from create_eam.py, Python version of Zhou04_create_v2.f\n") + f.write("{:<5d} {:<24}\n".format(len(attypes), " ".join(attypes))) + f.write( + "{:<5d} {:<24.16e} {:<5d} {:<24.16e} {:<24.16e}\n".format( + nrho, drho, nr, dr, rc + ) + ) + for at in attypes: + atom = Database[at] + f.write( + "{:>5d} {:>15.5f} {:>15.5f} {:>8}\n".format( + atom.ielement, atom.amass, atom.blat, struc + ) + ) + for i, fr in enumerate(Fr[at]): + f.write(" {:>24.16E}".format(fr)) + if not (i + 1) % 5: + f.write("\n") + for i, rho in enumerate(rhor[at]): + f.write(" {:>24.16E}".format(rho)) + if not (i + 1) % 5: + f.write("\n") + for n1 in range(len(attypes)): + for n2 in range(n1 + 1): + for i, z in enumerate(z2r[n1, n2]): + f.write(" {:>24.16E}".format(z)) + if not (i + 1) % 5: + f.write("\n") + + return + + +def main(): + + parser = ap.ArgumentParser(description="Script to make EAM alloy file inputs.") + parser.add_argument("-n", "--names", dest="names", nargs="+", help="Atom names.") + parser.add_argument("-nr", dest="nr", type=int, default=2000, help="Number of point in r space [default 2000].") + parser.add_argument("-nrho", dest="nrho", type=int, default=2000, help="Number of point in rho space [default 2000].") + args = parser.parse_args() + atnames = args.names + nr = args.nr + nrho = args.nrho + + for n in atnames: + try: + Database[n] + except KeyError: + output = "Atom {} not found.\n".format(n) + valid = "Valid inputs are: {}".format(" ".join(Database.keys())) + sys.exit("".join([output, valid])) + + ntypes = len(atnames) + outfilename = "".join([*atnames, ".set"]) + rhor = {} + Fr = {} + + alatmax = max([Database[at].blat for at in atnames]) + rhoemax = max([Database[at].rhoe for at in atnames]) + rc = np.sqrt(10.0) / 2.0 * alatmax + rst = 0.5 + r = np.linspace(0.0, rc, num=nr, dtype=np.double) + dr = r[1] - r[0] + r[r < rst] = rst + z2r = np.zeros([ntypes, ntypes, nr]) + fmax = -np.inf + rhomax = -np.inf + + for i, n1 in enumerate(atnames): + for j, n2 in enumerate(atnames): + if j > i: + continue + elif i == j: + rhor[n1] = prof(n1, r) + rhomax = np.max(rhor[n1]) if rhomax < np.max(rhor[n1]) else rhomax + z2r[i, j, :] = r * pair(n1, n2, r) + else: + z2r[i, j, :] = r * pair(n1, n2, r) + z2r = np.where(z2r, z2r, z2r.transpose((1, 0, 2))) + if rhomax < 2.0 * rhoemax: + rhomax = 2.0 * rhoemax + if rhomax < 100.0: + rhomax = 100.0 + rho = np.linspace(0.0, rhomax, num=nrho, dtype=np.double) + drho = rho[1] - rho[0] + for i, n1 in enumerate(atnames): + Fr[n1] = embed(n1, rho) + + write_file(atnames, outfilename, Fr, rhor, z2r, nrho, drho, nr, dr, rc) + + return + + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + raise SystemExit("User interruption.") diff --git a/tools/eam_database/eamDatabase.py b/tools/eam_database/eamDatabase.py new file mode 100644 index 0000000000..26d22d2f3a --- /dev/null +++ b/tools/eam_database/eamDatabase.py @@ -0,0 +1,610 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Python version of the code Zhou04_create_v2.f +original author: X. W. Zhou, xzhou@sandia.gov +based on updates by: Lucas Hale lucas.hale@nist.gov +written by: Germain Clavier g.m.g.c.clavier@tue.nl + +This file contains atom attributes for the EAM model and alloy combination. The +original file is EAM_code. It is designed to be used with create_eam.py script. +To add new contribution, just add new AtType instances. +""" + +import math + +class AtType: + def __init__( + self, + name, + re, + fe, + rhoe, + rhos, + alpha, + beta, + A, + B, + cai, + ramda, + Fi0, + Fi1, + Fi2, + Fi3, + Fm0, + Fm1, + Fm2, + Fm3, + fnn, + Fn, + ielement, + amass, + Fm4, + beta1, + ramda1, + rhol, + rhoh, + ): + self.name = name + self.re = re + self.fe = fe + self.rhoe = rhoe + self.rhos = rhos + self.alpha = alpha + self.beta = beta + self.A = A + self.B = B + self.cai = cai + self.ramda = ramda + self.Fi0 = Fi0 + self.Fi1 = Fi1 + self.Fi2 = Fi2 + self.Fi3 = Fi3 + self.Fm0 = Fm0 + self.Fm1 = Fm1 + self.Fm2 = Fm2 + self.Fm3 = Fm3 + self.fnn = fnn + self.Fn = Fn + self.ielement = ielement + self.amass = amass + self.Fm4 = Fm4 + self.beta1 = beta1 + self.ramda1 = ramda1 + self.rhol = rhol + self.rhoh = rhoh + self.blat = math.sqrt(2.0) * self.re + self.rhoin = self.rhol * self.rhoe + self.rhoout = self.rhoh * self.rhoe + + def __repr__(self): + output = """{}: + re = {}; fe = {} + rhoe = {}; rhos = {}; + alpha = {}; beta = {}; + A = {}; B = {} + cai = {}; ramda = {} + Fi0 = {}; Fi1 = {}; Fi2 = {}; Fi3 = {} + Fm0 = {}; Fm1 = {}; Fm2 = {}; Fm3 = {}; Fm4 = {} + fnn = {}; Fn = {} + ielement = {}; amass = {} + beta1 = {}; ramda1 = {} + rhol = {}; rhoh = {} + blat = {}; rhoin = {}; rhoout = {}""" + return output.format( + self.name, + self.re, + self.fe, + self.rhoe, + self.rhos, + self.alpha, + self.beta, + self.A, + self.B, + self.cai, + self.ramda, + self.Fi0, + self.Fi1, + self.Fi2, + self.Fi3, + self.Fm0, + self.Fm1, + self.Fm2, + self.Fm3, + self.Fm4, + self.fnn, + self.Fn, + self.ielement, + self.amass, + self.beta1, + self.ramda1, + self.rhol, + self.rhoh, + self.blat, + self.rhoin, + self.rhoout, + ) + + +Database = {} +Database["Cu"] = AtType( + "Cu", # Name + 2.556162, # re + 1.554485, # fe + 21.175871, # rhoe + 21.175395, # rhos + 8.127620, # alpha + 4.334731, # beta + 0.396620, # A + 0.548085, # B + 0.308782, # cai + 0.756515, # ramda + -2.170269, # Fi0 + -0.263788, # Fi1 + 1.088878, # Fi2 + -0.817603, # Fi3 + -2.19, # Fm0 + 0.00, # Fm1 + 0.561830, # Fm2 + -2.100595, # Fm3 + 0.310490, # fnn + -2.186568, # Fn + 29, # ielement + 63.546, # amass + -2.100595, # Fm4 + 4.334731, # beta1 + 0.756515, # ramda1 + 0.85, # rhol + 1.15, # rhoh +) +Database["Ag"] = AtType( + "Ag", + 2.891814, + 1.106232, + 14.604100, + 14.604144, + 9.132010, + 4.870405, + 0.277758, + 0.419611, + 0.339710, + 0.750758, + -1.729364, + -0.255882, + 0.912050, + -0.561432, + -1.75, + 0.00, + 0.744561, + -1.150650, + 0.783924, + -1.748423, + 47, + 107.8682, + -1.150650, + 4.870405, + 0.750758, + 0.85, + 1.15, +) +Database["Au"] = AtType( + "Au", + 2.885034, + 1.529021, + 19.991632, + 19.991509, + 9.516052, + 5.075228, + 0.229762, + 0.356666, + 0.356570, + 0.748798, + -2.937772, + -0.500288, + 1.601954, + -0.835530, + -2.98, + 0.00, + 1.706587, + -1.134778, + 1.021095, + -2.978815, + 79, + 196.96654, + -1.134778, + 5.075228, + 0.748798, + 0.85, + 1.15, +) +Database["Ni"] = AtType( + "Ni", + 2.488746, + 2.007018, + 27.562015, + 27.562031, + 8.383453, + 4.471175, + 0.429046, + 0.633531, + 0.443599, + 0.820658, + -2.693513, + -0.076445, + 0.241442, + -2.375626, + -2.70, + 0.00, + 0.265390, + -0.152856, + 0.445470, + -2.7, + 28, + 58.6934, + -0.152856, + 4.471175, + 0.820658, + 0.85, + 1.15, +) +Database["Pd"] = AtType( + "Pd", + 2.750897, + 1.595417, + 21.335246, + 21.940073, + 8.697397, + 4.638612, + 0.406763, + 0.598880, + 0.397263, + 0.754799, + -2.321006, + -0.473983, + 1.615343, + -0.231681, + -2.36, + 0.00, + 1.481742, + -1.675615, + 1.130000, + -2.352753, + 46, + 106.42, + -1.675615, + 4.638612, + 0.754799, + 0.85, + 1.15, +) +Database["Pt"] = AtType( + "Pt", + 2.771916, + 2.336509, + 33.367564, + 35.205357, + 7.105782, + 3.789750, + 0.556398, + 0.696037, + 0.385255, + 0.770510, + -1.455568, + -2.149952, + 0.528491, + 1.222875, + -4.17, + 0.00, + 3.010561, + -2.420128, + 1.450000, + -4.145597, + 78, + 195.08, + -2.420128, + 3.789750, + 0.770510, + 0.25, + 1.15, +) +Database["Al"] = AtType( + "Al", + 2.863924, + 1.403115, + 20.418205, + 23.195740, + 6.613165, + 3.527021, + 0.314873, + 0.365551, + 0.379846, + 0.759692, + -2.807602, + -0.301435, + 1.258562, + -1.247604, + -2.83, + 0.00, + 0.622245, + -2.488244, + 0.785902, + -2.824528, + 13, + 26.981539, + -2.488244, + 3.527021, + 0.759692, + 0.85, + 1.15, +) +Database["Pb"] = AtType( + "Pb", + 3.499723, + 0.647872, + 8.450154, + 8.450063, + 9.121799, + 5.212457, + 0.161219, + 0.236884, + 0.250805, + 0.764955, + -1.422370, + -0.210107, + 0.682886, + -0.529378, + -1.44, + 0.00, + 0.702726, + -0.538766, + 0.935380, + -1.439436, + 82, + 207.2, + -0.538766, + 5.212457, + 0.764955, + 0.85, + 1.15, +) +Database["Fe"] = AtType( + "Fe", + 2.481987, + 1.885957, + 20.041463, + 20.041463, + 9.818270, + 5.236411, + 0.392811, + 0.646243, + 0.170306, + 0.340613, + -2.534992, + -0.059605, + 0.193065, + -2.282322, + -2.54, + 0.00, + 0.200269, + -0.148770, + 0.391750, + -2.539945, + 26, + 55.847, + -0.148770, + 5.236411, + 0.340613, + 0.85, + 1.15, +) +Database["Mo"] = AtType( + "Mo", + 2.728100, + 2.723710, + 29.354065, + 29.354065, + 8.393531, + 4.476550, + 0.708787, + 1.120373, + 0.137640, + 0.275280, + -3.692913, + -0.178812, + 0.380450, + -3.133650, + -3.71, + 0.00, + 0.875874, + 0.776222, + 0.790879, + -3.712093, + 42, + 95.94, + 0.776222, + 4.476550, + 0.275280, + 0.85, + 1.15, +) +Database["Ta"] = AtType( + "Ta", + 2.860082, + 3.086341, + 33.787168, + 33.787168, + 8.489528, + 4.527748, + 0.611679, + 1.032101, + 0.176977, + 0.353954, + -5.103845, + -0.405524, + 1.112997, + -3.585325, + -5.14, + 0.00, + 1.640098, + 0.221375, + 0.848843, + -5.141526, + 73, + 180.9479, + 0.221375, + 4.527748, + 0.353954, + 0.85, + 1.15, +) +Database["W"] = AtType( + "W", + 2.740840, + 3.487340, + 37.234847, + 37.234847, + 8.900114, + 4.746728, + 0.882435, + 1.394592, + 0.139209, + 0.278417, + -4.946281, + -0.148818, + 0.365057, + -4.432406, + -4.96, + 0.00, + 0.661935, + 0.348147, + 0.582714, + -4.961306, + 74, + 183.84, + 0.348147, + 4.746728, + 0.278417, + 0.85, + 1.15, +) +Database["Mg"] = AtType( + "Mg", + 3.196291, + 0.544323, + 7.132600, + 7.132600, + 10.228708, + 5.455311, + 0.137518, + 0.225930, + 0.5, + 1.0, + -0.896473, + -0.044291, + 0.162232, + -0.689950, + -0.90, + 0.00, + 0.122838, + -0.226010, + 0.431425, + -0.899702, + 12, + 24.305, + -0.226010, + 5.455311, + 1.0, + 0.85, + 1.15, +) +Database["Co"] = AtType( + "Co", + 2.505979, + 1.975299, + 27.206789, + 27.206789, + 8.679625, + 4.629134, + 0.421378, + 0.640107, + 0.5, + 1.0, + -2.541799, + -0.219415, + 0.733381, + -1.589003, + -2.56, + 0.00, + 0.705845, + -0.687140, + 0.694608, + -2.559307, + 27, + 58.9332, + -0.687140, + 4.629134, + 1.0, + 0.85, + 1.15, +) +Database["Ti"] = AtType( + "Ti", + 2.933872, + 1.863200, + 25.565138, + 25.565138, + 8.775431, + 4.680230, + 0.373601, + 0.570968, + 0.5, + 1.0, + -3.203773, + -0.198262, + 0.683779, + -2.321732, + -3.22, + 0.00, + 0.608587, + -0.750710, + 0.558572, + -3.219176, + 22, + 47.88, + -0.750710, + 4.680230, + 1.0, + 0.85, + 1.15, +) +Database["Zr"] = AtType( + "Zr", + 3.199978, + 2.230909, + 30.879991, + 30.879991, + 8.559190, + 4.564902, + 0.424667, + 0.640054, + 0.5, + 1.0, + -4.485793, + -0.293129, + 0.990148, + -3.202516, + -4.51, + 0.00, + 0.928602, + -0.981870, + 0.597133, + -4.509025, + 40, + 91.224, + -0.981870, + 4.564902, + 1.0, + 0.85, + 1.15, +) From 06d4bb3faffa697962fd7b81778801780435f0b1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Feb 2022 09:33:37 -0500 Subject: [PATCH 02/16] set date dynamically --- tools/eam_database/create_eam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/eam_database/create_eam.py b/tools/eam_database/create_eam.py index 975774466d..c5de285d53 100644 --- a/tools/eam_database/create_eam.py +++ b/tools/eam_database/create_eam.py @@ -13,7 +13,7 @@ import sys import argparse as ap import numpy as np from eamDatabase import Database - +from datetime import date def prof(at, r): atom = Database[at] @@ -69,7 +69,7 @@ def embed(at, rho): def write_file(attypes, filename, Fr, rhor, z2r, nrho, drho, nr, dr, rc): struc = "fcc" with open(filename, "w") as f: - f.write("DATE: 2022-02-11") + f.write("DATE: " + date.today().strftime("%Y-%m-%d")) f.write(" CONTRIBUTORS: Xiaowang Zhou xzhou@sandia.gov and") f.write(" Lucas Hale lucas.hale@nist.gov") f.write(" Germain Clavier g.m.g.c.clavier@tue.nl/germain.clavier@gmail.com\n") From 0f5fbf1c427cd4f61c29a515cd4b2891208a69bd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Feb 2022 09:36:53 -0500 Subject: [PATCH 03/16] update citation info format --- tools/eam_database/create_eam.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tools/eam_database/create_eam.py b/tools/eam_database/create_eam.py index c5de285d53..f4c5e17f3d 100644 --- a/tools/eam_database/create_eam.py +++ b/tools/eam_database/create_eam.py @@ -65,22 +65,17 @@ def embed(at, rho): emb[i] = atom.Fn * (1.0 - atom.fnn * np.log(dr)) * dr**atom.fnn return emb - def write_file(attypes, filename, Fr, rhor, z2r, nrho, drho, nr, dr, rc): struc = "fcc" with open(filename, "w") as f: f.write("DATE: " + date.today().strftime("%Y-%m-%d")) - f.write(" CONTRIBUTORS: Xiaowang Zhou xzhou@sandia.gov and") + f.write(" CONTRIBUTOR: Xiaowang Zhou xzhou@sandia.gov and") f.write(" Lucas Hale lucas.hale@nist.gov") f.write(" Germain Clavier g.m.g.c.clavier@tue.nl/germain.clavier@gmail.com\n") - f.write(" CITATION: X. W. Zhou, R. A. Johnson, H. N. G. Wadley, Phys. Rev. B, 69, 144113(2004)\n") - f.write("Generated from create_eam.py, Python version of Zhou04_create_v2.f\n") + f.write(" CITATION: X. W. Zhou, R. A. Johnson, H. N. G. Wadley, Phys. Rev. B, 69, 144113(2004) ") + f.write("Generated by create_eam.py\n") f.write("{:<5d} {:<24}\n".format(len(attypes), " ".join(attypes))) - f.write( - "{:<5d} {:<24.16e} {:<5d} {:<24.16e} {:<24.16e}\n".format( - nrho, drho, nr, dr, rc - ) - ) + f.write("{:<5d} {:<24.16e} {:<5d} {:<24.16e} {:<24.16e}\n".format(nrho, drho, nr, dr, rc)) for at in attypes: atom = Database[at] f.write( From 69d3b1ebf356bd0de3a2dd340db71a04e1e21795 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Feb 2022 09:37:23 -0500 Subject: [PATCH 04/16] output files are now named .eam.alloy --- tools/eam_database/create_eam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/eam_database/create_eam.py b/tools/eam_database/create_eam.py index f4c5e17f3d..23943a4f7d 100644 --- a/tools/eam_database/create_eam.py +++ b/tools/eam_database/create_eam.py @@ -121,7 +121,7 @@ def main(): sys.exit("".join([output, valid])) ntypes = len(atnames) - outfilename = "".join([*atnames, ".set"]) + outfilename = "".join([*atnames, ".eam.alloy"]) rhor = {} Fr = {} From 3cca41b72e4a25dd9274c8122d544e321d7abc41 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Feb 2022 09:37:43 -0500 Subject: [PATCH 05/16] print help without arguments. clarify help message and argument names text --- tools/eam_database/create_eam.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/eam_database/create_eam.py b/tools/eam_database/create_eam.py index 23943a4f7d..bd1ca8e90a 100644 --- a/tools/eam_database/create_eam.py +++ b/tools/eam_database/create_eam.py @@ -103,12 +103,17 @@ def write_file(attypes, filename, Fr, rhor, z2r, nrho, drho, nr, dr, rc): def main(): - parser = ap.ArgumentParser(description="Script to make EAM alloy file inputs.") - parser.add_argument("-n", "--names", dest="names", nargs="+", help="Atom names.") + parser = ap.ArgumentParser(description="Script to create EAM alloy potential files.") + + parser.add_argument("-n", "--names", dest="name", nargs="+", help="Element names.") parser.add_argument("-nr", dest="nr", type=int, default=2000, help="Number of point in r space [default 2000].") parser.add_argument("-nrho", dest="nrho", type=int, default=2000, help="Number of point in rho space [default 2000].") args = parser.parse_args() - atnames = args.names + if not args.name: + parser.print_help() + sys.exit("") + + atnames = args.name nr = args.nr nrho = args.nrho @@ -116,8 +121,8 @@ def main(): try: Database[n] except KeyError: - output = "Atom {} not found.\n".format(n) - valid = "Valid inputs are: {}".format(" ".join(Database.keys())) + output = "Element {} not found in database.\n".format(n) + valid = "Supported elements are: {}".format(" ".join(Database.keys())) sys.exit("".join([output, valid])) ntypes = len(atnames) From 0113346e5467cad417ae2086f8060f9887a34273 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Feb 2022 09:50:43 -0500 Subject: [PATCH 06/16] apply some pylint recommendations --- tools/eam_database/create_eam.py | 35 +++++++++++++------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/tools/eam_database/create_eam.py b/tools/eam_database/create_eam.py index bd1ca8e90a..48423f1a5b 100644 --- a/tools/eam_database/create_eam.py +++ b/tools/eam_database/create_eam.py @@ -11,9 +11,10 @@ This script requires the numpy library. import sys import argparse as ap +from datetime import date + import numpy as np from eamDatabase import Database -from datetime import date def prof(at, r): atom = Database[at] @@ -72,7 +73,7 @@ def write_file(attypes, filename, Fr, rhor, z2r, nrho, drho, nr, dr, rc): f.write(" CONTRIBUTOR: Xiaowang Zhou xzhou@sandia.gov and") f.write(" Lucas Hale lucas.hale@nist.gov") f.write(" Germain Clavier g.m.g.c.clavier@tue.nl/germain.clavier@gmail.com\n") - f.write(" CITATION: X. W. Zhou, R. A. Johnson, H. N. G. Wadley, Phys. Rev. B, 69, 144113(2004) ") + f.write(" CITATION: X. W. Zhou, R. A. Johnson, H. N. G. Wadley, Phys. Rev. B, 69, 144113(2004)\n") f.write("Generated by create_eam.py\n") f.write("{:<5d} {:<24}\n".format(len(attypes), " ".join(attypes))) f.write("{:<5d} {:<24.16e} {:<5d} {:<24.16e} {:<24.16e}\n".format(nrho, drho, nr, dr, rc)) @@ -98,16 +99,15 @@ def write_file(attypes, filename, Fr, rhor, z2r, nrho, drho, nr, dr, rc): if not (i + 1) % 5: f.write("\n") - return - - def main(): - parser = ap.ArgumentParser(description="Script to create EAM alloy potential files.") - parser.add_argument("-n", "--names", dest="name", nargs="+", help="Element names.") - parser.add_argument("-nr", dest="nr", type=int, default=2000, help="Number of point in r space [default 2000].") - parser.add_argument("-nrho", dest="nrho", type=int, default=2000, help="Number of point in rho space [default 2000].") + parser.add_argument("-n", "--names", dest="name", nargs="+", + help="Element names") + parser.add_argument("-nr", dest="nr", type=int, default=2000, + help="Number of point in r space [default 2000]") + parser.add_argument("-nrho", dest="nrho", type=int, default=2000, + help="Number of point in rho space [default 2000]") args = parser.parse_args() if not args.name: parser.print_help() @@ -138,24 +138,20 @@ def main(): dr = r[1] - r[0] r[r < rst] = rst z2r = np.zeros([ntypes, ntypes, nr]) - fmax = -np.inf rhomax = -np.inf for i, n1 in enumerate(atnames): for j, n2 in enumerate(atnames): if j > i: continue - elif i == j: + if i == j: rhor[n1] = prof(n1, r) - rhomax = np.max(rhor[n1]) if rhomax < np.max(rhor[n1]) else rhomax + rhomax = max(rhomax,np.max(rhor[n1])) z2r[i, j, :] = r * pair(n1, n2, r) else: z2r[i, j, :] = r * pair(n1, n2, r) z2r = np.where(z2r, z2r, z2r.transpose((1, 0, 2))) - if rhomax < 2.0 * rhoemax: - rhomax = 2.0 * rhoemax - if rhomax < 100.0: - rhomax = 100.0 + rhomax = max(rhomax, 2.0 * rhoemax, 100.0) rho = np.linspace(0.0, rhomax, num=nrho, dtype=np.double) drho = rho[1] - rho[0] for i, n1 in enumerate(atnames): @@ -163,11 +159,8 @@ def main(): write_file(atnames, outfilename, Fr, rhor, z2r, nrho, drho, nr, dr, rc) - return - - if __name__ == "__main__": try: main() - except KeyboardInterrupt: - raise SystemExit("User interruption.") + except KeyboardInterrupt as exc: + raise SystemExit("User interruption.") from exc From 2fdadcfeb6c18c4775637b3f7ac0f3a647d5e37c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Feb 2022 10:01:20 -0500 Subject: [PATCH 07/16] include UNITS: metadata tag --- tools/eam_database/create_eam.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/eam_database/create_eam.py b/tools/eam_database/create_eam.py index 48423f1a5b..1f929d37db 100644 --- a/tools/eam_database/create_eam.py +++ b/tools/eam_database/create_eam.py @@ -69,10 +69,9 @@ def embed(at, rho): def write_file(attypes, filename, Fr, rhor, z2r, nrho, drho, nr, dr, rc): struc = "fcc" with open(filename, "w") as f: - f.write("DATE: " + date.today().strftime("%Y-%m-%d")) - f.write(" CONTRIBUTOR: Xiaowang Zhou xzhou@sandia.gov and") - f.write(" Lucas Hale lucas.hale@nist.gov") - f.write(" Germain Clavier g.m.g.c.clavier@tue.nl/germain.clavier@gmail.com\n") + f.write("DATE: " + date.today().strftime("%Y-%m-%d") + " UNITS: metal") + f.write(" CONTRIBUTOR: Xiaowang Zhou xzhou@sandia.gov, Lucas Hale lucas.hale@nist.gov,") + f.write(" and Germain Clavier g.m.g.c.clavier@tue.nl/germain.clavier@gmail.com\n") f.write(" CITATION: X. W. Zhou, R. A. Johnson, H. N. G. Wadley, Phys. Rev. B, 69, 144113(2004)\n") f.write("Generated by create_eam.py\n") f.write("{:<5d} {:<24}\n".format(len(attypes), " ".join(attypes))) From 8808b11d269ba43e0cd990ecc967b83711aeaeec Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Feb 2022 10:04:24 -0500 Subject: [PATCH 08/16] must write out 3 lines of comment in fortran code. sync output style with python --- tools/eam_database/create.f | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/eam_database/create.f b/tools/eam_database/create.f index ce6f03a7ac..af8538c1fe 100644 --- a/tools/eam_database/create.f +++ b/tools/eam_database/create.f @@ -243,11 +243,14 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc outfile = outfile(1:index(outfile,' ')-1)//'.eam.alloy' open(unit=1,file=outfile) call date_and_time(DATE=date) - write(1,*) ' DATE: ',date(1:4),'-',date(5:6),'-',date(7:8),' ', + write(1,*) '# DATE: ',date(1:4),'-',date(5:6),'-',date(7:8),' ', + * 'UNITS: metal ', * 'CONTRIBUTOR: Xiaowang Zhou xzhou@sandia.gov and ', * 'Lucas Hale lucas.hale@nist.gov ', * 'CITATION: X. W. Zhou, R. A. Johnson, ', * 'H. N. G. Wadley, Phys. Rev. B, 69, 144113(2004)' + write(1,*) '# created by create.f' + write(1,*) '#' write(1,8)ntypes,outelem 8 format(i5,' ',a24) write(1,9)nrho,drho,nr,dr,rc From 096ea21dd908c8829f075344c5b4ed65a152f6c5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Feb 2022 10:12:16 -0500 Subject: [PATCH 09/16] correct potential file output header (must have 3 comment lines) --- tools/eam_database/create.f | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/eam_database/create.f b/tools/eam_database/create.f index af8538c1fe..54b0d55ab7 100644 --- a/tools/eam_database/create.f +++ b/tools/eam_database/create.f @@ -243,14 +243,12 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc outfile = outfile(1:index(outfile,' ')-1)//'.eam.alloy' open(unit=1,file=outfile) call date_and_time(DATE=date) - write(1,*) '# DATE: ',date(1:4),'-',date(5:6),'-',date(7:8),' ', - * 'UNITS: metal ', - * 'CONTRIBUTOR: Xiaowang Zhou xzhou@sandia.gov and ', - * 'Lucas Hale lucas.hale@nist.gov ', - * 'CITATION: X. W. Zhou, R. A. Johnson, ', + write(1,*) 'DATE: ',date(1:4),'-',date(5:6),'-',date(7:8), + * ' UNITS: metal CONTRIBUTOR: Xiaowang Zhou xzhou@sandia.gov and ', + * 'Lucas Hale lucas.hale@nist.gov ' + write(1,*) 'CITATION: X. W. Zhou, R. A. Johnson, ', * 'H. N. G. Wadley, Phys. Rev. B, 69, 144113(2004)' - write(1,*) '# created by create.f' - write(1,*) '#' + write(1,*) 'Generated by create.f' write(1,8)ntypes,outelem 8 format(i5,' ',a24) write(1,9)nrho,drho,nr,dr,rc From 4343e8194c8fad17f593b602eb934e71c44cbc36 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Feb 2022 10:20:49 -0500 Subject: [PATCH 10/16] update README file --- tools/eam_database/README | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/tools/eam_database/README b/tools/eam_database/README index fa868b583b..21f1fe15d1 100644 --- a/tools/eam_database/README +++ b/tools/eam_database/README @@ -1,9 +1,11 @@ EAM database tool -Xiaowang Zhou (Sandia), xzhou at sandia.gov -Revised version including fixes from https://www.ctcms.nist.gov/potentials/entry/2004--Zhou-X-W-Johnson-R-A-Wadley-H-N-G--Al/ +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/ -based on this paper: +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). @@ -26,10 +28,25 @@ 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: +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 -4) in DYNAMO or LAMMPS context this file is referred to as a setfl file - that can be used with the LAMMPS pair_style eam/alloy command + +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 From d85788305d8877e37796dd539f7420379aaa9bf7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Feb 2022 10:33:20 -0500 Subject: [PATCH 11/16] update manual --- doc/src/Tools.rst | 25 ++++++++++++++++----- doc/utils/sphinx-config/false_positives.txt | 2 ++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index 0788a27623..f24659b278 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -277,13 +277,15 @@ at ens-lyon.fr, alain.dequidt at uca.fr eam database tool ----------------------------- -The tools/eam_database directory contains a Fortran program that will -generate EAM alloy setfl potential files for any combination of 17 -elements: Cu, Ag, Au, Ni, Pd, Pt, Al, Pb, Fe, Mo, Ta, W, Mg, Co, Ti, -Zr, Cr. The files can then be used with the :doc:`pair_style eam/alloy ` command. +The tools/eam_database directory contains a Fortran and a Python program +that will generate EAM alloy setfl potential files for any combination +of the 17 elements: Cu, Ag, Au, Ni, Pd, Pt, Al, Pb, Fe, Mo, Ta, W, Mg, +Co, Ti, Zr, Cr. The files can then be used with the :doc:`pair_style +eam/alloy ` command. -The tool is authored by Xiaowang Zhou (Sandia), xzhou at sandia.gov, -with updates from Lucas Hale (NIST) lucas.hale at nist.gov and is based on his paper: +The Fortran version of the tool was authored by Xiaowang Zhou (Sandia), +xzhou at sandia.gov, with updates from Lucas Hale (NIST) lucas.hale at +nist.gov and is based on his paper: X. W. Zhou, R. A. Johnson, and H. N. G. Wadley, Phys. Rev. B, 69, 144113 (2004). @@ -292,6 +294,17 @@ The parameters for Cr were taken from: Lin Z B, Johnson R A and Zhigilei L V, Phys. Rev. B 77 214108 (2008). +The Python version of the tool was authored by Germain Clavier +(TU Eindhoven) g.m.g.c.clavier at tue.nl or germain.clavier at gmail.com + +.. note:: + + The parameters in the database are only optimized for individual + elements. The mixed parameters for interactions between different + elements generated by this tool are derived from simple mixing rules + and are thus inferior to parameterizations that are specifically + optimized for specific mixtures and combinations of elements. + ---------- .. _eamgn: diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 1d4c27822b..c441708ba2 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -1141,6 +1141,7 @@ Geier gencode georg Georg +germain Germann Germano gerolf @@ -1812,6 +1813,7 @@ lsfftw ltbbmalloc Lua lubricateU +lucas lucy Luding Luijten From 8431d72d75e4e0f662ee192132878e993b288062 Mon Sep 17 00:00:00 2001 From: Germain Clavier Date: Mon, 14 Feb 2022 21:29:51 +0100 Subject: [PATCH 12/16] Added a test directory to tools/eam_database --- tools/eam_database/test/EAM.input | 9 + tools/eam_database/test/EAM_code | 1 + tools/eam_database/test/README | 2 + tools/eam_database/test/create_eam.py | 1 + tools/eam_database/test/create_lattice.lmp | 20 + tools/eam_database/test/data.lmp | 519 +++++++++++++++++++++ tools/eam_database/test/eamDatabase.py | 1 + tools/eam_database/test/errors.dat | 136 ++++++ tools/eam_database/test/in.lmp | 33 ++ tools/eam_database/test/log.lattice | 36 ++ tools/eam_database/test/test.sh | 33 ++ 11 files changed, 791 insertions(+) create mode 100644 tools/eam_database/test/EAM.input create mode 120000 tools/eam_database/test/EAM_code create mode 100644 tools/eam_database/test/README create mode 120000 tools/eam_database/test/create_eam.py create mode 100644 tools/eam_database/test/create_lattice.lmp create mode 100644 tools/eam_database/test/data.lmp create mode 120000 tools/eam_database/test/eamDatabase.py create mode 100644 tools/eam_database/test/errors.dat create mode 100644 tools/eam_database/test/in.lmp create mode 100644 tools/eam_database/test/log.lattice create mode 100755 tools/eam_database/test/test.sh diff --git a/tools/eam_database/test/EAM.input b/tools/eam_database/test/EAM.input new file mode 100644 index 0000000000..4e16d7df69 --- /dev/null +++ b/tools/eam_database/test/EAM.input @@ -0,0 +1,9 @@ + &funccard + atomtype='@ELEM1@' + &end + &funccard + atomtype='@ELEM2@' + &end + &funccard + &end + diff --git a/tools/eam_database/test/EAM_code b/tools/eam_database/test/EAM_code new file mode 120000 index 0000000000..8c67aeaca3 --- /dev/null +++ b/tools/eam_database/test/EAM_code @@ -0,0 +1 @@ +../EAM_code \ No newline at end of file diff --git a/tools/eam_database/test/README b/tools/eam_database/test/README new file mode 100644 index 0000000000..4812f7526f --- /dev/null +++ b/tools/eam_database/test/README @@ -0,0 +1,2 @@ +This directory contains a systematic regression test for eam parameters +comparing the old Zhou's FORTRAN version with the new Python script. diff --git a/tools/eam_database/test/create_eam.py b/tools/eam_database/test/create_eam.py new file mode 120000 index 0000000000..610cdcbb77 --- /dev/null +++ b/tools/eam_database/test/create_eam.py @@ -0,0 +1 @@ +../create_eam.py \ No newline at end of file diff --git a/tools/eam_database/test/create_lattice.lmp b/tools/eam_database/test/create_lattice.lmp new file mode 100644 index 0000000000..78591a9145 --- /dev/null +++ b/tools/eam_database/test/create_lattice.lmp @@ -0,0 +1,20 @@ +# Creates an "NaCl like" structure in data.lmp file +# Assigns a type 2 to the second atom of a bcc lattice +# replicate the box in every direction 5x5x5=250 atoms +units metal +boundary p p p +atom_style atomic + +lattice bcc 5.4 +region Myreg block 0 1 0 1 0 1 units lattice + +create_box 2 Myreg +create_atoms 1 box + +set atom 2 type 2 + +mass * 1. + +replicate 5 5 5 + +write_data data.lmp diff --git a/tools/eam_database/test/data.lmp b/tools/eam_database/test/data.lmp new file mode 100644 index 0000000000..ee8d7530c8 --- /dev/null +++ b/tools/eam_database/test/data.lmp @@ -0,0 +1,519 @@ +LAMMPS data file via write_data, version 7 Jan 2022, timestep = 0 + +250 atoms +2 atom types + +0 27 xlo xhi +0 27 ylo yhi +0 27 zlo zhi + +Masses + +1 1 +2 1 + +Atoms # atomic + +1 1 0 0 0 0 0 0 +2 2 2.7 2.7 2.7 0 0 0 +51 1 0 0 5.4 0 0 0 +52 2 2.7 2.7 8.100000000000001 0 0 0 +101 1 0 0 10.8 0 0 0 +102 2 2.7 2.7 13.5 0 0 0 +151 1 0 0 16.200000000000003 0 0 0 +152 2 2.7 2.7 18.900000000000002 0 0 0 +201 1 0 0 21.6 0 0 0 +202 2 2.7 2.7 24.3 0 0 0 +11 1 0 5.4 0 0 0 0 +12 2 2.7 8.100000000000001 2.7 0 0 0 +61 1 0 5.4 5.4 0 0 0 +62 2 2.7 8.100000000000001 8.100000000000001 0 0 0 +111 1 0 5.4 10.8 0 0 0 +112 2 2.7 8.100000000000001 13.5 0 0 0 +161 1 0 5.4 16.200000000000003 0 0 0 +162 2 2.7 8.100000000000001 18.900000000000002 0 0 0 +211 1 0 5.4 21.6 0 0 0 +212 2 2.7 8.100000000000001 24.3 0 0 0 +21 1 0 10.8 0 0 0 0 +22 2 2.7 13.5 2.7 0 0 0 +71 1 0 10.8 5.4 0 0 0 +72 2 2.7 13.5 8.100000000000001 0 0 0 +121 1 0 10.8 10.8 0 0 0 +122 2 2.7 13.5 13.5 0 0 0 +171 1 0 10.8 16.200000000000003 0 0 0 +172 2 2.7 13.5 18.900000000000002 0 0 0 +221 1 0 10.8 21.6 0 0 0 +222 2 2.7 13.5 24.3 0 0 0 +31 1 0 16.200000000000003 0 0 0 0 +32 2 2.7 18.900000000000002 2.7 0 0 0 +81 1 0 16.200000000000003 5.4 0 0 0 +82 2 2.7 18.900000000000002 8.100000000000001 0 0 0 +131 1 0 16.200000000000003 10.8 0 0 0 +132 2 2.7 18.900000000000002 13.5 0 0 0 +181 1 0 16.200000000000003 16.200000000000003 0 0 0 +182 2 2.7 18.900000000000002 18.900000000000002 0 0 0 +231 1 0 16.200000000000003 21.6 0 0 0 +232 2 2.7 18.900000000000002 24.3 0 0 0 +41 1 0 21.6 0 0 0 0 +42 2 2.7 24.3 2.7 0 0 0 +91 1 0 21.6 5.4 0 0 0 +92 2 2.7 24.3 8.100000000000001 0 0 0 +141 1 0 21.6 10.8 0 0 0 +142 2 2.7 24.3 13.5 0 0 0 +191 1 0 21.6 16.200000000000003 0 0 0 +192 2 2.7 24.3 18.900000000000002 0 0 0 +241 1 0 21.6 21.6 0 0 0 +242 2 2.7 24.3 24.3 0 0 0 +3 1 5.4 0 0 0 0 0 +4 2 8.100000000000001 2.7 2.7 0 0 0 +53 1 5.4 0 5.4 0 0 0 +54 2 8.100000000000001 2.7 8.100000000000001 0 0 0 +103 1 5.4 0 10.8 0 0 0 +104 2 8.100000000000001 2.7 13.5 0 0 0 +153 1 5.4 0 16.200000000000003 0 0 0 +154 2 8.100000000000001 2.7 18.900000000000002 0 0 0 +203 1 5.4 0 21.6 0 0 0 +204 2 8.100000000000001 2.7 24.3 0 0 0 +13 1 5.4 5.4 0 0 0 0 +14 2 8.100000000000001 8.100000000000001 2.7 0 0 0 +63 1 5.4 5.4 5.4 0 0 0 +64 2 8.100000000000001 8.100000000000001 8.100000000000001 0 0 0 +113 1 5.4 5.4 10.8 0 0 0 +114 2 8.100000000000001 8.100000000000001 13.5 0 0 0 +163 1 5.4 5.4 16.200000000000003 0 0 0 +164 2 8.100000000000001 8.100000000000001 18.900000000000002 0 0 0 +213 1 5.4 5.4 21.6 0 0 0 +214 2 8.100000000000001 8.100000000000001 24.3 0 0 0 +23 1 5.4 10.8 0 0 0 0 +24 2 8.100000000000001 13.5 2.7 0 0 0 +73 1 5.4 10.8 5.4 0 0 0 +74 2 8.100000000000001 13.5 8.100000000000001 0 0 0 +123 1 5.4 10.8 10.8 0 0 0 +124 2 8.100000000000001 13.5 13.5 0 0 0 +173 1 5.4 10.8 16.200000000000003 0 0 0 +174 2 8.100000000000001 13.5 18.900000000000002 0 0 0 +223 1 5.4 10.8 21.6 0 0 0 +224 2 8.100000000000001 13.5 24.3 0 0 0 +33 1 5.4 16.200000000000003 0 0 0 0 +34 2 8.100000000000001 18.900000000000002 2.7 0 0 0 +83 1 5.4 16.200000000000003 5.4 0 0 0 +84 2 8.100000000000001 18.900000000000002 8.100000000000001 0 0 0 +133 1 5.4 16.200000000000003 10.8 0 0 0 +134 2 8.100000000000001 18.900000000000002 13.5 0 0 0 +183 1 5.4 16.200000000000003 16.200000000000003 0 0 0 +184 2 8.100000000000001 18.900000000000002 18.900000000000002 0 0 0 +233 1 5.4 16.200000000000003 21.6 0 0 0 +234 2 8.100000000000001 18.900000000000002 24.3 0 0 0 +43 1 5.4 21.6 0 0 0 0 +44 2 8.100000000000001 24.3 2.7 0 0 0 +93 1 5.4 21.6 5.4 0 0 0 +94 2 8.100000000000001 24.3 8.100000000000001 0 0 0 +143 1 5.4 21.6 10.8 0 0 0 +144 2 8.100000000000001 24.3 13.5 0 0 0 +193 1 5.4 21.6 16.200000000000003 0 0 0 +194 2 8.100000000000001 24.3 18.900000000000002 0 0 0 +243 1 5.4 21.6 21.6 0 0 0 +244 2 8.100000000000001 24.3 24.3 0 0 0 +5 1 10.8 0 0 0 0 0 +6 2 13.5 2.7 2.7 0 0 0 +55 1 10.8 0 5.4 0 0 0 +56 2 13.5 2.7 8.100000000000001 0 0 0 +105 1 10.8 0 10.8 0 0 0 +106 2 13.5 2.7 13.5 0 0 0 +155 1 10.8 0 16.200000000000003 0 0 0 +156 2 13.5 2.7 18.900000000000002 0 0 0 +205 1 10.8 0 21.6 0 0 0 +206 2 13.5 2.7 24.3 0 0 0 +15 1 10.8 5.4 0 0 0 0 +16 2 13.5 8.100000000000001 2.7 0 0 0 +65 1 10.8 5.4 5.4 0 0 0 +66 2 13.5 8.100000000000001 8.100000000000001 0 0 0 +115 1 10.8 5.4 10.8 0 0 0 +116 2 13.5 8.100000000000001 13.5 0 0 0 +165 1 10.8 5.4 16.200000000000003 0 0 0 +166 2 13.5 8.100000000000001 18.900000000000002 0 0 0 +215 1 10.8 5.4 21.6 0 0 0 +216 2 13.5 8.100000000000001 24.3 0 0 0 +25 1 10.8 10.8 0 0 0 0 +26 2 13.5 13.5 2.7 0 0 0 +75 1 10.8 10.8 5.4 0 0 0 +76 2 13.5 13.5 8.100000000000001 0 0 0 +125 1 10.8 10.8 10.8 0 0 0 +126 2 13.5 13.5 13.5 0 0 0 +175 1 10.8 10.8 16.200000000000003 0 0 0 +176 2 13.5 13.5 18.900000000000002 0 0 0 +225 1 10.8 10.8 21.6 0 0 0 +226 2 13.5 13.5 24.3 0 0 0 +35 1 10.8 16.200000000000003 0 0 0 0 +36 2 13.5 18.900000000000002 2.7 0 0 0 +85 1 10.8 16.200000000000003 5.4 0 0 0 +86 2 13.5 18.900000000000002 8.100000000000001 0 0 0 +135 1 10.8 16.200000000000003 10.8 0 0 0 +136 2 13.5 18.900000000000002 13.5 0 0 0 +185 1 10.8 16.200000000000003 16.200000000000003 0 0 0 +186 2 13.5 18.900000000000002 18.900000000000002 0 0 0 +235 1 10.8 16.200000000000003 21.6 0 0 0 +236 2 13.5 18.900000000000002 24.3 0 0 0 +45 1 10.8 21.6 0 0 0 0 +46 2 13.5 24.3 2.7 0 0 0 +95 1 10.8 21.6 5.4 0 0 0 +96 2 13.5 24.3 8.100000000000001 0 0 0 +145 1 10.8 21.6 10.8 0 0 0 +146 2 13.5 24.3 13.5 0 0 0 +195 1 10.8 21.6 16.200000000000003 0 0 0 +196 2 13.5 24.3 18.900000000000002 0 0 0 +245 1 10.8 21.6 21.6 0 0 0 +246 2 13.5 24.3 24.3 0 0 0 +7 1 16.200000000000003 0 0 0 0 0 +8 2 18.900000000000002 2.7 2.7 0 0 0 +57 1 16.200000000000003 0 5.4 0 0 0 +58 2 18.900000000000002 2.7 8.100000000000001 0 0 0 +107 1 16.200000000000003 0 10.8 0 0 0 +108 2 18.900000000000002 2.7 13.5 0 0 0 +157 1 16.200000000000003 0 16.200000000000003 0 0 0 +158 2 18.900000000000002 2.7 18.900000000000002 0 0 0 +207 1 16.200000000000003 0 21.6 0 0 0 +208 2 18.900000000000002 2.7 24.3 0 0 0 +17 1 16.200000000000003 5.4 0 0 0 0 +18 2 18.900000000000002 8.100000000000001 2.7 0 0 0 +67 1 16.200000000000003 5.4 5.4 0 0 0 +68 2 18.900000000000002 8.100000000000001 8.100000000000001 0 0 0 +117 1 16.200000000000003 5.4 10.8 0 0 0 +118 2 18.900000000000002 8.100000000000001 13.5 0 0 0 +167 1 16.200000000000003 5.4 16.200000000000003 0 0 0 +168 2 18.900000000000002 8.100000000000001 18.900000000000002 0 0 0 +217 1 16.200000000000003 5.4 21.6 0 0 0 +218 2 18.900000000000002 8.100000000000001 24.3 0 0 0 +27 1 16.200000000000003 10.8 0 0 0 0 +28 2 18.900000000000002 13.5 2.7 0 0 0 +77 1 16.200000000000003 10.8 5.4 0 0 0 +78 2 18.900000000000002 13.5 8.100000000000001 0 0 0 +127 1 16.200000000000003 10.8 10.8 0 0 0 +128 2 18.900000000000002 13.5 13.5 0 0 0 +177 1 16.200000000000003 10.8 16.200000000000003 0 0 0 +178 2 18.900000000000002 13.5 18.900000000000002 0 0 0 +227 1 16.200000000000003 10.8 21.6 0 0 0 +228 2 18.900000000000002 13.5 24.3 0 0 0 +37 1 16.200000000000003 16.200000000000003 0 0 0 0 +38 2 18.900000000000002 18.900000000000002 2.7 0 0 0 +87 1 16.200000000000003 16.200000000000003 5.4 0 0 0 +88 2 18.900000000000002 18.900000000000002 8.100000000000001 0 0 0 +137 1 16.200000000000003 16.200000000000003 10.8 0 0 0 +138 2 18.900000000000002 18.900000000000002 13.5 0 0 0 +187 1 16.200000000000003 16.200000000000003 16.200000000000003 0 0 0 +188 2 18.900000000000002 18.900000000000002 18.900000000000002 0 0 0 +237 1 16.200000000000003 16.200000000000003 21.6 0 0 0 +238 2 18.900000000000002 18.900000000000002 24.3 0 0 0 +47 1 16.200000000000003 21.6 0 0 0 0 +48 2 18.900000000000002 24.3 2.7 0 0 0 +97 1 16.200000000000003 21.6 5.4 0 0 0 +98 2 18.900000000000002 24.3 8.100000000000001 0 0 0 +147 1 16.200000000000003 21.6 10.8 0 0 0 +148 2 18.900000000000002 24.3 13.5 0 0 0 +197 1 16.200000000000003 21.6 16.200000000000003 0 0 0 +198 2 18.900000000000002 24.3 18.900000000000002 0 0 0 +247 1 16.200000000000003 21.6 21.6 0 0 0 +248 2 18.900000000000002 24.3 24.3 0 0 0 +9 1 21.6 0 0 0 0 0 +10 2 24.3 2.7 2.7 0 0 0 +59 1 21.6 0 5.4 0 0 0 +60 2 24.3 2.7 8.100000000000001 0 0 0 +109 1 21.6 0 10.8 0 0 0 +110 2 24.3 2.7 13.5 0 0 0 +159 1 21.6 0 16.200000000000003 0 0 0 +160 2 24.3 2.7 18.900000000000002 0 0 0 +209 1 21.6 0 21.6 0 0 0 +210 2 24.3 2.7 24.3 0 0 0 +19 1 21.6 5.4 0 0 0 0 +20 2 24.3 8.100000000000001 2.7 0 0 0 +69 1 21.6 5.4 5.4 0 0 0 +70 2 24.3 8.100000000000001 8.100000000000001 0 0 0 +119 1 21.6 5.4 10.8 0 0 0 +120 2 24.3 8.100000000000001 13.5 0 0 0 +169 1 21.6 5.4 16.200000000000003 0 0 0 +170 2 24.3 8.100000000000001 18.900000000000002 0 0 0 +219 1 21.6 5.4 21.6 0 0 0 +220 2 24.3 8.100000000000001 24.3 0 0 0 +29 1 21.6 10.8 0 0 0 0 +30 2 24.3 13.5 2.7 0 0 0 +79 1 21.6 10.8 5.4 0 0 0 +80 2 24.3 13.5 8.100000000000001 0 0 0 +129 1 21.6 10.8 10.8 0 0 0 +130 2 24.3 13.5 13.5 0 0 0 +179 1 21.6 10.8 16.200000000000003 0 0 0 +180 2 24.3 13.5 18.900000000000002 0 0 0 +229 1 21.6 10.8 21.6 0 0 0 +230 2 24.3 13.5 24.3 0 0 0 +39 1 21.6 16.200000000000003 0 0 0 0 +40 2 24.3 18.900000000000002 2.7 0 0 0 +89 1 21.6 16.200000000000003 5.4 0 0 0 +90 2 24.3 18.900000000000002 8.100000000000001 0 0 0 +139 1 21.6 16.200000000000003 10.8 0 0 0 +140 2 24.3 18.900000000000002 13.5 0 0 0 +189 1 21.6 16.200000000000003 16.200000000000003 0 0 0 +190 2 24.3 18.900000000000002 18.900000000000002 0 0 0 +239 1 21.6 16.200000000000003 21.6 0 0 0 +240 2 24.3 18.900000000000002 24.3 0 0 0 +49 1 21.6 21.6 0 0 0 0 +50 2 24.3 24.3 2.7 0 0 0 +99 1 21.6 21.6 5.4 0 0 0 +100 2 24.3 24.3 8.100000000000001 0 0 0 +149 1 21.6 21.6 10.8 0 0 0 +150 2 24.3 24.3 13.5 0 0 0 +199 1 21.6 21.6 16.200000000000003 0 0 0 +200 2 24.3 24.3 18.900000000000002 0 0 0 +249 1 21.6 21.6 21.6 0 0 0 +250 2 24.3 24.3 24.3 0 0 0 + +Velocities + +1 0 0 0 +2 0 0 0 +51 0 0 0 +52 0 0 0 +101 0 0 0 +102 0 0 0 +151 0 0 0 +152 0 0 0 +201 0 0 0 +202 0 0 0 +11 0 0 0 +12 0 0 0 +61 0 0 0 +62 0 0 0 +111 0 0 0 +112 0 0 0 +161 0 0 0 +162 0 0 0 +211 0 0 0 +212 0 0 0 +21 0 0 0 +22 0 0 0 +71 0 0 0 +72 0 0 0 +121 0 0 0 +122 0 0 0 +171 0 0 0 +172 0 0 0 +221 0 0 0 +222 0 0 0 +31 0 0 0 +32 0 0 0 +81 0 0 0 +82 0 0 0 +131 0 0 0 +132 0 0 0 +181 0 0 0 +182 0 0 0 +231 0 0 0 +232 0 0 0 +41 0 0 0 +42 0 0 0 +91 0 0 0 +92 0 0 0 +141 0 0 0 +142 0 0 0 +191 0 0 0 +192 0 0 0 +241 0 0 0 +242 0 0 0 +3 0 0 0 +4 0 0 0 +53 0 0 0 +54 0 0 0 +103 0 0 0 +104 0 0 0 +153 0 0 0 +154 0 0 0 +203 0 0 0 +204 0 0 0 +13 0 0 0 +14 0 0 0 +63 0 0 0 +64 0 0 0 +113 0 0 0 +114 0 0 0 +163 0 0 0 +164 0 0 0 +213 0 0 0 +214 0 0 0 +23 0 0 0 +24 0 0 0 +73 0 0 0 +74 0 0 0 +123 0 0 0 +124 0 0 0 +173 0 0 0 +174 0 0 0 +223 0 0 0 +224 0 0 0 +33 0 0 0 +34 0 0 0 +83 0 0 0 +84 0 0 0 +133 0 0 0 +134 0 0 0 +183 0 0 0 +184 0 0 0 +233 0 0 0 +234 0 0 0 +43 0 0 0 +44 0 0 0 +93 0 0 0 +94 0 0 0 +143 0 0 0 +144 0 0 0 +193 0 0 0 +194 0 0 0 +243 0 0 0 +244 0 0 0 +5 0 0 0 +6 0 0 0 +55 0 0 0 +56 0 0 0 +105 0 0 0 +106 0 0 0 +155 0 0 0 +156 0 0 0 +205 0 0 0 +206 0 0 0 +15 0 0 0 +16 0 0 0 +65 0 0 0 +66 0 0 0 +115 0 0 0 +116 0 0 0 +165 0 0 0 +166 0 0 0 +215 0 0 0 +216 0 0 0 +25 0 0 0 +26 0 0 0 +75 0 0 0 +76 0 0 0 +125 0 0 0 +126 0 0 0 +175 0 0 0 +176 0 0 0 +225 0 0 0 +226 0 0 0 +35 0 0 0 +36 0 0 0 +85 0 0 0 +86 0 0 0 +135 0 0 0 +136 0 0 0 +185 0 0 0 +186 0 0 0 +235 0 0 0 +236 0 0 0 +45 0 0 0 +46 0 0 0 +95 0 0 0 +96 0 0 0 +145 0 0 0 +146 0 0 0 +195 0 0 0 +196 0 0 0 +245 0 0 0 +246 0 0 0 +7 0 0 0 +8 0 0 0 +57 0 0 0 +58 0 0 0 +107 0 0 0 +108 0 0 0 +157 0 0 0 +158 0 0 0 +207 0 0 0 +208 0 0 0 +17 0 0 0 +18 0 0 0 +67 0 0 0 +68 0 0 0 +117 0 0 0 +118 0 0 0 +167 0 0 0 +168 0 0 0 +217 0 0 0 +218 0 0 0 +27 0 0 0 +28 0 0 0 +77 0 0 0 +78 0 0 0 +127 0 0 0 +128 0 0 0 +177 0 0 0 +178 0 0 0 +227 0 0 0 +228 0 0 0 +37 0 0 0 +38 0 0 0 +87 0 0 0 +88 0 0 0 +137 0 0 0 +138 0 0 0 +187 0 0 0 +188 0 0 0 +237 0 0 0 +238 0 0 0 +47 0 0 0 +48 0 0 0 +97 0 0 0 +98 0 0 0 +147 0 0 0 +148 0 0 0 +197 0 0 0 +198 0 0 0 +247 0 0 0 +248 0 0 0 +9 0 0 0 +10 0 0 0 +59 0 0 0 +60 0 0 0 +109 0 0 0 +110 0 0 0 +159 0 0 0 +160 0 0 0 +209 0 0 0 +210 0 0 0 +19 0 0 0 +20 0 0 0 +69 0 0 0 +70 0 0 0 +119 0 0 0 +120 0 0 0 +169 0 0 0 +170 0 0 0 +219 0 0 0 +220 0 0 0 +29 0 0 0 +30 0 0 0 +79 0 0 0 +80 0 0 0 +129 0 0 0 +130 0 0 0 +179 0 0 0 +180 0 0 0 +229 0 0 0 +230 0 0 0 +39 0 0 0 +40 0 0 0 +89 0 0 0 +90 0 0 0 +139 0 0 0 +140 0 0 0 +189 0 0 0 +190 0 0 0 +239 0 0 0 +240 0 0 0 +49 0 0 0 +50 0 0 0 +99 0 0 0 +100 0 0 0 +149 0 0 0 +150 0 0 0 +199 0 0 0 +200 0 0 0 +249 0 0 0 +250 0 0 0 diff --git a/tools/eam_database/test/eamDatabase.py b/tools/eam_database/test/eamDatabase.py new file mode 120000 index 0000000000..600def02b9 --- /dev/null +++ b/tools/eam_database/test/eamDatabase.py @@ -0,0 +1 @@ +../eamDatabase.py \ No newline at end of file diff --git a/tools/eam_database/test/errors.dat b/tools/eam_database/test/errors.dat new file mode 100644 index 0000000000..1ee93b0a9d --- /dev/null +++ b/tools/eam_database/test/errors.dat @@ -0,0 +1,136 @@ +Relative energy and pressure error for pair Cu Cu de = 0; dp = 0 +Relative energy and pressure error for pair Cu Ag de = 0; dp = 0 +Relative energy and pressure error for pair Cu Au de = 0; dp = 0 +Relative energy and pressure error for pair Cu Ni de = 0; dp = 0 +Relative energy and pressure error for pair Cu Pd de = 0; dp = 0 +Relative energy and pressure error for pair Cu Pt de = 0; dp = 0 +Relative energy and pressure error for pair Cu Al de = 0; dp = 0 +Relative energy and pressure error for pair Cu Pb de = 0; dp = 0 +Relative energy and pressure error for pair Cu Fe de = 0; dp = 0 +Relative energy and pressure error for pair Cu Mo de = 0; dp = 0 +Relative energy and pressure error for pair Cu Ta de = 0; dp = 0 +Relative energy and pressure error for pair Cu W de = 0; dp = 0 +Relative energy and pressure error for pair Cu Mg de = 0; dp = 0 +Relative energy and pressure error for pair Cu Co de = 0; dp = 0 +Relative energy and pressure error for pair Cu Ti de = 0; dp = 0 +Relative energy and pressure error for pair Cu Zr de = 0; dp = 0 +Relative energy and pressure error for pair Ag Ag de = 0; dp = 0 +Relative energy and pressure error for pair Ag Au de = 0; dp = 0 +Relative energy and pressure error for pair Ag Ni de = 0; dp = 0 +Relative energy and pressure error for pair Ag Pd de = 0; dp = 0 +Relative energy and pressure error for pair Ag Pt de = 0; dp = 0 +Relative energy and pressure error for pair Ag Al de = 0; dp = 0 +Relative energy and pressure error for pair Ag Pb de = 0; dp = 0 +Relative energy and pressure error for pair Ag Fe de = 0; dp = 0 +Relative energy and pressure error for pair Ag Mo de = 0; dp = 0 +Relative energy and pressure error for pair Ag Ta de = 0; dp = 0 +Relative energy and pressure error for pair Ag W de = 0; dp = 0 +Relative energy and pressure error for pair Ag Mg de = 0; dp = 0 +Relative energy and pressure error for pair Ag Co de = 0; dp = 0 +Relative energy and pressure error for pair Ag Ti de = 0; dp = 0 +Relative energy and pressure error for pair Ag Zr de = 0; dp = 0 +Relative energy and pressure error for pair Au Au de = 0; dp = 0 +Relative energy and pressure error for pair Au Ni de = 0; dp = 0 +Relative energy and pressure error for pair Au Pd de = 0; dp = 0 +Relative energy and pressure error for pair Au Pt de = 0; dp = 0 +Relative energy and pressure error for pair Au Al de = 0; dp = 0 +Relative energy and pressure error for pair Au Pb de = 0; dp = 0 +Relative energy and pressure error for pair Au Fe de = 0; dp = 0 +Relative energy and pressure error for pair Au Mo de = 0; dp = 0 +Relative energy and pressure error for pair Au Ta de = 0; dp = 0 +Relative energy and pressure error for pair Au W de = 0; dp = 0 +Relative energy and pressure error for pair Au Mg de = 0; dp = 0 +Relative energy and pressure error for pair Au Co de = 0; dp = 0 +Relative energy and pressure error for pair Au Ti de = 0; dp = 0 +Relative energy and pressure error for pair Au Zr de = 0; dp = 0 +Relative energy and pressure error for pair Ni Ni de = 0; dp = 0 +Relative energy and pressure error for pair Ni Pd de = 0; dp = 0 +Relative energy and pressure error for pair Ni Pt de = 0; dp = 0 +Relative energy and pressure error for pair Ni Al de = 0; dp = 0 +Relative energy and pressure error for pair Ni Pb de = 0; dp = 0 +Relative energy and pressure error for pair Ni Fe de = 0; dp = 0 +Relative energy and pressure error for pair Ni Mo de = 0; dp = 0 +Relative energy and pressure error for pair Ni Ta de = 0; dp = 0 +Relative energy and pressure error for pair Ni W de = 0; dp = 0 +Relative energy and pressure error for pair Ni Mg de = 0; dp = 0 +Relative energy and pressure error for pair Ni Co de = 0; dp = 0 +Relative energy and pressure error for pair Ni Ti de = 0; dp = 0 +Relative energy and pressure error for pair Ni Zr de = 0; dp = 0 +Relative energy and pressure error for pair Pd Pd de = 0; dp = 0 +Relative energy and pressure error for pair Pd Pt de = 0; dp = 0 +Relative energy and pressure error for pair Pd Al de = 0; dp = 0 +Relative energy and pressure error for pair Pd Pb de = 0; dp = 0 +Relative energy and pressure error for pair Pd Fe de = 0; dp = 0 +Relative energy and pressure error for pair Pd Mo de = 0; dp = 0 +Relative energy and pressure error for pair Pd Ta de = 0; dp = 0 +Relative energy and pressure error for pair Pd W de = 0; dp = 0 +Relative energy and pressure error for pair Pd Mg de = 0; dp = 0 +Relative energy and pressure error for pair Pd Co de = 0; dp = 0 +Relative energy and pressure error for pair Pd Ti de = 0; dp = 0 +Relative energy and pressure error for pair Pd Zr de = 0; dp = 0 +Relative energy and pressure error for pair Pt Pt de = 0; dp = 0 +Relative energy and pressure error for pair Pt Al de = 0; dp = 0 +Relative energy and pressure error for pair Pt Pb de = 0; dp = 0 +Relative energy and pressure error for pair Pt Fe de = 0; dp = 0 +Relative energy and pressure error for pair Pt Mo de = 0; dp = 0 +Relative energy and pressure error for pair Pt Ta de = 0; dp = 0 +Relative energy and pressure error for pair Pt W de = 0; dp = 0 +Relative energy and pressure error for pair Pt Mg de = 0; dp = 0 +Relative energy and pressure error for pair Pt Co de = 0; dp = 0 +Relative energy and pressure error for pair Pt Ti de = 0; dp = 0 +Relative energy and pressure error for pair Pt Zr de = 0; dp = 0 +Relative energy and pressure error for pair Al Al de = 0; dp = 0 +Relative energy and pressure error for pair Al Pb de = 0; dp = 0 +Relative energy and pressure error for pair Al Fe de = 0; dp = 0 +Relative energy and pressure error for pair Al Mo de = 0; dp = 0 +Relative energy and pressure error for pair Al Ta de = 0; dp = 0 +Relative energy and pressure error for pair Al W de = 0; dp = 0 +Relative energy and pressure error for pair Al Mg de = 0; dp = 0 +Relative energy and pressure error for pair Al Co de = 0; dp = 0 +Relative energy and pressure error for pair Al Ti de = 0; dp = 0 +Relative energy and pressure error for pair Al Zr de = 0; dp = 0 +Relative energy and pressure error for pair Pb Pb de = 0; dp = 0 +Relative energy and pressure error for pair Pb Fe de = 0; dp = 0 +Relative energy and pressure error for pair Pb Mo de = 0; dp = 0 +Relative energy and pressure error for pair Pb Ta de = 0; dp = 0 +Relative energy and pressure error for pair Pb W de = 0; dp = 0 +Relative energy and pressure error for pair Pb Mg de = 0; dp = 0 +Relative energy and pressure error for pair Pb Co de = 0; dp = 0 +Relative energy and pressure error for pair Pb Ti de = 0; dp = 0 +Relative energy and pressure error for pair Pb Zr de = 0; dp = 0 +Relative energy and pressure error for pair Fe Fe de = 0; dp = 0 +Relative energy and pressure error for pair Fe Mo de = 0; dp = 0 +Relative energy and pressure error for pair Fe Ta de = 0; dp = 0 +Relative energy and pressure error for pair Fe W de = 0; dp = 0 +Relative energy and pressure error for pair Fe Mg de = 0; dp = 0 +Relative energy and pressure error for pair Fe Co de = 0; dp = 0 +Relative energy and pressure error for pair Fe Ti de = 0; dp = 0 +Relative energy and pressure error for pair Fe Zr de = 0; dp = 0 +Relative energy and pressure error for pair Mo Mo de = 0; dp = 0 +Relative energy and pressure error for pair Mo Ta de = 0; dp = 0 +Relative energy and pressure error for pair Mo W de = 0; dp = 0 +Relative energy and pressure error for pair Mo Mg de = 0; dp = 0 +Relative energy and pressure error for pair Mo Co de = 0; dp = 0 +Relative energy and pressure error for pair Mo Ti de = 0; dp = 0 +Relative energy and pressure error for pair Mo Zr de = 0; dp = 0 +Relative energy and pressure error for pair Ta Ta de = 0; dp = 0 +Relative energy and pressure error for pair Ta W de = 0; dp = 0 +Relative energy and pressure error for pair Ta Mg de = 0; dp = 0 +Relative energy and pressure error for pair Ta Co de = 0; dp = 0 +Relative energy and pressure error for pair Ta Ti de = 0; dp = 0 +Relative energy and pressure error for pair Ta Zr de = 0; dp = 0 +Relative energy and pressure error for pair W W de = 0; dp = 0 +Relative energy and pressure error for pair W Mg de = 0; dp = 0 +Relative energy and pressure error for pair W Co de = 0; dp = 0 +Relative energy and pressure error for pair W Ti de = 0; dp = 0 +Relative energy and pressure error for pair W Zr de = 0; dp = 0 +Relative energy and pressure error for pair Mg Mg de = 0; dp = 0 +Relative energy and pressure error for pair Mg Co de = 0; dp = 0 +Relative energy and pressure error for pair Mg Ti de = 0; dp = 0 +Relative energy and pressure error for pair Mg Zr de = 0; dp = 0 +Relative energy and pressure error for pair Co Co de = 0; dp = 0 +Relative energy and pressure error for pair Co Ti de = 0; dp = 0 +Relative energy and pressure error for pair Co Zr de = 0; dp = 0 +Relative energy and pressure error for pair Ti Ti de = 0; dp = 0 +Relative energy and pressure error for pair Ti Zr de = 0; dp = 0 +Relative energy and pressure error for pair Zr Zr de = 0; dp = 0 diff --git a/tools/eam_database/test/in.lmp b/tools/eam_database/test/in.lmp new file mode 100644 index 0000000000..ecc8f2fc0c --- /dev/null +++ b/tools/eam_database/test/in.lmp @@ -0,0 +1,33 @@ +units metal +boundary p p p +atom_style atomic + +read_data data.lmp + +pair_style eam/alloy +pair_coeff * * @FORTRANFILE@ @ELEM1@ @ELEM2@ + +variable etot equal etotal +variable press equal press +thermo_style custom pe etotal press + +run 0 + +variable efor equal ${etot} +variable pfor equal ${press} +thermo_style custom pe etotal v_efor press v_pfor + +run 0 + +pair_coeff * * @PYTHONFILE@ @ELEM1@ @ELEM2@ + +variable epyt equal ${etot} +variable ppyt equal ${press} +thermo_style custom pe etotal v_epyt press v_ppyt + +run 0 + +variable e equal "1 - v_epyt/v_efor" +variable p equal "1 - v_ppyt/v_pfor" + +print "Relative energy and pressure error for pair @ELEM1@ @ELEM2@ de = $e; dp = $p" append ../errors.dat diff --git a/tools/eam_database/test/log.lattice b/tools/eam_database/test/log.lattice new file mode 100644 index 0000000000..e2f332f506 --- /dev/null +++ b/tools/eam_database/test/log.lattice @@ -0,0 +1,36 @@ +LAMMPS (7 Jan 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +units metal +boundary p p p +atom_style atomic + +lattice bcc 5.4 +Lattice spacing in x,y,z = 5.4 5.4 5.4 +region Myreg block 0 1 0 1 0 1 units lattice + +create_box 2 Myreg +Created orthogonal box = (0 0 0) to (5.4 5.4 5.4) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 2 atoms + using lattice units in orthogonal box = (0 0 0) to (5.4 5.4 5.4) + create_atoms CPU = 0.000 seconds + +set atom 2 type 2 +Setting atom values ... + 1 settings made for type + +mass * 1. + +replicate 5 5 5 +Replicating atoms ... + orthogonal box = (0 0 0) to (27 27 27) + 1 by 1 by 1 MPI processor grid + 250 atoms + replicate CPU = 0.000 seconds + +write_data data.lmp +System init for write_data ... +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:209) +Total wall time: 0:00:00 diff --git a/tools/eam_database/test/test.sh b/tools/eam_database/test/test.sh new file mode 100755 index 0000000000..dae46b5221 --- /dev/null +++ b/tools/eam_database/test/test.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +elements=(Cu Ag Au Ni Pd Pt Al Pb Fe Mo Ta W Mg Co Ti Zr) + +rm -r tmp +for ((i=0; i< ${#elements[@]}; i=$i+1)) +do + for (( j=$i; j<${#elements[@]}; j=$j+1)) + do + e1=${elements[${i}]} + e2=${elements[${j}]} + echo "e1 = ${e1} e2 = ${e2}" + pythonfile="${e1}${e2}.eam.alloy.python" + fortranfile="${e1}${e2}.eam.alloy.fortran" + mkdir tmp; + cp eamDatabase.py create_eam.py in.lmp data.lmp a.out EAM.input EAM_code tmp/ + cd tmp + sed -i "s/@ELEM1@/${e1}/g" EAM.input + sed -i "s/@ELEM2@/${e2}/g" EAM.input + ./a.out < EAM.input + mv "${e1}${e2}_Zhou04.eam.alloy" ${fortranfile} + python create_eam.py -n ${e1} ${e2} + mv "${e1}${e2}.eam.alloy" ${pythonfile} + sed -i "s/@ELEM1@/${e1}/g" in.lmp + sed -i "s/@ELEM2@/${e2}/g" in.lmp + sed -i "s/@PYTHONFILE@/${pythonfile}/g" in.lmp + sed -i "s/@FORTRANFILE@/${fortranfile}/g" in.lmp + lmp -i in.lmp + cd ../ + rm -r tmp + done +done + From c65dbd338b5d320bf3204336e8dbfe01b7b029a4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 14 Feb 2022 17:44:33 -0500 Subject: [PATCH 13/16] change create_eam.py so it can be called as a function from another script --- tools/eam_database/create_eam.py | 6 +++--- unittest/tools/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/eam_database/create_eam.py b/tools/eam_database/create_eam.py index 1f929d37db..8b230b87b4 100644 --- a/tools/eam_database/create_eam.py +++ b/tools/eam_database/create_eam.py @@ -98,7 +98,7 @@ def write_file(attypes, filename, Fr, rhor, z2r, nrho, drho, nr, dr, rc): if not (i + 1) % 5: f.write("\n") -def main(): +def create_eam(argv=None): parser = ap.ArgumentParser(description="Script to create EAM alloy potential files.") parser.add_argument("-n", "--names", dest="name", nargs="+", @@ -107,7 +107,7 @@ def main(): help="Number of point in r space [default 2000]") parser.add_argument("-nrho", dest="nrho", type=int, default=2000, help="Number of point in rho space [default 2000]") - args = parser.parse_args() + args = parser.parse_args(argv) if not args.name: parser.print_help() sys.exit("") @@ -160,6 +160,6 @@ def main(): if __name__ == "__main__": try: - main() + create_eam(sys.argv[1:]) except KeyboardInterrupt as exc: raise SystemExit("User interruption.") from exc diff --git a/unittest/tools/CMakeLists.txt b/unittest/tools/CMakeLists.txt index 5ed9c55b57..bde006a3ab 100644 --- a/unittest/tools/CMakeLists.txt +++ b/unittest/tools/CMakeLists.txt @@ -6,7 +6,7 @@ if(CMAKE_VERSION VERSION_LESS 3.12) set(Python_EXECUTABLE ${PYTHON_EXECUTABLE}) endif() else() - find_package(Python3 COMPONENTS Interpreter) + find_package(Python 3.5 COMPONENTS Interpreter) endif() if(Python_EXECUTABLE) From b0c0251154f4199626e1ceef33b7701dafadc619 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 14 Feb 2022 18:06:24 -0500 Subject: [PATCH 14/16] delete unwanted files --- tools/eam_database/test/errors.dat | 136 ---------------------------- tools/eam_database/test/log.lattice | 36 -------- 2 files changed, 172 deletions(-) delete mode 100644 tools/eam_database/test/errors.dat delete mode 100644 tools/eam_database/test/log.lattice diff --git a/tools/eam_database/test/errors.dat b/tools/eam_database/test/errors.dat deleted file mode 100644 index 1ee93b0a9d..0000000000 --- a/tools/eam_database/test/errors.dat +++ /dev/null @@ -1,136 +0,0 @@ -Relative energy and pressure error for pair Cu Cu de = 0; dp = 0 -Relative energy and pressure error for pair Cu Ag de = 0; dp = 0 -Relative energy and pressure error for pair Cu Au de = 0; dp = 0 -Relative energy and pressure error for pair Cu Ni de = 0; dp = 0 -Relative energy and pressure error for pair Cu Pd de = 0; dp = 0 -Relative energy and pressure error for pair Cu Pt de = 0; dp = 0 -Relative energy and pressure error for pair Cu Al de = 0; dp = 0 -Relative energy and pressure error for pair Cu Pb de = 0; dp = 0 -Relative energy and pressure error for pair Cu Fe de = 0; dp = 0 -Relative energy and pressure error for pair Cu Mo de = 0; dp = 0 -Relative energy and pressure error for pair Cu Ta de = 0; dp = 0 -Relative energy and pressure error for pair Cu W de = 0; dp = 0 -Relative energy and pressure error for pair Cu Mg de = 0; dp = 0 -Relative energy and pressure error for pair Cu Co de = 0; dp = 0 -Relative energy and pressure error for pair Cu Ti de = 0; dp = 0 -Relative energy and pressure error for pair Cu Zr de = 0; dp = 0 -Relative energy and pressure error for pair Ag Ag de = 0; dp = 0 -Relative energy and pressure error for pair Ag Au de = 0; dp = 0 -Relative energy and pressure error for pair Ag Ni de = 0; dp = 0 -Relative energy and pressure error for pair Ag Pd de = 0; dp = 0 -Relative energy and pressure error for pair Ag Pt de = 0; dp = 0 -Relative energy and pressure error for pair Ag Al de = 0; dp = 0 -Relative energy and pressure error for pair Ag Pb de = 0; dp = 0 -Relative energy and pressure error for pair Ag Fe de = 0; dp = 0 -Relative energy and pressure error for pair Ag Mo de = 0; dp = 0 -Relative energy and pressure error for pair Ag Ta de = 0; dp = 0 -Relative energy and pressure error for pair Ag W de = 0; dp = 0 -Relative energy and pressure error for pair Ag Mg de = 0; dp = 0 -Relative energy and pressure error for pair Ag Co de = 0; dp = 0 -Relative energy and pressure error for pair Ag Ti de = 0; dp = 0 -Relative energy and pressure error for pair Ag Zr de = 0; dp = 0 -Relative energy and pressure error for pair Au Au de = 0; dp = 0 -Relative energy and pressure error for pair Au Ni de = 0; dp = 0 -Relative energy and pressure error for pair Au Pd de = 0; dp = 0 -Relative energy and pressure error for pair Au Pt de = 0; dp = 0 -Relative energy and pressure error for pair Au Al de = 0; dp = 0 -Relative energy and pressure error for pair Au Pb de = 0; dp = 0 -Relative energy and pressure error for pair Au Fe de = 0; dp = 0 -Relative energy and pressure error for pair Au Mo de = 0; dp = 0 -Relative energy and pressure error for pair Au Ta de = 0; dp = 0 -Relative energy and pressure error for pair Au W de = 0; dp = 0 -Relative energy and pressure error for pair Au Mg de = 0; dp = 0 -Relative energy and pressure error for pair Au Co de = 0; dp = 0 -Relative energy and pressure error for pair Au Ti de = 0; dp = 0 -Relative energy and pressure error for pair Au Zr de = 0; dp = 0 -Relative energy and pressure error for pair Ni Ni de = 0; dp = 0 -Relative energy and pressure error for pair Ni Pd de = 0; dp = 0 -Relative energy and pressure error for pair Ni Pt de = 0; dp = 0 -Relative energy and pressure error for pair Ni Al de = 0; dp = 0 -Relative energy and pressure error for pair Ni Pb de = 0; dp = 0 -Relative energy and pressure error for pair Ni Fe de = 0; dp = 0 -Relative energy and pressure error for pair Ni Mo de = 0; dp = 0 -Relative energy and pressure error for pair Ni Ta de = 0; dp = 0 -Relative energy and pressure error for pair Ni W de = 0; dp = 0 -Relative energy and pressure error for pair Ni Mg de = 0; dp = 0 -Relative energy and pressure error for pair Ni Co de = 0; dp = 0 -Relative energy and pressure error for pair Ni Ti de = 0; dp = 0 -Relative energy and pressure error for pair Ni Zr de = 0; dp = 0 -Relative energy and pressure error for pair Pd Pd de = 0; dp = 0 -Relative energy and pressure error for pair Pd Pt de = 0; dp = 0 -Relative energy and pressure error for pair Pd Al de = 0; dp = 0 -Relative energy and pressure error for pair Pd Pb de = 0; dp = 0 -Relative energy and pressure error for pair Pd Fe de = 0; dp = 0 -Relative energy and pressure error for pair Pd Mo de = 0; dp = 0 -Relative energy and pressure error for pair Pd Ta de = 0; dp = 0 -Relative energy and pressure error for pair Pd W de = 0; dp = 0 -Relative energy and pressure error for pair Pd Mg de = 0; dp = 0 -Relative energy and pressure error for pair Pd Co de = 0; dp = 0 -Relative energy and pressure error for pair Pd Ti de = 0; dp = 0 -Relative energy and pressure error for pair Pd Zr de = 0; dp = 0 -Relative energy and pressure error for pair Pt Pt de = 0; dp = 0 -Relative energy and pressure error for pair Pt Al de = 0; dp = 0 -Relative energy and pressure error for pair Pt Pb de = 0; dp = 0 -Relative energy and pressure error for pair Pt Fe de = 0; dp = 0 -Relative energy and pressure error for pair Pt Mo de = 0; dp = 0 -Relative energy and pressure error for pair Pt Ta de = 0; dp = 0 -Relative energy and pressure error for pair Pt W de = 0; dp = 0 -Relative energy and pressure error for pair Pt Mg de = 0; dp = 0 -Relative energy and pressure error for pair Pt Co de = 0; dp = 0 -Relative energy and pressure error for pair Pt Ti de = 0; dp = 0 -Relative energy and pressure error for pair Pt Zr de = 0; dp = 0 -Relative energy and pressure error for pair Al Al de = 0; dp = 0 -Relative energy and pressure error for pair Al Pb de = 0; dp = 0 -Relative energy and pressure error for pair Al Fe de = 0; dp = 0 -Relative energy and pressure error for pair Al Mo de = 0; dp = 0 -Relative energy and pressure error for pair Al Ta de = 0; dp = 0 -Relative energy and pressure error for pair Al W de = 0; dp = 0 -Relative energy and pressure error for pair Al Mg de = 0; dp = 0 -Relative energy and pressure error for pair Al Co de = 0; dp = 0 -Relative energy and pressure error for pair Al Ti de = 0; dp = 0 -Relative energy and pressure error for pair Al Zr de = 0; dp = 0 -Relative energy and pressure error for pair Pb Pb de = 0; dp = 0 -Relative energy and pressure error for pair Pb Fe de = 0; dp = 0 -Relative energy and pressure error for pair Pb Mo de = 0; dp = 0 -Relative energy and pressure error for pair Pb Ta de = 0; dp = 0 -Relative energy and pressure error for pair Pb W de = 0; dp = 0 -Relative energy and pressure error for pair Pb Mg de = 0; dp = 0 -Relative energy and pressure error for pair Pb Co de = 0; dp = 0 -Relative energy and pressure error for pair Pb Ti de = 0; dp = 0 -Relative energy and pressure error for pair Pb Zr de = 0; dp = 0 -Relative energy and pressure error for pair Fe Fe de = 0; dp = 0 -Relative energy and pressure error for pair Fe Mo de = 0; dp = 0 -Relative energy and pressure error for pair Fe Ta de = 0; dp = 0 -Relative energy and pressure error for pair Fe W de = 0; dp = 0 -Relative energy and pressure error for pair Fe Mg de = 0; dp = 0 -Relative energy and pressure error for pair Fe Co de = 0; dp = 0 -Relative energy and pressure error for pair Fe Ti de = 0; dp = 0 -Relative energy and pressure error for pair Fe Zr de = 0; dp = 0 -Relative energy and pressure error for pair Mo Mo de = 0; dp = 0 -Relative energy and pressure error for pair Mo Ta de = 0; dp = 0 -Relative energy and pressure error for pair Mo W de = 0; dp = 0 -Relative energy and pressure error for pair Mo Mg de = 0; dp = 0 -Relative energy and pressure error for pair Mo Co de = 0; dp = 0 -Relative energy and pressure error for pair Mo Ti de = 0; dp = 0 -Relative energy and pressure error for pair Mo Zr de = 0; dp = 0 -Relative energy and pressure error for pair Ta Ta de = 0; dp = 0 -Relative energy and pressure error for pair Ta W de = 0; dp = 0 -Relative energy and pressure error for pair Ta Mg de = 0; dp = 0 -Relative energy and pressure error for pair Ta Co de = 0; dp = 0 -Relative energy and pressure error for pair Ta Ti de = 0; dp = 0 -Relative energy and pressure error for pair Ta Zr de = 0; dp = 0 -Relative energy and pressure error for pair W W de = 0; dp = 0 -Relative energy and pressure error for pair W Mg de = 0; dp = 0 -Relative energy and pressure error for pair W Co de = 0; dp = 0 -Relative energy and pressure error for pair W Ti de = 0; dp = 0 -Relative energy and pressure error for pair W Zr de = 0; dp = 0 -Relative energy and pressure error for pair Mg Mg de = 0; dp = 0 -Relative energy and pressure error for pair Mg Co de = 0; dp = 0 -Relative energy and pressure error for pair Mg Ti de = 0; dp = 0 -Relative energy and pressure error for pair Mg Zr de = 0; dp = 0 -Relative energy and pressure error for pair Co Co de = 0; dp = 0 -Relative energy and pressure error for pair Co Ti de = 0; dp = 0 -Relative energy and pressure error for pair Co Zr de = 0; dp = 0 -Relative energy and pressure error for pair Ti Ti de = 0; dp = 0 -Relative energy and pressure error for pair Ti Zr de = 0; dp = 0 -Relative energy and pressure error for pair Zr Zr de = 0; dp = 0 diff --git a/tools/eam_database/test/log.lattice b/tools/eam_database/test/log.lattice deleted file mode 100644 index e2f332f506..0000000000 --- a/tools/eam_database/test/log.lattice +++ /dev/null @@ -1,36 +0,0 @@ -LAMMPS (7 Jan 2022) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) - using 1 OpenMP thread(s) per MPI task -units metal -boundary p p p -atom_style atomic - -lattice bcc 5.4 -Lattice spacing in x,y,z = 5.4 5.4 5.4 -region Myreg block 0 1 0 1 0 1 units lattice - -create_box 2 Myreg -Created orthogonal box = (0 0 0) to (5.4 5.4 5.4) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 2 atoms - using lattice units in orthogonal box = (0 0 0) to (5.4 5.4 5.4) - create_atoms CPU = 0.000 seconds - -set atom 2 type 2 -Setting atom values ... - 1 settings made for type - -mass * 1. - -replicate 5 5 5 -Replicating atoms ... - orthogonal box = (0 0 0) to (27 27 27) - 1 by 1 by 1 MPI processor grid - 250 atoms - replicate CPU = 0.000 seconds - -write_data data.lmp -System init for write_data ... -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:209) -Total wall time: 0:00:00 From c46dd3675aa03b3ee63b39cfb59378037b979dc6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 14 Feb 2022 18:06:48 -0500 Subject: [PATCH 15/16] add Cr parameters to python database file --- tools/eam_database/eamDatabase.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tools/eam_database/eamDatabase.py b/tools/eam_database/eamDatabase.py index 26d22d2f3a..db70b7d2b7 100644 --- a/tools/eam_database/eamDatabase.py +++ b/tools/eam_database/eamDatabase.py @@ -608,3 +608,33 @@ Database["Zr"] = AtType( 0.85, 1.15, ) +Database["Cr"] = AtType( + "Cr", + 2.493879, +1.793835, +17.641302, +19.60545, +8.604593, +7.170494, +1.551848, +1.827556, +0.18533, +0.277995, +-2.022754, +0.039608, +-0.183611, +-2.245972, +-2.02, +0.00, +-0.056517, +0.439144, +0.456, +-2.020038, +24, +51.9961, +0.439144, +7.170494, +0.277995, +0.85, +1.15 +) From 9a200c9b79184c020315f385c8e7c97aca3b25a2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 14 Feb 2022 18:07:29 -0500 Subject: [PATCH 16/16] small tweaks --- tools/eam_database/test/in.lmp | 12 ++++++++---- tools/eam_database/test/test.sh | 7 ++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/eam_database/test/in.lmp b/tools/eam_database/test/in.lmp index ecc8f2fc0c..d37bba5b09 100644 --- a/tools/eam_database/test/in.lmp +++ b/tools/eam_database/test/in.lmp @@ -9,15 +9,15 @@ pair_coeff * * @FORTRANFILE@ @ELEM1@ @ELEM2@ variable etot equal etotal variable press equal press -thermo_style custom pe etotal press +thermo_style custom pe etotal press -run 0 +run 0 post no variable efor equal ${etot} variable pfor equal ${press} thermo_style custom pe etotal v_efor press v_pfor -run 0 +run 0 post no pair_coeff * * @PYTHONFILE@ @ELEM1@ @ELEM2@ @@ -25,9 +25,13 @@ variable epyt equal ${etot} variable ppyt equal ${press} thermo_style custom pe etotal v_epyt press v_ppyt -run 0 +run 0 post no variable e equal "1 - v_epyt/v_efor" variable p equal "1 - v_ppyt/v_pfor" +variable de equal v_epyt-v_efor +variable dp equal v_ppyt-v_pfor print "Relative energy and pressure error for pair @ELEM1@ @ELEM2@ de = $e; dp = $p" append ../errors.dat +print "Absolute energy and pressure error for pair @ELEM1@ @ELEM2@ de = ${de}; dp = ${dp}" append ../errors.dat + diff --git a/tools/eam_database/test/test.sh b/tools/eam_database/test/test.sh index dae46b5221..3f098902aa 100755 --- a/tools/eam_database/test/test.sh +++ b/tools/eam_database/test/test.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash -elements=(Cu Ag Au Ni Pd Pt Al Pb Fe Mo Ta W Mg Co Ti Zr) +elements=(Cu Ag Au Ni Pd Pt Al Pb Fe Mo Ta W Mg Co Ti Zr Cr) +LMP=${LMP-../../../src/lmp_serial} rm -r tmp for ((i=0; i< ${#elements[@]}; i=$i+1)) @@ -18,14 +19,14 @@ do sed -i "s/@ELEM1@/${e1}/g" EAM.input sed -i "s/@ELEM2@/${e2}/g" EAM.input ./a.out < EAM.input - mv "${e1}${e2}_Zhou04.eam.alloy" ${fortranfile} + mv "${e1}${e2}.eam.alloy" ${fortranfile} python create_eam.py -n ${e1} ${e2} mv "${e1}${e2}.eam.alloy" ${pythonfile} sed -i "s/@ELEM1@/${e1}/g" in.lmp sed -i "s/@ELEM2@/${e2}/g" in.lmp sed -i "s/@PYTHONFILE@/${pythonfile}/g" in.lmp sed -i "s/@FORTRANFILE@/${fortranfile}/g" in.lmp - lmp -i in.lmp + ${LMP} -i in.lmp cd ../ rm -r tmp done