From 0329bab2facdf00da6c5ae1128adfe93afc88a87 Mon Sep 17 00:00:00 2001 From: John laptop Date: Wed, 7 Aug 2024 09:35:21 +0800 Subject: [PATCH 1/2] automative script to run TDDFT-ris calculation --- TDDFT-ris/compound.inp | 47 +++ TDDFT-ris/get_ris_bas.py | 49 +++ TDDFT-ris/radi_exponent.txt | 105 ++++++ TDDFT-ris/ris+p.bas | 619 ++++++++++++++++++++++++++++++++++++ TDDFT-ris/ris.bas | 415 ++++++++++++++++++++++++ 5 files changed, 1235 insertions(+) create mode 100644 TDDFT-ris/compound.inp create mode 100644 TDDFT-ris/get_ris_bas.py create mode 100644 TDDFT-ris/radi_exponent.txt create mode 100644 TDDFT-ris/ris+p.bas create mode 100644 TDDFT-ris/ris.bas diff --git a/TDDFT-ris/compound.inp b/TDDFT-ris/compound.inp new file mode 100644 index 0000000..822c01c --- /dev/null +++ b/TDDFT-ris/compound.inp @@ -0,0 +1,47 @@ +%Compound + # ------------------------------------ + # SCF + # ------------------------------------ + New_Step + + ! B3LYP D3BJ def2-TZVP RIJCOSX + %maxcore 2000 + %pal + nprocs 4 + end + + *xyzfile 0 1 example.xyz + + Step_End + + + + # ------------------------------------ + # Second job with same goemetry + # but different functional + # ------------------------------------ + New_Step + + ! B3LYP D3BJ def2-TZVP RIJK moread noiter + %maxcore 2000 + %pal + nprocs 4 + end + + %tddft + nroots 20 + end + + %basis + GTOAuxJName = "ris.bas" + GTOAuxJKName = "ris.bas" + end + + %method + xckernelx 0 + xckernelc 0 + end + + Step_End + +EndRun \ No newline at end of file diff --git a/TDDFT-ris/get_ris_bas.py b/TDDFT-ris/get_ris_bas.py new file mode 100644 index 0000000..1fee528 --- /dev/null +++ b/TDDFT-ris/get_ris_bas.py @@ -0,0 +1,49 @@ +import argparse + + + +def gen_args(): + def str2bool(str): + if str.lower() in ('yes', 'true', 't', 'y', '1'): + return True + elif str.lower() in ('no', 'false', 'f', 'n', '0'): + return False + else: + raise argparse.ArgumentTypeError('Unsupported value encountered.') + parser = argparse.ArgumentParser(description='Davidson') + parser.add_argument('-p', '--pfunc', type=str2bool, default=False, help='extra p function each atom?') + args = parser.parse_args() + return args + +args = gen_args() + +input_filename = 'radi_exponent.txt' +output_filename = 'ris.bas' if not args.pfunc else 'ris+p.bas' + +with open(input_filename, 'r') as file: + lines = file.readlines() + +# 处理文件内容并生成输出 +with open(output_filename, 'w') as file: + file.write('$DATA\n\n') + + for line in lines: + if line.startswith('#'): + continue + parts = line.split() + + element_symbol = parts[1].lower() + theta_value = parts[-1] + + file.write(f'{element_symbol}\n') + file.write('S 1\n') + file.write(f'1 {theta_value} 1.0000000\n') + if args.pfunc and element_symbol != 'h': + file.write('P 1\n') + file.write(f'1 {theta_value} 1.0000000\n') + + file.write('\n') + + file.write('$END') + +print(f'Output written to {output_filename}') diff --git a/TDDFT-ris/radi_exponent.txt b/TDDFT-ris/radi_exponent.txt new file mode 100644 index 0000000..2e24e3c --- /dev/null +++ b/TDDFT-ris/radi_exponent.txt @@ -0,0 +1,105 @@ +# # # theta=1 theta=0.2(optimal) +#No. Elements Radii(Å) 1/R^2 0.2/R^2 +1 H 0.5292 0.999914019 0.199982804 +2 He 0.3113 2.889642307 0.577928461 +3 Li 1.6283 0.105616916 0.021123383 +4 Be 1.0855 0.237652656 0.047530531 +5 B 0.8141 0.42251956 0.084503912 +6 C 0.6513 0.660146268 0.132029254 +7 N 0.5428 0.950435502 0.1900871 +8 O 0.4652 1.293966153 0.258793231 +9 F 0.4071 1.689663115 0.337932623 +10 Ne 0.3618 2.139268042 0.427853608 +11 Na 2.165 0.059742931 0.011948586 +12 Mg 1.6711 0.100276104 0.020055221 +13 Al 1.3608 0.151221565 0.030244313 +14 Si 1.1477 0.212591338 0.042518268 +15 P 0.9922 0.284448654 0.056889731 +16 S 0.8739 0.366672931 0.073334586 +17 Cl 0.7808 0.459327787 0.091865557 +18 Ar 0.7056 0.562451636 0.112490327 +19 K 3.293 0.025823724 0.005164745 +20 Ca 2.5419 0.043339651 0.00866793 +21 Sc 2.4149 0.048017995 0.009603599 +22 Ti 2.2998 0.052944663 0.010588933 +23 V 2.1953 0.058105143 0.011621029 +24 Cr 2.1 0.06349854 0.012699708 +25 Mn 2.0124 0.069147059 0.013829412 +26 Fe 1.9319 0.075029671 0.015005934 +27 Co 1.8575 0.081160494 0.016232099 +28 Ni 1.7888 0.087514246 0.017502849 +29 Cu 1.725 0.094107477 0.018821495 +30 Zn 1.6654 0.100963688 0.020192738 +31 Ga 1.4489 0.133390685 0.026678137 +32 Ge 1.2823 0.170303292 0.034060658 +33 As 1.145 0.213595134 0.042719027 +34 Se 1.0424 0.257711336 0.051542267 +35 Br 0.9532 0.308201154 0.061640231 +36 Kr 0.8782 0.363090982 0.072618196 +37 Rb 3.8487 0.018904892 0.003780978 +38 Sr 2.9709 0.031726799 0.00634536 +39 Y 2.8224 0.035153227 0.007030645 +40 Zr 2.688 0.038756433 0.007751287 +41 Nb 2.5658 0.042536008 0.008507202 +42 Mo 2.4543 0.046488661 0.009297732 +43 Tc 2.352 0.050620647 0.010124129 +44 Ru 2.2579 0.054927891 0.010985578 +45 Rh 2.1711 0.059407691 0.011881538 +46 Pd 2.0907 0.064064714 0.012812943 +47 Ag 2.016 0.068900325 0.013780065 +48 Cd 1.9465 0.073908351 0.01478167 +49 In 1.6934 0.097652467 0.019530493 +50 Sn 1.4986 0.124689784 0.024937957 +51 Sb 1.344 0.155025732 0.031005146 +52 Te 1.2183 0.188666086 0.037733217 +53 I 1.1141 0.225607732 0.045121546 +54 Xe 1.0263 0.26586041 0.053172082 +55 Cs 4.2433 0.015552308 0.003110462 +56 Ba 3.2753 0.026103585 0.005220717 +57 La 2.6673 0.039360318 0.007872064 +58 Ce 2.2494 0.055343796 0.011068759 +59 Pr 1.9447 0.074045232 0.014809046 +60 Nd 1.7129 0.095441732 0.019088346 +61 Pm 1.5303 0.119577418 0.023915484 +62 Sm 1.383 0.146405694 0.029281139 +63 Eu 1.2615 0.175965618 0.035193124 +64 Gd 1.1596 0.208250434 0.041650087 +65 Tb 1.073 0.243222016 0.048644403 +66 Dy 0.9984 0.280926807 0.056185361 +67 Ho 0.9335 0.321346581 0.064269316 +68 Er 0.8765 0.364500801 0.07290016 +69 Tm 0.8261 0.410333603 0.082066721 +70 Yb 0.7812 0.458857526 0.091771505 +71 Lu 0.7409 0.510132672 0.102026534 +72 Hf 0.7056 0.562451636 0.112490327 +73 Ta 0.6716 0.620841806 0.124168361 +74 W 0.6416 0.680257937 0.136051587 +75 Re 0.6141 0.742547318 0.148509464 +76 Os 0.589 0.807182502 0.1614365 +77 Ir 0.5657 0.875044161 0.175008832 +78 Pt 0.5443 0.945204237 0.189040847 +79 Au 0.5244 1.018302857 0.203660571 +80 Hg 0.506 1.093707763 0.218741553 +81 Tl 1.867 0.080336645 0.016067329 +82 Pb 1.6523 0.102570984 0.020514197 +83 Bi 1.4818 0.127533168 0.025506634 +84 Po 1.3431 0.155233565 0.031046713 +85 At 1.2283 0.185606604 0.037121321 +86 Rn 1.1315 0.218722374 0.043744475 +87 Fr 4.4479 0.014154427 0.002830885 +88 Ra 3.4332 0.023757685 0.004751537 +89 Ac 3.2615 0.02632495 0.00526499 +90 Th 3.1061 0.029024949 0.00580499 +91 Pa 2.2756 0.054076737 0.010815347 +92 U 1.9767 0.071667261 0.014333452 +93 Np 1.7473 0.091720703 0.018344141 +94 Pu 1.4496 0.13326189 0.026652378 +95 Am 1.2915 0.167885623 0.033577125 +96 Cm 1.296 0.166721775 0.033344355 +97 Bk 1.1247 0.221375186 0.044275037 +98 Cf 1.0465 0.255695958 0.051139192 +99 Es 0.9785 0.292469558 0.058493912 +100 Fm 0.9188 0.331711368 0.066342274 +101 Md 0.8659 0.373479569 0.074695914 +102 No 0.8188 0.417682866 0.083536573 +103 Lr 0.8086 0.428286963 0.085657393 \ No newline at end of file diff --git a/TDDFT-ris/ris+p.bas b/TDDFT-ris/ris+p.bas new file mode 100644 index 0000000..985dc76 --- /dev/null +++ b/TDDFT-ris/ris+p.bas @@ -0,0 +1,619 @@ +$DATA + +h +S 1 +1 0.199982804 1.0000000 + +he +S 1 +1 0.577928461 1.0000000 +P 1 +1 0.577928461 1.0000000 + +li +S 1 +1 0.021123383 1.0000000 +P 1 +1 0.021123383 1.0000000 + +be +S 1 +1 0.047530531 1.0000000 +P 1 +1 0.047530531 1.0000000 + +b +S 1 +1 0.084503912 1.0000000 +P 1 +1 0.084503912 1.0000000 + +c +S 1 +1 0.132029254 1.0000000 +P 1 +1 0.132029254 1.0000000 + +n +S 1 +1 0.1900871 1.0000000 +P 1 +1 0.1900871 1.0000000 + +o +S 1 +1 0.258793231 1.0000000 +P 1 +1 0.258793231 1.0000000 + +f +S 1 +1 0.337932623 1.0000000 +P 1 +1 0.337932623 1.0000000 + +ne +S 1 +1 0.427853608 1.0000000 +P 1 +1 0.427853608 1.0000000 + +na +S 1 +1 0.011948586 1.0000000 +P 1 +1 0.011948586 1.0000000 + +mg +S 1 +1 0.020055221 1.0000000 +P 1 +1 0.020055221 1.0000000 + +al +S 1 +1 0.030244313 1.0000000 +P 1 +1 0.030244313 1.0000000 + +si +S 1 +1 0.042518268 1.0000000 +P 1 +1 0.042518268 1.0000000 + +p +S 1 +1 0.056889731 1.0000000 +P 1 +1 0.056889731 1.0000000 + +s +S 1 +1 0.073334586 1.0000000 +P 1 +1 0.073334586 1.0000000 + +cl +S 1 +1 0.091865557 1.0000000 +P 1 +1 0.091865557 1.0000000 + +ar +S 1 +1 0.112490327 1.0000000 +P 1 +1 0.112490327 1.0000000 + +k +S 1 +1 0.005164745 1.0000000 +P 1 +1 0.005164745 1.0000000 + +ca +S 1 +1 0.00866793 1.0000000 +P 1 +1 0.00866793 1.0000000 + +sc +S 1 +1 0.009603599 1.0000000 +P 1 +1 0.009603599 1.0000000 + +ti +S 1 +1 0.010588933 1.0000000 +P 1 +1 0.010588933 1.0000000 + +v +S 1 +1 0.011621029 1.0000000 +P 1 +1 0.011621029 1.0000000 + +cr +S 1 +1 0.012699708 1.0000000 +P 1 +1 0.012699708 1.0000000 + +mn +S 1 +1 0.013829412 1.0000000 +P 1 +1 0.013829412 1.0000000 + +fe +S 1 +1 0.015005934 1.0000000 +P 1 +1 0.015005934 1.0000000 + +co +S 1 +1 0.016232099 1.0000000 +P 1 +1 0.016232099 1.0000000 + +ni +S 1 +1 0.017502849 1.0000000 +P 1 +1 0.017502849 1.0000000 + +cu +S 1 +1 0.018821495 1.0000000 +P 1 +1 0.018821495 1.0000000 + +zn +S 1 +1 0.020192738 1.0000000 +P 1 +1 0.020192738 1.0000000 + +ga +S 1 +1 0.026678137 1.0000000 +P 1 +1 0.026678137 1.0000000 + +ge +S 1 +1 0.034060658 1.0000000 +P 1 +1 0.034060658 1.0000000 + +as +S 1 +1 0.042719027 1.0000000 +P 1 +1 0.042719027 1.0000000 + +se +S 1 +1 0.051542267 1.0000000 +P 1 +1 0.051542267 1.0000000 + +br +S 1 +1 0.061640231 1.0000000 +P 1 +1 0.061640231 1.0000000 + +kr +S 1 +1 0.072618196 1.0000000 +P 1 +1 0.072618196 1.0000000 + +rb +S 1 +1 0.003780978 1.0000000 +P 1 +1 0.003780978 1.0000000 + +sr +S 1 +1 0.00634536 1.0000000 +P 1 +1 0.00634536 1.0000000 + +y +S 1 +1 0.007030645 1.0000000 +P 1 +1 0.007030645 1.0000000 + +zr +S 1 +1 0.007751287 1.0000000 +P 1 +1 0.007751287 1.0000000 + +nb +S 1 +1 0.008507202 1.0000000 +P 1 +1 0.008507202 1.0000000 + +mo +S 1 +1 0.009297732 1.0000000 +P 1 +1 0.009297732 1.0000000 + +tc +S 1 +1 0.010124129 1.0000000 +P 1 +1 0.010124129 1.0000000 + +ru +S 1 +1 0.010985578 1.0000000 +P 1 +1 0.010985578 1.0000000 + +rh +S 1 +1 0.011881538 1.0000000 +P 1 +1 0.011881538 1.0000000 + +pd +S 1 +1 0.012812943 1.0000000 +P 1 +1 0.012812943 1.0000000 + +ag +S 1 +1 0.013780065 1.0000000 +P 1 +1 0.013780065 1.0000000 + +cd +S 1 +1 0.01478167 1.0000000 +P 1 +1 0.01478167 1.0000000 + +in +S 1 +1 0.019530493 1.0000000 +P 1 +1 0.019530493 1.0000000 + +sn +S 1 +1 0.024937957 1.0000000 +P 1 +1 0.024937957 1.0000000 + +sb +S 1 +1 0.031005146 1.0000000 +P 1 +1 0.031005146 1.0000000 + +te +S 1 +1 0.037733217 1.0000000 +P 1 +1 0.037733217 1.0000000 + +i +S 1 +1 0.045121546 1.0000000 +P 1 +1 0.045121546 1.0000000 + +xe +S 1 +1 0.053172082 1.0000000 +P 1 +1 0.053172082 1.0000000 + +cs +S 1 +1 0.003110462 1.0000000 +P 1 +1 0.003110462 1.0000000 + +ba +S 1 +1 0.005220717 1.0000000 +P 1 +1 0.005220717 1.0000000 + +la +S 1 +1 0.007872064 1.0000000 +P 1 +1 0.007872064 1.0000000 + +ce +S 1 +1 0.011068759 1.0000000 +P 1 +1 0.011068759 1.0000000 + +pr +S 1 +1 0.014809046 1.0000000 +P 1 +1 0.014809046 1.0000000 + +nd +S 1 +1 0.019088346 1.0000000 +P 1 +1 0.019088346 1.0000000 + +pm +S 1 +1 0.023915484 1.0000000 +P 1 +1 0.023915484 1.0000000 + +sm +S 1 +1 0.029281139 1.0000000 +P 1 +1 0.029281139 1.0000000 + +eu +S 1 +1 0.035193124 1.0000000 +P 1 +1 0.035193124 1.0000000 + +gd +S 1 +1 0.041650087 1.0000000 +P 1 +1 0.041650087 1.0000000 + +tb +S 1 +1 0.048644403 1.0000000 +P 1 +1 0.048644403 1.0000000 + +dy +S 1 +1 0.056185361 1.0000000 +P 1 +1 0.056185361 1.0000000 + +ho +S 1 +1 0.064269316 1.0000000 +P 1 +1 0.064269316 1.0000000 + +er +S 1 +1 0.07290016 1.0000000 +P 1 +1 0.07290016 1.0000000 + +tm +S 1 +1 0.082066721 1.0000000 +P 1 +1 0.082066721 1.0000000 + +yb +S 1 +1 0.091771505 1.0000000 +P 1 +1 0.091771505 1.0000000 + +lu +S 1 +1 0.102026534 1.0000000 +P 1 +1 0.102026534 1.0000000 + +hf +S 1 +1 0.112490327 1.0000000 +P 1 +1 0.112490327 1.0000000 + +ta +S 1 +1 0.124168361 1.0000000 +P 1 +1 0.124168361 1.0000000 + +w +S 1 +1 0.136051587 1.0000000 +P 1 +1 0.136051587 1.0000000 + +re +S 1 +1 0.148509464 1.0000000 +P 1 +1 0.148509464 1.0000000 + +os +S 1 +1 0.1614365 1.0000000 +P 1 +1 0.1614365 1.0000000 + +ir +S 1 +1 0.175008832 1.0000000 +P 1 +1 0.175008832 1.0000000 + +pt +S 1 +1 0.189040847 1.0000000 +P 1 +1 0.189040847 1.0000000 + +au +S 1 +1 0.203660571 1.0000000 +P 1 +1 0.203660571 1.0000000 + +hg +S 1 +1 0.218741553 1.0000000 +P 1 +1 0.218741553 1.0000000 + +tl +S 1 +1 0.016067329 1.0000000 +P 1 +1 0.016067329 1.0000000 + +pb +S 1 +1 0.020514197 1.0000000 +P 1 +1 0.020514197 1.0000000 + +bi +S 1 +1 0.025506634 1.0000000 +P 1 +1 0.025506634 1.0000000 + +po +S 1 +1 0.031046713 1.0000000 +P 1 +1 0.031046713 1.0000000 + +at +S 1 +1 0.037121321 1.0000000 +P 1 +1 0.037121321 1.0000000 + +rn +S 1 +1 0.043744475 1.0000000 +P 1 +1 0.043744475 1.0000000 + +fr +S 1 +1 0.002830885 1.0000000 +P 1 +1 0.002830885 1.0000000 + +ra +S 1 +1 0.004751537 1.0000000 +P 1 +1 0.004751537 1.0000000 + +ac +S 1 +1 0.00526499 1.0000000 +P 1 +1 0.00526499 1.0000000 + +th +S 1 +1 0.00580499 1.0000000 +P 1 +1 0.00580499 1.0000000 + +pa +S 1 +1 0.010815347 1.0000000 +P 1 +1 0.010815347 1.0000000 + +u +S 1 +1 0.014333452 1.0000000 +P 1 +1 0.014333452 1.0000000 + +np +S 1 +1 0.018344141 1.0000000 +P 1 +1 0.018344141 1.0000000 + +pu +S 1 +1 0.026652378 1.0000000 +P 1 +1 0.026652378 1.0000000 + +am +S 1 +1 0.033577125 1.0000000 +P 1 +1 0.033577125 1.0000000 + +cm +S 1 +1 0.033344355 1.0000000 +P 1 +1 0.033344355 1.0000000 + +bk +S 1 +1 0.044275037 1.0000000 +P 1 +1 0.044275037 1.0000000 + +cf +S 1 +1 0.051139192 1.0000000 +P 1 +1 0.051139192 1.0000000 + +es +S 1 +1 0.058493912 1.0000000 +P 1 +1 0.058493912 1.0000000 + +fm +S 1 +1 0.066342274 1.0000000 +P 1 +1 0.066342274 1.0000000 + +md +S 1 +1 0.074695914 1.0000000 +P 1 +1 0.074695914 1.0000000 + +no +S 1 +1 0.083536573 1.0000000 +P 1 +1 0.083536573 1.0000000 + +lr +S 1 +1 0.085657393 1.0000000 +P 1 +1 0.085657393 1.0000000 + +$END \ No newline at end of file diff --git a/TDDFT-ris/ris.bas b/TDDFT-ris/ris.bas new file mode 100644 index 0000000..874c250 --- /dev/null +++ b/TDDFT-ris/ris.bas @@ -0,0 +1,415 @@ +$DATA + +h +S 1 +1 0.199982804 1.0000000 + +he +S 1 +1 0.577928461 1.0000000 + +li +S 1 +1 0.021123383 1.0000000 + +be +S 1 +1 0.047530531 1.0000000 + +b +S 1 +1 0.084503912 1.0000000 + +c +S 1 +1 0.132029254 1.0000000 + +n +S 1 +1 0.1900871 1.0000000 + +o +S 1 +1 0.258793231 1.0000000 + +f +S 1 +1 0.337932623 1.0000000 + +ne +S 1 +1 0.427853608 1.0000000 + +na +S 1 +1 0.011948586 1.0000000 + +mg +S 1 +1 0.020055221 1.0000000 + +al +S 1 +1 0.030244313 1.0000000 + +si +S 1 +1 0.042518268 1.0000000 + +p +S 1 +1 0.056889731 1.0000000 + +s +S 1 +1 0.073334586 1.0000000 + +cl +S 1 +1 0.091865557 1.0000000 + +ar +S 1 +1 0.112490327 1.0000000 + +k +S 1 +1 0.005164745 1.0000000 + +ca +S 1 +1 0.00866793 1.0000000 + +sc +S 1 +1 0.009603599 1.0000000 + +ti +S 1 +1 0.010588933 1.0000000 + +v +S 1 +1 0.011621029 1.0000000 + +cr +S 1 +1 0.012699708 1.0000000 + +mn +S 1 +1 0.013829412 1.0000000 + +fe +S 1 +1 0.015005934 1.0000000 + +co +S 1 +1 0.016232099 1.0000000 + +ni +S 1 +1 0.017502849 1.0000000 + +cu +S 1 +1 0.018821495 1.0000000 + +zn +S 1 +1 0.020192738 1.0000000 + +ga +S 1 +1 0.026678137 1.0000000 + +ge +S 1 +1 0.034060658 1.0000000 + +as +S 1 +1 0.042719027 1.0000000 + +se +S 1 +1 0.051542267 1.0000000 + +br +S 1 +1 0.061640231 1.0000000 + +kr +S 1 +1 0.072618196 1.0000000 + +rb +S 1 +1 0.003780978 1.0000000 + +sr +S 1 +1 0.00634536 1.0000000 + +y +S 1 +1 0.007030645 1.0000000 + +zr +S 1 +1 0.007751287 1.0000000 + +nb +S 1 +1 0.008507202 1.0000000 + +mo +S 1 +1 0.009297732 1.0000000 + +tc +S 1 +1 0.010124129 1.0000000 + +ru +S 1 +1 0.010985578 1.0000000 + +rh +S 1 +1 0.011881538 1.0000000 + +pd +S 1 +1 0.012812943 1.0000000 + +ag +S 1 +1 0.013780065 1.0000000 + +cd +S 1 +1 0.01478167 1.0000000 + +in +S 1 +1 0.019530493 1.0000000 + +sn +S 1 +1 0.024937957 1.0000000 + +sb +S 1 +1 0.031005146 1.0000000 + +te +S 1 +1 0.037733217 1.0000000 + +i +S 1 +1 0.045121546 1.0000000 + +xe +S 1 +1 0.053172082 1.0000000 + +cs +S 1 +1 0.003110462 1.0000000 + +ba +S 1 +1 0.005220717 1.0000000 + +la +S 1 +1 0.007872064 1.0000000 + +ce +S 1 +1 0.011068759 1.0000000 + +pr +S 1 +1 0.014809046 1.0000000 + +nd +S 1 +1 0.019088346 1.0000000 + +pm +S 1 +1 0.023915484 1.0000000 + +sm +S 1 +1 0.029281139 1.0000000 + +eu +S 1 +1 0.035193124 1.0000000 + +gd +S 1 +1 0.041650087 1.0000000 + +tb +S 1 +1 0.048644403 1.0000000 + +dy +S 1 +1 0.056185361 1.0000000 + +ho +S 1 +1 0.064269316 1.0000000 + +er +S 1 +1 0.07290016 1.0000000 + +tm +S 1 +1 0.082066721 1.0000000 + +yb +S 1 +1 0.091771505 1.0000000 + +lu +S 1 +1 0.102026534 1.0000000 + +hf +S 1 +1 0.112490327 1.0000000 + +ta +S 1 +1 0.124168361 1.0000000 + +w +S 1 +1 0.136051587 1.0000000 + +re +S 1 +1 0.148509464 1.0000000 + +os +S 1 +1 0.1614365 1.0000000 + +ir +S 1 +1 0.175008832 1.0000000 + +pt +S 1 +1 0.189040847 1.0000000 + +au +S 1 +1 0.203660571 1.0000000 + +hg +S 1 +1 0.218741553 1.0000000 + +tl +S 1 +1 0.016067329 1.0000000 + +pb +S 1 +1 0.020514197 1.0000000 + +bi +S 1 +1 0.025506634 1.0000000 + +po +S 1 +1 0.031046713 1.0000000 + +at +S 1 +1 0.037121321 1.0000000 + +rn +S 1 +1 0.043744475 1.0000000 + +fr +S 1 +1 0.002830885 1.0000000 + +ra +S 1 +1 0.004751537 1.0000000 + +ac +S 1 +1 0.00526499 1.0000000 + +th +S 1 +1 0.00580499 1.0000000 + +pa +S 1 +1 0.010815347 1.0000000 + +u +S 1 +1 0.014333452 1.0000000 + +np +S 1 +1 0.018344141 1.0000000 + +pu +S 1 +1 0.026652378 1.0000000 + +am +S 1 +1 0.033577125 1.0000000 + +cm +S 1 +1 0.033344355 1.0000000 + +bk +S 1 +1 0.044275037 1.0000000 + +cf +S 1 +1 0.051139192 1.0000000 + +es +S 1 +1 0.058493912 1.0000000 + +fm +S 1 +1 0.066342274 1.0000000 + +md +S 1 +1 0.074695914 1.0000000 + +no +S 1 +1 0.083536573 1.0000000 + +lr +S 1 +1 0.085657393 1.0000000 + +$END \ No newline at end of file From 19915ef14334ebf65b0d0f895c36cf732130943d Mon Sep 17 00:00:00 2001 From: John laptop Date: Thu, 6 Mar 2025 01:26:00 +0800 Subject: [PATCH 2/2] some comments inside inp and py --- TDDFT-ris/compound.inp | 28 +++++++++++++++++++++++++--- TDDFT-ris/get_ris_bas.py | 8 +++++++- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/TDDFT-ris/compound.inp b/TDDFT-ris/compound.inp index 822c01c..3a6e1ce 100644 --- a/TDDFT-ris/compound.inp +++ b/TDDFT-ris/compound.inp @@ -1,6 +1,25 @@ +# To run TDDFT-ris calculation, first you need a ground state SCF calculation, +# just like what you usually did for any other DFT calculations. +# Then in the TD step, compared to the standard TDDFT calculation, you need two extra setup +# 1) trun off the XC nernel, +# %method +# xckernelx 0 +# xckernelc 0 +# end +# 2) use RIJK with a minimal aux basis read from external file "ris.bas", +# which can be generated by running the python script "python get_ris_bas.py" +# %basis +# GTOAuxJName = "ris.bas" +# GTOAuxJKName = "ris.bas" +# end + + + + %Compound # ------------------------------------ - # SCF + # SCF step, setup functional/basis/mutliplicy just like usual + # revise it as need # ------------------------------------ New_Step @@ -17,8 +36,10 @@ # ------------------------------------ - # Second job with same goemetry - # but different functional + # TDDFT-ris step, the calculation starts + # from the previous SCF calculation + # (Rtol 1e-3, becasue TDDFT-ris is a semi-empirical method, + # no need to be that much accurate. Default Rtol 1e-6.) # ------------------------------------ New_Step @@ -30,6 +51,7 @@ %tddft nroots 20 + Rtol 1e-3 end %basis diff --git a/TDDFT-ris/get_ris_bas.py b/TDDFT-ris/get_ris_bas.py index 1fee528..7c5a672 100644 --- a/TDDFT-ris/get_ris_bas.py +++ b/TDDFT-ris/get_ris_bas.py @@ -1,3 +1,10 @@ +# This script generates the "ris.bas" (or "ris+p.bas") file +# for the fitting basis for TDDFT-ris (or TDDFT-ris+p) method +# Simply run "python get_ris_bas.py" or "python get_ris_bas.py -p True" +# I provided parameters for 106 elements in the "radi_exponent.txt" file, revise as need. + + + import argparse @@ -23,7 +30,6 @@ def str2bool(str): with open(input_filename, 'r') as file: lines = file.readlines() -# 处理文件内容并生成输出 with open(output_filename, 'w') as file: file.write('$DATA\n\n')