User Tools

Site Tools


howto:atat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howto:atat [2018/01/11 14:32]
alopis
howto:atat [2021/12/09 16:42] (current)
Line 1: Line 1:
-====== Running ATAT (The Alloy-Theoretic Automated Toolkit)======+====== Running ATAT (The Alloy-Theoretic Automated Toolkit) ======
  
  
-This describes the use of ATAT which employs QE (Quantum Espresso 6.1.0).  Anton Lopis  11 Jan 2017+[[http://www.brown.edu/Departments/Engineering/Labs/avdw/atat/]] 
 + 
 + 
 +This describes the use of ATAT on Lengau and employs QE (Quantum Espresso 6.1.0).  Anton Lopis  11 Jan 2017
  
 Please find the files at   **/apps/chpc/chem/ATAT/3.36/CHPC_Running** including pbs submission/bash script and input files (see below as well). Please find the files at   **/apps/chpc/chem/ATAT/3.36/CHPC_Running** including pbs submission/bash script and input files (see below as well).
Line 10: Line 13:
  
  
-One needs the following files:+===== One needs the following files: =====
  
 1. maps.pbs 1. maps.pbs
Line 24: Line 27:
  
  
-One needs to edit the pbs submit script file maps.pbs appropriately:+===== One needs to edit the pbs submit script file maps.pbs appropriately: ===== 
 + 
 + 
 + 
 + 
  
 1.** Choose the number of nodes that QE will run most efficiently on for your size of QM problem**. In the listed example I have specified 2 nodes, however I have not checked, and perhaps only one node might have been more efficient. 1.** Choose the number of nodes that QE will run most efficiently on for your size of QM problem**. In the listed example I have specified 2 nodes, however I have not checked, and perhaps only one node might have been more efficient.
Line 44: Line 52:
  
  
-One needs to edit the file "runstruct_qe" appropriately:+===== One needs to edit the file "runstruct_qe" appropriately: ===== 
 + 
  
 1. The appropriate PseudoDIR (it could remain as one used for all jobs). 1. The appropriate PseudoDIR (it could remain as one used for all jobs).
Line 64: Line 74:
 #PBS -m be #PBS -m be
 #PBS -M none #PBS -M none
-#PBS -o /mnt/lustre/users/alopis/ATAT_testing/out  +#PBS -o /mnt/lustre/users/alopis/ATAT_testing.out  
-#PBS -e /mnt/lustre/users/alopis/ATAT_testing/error+#PBS -e /mnt/lustre/users/alopis/ATAT_testing.error
 #PBS #PBS
  
Line 87: Line 97:
 touch stop touch stop
 </file> </file>
 +
 +
 +<file bash runstruct_qe>
 +
 +#!/bin/bash
 +# This bash scrpit is for the interface between ATAT and Quantum-ESPRESSO v5.0
 +# The final result will be in eV unit
 +# Produced by GAO Zhe, Mater. Sci & Eng, Seoul Nat'l Univ., S. Korea
 +# email to gaozhe1983(a)snu.ac.kr
 +
 +# Set the k-points density in reciprocal space
 +KPPRA=1000
 +
 +# Set the command to run pw.x, for example,
 +# if you wanna run it with 4 cores/cpus, set it
 +# as "$MPI_PATH/mpirun -n 4 $QE_PATH/pw.x"
 +
 +#export QESPRESSO=/apps/chpc/chem/qespresso/6.1.0
 +
 +PWCOMMAND="$QESPRESSO/bin/pw.x"
 +
 +# Set some calculation parameters here, which contents:
 +# cut-off energy for wave-functions and charge density;
 +# gaussian broadening parameter for smearing;
 +# especially, the directory where restore your pseudo-potential files.
 +# Definitely, you can directly set these and some other parameters
 +# in the input file-creating part.
 +########################################################################
 +# Recommand from the official manual of Quantum-ESPRESSO:              #
 +# for Norm-Conserving pseudo-potential, the cut-off for charge density #
 +# does not need to be setted (or, 4 times of ecutwfc).                 #
 +# But for ultrasoft pseudo-potential, set the cut-off for charge       #
 +# density to 8~10 times of cut-off for wavefunctions.                  #
 +########################################################################
 +PseudoDIR=/mnt/lustre/users/alopis/ATAT_testing/Pseudo
 +CUT_WFC=50
 +CUT_CHG=520
 +DEGAUSS=0.5
 +
 +# Try to find the parameter setting file, which contents the 
 +# information for species of elements
 +# If this file does not exist, the script will stop
 +ParamFile=/mnt/lustre/users/alopis/ATAT_testing/qe.param
 +if [ ! -e $ParamFile ]; then
 +  ParamFile="../qe.param"
 +  if [ ! -e $ParamFile ]; then
 +    ParamFile="../../qe.param"
 +    if [ ! -e $ParamFile ]; then
 +     echo " Cannot find the param file qe.param, stop the code!"
 +     exit 1
 +    fi
 +  fi
 +fi
 +
 +# Create the fist part of input file for QE v5.0
 +cat > pwscf.in <<EOF
 +&control
 +   calculation = 'vc-relax' ,
 +   prefix = 'pwscf' ,
 +   outdir = './temp/' ,
 +   pseudo_dir = '$PseudoDIR/' ,
 +   disk_io = 'none' ,
 +   etot_conv_thr = 1.0d-10 ,
 +   forc_conv_thr = 1.0d-5 ,
 +/
 +&system
 +   ibrav = 0 ,
 +   celldm(1) = 1.889725989 ,
 +   ecutwfc = ${CUT_WFC} ,
 +   ecutrho = ${CUT_CHG} ,
 +   occupations = 'smearing' ,
 +   smearing = 'mv' ,
 +   degauss = ${DEGAUSS} ,
 +EOF
 +
 +# Find the atom number and elements number
 +# Then, write them into the input file
 +NAT=`cellcvrt -f < str.out | tail -n +7 | wc -l`
 +NTYPE=`cellcvrt -f < str.out | tail -n +7 | awk '{print $4}' | sort -u | wc -l`
 +echo "   nat = $NAT , " >> pwscf.in
 +echo "   ntyp = $NTYPE , " >> pwscf.in
 +
 +# Create the temp input file, which corresponds to
 +# the second big part. After creating, it will be 
 +# attached follow the former one and deleted.
 +cat > pwscf.tmp <<EOF
 +/
 +&electrons
 +   conv_thr = 1.0d-10 ,
 +   diagonalization = 'david' ,
 +   mixing_mode = 'plain' ,
 +   startingpot = 'atomic' ,
 +   startingwfc = 'atomic+random' ,
 +   mixing_beta = 0.6 ,
 +/
 +&ions
 +   ion_dynamics = 'bfgs' ,
 +/
 +&cell
 +   cell_dynamics = 'bfgs' ,
 +   cell_factor = 2.0 ,
 +   press = 0.0 ,
 +   press_conv_thr = 1.0d-3 ,
 +/
 +CELL_PARAMETERS alat
 +EOF
 +cat pwscf.tmp >> pwscf.in
 +rm -f pwscf.tmp
 +
 +# Find and write the lattice vector information
 +cat str.out | cellcvrt -c -sig=9 | tail -n +4 | head -3 >> pwscf.in
 +
 +# Find and write the information for element type, mass
 +# and pseudo-potential files' name
 +echo "ATOMIC_SPECIES" >> pwscf.in
 +INT=1
 +while [ "$INT" -le "$NTYPE" ]; do
 +  KIND=pp`cellcvrt -f < str.out | tail -n +7 | awk '{print $4}' | sort -u | head -${INT} | tail -1`
 +  grep "$KIND" $ParamFile | awk '{print "  " $2, $3, $4}' >> pwscf.in
 +  let "$((INT++))"
 +done
 +
 +# Find and write the atoms' position to input file
 +echo "ATOMIC_POSITIONS angstrom" >> pwscf.in
 +cat str.out | cellcvrt -c -sig=9 | tail -n +7 | awk '{print "  " $4,  $1,  $2,  $3 }' >> pwscf.in
 +
 +# Find the k-points mesh, the mesh will be created
 +# by Monkhorst-Pack method
 +echo "K_POINTS automatic" >> pwscf.in
 +nbat=`cellcvrt -pn < str.out`
 +echo "  " `( echo $KPPRA $nbat | awk '{print $1/$2}' ; cat str.out | cellcvrt -f | head -3 ) | kmesh -q -r`    0  0 >> pwscf.in
 +
 +# Run pw.x for calculation
 +
 +
 +nproc=`cat $PBS_NODEFILE | wc -l`
 +
 +#mpirun -np 24 $PWCOMMAND < pwscf.in > pwscf.out
 +mpirun -np $nproc $PWCOMMAND < pwscf.in > pwscf.out
 +
 +# Abstract the final total energy to "energy" file
 +# in the unit of eV
 +FERy=`grep '!' pwscf.out | tail -1 | cut -c 35-50`
 +FEeV=`echo "scale=15; $FERy*13.605698066" | bc -l`
 +echo "$FEeV" > energy
 +
 +</file>
 +
  
 <file txt lat.in> <file txt lat.in>
 +
 3.155  3.155  3.155  90  90  90 3.155  3.155  3.155  90  90  90
  0.5   0.5   0.5  0.5   0.5   0.5
 -0.5   0.5   0.5 -0.5   0.5   0.5
 -0.5  -0.5   0.5 -0.5  -0.5   0.5
-0.0  0.0  0.0  Mo,W +0.0  0.0  0.0  Mo,W                 
-~                  +</file> 
 + 
 + 
 +<file txt qe.param> 
 + 
 +# The rule for make atomic_species card: 
 +# set the ppXXX as the name of certain line 
 +# then, write down the elemental symbol, mass 
 +# and pseudo-potential name info. 
 + 
 +ppW       183.80   W.GTH_LDA.UPF 
 +ppMo    Mo  12.011   Mo.GTH_LDA.UPF 
 +                                      
 </file> </file>
/app/dokuwiki/data/attic/howto/atat.1515673971.txt.gz · Last modified: 2021/12/09 16:42 (external edit)