Skip to content

Commit

Permalink
add lmp_meam scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
haidi-ustc committed Jul 6, 2020
1 parent 7496ea1 commit ff01223
Show file tree
Hide file tree
Showing 4 changed files with 522 additions and 0 deletions.
150 changes: 150 additions & 0 deletions ase/ase_vasp_opt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
#!/bin/bash
#MSUB -A emsla50834
#MSUB -l nodes=3:ppn=16,walltime=24:00:00
#MSUB -o out_%j.log
#MSUB -e out_%j.err
#MSUB -N vasp_job
#MSUB -m ea
#MSUB -V

############################################################################
# Print out some information for refund purposes
############################################################################

echo "refund: UserID = ${USER}"
echo "refund: Number of nodes = 3"
echo "refund: Number of cores per node = 16"
echo "refund: Number of cores = 48"
echo "refund: Amount of time requested = 18:00"
echo "refund: SLURM Job ID = ${SLURM_JOBID}"
echo "refund: Directory = ${PWD}"
echo " "
echo Processor list:
echo "${SLURM_JOB_NODELIST}"
echo " "

source /etc/profile.d/modules.bash
module purge

ulimit -s unlimited

module load intel/14.0.3
module load impi/5.1.2.150
# export I_MPI_PROCESS_MANAGER=mpd
export I_MPI_PMI_LIBRARY=/usr/lib64/libpmi.so

# VASPBIN=${HOME}/apps/vasp/5.4.4/vasp_gam_dri
# VASPBIN=${HOME}/apps/vasp/5.4.4/vasp_ncl_dri
# VASPBIN=${HOME}/apps/vasp/5.4.4/vasp_std_dri
# VASPBIN=${HOME}/apps/vasp/5.4.4/vasp_vtst_gam
# VASPBIN=${HOME}/apps/vasp/5.4.4/vasp_vtst_ncl
# VASPBIN=${HOME}/apps/vasp/5.4.4/vasp_vtst_std
VASPBIN=${HOME}/apps/vasp/5.4.4/vasp_gam
# VASPBIN=${HOME}/apps/vasp/5.4.4/vasp_ncl
# VASPBIN=${HOME}/apps/vasp/5.4.4/vasp_std

cp $VASPBIN vasp
# [ -f vasp ] || cp $VASPBIN vasp
ln -sf ${HOME}/apps/vasp/5.4.4/vdw_kernel.bindat

############################################################################
# if [ ! -f ${TMPDIR}/vasp ]; then
# cp $VASPBIN $TMPDIR/vasp
# fi
# if [ ! -d ${TMPDIR}/run ]; then
# cp $WORKDIR/INCAR $TMPDIR
# cp $WORKDIR/POSCAR $TMPDIR
# cp $WORKDIR/POTCAR $TMPDIR
# cp $WORKDIR/KPOINTS $TMPDIR
# cp -r $WORKDIR/run $TMPDIR
# fi
#
#############################################################################
# Run code (or multiple codes by repeating the vasp command)
#############################################################################

# srun --wait=60 --kill-on-bad-exit -n 48 -N 3 ./vasp
# srun --wait=60 --kill-on-bad-exit ./vasp

# mpirun -n ${SLURM_NPROCS} ./vasp
# srun -n ${SLURM_NPROCS} ./vasp
# srun -n ${SLURM_NPROCS} ./vasp -h 130.20.235.2 -p 31416
############################################################
python << EOF
import os
import numpy as np
from ase.io import read, write
from ase.calculators.vasp import Vasp
from ase.constraints import UnitCellFilter, FixBondLength
from ase.optimize import BFGS as QuasiNewton
os.environ['VASP_COMMAND'] = "srun -n ${SLURM_NPROCS} ./vasp"
os.environ['VASP_PP_PATH'] = "$HOME/apps/vasp/pp/"
# the starting configuration
geo = read('init.vasp', format='vasp')
# setting the c-axis parameter
# geo.cell[-1,-1] = 20
calc = Vasp(
###############################
# General
###############################
system = 'vaspCalc',
prec = 'High',
encut = 400,
ispin = 1,
istart = 0,
icharg = 1,
###############################
# Electronic relaxation
###############################
# isym = 0,
algo = 'Fast',
nelmin = 4,
nelm = 120,
xc = 'pbe',
ediff = 1E-7,
ismear = 0,
sigma = 0.1,
npar = 4,
lorbit = 11,
nelect = 1291,
###############################
# k-points grid
###############################
kpts = (1, 1, 1),
###############################
# Writing Flat
###############################
nwrite = 1,
lwave = True,
lcharg = True,
###############################
# Vdw Correction
###############################
ivdw = 10,
###############################
# Dipole Correction
###############################
# ldipol = True,
# idipol = 3,
# dipol = (0.5, 0.5, 0.5)
)
geo.set_calculator(calc)
# stress mask [XX, YY, ZZ, YZ, XZ, XY]
# 0 if fixed else 1
# unf = UnitCellFilter(geo, mask=[1,1,1,1,1,1])
# unf = UnitCellFilter(geo, mask=[1,1,0,0,0,1])
ch_bond_fix = FixBondLength(129, 143)
geo.constraints += [ch_bond_fix]
dyn = QuasiNewton(geo, logfile='opt.log', trajectory='opt.traj')
dyn.run(fmax=0.01)
write('final.vasp', geo, vasp5=True, direct=True)
EOF

rm -rf vasp

127 changes: 127 additions & 0 deletions lmp/AlSiMgCuFe.meam
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# DATE: 2012-06-29 CONTRIBUTOR: Greg Wagner, [email protected] CITATION: Jelinek, Groh, Horstemeyer, Houze, Kim, Wagner, Moitra and Baskes, Phys Rev B, 85, 245102 (2012)
# MEAM Al, Si, Mg, Cu, Fe alloy potential
# use with AlS SiS MgS CuS FeS from library.meam
# http://dx.doi.org/10.1103/PhysRevB.85.245102

Cmin(1,1,1) = 0.8
repuls(1,1) = 0.1
Cmin(3,3,3) = 0.8
Cmin(4,4,4) = 0.8
Cmin(5,5,5) = 0.68
repuls(5,5) = 0.3
Cmax(5,5,5) = 1.9

nn2(1,1)=1
nn2(1,2)=1
nn2(1,3)=1
nn2(1,4)=1
nn2(1,5)=1
nn2(2,2)=1
nn2(2,3)=1
nn2(2,4)=1
nn2(2,5)=1
nn2(3,3)=1
nn2(3,4)=1
nn2(3,5)=1
nn2(4,4)=1
nn2(4,5)=1
nn2(5,5)=1

lattce(1,2)='b1'
delta(1,2)=+0.28
alpha(1,2)=4.56
re(1,2)=2.62
Cmin(1,1,2) = 0.50
Cmin(2,2,1) = 2.00
Cmin(1,2,1) = 2.00
Cmin(1,2,2) = 2.00

lattce(1,3)='b1'
delta(1,3)=+0.23
alpha(1,3)=4.52
re(1,3)=2.87
Cmin(1,1,3) = 2.00
Cmin(3,3,1) = 0.00
Cmin(1,3,1) = 2.00
Cmin(1,3,3) = 0.00

lattce(1,4)='b1'
delta(1,4)=+0.19
alpha(1,4)=4.65
re(1,4)=2.53
Cmin(1,1,4) = 0.00
Cmin(4,4,1) = 2.00
Cmin(1,4,1) = 2.00
Cmin(1,4,4) = 2.00

lattce(1,5)='b1'
delta(1,5)=+0.26
alpha(1,5)=4.64
re(1,5)=2.45
Cmin(1,1,5) = 0.90
Cmin(5,5,1) = 0.10
Cmin(1,5,1) = 2.00
Cmin(1,5,5) = 2.00

lattce(2,3)='b1'
delta(2,3)=+0.2
alpha(2,3)=4.73
re(2,3)=2.75
Cmin(2,2,3) = 1.00
Cmin(3,3,2) = 1.00
Cmin(2,3,2) = 2.00
Cmin(2,3,3) = 2.00

lattce(2,4)='b1'
delta(2,4)=+0.14
alpha(2,4)=4.74
re(2,4)=2.46
Cmin(2,2,4) = 0.00
Cmin(4,4,2) = 0.00
Cmin(2,4,2) = 2.00
Cmin(2,4,4) = 2.00

lattce(2,5)='b1'
delta(2,5)=-0.07
alpha(2,5)=5.17
re(2,5)=2.39
Cmin(2,2,5) = 1.00
Cmin(5,5,2) = 1.00
Cmin(2,5,2) = 2.00
Cmin(2,5,5) = 0.00
attrac(2,5) = 0.1
repuls(2,5) = 0.1

lattce(3,4)='b1'
delta(3,4)=+0.23
alpha(3,4)=4.70
re(3,4)=2.63
Cmin(3,3,4) = 2.00
Cmin(4,4,3) = 0.00
Cmin(3,4,3) = 2.00
Cmin(3,4,4) = 2.00

lattce(3,5)='b1'
delta(3,5)=+0.6
alpha(3,5)=4.96
re(3,5)=2.61
Cmin(3,3,5) = 0.65
Cmin(5,5,3) = 0.00
Cmin(3,5,3) = 2.00
Cmin(3,5,5) = 2.00

lattce(4,5)='b1'
delta(4,5)=+0.63
alpha(4,5)=5.21
re(4,5)=2.42
Cmin(5,5,4)=0.00

attrac(5,2) = 0.1
repuls(5,2) = 0.1

rc = 5.0
ialloy=1
augt1=0
delr=0.25658351
emb_lin_neg=1
bkgd_dyn=1
Loading

0 comments on commit ff01223

Please sign in to comment.