Skip to content

Commit

Permalink
1. added -DARPACK in the Makefile to control whether use ARPACK or no…
Browse files Browse the repository at this point in the history
…t; 2. try to support non-orthogonal basis read from openmx; 3. redefined the sparse hr.dat where the degeneracy number of R points are removed; fixed several bugs when gfortran fails
  • Loading branch information
quanshengwu committed May 6, 2024
1 parent b65b436 commit 5294e1c
Show file tree
Hide file tree
Showing 29 changed files with 3,009 additions and 308 deletions.
3 changes: 1 addition & 2 deletions examples/Bi2Se3/wt.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ Se pz px py
!> bulk band structure calculation flag
&CONTROL
BulkBand_calc = T
!BulkBand_points_calc = T
Symmetry_Import_calc = T
BulkBand_points_calc = T
/

&SYSTEM
Expand Down
4 changes: 2 additions & 2 deletions examples/MoTe2/bulk/wt.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ SOC = 1 ! soc

&PARAMETERS
E_arc = -5 ! specify the Fermi energy
OmegaNum = 32 ! omega number
OmegaNum = 50 ! omega number
OmegaMin = -0.6 ! energy interval
OmegaMax = 0.2 ! energy interval
Nk1 = 10 ! number k points
Nk1 = 40 ! number k points
NP = 1 ! number of principle layers
/

Expand Down
247 changes: 244 additions & 3 deletions examples/WTe2/wannier90.win
Original file line number Diff line number Diff line change
@@ -1,16 +1,257 @@
num_bands = 192
num_bands = 192 ! set to NBANDS by VASP
num_wann = 96

dis_num_iter = 2000
num_iter = 100
dis_num_iter = 1000
num_iter = 0
!postproc_setup = .true.
iprint=2
!wvfn_formatted=.true.
!bands_plot = .true.

!min of outer window
dis_win_min = -1.0
dis_win_max = 16
!inner -
dis_froz_min = 6.0000
dis_froz_max = 8.0000
wvfn_formatted=.true.
bands_plot = .true.
hr_plot =.true.

begin projections
W : s; dxy; dyz; dxz; dx2-y2; dz2
Te : px; py; pz
end projections


begin kpoint_path
G 0.00000 0.00000 0.0000 Y 0.00000 0.50000 0.0000
Y 0.00000 0.50000 0.0000 S 0.50000 0.50000 0.0000
S 0.50000 0.50000 0.0000 X 0.50000 0.00000 0.0000
X 0.50000 0.00000 0.0000 G 0.00000 0.00000 0.0000
G 0.00000 0.00000 0.0000 Z 0.00000 0.00000 0.5000
Z 0.00000 0.00000 0.5000 T 0.00000 0.50000 0.5000
T 0.0 0.5 0.5 R 0.5 0.5 0.5
R 0.5 0.5 0.5 U 0.5 0.0 0.5
U 0.5 0.0 0.5 Z 0.0 0.0 0.5
end kpoint_path

spinors = .true.

begin unit_cell_cart
3.4770000 0.0000000 0.0000000
0.0000000 6.2490000 0.0000000
0.0000000 0.0000000 14.0180000
end unit_cell_cart

begin atoms_cart
W 0.0000000 3.7532744 10.7171100
W 0.0000000 0.2487102 3.9214640
W 1.7385000 2.4957256 3.7081100
W 1.7385000 6.0002898 10.9304640
Te 0.0000000 5.3592049 12.8934045
Te 1.7385000 0.8897951 5.8844045
Te 0.0000000 4.0387912 5.2657902
Te 1.7385000 2.2102088 12.2747902
Te 0.0000000 1.8650141 1.7432069
Te 1.7385000 4.3839859 8.7522069
Te 0.0000000 1.2949178 9.3695597
Te 1.7385000 4.9540822 2.3605597
end atoms_cart

mp_grid = 8 6 4

begin kpoints
0.000000000000 0.000000000000 0.000000000000
0.125000000000 0.000000000000 0.000000000000
0.250000000000 0.000000000000 0.000000000000
0.375000000000 0.000000000000 0.000000000000
0.500000000000 0.000000000000 0.000000000000
-0.375000000000 0.000000000000 0.000000000000
-0.250000000000 0.000000000000 0.000000000000
-0.125000000000 0.000000000000 0.000000000000
0.000000000000 0.166666666667 0.000000000000
0.125000000000 0.166666666667 0.000000000000
0.250000000000 0.166666666667 0.000000000000
0.375000000000 0.166666666667 0.000000000000
0.500000000000 0.166666666667 0.000000000000
-0.375000000000 0.166666666667 0.000000000000
-0.250000000000 0.166666666667 0.000000000000
-0.125000000000 0.166666666667 0.000000000000
0.000000000000 0.333333333333 0.000000000000
0.125000000000 0.333333333333 0.000000000000
0.250000000000 0.333333333333 0.000000000000
0.375000000000 0.333333333333 0.000000000000
0.500000000000 0.333333333333 0.000000000000
-0.375000000000 0.333333333333 0.000000000000
-0.250000000000 0.333333333333 0.000000000000
-0.125000000000 0.333333333333 0.000000000000
0.000000000000 0.500000000000 0.000000000000
0.125000000000 0.500000000000 0.000000000000
0.250000000000 0.500000000000 0.000000000000
0.375000000000 0.500000000000 0.000000000000
0.500000000000 0.500000000000 0.000000000000
-0.375000000000 0.500000000000 0.000000000000
-0.250000000000 0.500000000000 0.000000000000
-0.125000000000 0.500000000000 0.000000000000
0.000000000000 -0.333333333333 0.000000000000
0.125000000000 -0.333333333333 0.000000000000
0.250000000000 -0.333333333333 0.000000000000
0.375000000000 -0.333333333333 0.000000000000
0.500000000000 -0.333333333333 0.000000000000
-0.375000000000 -0.333333333333 0.000000000000
-0.250000000000 -0.333333333333 0.000000000000
-0.125000000000 -0.333333333333 0.000000000000
0.000000000000 -0.166666666667 0.000000000000
0.125000000000 -0.166666666667 0.000000000000
0.250000000000 -0.166666666667 0.000000000000
0.375000000000 -0.166666666667 0.000000000000
0.500000000000 -0.166666666667 0.000000000000
-0.375000000000 -0.166666666667 0.000000000000
-0.250000000000 -0.166666666667 0.000000000000
-0.125000000000 -0.166666666667 0.000000000000
0.000000000000 0.000000000000 0.250000000000
0.125000000000 0.000000000000 0.250000000000
0.250000000000 0.000000000000 0.250000000000
0.375000000000 0.000000000000 0.250000000000
0.500000000000 0.000000000000 0.250000000000
-0.375000000000 0.000000000000 0.250000000000
-0.250000000000 0.000000000000 0.250000000000
-0.125000000000 0.000000000000 0.250000000000
0.000000000000 0.166666666667 0.250000000000
0.125000000000 0.166666666667 0.250000000000
0.250000000000 0.166666666667 0.250000000000
0.375000000000 0.166666666667 0.250000000000
0.500000000000 0.166666666667 0.250000000000
-0.375000000000 0.166666666667 0.250000000000
-0.250000000000 0.166666666667 0.250000000000
-0.125000000000 0.166666666667 0.250000000000
0.000000000000 0.333333333333 0.250000000000
0.125000000000 0.333333333333 0.250000000000
0.250000000000 0.333333333333 0.250000000000
0.375000000000 0.333333333333 0.250000000000
0.500000000000 0.333333333333 0.250000000000
-0.375000000000 0.333333333333 0.250000000000
-0.250000000000 0.333333333333 0.250000000000
-0.125000000000 0.333333333333 0.250000000000
0.000000000000 0.500000000000 0.250000000000
0.125000000000 0.500000000000 0.250000000000
0.250000000000 0.500000000000 0.250000000000
0.375000000000 0.500000000000 0.250000000000
0.500000000000 0.500000000000 0.250000000000
-0.375000000000 0.500000000000 0.250000000000
-0.250000000000 0.500000000000 0.250000000000
-0.125000000000 0.500000000000 0.250000000000
0.000000000000 -0.333333333333 0.250000000000
0.125000000000 -0.333333333333 0.250000000000
0.250000000000 -0.333333333333 0.250000000000
0.375000000000 -0.333333333333 0.250000000000
0.500000000000 -0.333333333333 0.250000000000
-0.375000000000 -0.333333333333 0.250000000000
-0.250000000000 -0.333333333333 0.250000000000
-0.125000000000 -0.333333333333 0.250000000000
0.000000000000 -0.166666666667 0.250000000000
0.125000000000 -0.166666666667 0.250000000000
0.250000000000 -0.166666666667 0.250000000000
0.375000000000 -0.166666666667 0.250000000000
0.500000000000 -0.166666666667 0.250000000000
-0.375000000000 -0.166666666667 0.250000000000
-0.250000000000 -0.166666666667 0.250000000000
-0.125000000000 -0.166666666667 0.250000000000
0.000000000000 0.000000000000 0.500000000000
0.125000000000 0.000000000000 0.500000000000
0.250000000000 0.000000000000 0.500000000000
0.375000000000 0.000000000000 0.500000000000
0.500000000000 0.000000000000 0.500000000000
-0.375000000000 0.000000000000 0.500000000000
-0.250000000000 0.000000000000 0.500000000000
-0.125000000000 0.000000000000 0.500000000000
0.000000000000 0.166666666667 0.500000000000
0.125000000000 0.166666666667 0.500000000000
0.250000000000 0.166666666667 0.500000000000
0.375000000000 0.166666666667 0.500000000000
0.500000000000 0.166666666667 0.500000000000
-0.375000000000 0.166666666667 0.500000000000
-0.250000000000 0.166666666667 0.500000000000
-0.125000000000 0.166666666667 0.500000000000
0.000000000000 0.333333333333 0.500000000000
0.125000000000 0.333333333333 0.500000000000
0.250000000000 0.333333333333 0.500000000000
0.375000000000 0.333333333333 0.500000000000
0.500000000000 0.333333333333 0.500000000000
-0.375000000000 0.333333333333 0.500000000000
-0.250000000000 0.333333333333 0.500000000000
-0.125000000000 0.333333333333 0.500000000000
0.000000000000 0.500000000000 0.500000000000
0.125000000000 0.500000000000 0.500000000000
0.250000000000 0.500000000000 0.500000000000
0.375000000000 0.500000000000 0.500000000000
0.500000000000 0.500000000000 0.500000000000
-0.375000000000 0.500000000000 0.500000000000
-0.250000000000 0.500000000000 0.500000000000
-0.125000000000 0.500000000000 0.500000000000
0.000000000000 -0.333333333333 0.500000000000
0.125000000000 -0.333333333333 0.500000000000
0.250000000000 -0.333333333333 0.500000000000
0.375000000000 -0.333333333333 0.500000000000
0.500000000000 -0.333333333333 0.500000000000
-0.375000000000 -0.333333333333 0.500000000000
-0.250000000000 -0.333333333333 0.500000000000
-0.125000000000 -0.333333333333 0.500000000000
0.000000000000 -0.166666666667 0.500000000000
0.125000000000 -0.166666666667 0.500000000000
0.250000000000 -0.166666666667 0.500000000000
0.375000000000 -0.166666666667 0.500000000000
0.500000000000 -0.166666666667 0.500000000000
-0.375000000000 -0.166666666667 0.500000000000
-0.250000000000 -0.166666666667 0.500000000000
-0.125000000000 -0.166666666667 0.500000000000
0.000000000000 0.000000000000 -0.250000000000
0.125000000000 0.000000000000 -0.250000000000
0.250000000000 0.000000000000 -0.250000000000
0.375000000000 0.000000000000 -0.250000000000
0.500000000000 0.000000000000 -0.250000000000
-0.375000000000 0.000000000000 -0.250000000000
-0.250000000000 0.000000000000 -0.250000000000
-0.125000000000 0.000000000000 -0.250000000000
0.000000000000 0.166666666667 -0.250000000000
0.125000000000 0.166666666667 -0.250000000000
0.250000000000 0.166666666667 -0.250000000000
0.375000000000 0.166666666667 -0.250000000000
0.500000000000 0.166666666667 -0.250000000000
-0.375000000000 0.166666666667 -0.250000000000
-0.250000000000 0.166666666667 -0.250000000000
-0.125000000000 0.166666666667 -0.250000000000
0.000000000000 0.333333333333 -0.250000000000
0.125000000000 0.333333333333 -0.250000000000
0.250000000000 0.333333333333 -0.250000000000
0.375000000000 0.333333333333 -0.250000000000
0.500000000000 0.333333333333 -0.250000000000
-0.375000000000 0.333333333333 -0.250000000000
-0.250000000000 0.333333333333 -0.250000000000
-0.125000000000 0.333333333333 -0.250000000000
0.000000000000 0.500000000000 -0.250000000000
0.125000000000 0.500000000000 -0.250000000000
0.250000000000 0.500000000000 -0.250000000000
0.375000000000 0.500000000000 -0.250000000000
0.500000000000 0.500000000000 -0.250000000000
-0.375000000000 0.500000000000 -0.250000000000
-0.250000000000 0.500000000000 -0.250000000000
-0.125000000000 0.500000000000 -0.250000000000
0.000000000000 -0.333333333333 -0.250000000000
0.125000000000 -0.333333333333 -0.250000000000
0.250000000000 -0.333333333333 -0.250000000000
0.375000000000 -0.333333333333 -0.250000000000
0.500000000000 -0.333333333333 -0.250000000000
-0.375000000000 -0.333333333333 -0.250000000000
-0.250000000000 -0.333333333333 -0.250000000000
-0.125000000000 -0.333333333333 -0.250000000000
0.000000000000 -0.166666666667 -0.250000000000
0.125000000000 -0.166666666667 -0.250000000000
0.250000000000 -0.166666666667 -0.250000000000
0.375000000000 -0.166666666667 -0.250000000000
0.500000000000 -0.166666666667 -0.250000000000
-0.375000000000 -0.166666666667 -0.250000000000
-0.250000000000 -0.166666666667 -0.250000000000
-0.125000000000 -0.166666666667 -0.250000000000
end kpoints
4 changes: 2 additions & 2 deletions examples/WTe2/wt.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ E_arc = 0.0 ! energy for calculate Fermi Arc
OmegaNum = 400 ! omega number
OmegaMin = -0.6 ! energy interval
OmegaMax = 0.5 ! energy interval
Nk1 = 41 ! number k points
Nk2 = 41 ! number k points
Nk1 = 6 ! number k points
Nk2 = 6 ! number k points
Nk3 = 6 ! number k points
NP = 1 ! number of principle layers
Gap_threshold = 0.001 ! threshold for GapCube output
Expand Down
4 changes: 2 additions & 2 deletions src/Boltz_transport_anomalous.f90
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ subroutine sigma_AHC
write(outfileindex, '(a)')'set xlabel "Energy (eV)"'
write(outfileindex, '(a)')'set ylabel "AHC (S/cm)"'
write(outfileindex, '(5a)')"plot '", trim(adjustl(ahcfilename)), "' u 1:2 w l title '\sigma_{xy}' lc rgb 'red' lw 4, \"
write(outfileindex, '(5a)')"'", trim(adjustl(ahcfilename)), "' u 1:3 w l title '\sigma_{zx}' lc rgb 'blue' lw 4, \"
write(outfileindex, '(5a)')"'", trim(adjustl(ahcfilename)), "' u 1:4 w l title '\sigma_{xz}' lc rgb 'orange' lw 4 "
write(outfileindex, '(5a)')"'", trim(adjustl(ahcfilename)), "' u 1:3 w l title '\sigma_{yz}' lc rgb 'blue' lw 4, \"
write(outfileindex, '(5a)')"'", trim(adjustl(ahcfilename)), "' u 1:4 w l title '\sigma_{zx}' lc rgb 'orange' lw 4 "
close(outfileindex)
endif

Expand Down
47 changes: 34 additions & 13 deletions src/Makefile.gfortran
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
obj = module.o sparse.o wt_aux.o math_lib.o symmetry.o readHmnR.o inverse.o proteus.o \
OBJ = module.o sparse.o wt_aux.o math_lib.o mgmres.o symmetry.o \
readHmnR.o inverse.o proteus.o \
eigen.o ham_qlayer2qlayer.o psi.o unfolding.o rand.o \
ham_slab.o ham_bulk.o ek_slab.o ek_bulk_polar.o ek_bulk.o \
readinput.o fermisurface.o surfgreen.o surfstat.o \
Expand All @@ -12,28 +13,48 @@ obj = module.o sparse.o wt_aux.o math_lib.o symmetry.o readHmnR.o inverse.o pro
main.o

# compiler
f90 = gfortran -cpp -DINTELMKL
#F90 = mpif90 -fpp -DMPI -fpe3 -O3 # -DINTELMKL -DSUPERLU # -check all -traceback -g
#F90 = gfortran -fpp #-DMPI -fpe3 -O3 # -DINTELMKL -DSUPERLU # -check all -traceback -g
F90 = gfortran -cpp
#F90 = ifort -fpp -DINTELMKL -fpe3 -check all -traceback -g
#CC = mpicc -fpp -DMPI -fpe3 -O3 # -DINTELMKL -DSUPERLU
CC = gcc -E #-DMPI -fpe3 -O3 # -DINTELMKL -DSUPERLU

flag = -O3 -ffree-line-length-512 #-g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
INCLUDE = #-I${MKLROOT}/include -I/Users/user/quan/work/workplace/github-repositories/superlu/SRC
WFLAG = #-nogen-interface
#OFLAG = -O3 -static-intel
OFLAG = -O3 -ffree-line-length-512 #-g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
FFLAG = $(OFLAG) $(WFLAG)
LFLAG = $(OFLAG)

ARPACK=/Users/quan/work/workplace/ARPACK/libarpack_gfortran.a
# ARPACK LIBRARY
ARPACK= #-L/usr/local/lib -larpack #/Users/user/quan/work/workplace/ARPACK/libarpack_gfortran.a

# need to specify if -DSUPERLU privided in the F90
SUPERLULIB=#/usr/local/lib/libsuperlu.a

# blas and lapack libraries
#libs = -L/usr/lib/ -llapack -lblas

# Intel MKL also supports with gfortran comipler
# static linking
#LIBS = -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a \
${MKLROOT}/lib/intel64/libmkl_sequential.a \
${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl \
${ARPACK}

# dynamic linking
libs = ${ARPACK} -L/${MKLROOT}/lib -lmkl_core -lmkl_sequential -lmkl_intel_lp64 -lpthread
#LIBS = ${ARPACK} -L/${MKLROOT}/lib/intel64 -lmkl_core -lmkl_sequential -lmkl_intel_lp64 -lpthread ${SUPERLULIB}
LIBS = ${ARPACK} -llapack -lblas


main : $(obj)
$(f90) $(obj) -o wt.x $(libs)
main : $(OBJ)
$(F90) $(LFLAG) $(OBJ) -o wt.x $(LIBS)
cp -f wt.x ../bin

.SUFFIXES: .o .f90
.SUFFIXES: .o .f90 .c

.f90.o :
$(f90) -c $(flag) $(includes) $*.f90
$(F90) $(FFLAG) $(INCLUDE) -c $*.f90
.c.o:
$(CC) $(CFLAGS) -I$(INCLUDE) -c $< $(VERBOSE)

clean :
rm -f *.o *.mod *~ wt.x

3 changes: 2 additions & 1 deletion src/Makefile.gfortran_travis
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
OBJ = module.o sparse.o wt_aux.o math_lib.o symmetry.o readHmnR.o inverse.o proteus.o \
OBJ = module.o sparse.o wt_aux.o math_lib.o mgmres.o symmetry.o \
readHmnR.o inverse.o proteus.o \
eigen.o ham_qlayer2qlayer.o psi.o unfolding.o rand.o \
ham_slab.o ham_bulk.o ek_slab.o ek_bulk_polar.o ek_bulk.o \
readinput.o fermisurface.o surfgreen.o surfstat.o \
Expand Down
Loading

0 comments on commit 5294e1c

Please sign in to comment.