Ref: http://bbs.keinsci.com/thread-12111-1-1.html
tar -xvf periodic_nbo_v.1.1.tgz
cd projection
sed -i "s/USE mkl95_BLAS/USE BLAS95/ig;s/USE mkl95_LAPACK/USE LAPACK95/ig" *.f90
sed -i "s/zGEMM_MKL95/GEMM/ig;s/DGEMM_MKL95/GEMM/ig;" *.f90
sed -i "s/DGETRF_MKL95/GETRF/ig;s/ZGETRF_MKL95/GETRF/ig;" *.f90
sed -i "s/DGETRI_MKL95/GETRI/ig;s/ZGETRI_MKL95/GETRI/ig;" *.f90
sed -i "s/zheev_mkl95/heev/ig;s/ZGESVD_MKL95/GESVD/ig;s/ZGEMV_MKL95/GEMV/ig;" *.f90
###Modify Makefile
LD=ifort
FC=ifort
FFLAGS= -I$(MKLROOT)/include/intel64/lp64 -mkl=sequential
LDFLAGS=-L$(MKLROOT)/lib/intel64 -openmp -lmkl_blas95_lp64 -lmkl_lapack95_lp64 -lpthread -lm -I$(MKLROOT)/include/intel64/lp64 -mkl=sequential
###
make
##Periodic nbo
tar -xvf periodic_nbo_v.1.1.tgz
cd projection
sed -i "s/USE mkl95_BLAS/USE BLAS95/ig;s/USE mkl95_LAPACK/USE LAPACK95/ig" *.f90
sed -i "s/zGEMM_MKL95/GEMM/ig;s/DGEMM_MKL95/GEMM/ig;" *.f90
sed -i "s/DGETRF_MKL95/GETRF/ig;s/ZGETRF_MKL95/GETRF/ig;" *.f90
sed -i "s/DGETRI_MKL95/GETRI/ig;s/ZGETRI_MKL95/GETRI/ig;" *.f90
sed -i "s/zheev_mkl95/heev/ig;s/ZGESVD_MKL95/GESVD/ig;s/ZGEMV_MKL95/GEMV/ig;" *.f90
###Modify Makefile.template
FC=ifort
LD=ifort
#FFLAGS=-check all -check noarg_temp_created -g -traceback -warn unused -I $(MKLROOT)/include/intel64/lp64
FFLAGS= -vec-report0 -openmp -I $(MKLROOT)/include/intel64/lp64
LDFLAGS=-L$(MKLROOT)/lib/intel64 -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lmkl_blas95_lp64 -lmkl_lapack95_lp64 -openmp
###
make
cp projection_output.F proj_VASP_5.4_mod.patch /src
cd src && patch<proj_VASP_5.4_mod.patch
# ps: proj_VASP_5.4_mod.patch modifiled from proj_VASP_5.4.patch in Per NBO
make std
mv bin/vasp_std bin/vasp.impi.nbo
mv build/std build/std.nbo
tar -xvf projection_v.1.1.2.tgz && cd projection
make (not use)
tar -xvf SSAdNDP_program_distr.zip && cd SSAdNDP_program_distr
cd SSAdNDP/
#------------------
change the PATH for MKL in Makefile.template, then
#------------------
perl mkmf -t Makefile.template -p ssadndp.exe
make && cp ssadndp.exe ~/.soft/vasp/vaspshell/
cd ../Visualization
ifort -o visual.exe visual.f90
cp visual.exe ~/.soft/vasp/vaspshell/
cd Projection
#---------------
correct MKLROOT,
#---------------
make
cp projection ~/.soft/vasp/vaspshell/projection.exe
get projection, use this one rather the one in projection_v.1.1.2.tgz
LNBO=.FALSE.; LWAVE=.TRUE.
to INCAR of single point calculation and run mpirun -np 16 vasp.impi.nbo
.LNBO=.TRUE.; ISTART=1; EDIFF=1E-5
and delete NPAR
(important) and run mpirun -np 16 vasp.impi.nbo
again. Tip: The parallel calculation of VASP is based on bands, so “NBANDS” will be times of cores used. But too many unoccupied bands will lead to unphysical eigenvalue, leading to failure of projection at the next step. So do not use too many cores.export OMP_NUM_THREADS=4 && export OMP_STACKSIZE=4000mb && ulimit -s unlimited
.****
B 0
S 6 1.00
2858.8900000 0.00215375
428.1400000 0.0165823
97.5282000 0.0821870
27.9693000 0.2766180
8.2157700 0.6293160
1.1127800 0.1737700
SP 3 1.00
13.2415000 0.1174430 0.0418100
3.0016600 0.9180020 0.2365750
0.9128560 -0.00265105 0.8162140
SP 1 1.00
0.3154540 1.0000000 1.0000000
SP 1 1.00
0.0988563 1.0000000 1.0000000
D 1 1.00
0.4010000 1.0000000
****
C 0
S 6 1.00
4563.2400000 0.00196665
682.0240000 0.0152306
154.9730000 0.0761269
44.4553000 0.2608010
13.0290000 0.6164620
1.8277300 0.2210060
SP 3 1.00
20.9642000 0.1146600 0.0402487
4.8033100 0.9199990 0.2375940
1.4593300 -0.00303068 0.8158540
SP 1 1.00
0.4834560 1.0000000 1.0000000
SP 1 1.00
0.1455850 1.0000000 1.0000000
D 1 1.00
0.6260000 1.0000000
****
and run projection.exe
at bash shell.
5. Convert CONTCAR to vasp 4 format (no element line). Prepare SSAdNDP.inp like this
GENERAL SEARCH INPUT FILE
Prepare files for visualization: T/F?
T
Number of different types of bonds in general search:
4
Number of centers, ON threshold, Distance threshold:
1 1.85 2.0
2 1.75 2.0
3 1.85 2.5
4 1.75 3.0
and run ssadndp.exe SSAdNDP.inp resid_gen.dat T
.
6. You should delete resid_gen.dat for a new scheme, while you should keep it for continuing searching. For user directed mode, Prepare SSAdNDP-UD.inp
like this
USER-DIRECTED SEARCH INPUT FILE
Prepare files for visualization: T/F?
T
Number of fragments to search on:
2
Number of centers on fragment 1:
7
Atom numbers, cell a,b,c:
2, 0 0 0
4, 0 0 0
5, 0 0 0
13, 0 0 0
8, 0 0 0
10,0 0 0
12,0 0 0
Number of bonds on fragment 1:
1
Number of centers on fragment 2:
7
Atom numbers, cell a,b,c:
1, 0 0 0
3, 0 0 0
6, -1 -1 0
7, 0 -1 0
9, 0 -1 0
11, 0 0 0
14, -1 0 0
Number of bonds on fragment 2:
1
and run ssadndp.exe SSAdNDP-UD.inp resid_gen.dat T
. Tips: Translating the fragment may avoid the belt on the edge.
7. If you get vis_gs_*-bonds.out from general mode or vis_ud_bonds.out from user directed mode, run visual.exe vis_gs_4c-bonds.out 81 81 81 T
or run visual.exe vis_ud_bonds.out 81 81 81 T
.
8. Open lattice_vec.cube in VESTA, uncheck Style->Volumetric data->Show Sections
.
9. in Vesta, Edit->Edit Data->Phases
, import cube file (e.g., gs_3c-bond_1.cube or ud_bond_1.cube), and set positioning for this layer to “0.5 0.5 0.5” ( or 0.16666/0.83333 rather than 0.5) and Apply.