Purpose
		
		    - Generates a POSCAR file or input file for each point for a stacking fault curve
 
		    - Executes VASP or Quantum Espresso
 
		    - Extracts energy per stacking fault area for a static system
 
		    - Two stacking fault types are implemented for FCC, and three for BCC
			
			    - For FCC, users can choose either (111)[1-10] (full) or (111)[11-2] (partial).
 
			    - For BCC, users can choose from (110)[-111] (full), (110)[001] (partial), or 
				(110) [-110] (longpartial).
 
			
		 
		
		Usage
		Download the file under "Source" to obtain the Python script. While this file
		can be renamed, this section assumes it has been saved as
		
gsfe_curve.py.
		
		Edit the script, 
gsfe_curve.py, to reflect the DFT code you will
		be using.
		
#
### EDIT THIS PARAMETER FOR CODE IN USE
# 'qe' - Quantum Espresso
# 'vasp' - VASP
dft = 'qe' 
		
		If using VASP, the INCAR, KPOINTS, and POTCAR files must be in the same
		directory. The script should be edited with the path to your VASP
		executable.
		
		If using Quantum Espresso, modify the script with the correct pseudopotential
		directory, element name, psuedopotential file name, and atomic weight.
		
##### MATERIAL SETTINGS - USER EDIT REQUIRED #####
# vvv These parameters are for QE only, VASP will use the available POTCAR file vvv
# Directory containing your pseudopotentials
pp_dir = '/cavs/users/bradley/software/qe-6.0/pseudo/'
# Element name
el = 'Ta'
# Potential file name
potential = 'Ta.pbesol-spn-kjpaw_psl.0.2.UPF'
# Element weight
el_weight = 180.94788
# ^^^
		
		The script will also have to be edited if the Quantum Espresso executable,
		
pw.x, is not on the path. For example, if 
pw.x was in
		the 
/scratch/ICME_2019/directory, the script would be changed as
		follows.
		
# Run quantum espresso
		os.system('mpirun -np {} /scratch/ICME_2019/pw.x < gsfe.in > gsfe.out'.format(num_proc))
		
		Change the energy cutoff (eV) and number of K-points as desired.
		
##### DFT PARAMETERS - USER EDIT IF DESIRED #####
# Energy cutoff value (eV) (qe only)
energy_cutoff = 290.0
# The below energy cutoff setting works for most materials.
# Check your pseudopotential file to see the suggested value for your material
energy_cutoff_rho = energy_cutoff * 4.0
# K-points specification
kpoints = 15
		
		Modify the python script, 
gsfe_curve.py, to control how many
		points are generated.
		
##### STACKING FAULT PARAMETERS - USER EDIT IF NEEDED #####
# Number or location of simulated points. It MUST start with 0.
#fault_points = [0.0, 1./4., 1./2.]
fault_points = np.linspace(0,1,16)
		
		Use the commented line to specify specific points. The displacement is
		normalized here - points should range from 0 to 1, and start with 0. Otherwise,
		use the line below it (
fault_points = np.linspace(0,1,16)) to
		create evenly spaced points.
		
		This script should be run with python 2.7.8. To run the python script on the
		HPC cluster at Mississippi State University, prepare a PBS script including the
		modules needed to run the simulation. A sample PBS script with the details
		needed to run a gsfe_curve calculation is posted here for convenience; this
		script loads the modules python/2.7.8 and openmpi-intel:
		
#!/bin/bash
#PBS -N Cr.gsfe.f.16pt
#PBS -l nodes=1:ppn=12
#PBS -l walltime=192:00:00
#PBS -q q48p192h
#PBS -A 193000-990015
#PBS -m ae
#PBS -r n
#PBS -V
cd $PBS_O_WORKDIR
ml python/2.7.8
ml openmpi-intel
#Run gsfe python script
/work/path_to_files/gsfefull12/gsfe_curve.py BCC 2.8497783 full
		
		The arguments after 
gsfe_curve.py can be changed as per the
		requirements:
		
gsfe_curve.py fcc 3.63 partial
		
		The first argument, 
fcc, is the reference structure. Only
		
fcc and 
bcc are currently implemented. The second,
		
3.63, is the ground state lattice parameter.  The third,
		
partial, specifies the kind of dislocation. For more explanation
		on the types, run the script with no inputs, or look in the
		
create_stackingfault function.
		
		The script generates an output file called 
GSFE_SUMMARY containing
		three data columns. From left to right, these columns are the upper atom
		displacement normalized by the lattice parameter, the change in energy in
		mJ/m², and the wall time in seconds.
		
		
		Source Code
		gsfe_curve.py