SYSTEM = p(1x1)Cu(111) 1.0 2.5701000690 0.0000000000 0.0000000000 -1.2850500345 2.2257719501 0.0000000000 0.0000000000 0.0000000000 21.2954006195 Cu 4 Selective Dynamics Direct 0.000000000 0.000000000 0.000000000 F F F 0.666670000 0.333330000 0.098540000 F F F 0.333330000 0.666670000 0.197080000 T T T 0.000000000 0.000000000 0.295620000 T T T
SYSTEM = p(1x1)Cu(111) 1.0 2.5701000690 0.0000000000 0.0000000000 -1.2850500345 2.2257719501 0.0000000000 0.0000000000 0.0000000000 21.2954006195 Cu 4 Selective Dynamics Direct 0.000000000 0.000000000 0.000000000 F F F 0.666670000 0.333330000 0.098540000 F F F 0.333330000 0.666670000 0.197080000 T T T 0.000000000 0.000000000 0.295620000 T T T [ctan@baifq-hpc141 primitive-slab-opt-1]$ cat CONTCAR CONTCAR\(1\1\1) 1.00000000000000 2.5701000690000000 0.0000000000000000 0.0000000000000000 -1.2850500345000000 2.2257719501000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 21.2954006195000005 Cu/0e71e558f37 4 Selective dynamics Direct 0.0000000000000000 0.0000000000000000 0.0000000000000000 F F F 0.6666700000000034 0.3333299999999966 0.0985399999999998 F F F 0.3333311322281505 0.6666688677718494 0.1972481653092927 T T T -0.0000004145140272 0.0000004145140272 0.2951613337135311 T T T
#!/usr/bin/env python # -*- coding: utf-8 -*- #Convert direc coordiation to cartesian Writen By Qiang and Xu Nan """ The right input way to run this script is : python dire2cart.py CONTCAR 3 CONTCAR will be converted from Direct to Cartesian and 3 layers will be fixed. If you do not want to fix layers and keep the same as before, run command: python dire2cat.py CONTCAR """
import sys import os import numpy as np
print'Please read the head part of this script and get more information!' print""" ################################### # # #for VASP 5.2 or higher versions # # # ################################### """
iflen(sys.argv) <= 1: print('\n' + ' Warning! ' * 3 + '\n') print('You did not select the inputfile to be converted. \n By defalut, we are going to convert your CONTCAR.\n') ifnot os.path.isfile("POSCAR") andnot os.path.isfile("CONTCAR"): print("Error:" * 3 + "\n Can not find neither POSCAR nor CONTCAR!!\n") exit() else: if os.path.isfile("CONTCAR"): script = sys.argv[0] file_to_be_converted = "CONTCAR" print"\n Convertion starts........\n" else: script = sys.argv[0] file_to_be_converted = "POSCAR" print"\n There is no CONTCAR in your directory. \n \n POSCAR Convertion starts........\n" iflen(sys.argv) == 2: print("\n%s Convertion starts......" %sys.argv[1]) script, file_to_be_converted = sys.argv[:2] else: print("\n%s Convertion starts......\n" %sys.argv[1]) script, file_to_be_converted, fixedlayer = sys.argv[:3] fixedlayer = int(fixedlayer)
defget_infor(): f = open(file_to_be_converted, 'r') lines = f.readlines() f.close() num_atoms = sum([int(x) for x in lines[6].split()]) if lines[7][0] == 'S'or lines[7][0] == 's': # # With Selected T T T, coordination starts from line 9 start_num = 9 if lines[8][0] == 'D'or lines[8][0] == 'd': is_direct = True else: is_direct = False else: start_num = 8 print'----------------------------------------------------' print'Pay Attetion! There is no TTT in %s ' %(file_to_be_converted) print'----------------------------------------------------' if lines[7][0] == 'D'or lines[7][0] == 'd': is_direct = True else: is_direct = False a = [] b = [] c = [] if is_direct: for i in np.arange(2,5): line = [float(i) for i in lines[i].strip().split()] a.append(line[0]) b.append(line[1]) c.append(line[2]) vector = np.array([a,b,c]) else: vector = np.array([[1, 0 , 0], [0, 1, 0], [0, 0, 1]]) return vector, lines, start_num, num_atoms, is_direct
defdeterminelayers(z_cartesian): threshold = 0.5 seq = sorted(z_cartesian) min = seq[0] layerscount = {} sets = [min] for j inrange(len(seq)): ifabs(seq[j]-min) >= threshold: min = seq[j] sets.append(min)
for i inrange(1,len(sets)+1): layerscount[i] = [] for k inrange(len(z_cartesian)): ifabs(z_cartesian[k]-sets[i-1]) <= threshold: layerscount[i].append(k)
return layerscount
defconvert(): x_cartesian = [] y_cartesian = [] z_cartesian = [] tf = [] for i inrange(start_num, num_atoms + start_num): line_data = [float(ele) for ele in lines[i].split()[0:3]] line_data = np.array([line_data]) x, y, z = [sum(k) for k in line_data * vector ] x_cartesian.append(x) y_cartesian.append(y) z_cartesian.append(z) if start_num == 9 : # if T T T exist, the start_num will be 9 tf.append((lines[i].split()[3:])) else: tf.append(' ') # if there is no T T T, use space instead.
layerscount =determinelayers(z_cartesian) file_out = open(file_to_be_converted+'_C', 'w') for i inrange(0,7): file_out.write(lines[i].rstrip() + '\n') # first 7 lines are kept the same print'\n Find %s layers!' * 3 %(len(layerscount), len(layerscount), len(layerscount)) iflen(sys.argv) >= 3: # This means that the nuber for fixing layers is given by the user. file_out.write('Selective\n') file_out.write('Cartesian' + '\n') for i inrange(1,len(layerscount)+1): if i <= fixedlayer: for j in layerscount[i]: tf[j] = ['F','F','F'] else: for k in layerscount[i]: tf[k] = ['T','T','T'] else: if start_num == 9: # 9 means there are T T T or F F F in the file file_out.write('Selective\n') file_out.write('Cartesian' + '\n') else: file_out.write('Cartesian' + '\n') for i inrange(0,len(x_cartesian)): file_out.write("\t%+-3.10f %+-3.10f %+-3.10f %s\n" %(x_cartesian[i], y_cartesian[i], z_cartesian[i], ' '.join(tf[i]))) file_out.close() vector, lines, start_num, num_atoms, is_direct = get_infor()
if is_direct : print"\n%s has Direct Coordinates, Contersion starts.... " %(file_to_be_converted) convert() else: print"\n%s has Cartesian Coordinates Already! We are going to fix layers only." %(file_to_be_converted) convert() print'-----------------------------------------------------\n' print'\n %s with Cartesian Coordiates is named as %s_C\n' %(file_to_be_converted, file_to_be_converted) print'-----------------------------------------------------\n'
[ctan@baifq-hpc141 primitive-slab-opt-1]$ cat POSCAR_C CONTCAR\(1\1\1) 1.0 2.5701000690 0.0000000000 0.0000000000 -1.2850500345 2.2257719501 0.0000000000 0.0000000000 0.0000000000 21.2954006195 Cu 4 Selective Cartesian +0.0000000000 +0.0000000000 +0.0000000000 F F F +1.2850628850 +0.7419165641 +2.0984487770 F F F -0.0000128505 +1.4838553860 +4.1968975541 T T T +0.0000000000 +0.0000000000 +6.2953463311 T T T
CONTCAR_C
1 2 3 4 5 6 7 8 9 10 11 12 13 14
[ctan@baifq-hpc141 primitive-slab-opt-1]$ cat CONTCAR_C CONTCAR\(1\1\1) 1.00000000000000 2.5701000690000000 0.0000000000000000 0.0000000000000000 -1.2850500345000000 2.2257719501000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 21.2954006195000005 Cu/0e71e558f37 4 Selective Cartesian +0.0000000000 +0.0000000000 +0.0000000000 F F F +1.2850628850 +0.7419165641 +2.0984487770 F F F -0.0000084856 +1.4838528659 +4.2004787017 T T T -0.0000015980 +0.0000009226 +6.2855788488 T T T
[ctan@baifq-hpc141 primitive-slab-opt-1]$ grep ' without' OUTCAR energy without entropy= -13.96941183 energy(sigma->0) = -13.97673168 energy without entropy= -13.96945528 energy(sigma->0) = -13.97676958 energy without entropy= -13.97006413 energy(sigma->0) = -13.97726241 energy without entropy= -13.97020643 energy(sigma->0) = -13.97735554 energy without entropy= -13.97017969 energy(sigma->0) = -13.97735013
CONTCAR\(1\1\1) 1.0 2.5701000690 0.0000000000 0.0000000000 -1.2850500345 2.2257719501 0.0000000000 0.0000000000 0.0000000000 21.2954006195 Cu 4 Selective Dynamics Direct 0.000000000 0.000000000 0.000000000 F F F 0.666670000 0.333330000 0.098540000 F F F 0.333330000 0.666670000 0.197080000 T T T 0.000000000 0.000000000 0.295620000 T T T
[ctan@baifq-hpc141 primitive-slab-opt]$ grep ' without' OUTCAR energy without entropy= -13.96941183 energy(sigma->0) = -13.97673168 energy without entropy= -13.96945528 energy(sigma->0) = -13.97676958 energy without entropy= -13.97006413 energy(sigma->0) = -13.97726241 energy without entropy= -13.97020643 energy(sigma->0) = -13.97735554 energy without entropy= -13.97017969 energy(sigma->0) = -13.97735013
计算时间:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
General timing and accounting informations for this job: ========================================================
Total CPU time used (sec): 53.453 User time (sec): 49.556 System time (sec): 3.896 Elapsed time (sec): 55.466
Maximum memory used (kb): 134456. Average memory used (kb): N/A
Minor page faults: 12550 Major page faults: 686 Voluntary context switches: 1587
General timing and accounting informations for this job: ========================================================
Total CPU time used (sec): 93.113 User time (sec): 87.076 System time (sec): 6.036 Elapsed time (sec): 94.073
Maximum memory used (kb): 126136. Average memory used (kb): N/A
Minor page faults: 11497 Major page faults: 687 Voluntary context switches: 1456
能量信息:
1 2 3 4 5 6 7 8 9 10 11 12
[ctan@baifq-hpc141 primitive-slab-opt-2]$ grep ' without' OUTCAR energy without entropy= -13.96941183 energy(sigma->0) = -13.97673168 energy without entropy= -13.96949582 energy(sigma->0) = -13.97680372 energy without entropy= -13.96971572 energy(sigma->0) = -13.97698803 energy without entropy= -13.97005607 energy(sigma->0) = -13.97725330 energy without entropy= -13.97030617 energy(sigma->0) = -13.97735559 energy without entropy= -13.97026927 energy(sigma->0) = -13.97738319 energy without entropy= -13.97031853 energy(sigma->0) = -13.97745396 energy without entropy= -13.97042910 energy(sigma->0) = -13.97762319 energy without entropy= -13.97041285 energy(sigma->0) = -13.97773496 energy without entropy= -13.97039032 energy(sigma->0) = -13.97772890 energy without entropy= -13.97040171 energy(sigma->0) = -13.97773244
POTLOK: cpu time 0.0215: real time 0.0258 SETDIJ: cpu time 0.0109: real time 0.0118 EDDAV: cpu time 0.7451: real time 0.7613 DOS: cpu time 0.0052: real time 0.0060 -------------------------------------------- LOOP: cpu time 0.7826: real time 0.8050
eigenvalue-minimisations : 2548 total energy-change (2. order) : 0.3445715E+03 (-0.1837296E+04) number of electron 44.0000000 magnetization augmentation part 44.0000000 magnetization
DIPCOR: dipole corrections for dipol direction 3 min pos 155, dipolmoment 0.000000 0.000000 0.000026 electrons x Angstroem Tr[quadrupol] -31.061780
energy correction for charged system 0.000000 eV dipol+quadrupol energy correction -0.000000 eV added-field ion interaction 0.001451 eV (added to PSCEN)
Free energy of the ion-electron system (eV) --------------------------------------------------- alpha Z PSCENC = 96.14159556 Ewald energy TEWEN = 16384.30326894 -Hartree energ DENC = -21746.47963692 -exchange EXHF = 0.00000000 -V(xc)+E(xc) XCENC = 182.01436818 PAW double counting = 4912.82663951 -5336.19386850 entropy T*S EENTRO = 0.00034874 eigenvalues EBANDS = 288.07434016 atomic energy EATOM = 5563.88447798 Solvation Ediel_sol = 0.00000000 --------------------------------------------------- free energy TOTEN = 344.57153365 eV
energy without entropy = 344.57118491 energy(sigma->0) = 344.57141740
----------------------------------------------------------------------------- | | | EEEEEEE RRRRRR RRRRRR OOOOOOO RRRRRR ### ### ### | | E R R R R O O R R ### ### ### | | E R R R R O O R R ### ### ### | | EEEEE RRRRRR RRRRRR O O RRRRRR # # # | | E R R R R O O R R | | E R R R R O O R R ### ### ### | | EEEEEEE R R R R OOOOOOO R R ### ### ### | | | | Error EDDDAV: Call to ZHEGV failed. Returncode = 7 1 8 | | | | ----> I REFUSE TO CONTINUE WITH THIS SICK JOB ... BYE!!! <---- | | | -----------------------------------------------------------------------------
tar -xvf aocc-compiler-5.0.0.tar #解压 cd aocc-compiler-3.2.0 #进入目录 install.sh #如果没有可执行权限请赋予可执行权限, chmod +x install.sh source .setenv_AOCC.sh #这一行可以写入~/.bashrc,然后source ~/.bashrc,刷新一下环境变量
AOCL
下载AOCL 5.0 binary packages compiled with AOCC 5.0
1 2 3
tar -zxvf XXX.tar.gz #解压tar.gz包,如果报错请查询Linux下的解压命令,up记不太清了、、、 cd XXX install.sh -t /home/XXX #安装,可以指定安装目录,up安装在/home目录下的某个文件夹里的,这样不需要管理员权限、
安装OpenMPI
在安装OpenMPI之前请确保AOCC、AOCL以及必备的依赖已安装完全
1 2 3 4 5 6 7 8
which clang #检查clang which clang++ #检查clang++ which flang #检查flang 以上三个来自于AOCC和AOCL which c #检查有没有C which c++ #检查有没有C++ sudo apt install g++ sudo apt install gcc
下载OpenMPI的稳定版本,然后解压,进入目录
1 2 3
configure CC=clang CXX=clang++ FC=flang --prefix=/xxxx #可以手动指定/xxx目录 make -j4 #以4核心编译,大小可调,比如16核处理器就改成make -j16 make install #编译安装
# For what used to be vasp.5.lib CPP_LIB = $(CPP) FC_LIB = $(FC) CC_LIB = clang CFLAGS_LIB = -O FFLAGS_LIB = -O1 FREE_LIB = $(FREE)
OBJECTS_LIB = linpack_double.o
# For the parser library CXX_PARS = clang++ LLIBS = -lstdc++
## ## Customize as of this point! Of course you may change the preceding ## part of this file as well if you like, but it should rarely be ## necessary ... ##
# When compiling on the target machine itself, change this to the # relevant target when cross-compiling for another architecture VASP_TARGET_CPU ?= -march=znver4 #7840HS belongs to ZEN4 platform FFLAGS += $(VASP_TARGET_CPU)
----------------------------------------------------------------------------- | | | EEEEEEE RRRRRR RRRRRR OOOOOOO RRRRRR ### ### ### | | E R R R R O O R R ### ### ### | | E R R R R O O R R ### ### ### | | EEEEE RRRRRR RRRRRR O O RRRRRR # # # | | E R R R R O O R R | | E R R R R O O R R ### ### ### | | EEEEEEE R R R R OOOOOOO R R ### ### ### | | | | ERROR FEXCF: supplied exchange-correlation table | | is too small, maximal index : 7355 | | | | ----> I REFUSE TO CONTINUE WITH THIS SICK JOB ... BYE!!! <---- | | | -----------------------------------------------------------------------------