The codes here can be used to obtain the 
two potential alignment terms: 

1. Neutral defect and pristine: V_{0/p}. The potential 
   far from the defect is compared to the pristine cell 
   potential.
   dV_0p.py performs (V_0 - V_p)*q and plots the planar averaged 
   potential along the desired direction.

2. Model potential and the DFT difference. The model potential 
   far from the defect is compared to the DFT difference potential 
   between charged and neutral cell.
   dV_mD.py plots the planar averaged DFT difference potential, (V_q - V_0), 
   and the model potential, V_m, along the desired direction.


The input parameters for dV_0p.py and dV_mD.py are read from an input file. 
Format of the input files:
&dv_0p
file_type = cube # No quotes. Takes cube/xsf
file_neutral =  # No quotes. Path to the neutral DFT potential file 
file_pristine = # No quotes. Path to the pristine DFT potential file
plt_dir = a1 # No quotes. Takes a1/a2/a3. If a1
             # is specified, the data is averaged along a2
             # and a3 directions and the planar averaged data is plotted
             # along a1 in a file pa_dv0p_a1.plot
charge = -1  # Charge, to be multiplied to (V_0 - V_p)
factor = Ryd # factor to be multiplied to the data. If the data is in
             # rydberg and the plot is needed in eV, specify
             # factor = Ryd, else factor = None. If data is in Hartree
             # units, specify factor = Hartree
/

Output:  pa_dv0p_a1.plot (for plt_dir = a1)

&dV_mD
file_type = cube # No quotes. Format of the DFT potential files: cube/xsf
file_model =  # No quotes. Path to the model potential file (.npy)
file_charged = # No quotes. Path to the charged DFT potential file
file_neutral = # No quotes. Path to the neutral DFT potential file
plt_dir = a1 # No quotes. Takes a1/a2/a3. If a1
             # is specified, the data is averaged along a2
             # and a3 directions and the planar averaged data is plotted
             # along a1 in files DFTdiff_a1.plot, model_a1.plot
factor = Ryd # factor to be multiplied to the data. If the data is in
             # rydberg and the plot is needed in eV, specify
             # factor = Ryd, else factor = None. If data is in Hartree
             # units, specify factor = Hartree
/

Output: DFTdiff_a1.plot, model_a1.plot (for plt_dir = a1)
