sbin/bdf_extractor.py
A tool for extracting useful information from BDF output. It is to be used for preparation interface for geometry optimization, nonadiabatic dynamics
An example of a single step for nonadiabatic dynamics involving different spin states
To perform nonadiabatic dynamics involving different spins for CH2O, we need the following information:
1. two TD-DFT calculations for singlet and triplet calculations, respectively
2. a TD-DFT/SOC calculation for generating SOC matrix elements (isoc=3)
3. one RESP calculations for gradients of spin-free states,
4. one RESP calculations for nonadiabatic couplings (NAC) between spin-free states
Input:
$COMPASS Title nh3 Basis sto-3g Geometry C 0.000000 0.000000 -0.526806 O 0.000000 0.000000 0.677133 H 0.000000 0.945218 -1.128115 H 0.000000 -0.945218 -1.128115 End geometry $END $xuanyuan scalar heff 0 soint hsoc 0 $end $scf RHF charge 0 spin 1 THRESHCONV 1.d-12 1.d-10 OPTSCR 1 $end $traint tddft orbi hforb $end $tddft imethod 1 isf 0 idiag 1 iexit 1 itda 1 istore 1 crit_e 1.d-10 crit_vec 1.d-6 $end $tddft imethod 1 isf 1 itda 1 idiag 1 iexit 1 istore 2 crit_e 1.d-10 crit_vec 1.d-6 $end # print all SOC mat $tddft isoc 3 nfiles 2 ifgs 1 imatsoc -1 $end # gs & Excited-state gradients $resp iprt 0 geom norder 1 method 2 nfiles 2 $end # NAC calculations $resp iprt 0 quad fnac method 2 nfiles 2 $end
After running the job, useful information for dynamics can be generated using bdf_extractor.py and extractor.py:
./run.sh taskname.inp > taskname.out ./bdf_extractor.py taskname
Output:
SUMMARY via Extractors: ======================= job type = ['SCF', 'TDDFT_ENE', 'TDDFT_ENE', 'TDDFT_SOC', 'RESP_EXGRAD', 'RESP_FNAC'] ### JOB TYPE = SCF ### E_tot= -112.35347426 ### JOB TYPE = TDDFT_ENE ### nsym = 4 nstate = 4 nexit = [1, 1, 1, 1] info = sym = 1 [{'No.': 1, 'f': 0.3008, 'energy': -111.8973417521, 'Ova': 0.9169, 'weV': 12.412, 'DPab': 0.0}] sym = 2 [{'No.': 1, 'f': 88.8888, 'energy': -112.1933869555, 'Ova': 0.5112, 'weV': 4.3562, 'DPab': 0.0}] sym = 3 [{'No.': 1, 'f': 0.3017, 'energy': -111.6950889318, 'Ova': 0.563, 'weV': 17.9156, 'DPab': 0.0}] sym = 4 [{'No.': 1, 'f': 0.0114, 'energy': -112.0012697504, 'Ova': 0.5931, 'weV': 9.584, 'DPab': 0.0}] ### JOB TYPE = TDDFT_ENE ### nsym = 4 nstate = 4 nexit = [1, 1, 1, 1] info = sym = 1 [{'No.': 1, 'f': 0.0, 'energy': -112.1987475668, 'Ova': 0.947, 'weV': 4.2103, 'DPab': 2.0}] sym = 2 [{'No.': 1, 'f': 0.0, 'energy': -112.2334312783, 'Ova': 0.5115, 'weV': 3.2665, 'DPab': 2.0}] sym = 3 [{'No.': 1, 'f': 0.0, 'energy': -111.8335424533, 'Ova': 0.5869, 'weV': 14.1481, 'DPab': 2.0}] sym = 4 [{'No.': 1, 'f': 0.0, 'energy': -112.0639429411, 'Ova': 0.5941, 'weV': 7.8786, 'DPab': 2.0}] ### JOB TYPE = TDDFT_SOC ### npair= 45 ipair = 1 pairs = [0, 0, 0, 0, 0, 0, 1, 1] socmat= [[0.0, 0.0]] ipair = 2 pairs = [0, 0, 0, 1, 1, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 3 pairs = [0, 0, 0, 1, 2, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 4 pairs = [0, 0, 0, 1, 3, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 5 pairs = [0, 0, 0, 1, 4, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 6 pairs = [0, 0, 0, 2, 1, 1, 1, 3] socmat= [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]] ipair = 7 pairs = [0, 0, 0, 2, 2, 1, 1, 3] socmat= [[0.0, -0.0], [0.0, 0.0003859934], [0.0, 0.0]] ipair = 8 pairs = [0, 0, 0, 2, 3, 1, 1, 3] socmat= [[9.63651e-05, -0.0], [0.0, -0.0], [9.63651e-05, 0.0]] ipair = 9 pairs = [0, 0, 0, 2, 4, 1, 1, 3] socmat= [[-0.0, -0.0002505808], [0.0, 0.0], [-0.0, 0.0002505808]] ipair = 10 pairs = [1, 1, 1, 1, 1, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 11 pairs = [1, 1, 1, 1, 2, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 12 pairs = [1, 1, 1, 1, 3, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 13 pairs = [1, 1, 1, 1, 4, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 14 pairs = [1, 1, 1, 2, 1, 1, 1, 3] socmat= [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]] ipair = 15 pairs = [1, 1, 1, 2, 2, 1, 1, 3] socmat= [[0.0, -0.0], [0.0, -0.000267303], [0.0, 0.0]] ipair = 16 pairs = [1, 1, 1, 2, 3, 1, 1, 3] socmat= [[9.9813e-06, -0.0], [0.0, 0.0], [9.9813e-06, 0.0]] ipair = 17 pairs = [1, 1, 1, 2, 4, 1, 1, 3] socmat= [[-0.0, 0.0001380162], [0.0, -0.0], [-0.0, -0.0001380162]] ipair = 18 pairs = [1, 2, 1, 1, 2, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 19 pairs = [1, 2, 1, 1, 3, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 20 pairs = [1, 2, 1, 1, 4, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 21 pairs = [1, 2, 1, 2, 1, 1, 1, 3] socmat= [[-0.0, 0.0], [0.0, 0.0002395748], [-0.0, -0.0]] ipair = 22 pairs = [1, 2, 1, 2, 2, 1, 1, 3] socmat= [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]] ipair = 23 pairs = [1, 2, 1, 2, 3, 1, 1, 3] socmat= [[-0.0, 6.71293e-05], [0.0, 0.0], [-0.0, -6.71293e-05]] ipair = 24 pairs = [1, 2, 1, 2, 4, 1, 1, 3] socmat= [[0.0001918886, -0.0], [0.0, 0.0], [0.0001918886, 0.0]] ipair = 25 pairs = [1, 3, 1, 1, 3, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 26 pairs = [1, 3, 1, 1, 4, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 27 pairs = [1, 3, 1, 2, 1, 1, 1, 3] socmat= [[5.3791e-06, 0.0], [0.0, 0.0], [5.3791e-06, -0.0]] ipair = 28 pairs = [1, 3, 1, 2, 2, 1, 1, 3] socmat= [[0.0, -9.33422e-05], [0.0, -0.0], [0.0, 9.33422e-05]] ipair = 29 pairs = [1, 3, 1, 2, 3, 1, 1, 3] socmat= [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]] ipair = 30 pairs = [1, 3, 1, 2, 4, 1, 1, 3] socmat= [[-0.0, 0.0], [0.0, 3.9987e-06], [-0.0, -0.0]] ipair = 31 pairs = [1, 4, 1, 1, 4, 1, 1, 1] socmat= [[0.0, 0.0]] ipair = 32 pairs = [1, 4, 1, 2, 1, 1, 1, 3] socmat= [[0.0, -0.0001082041], [0.0, 0.0], [0.0, 0.0001082041]] ipair = 33 pairs = [1, 4, 1, 2, 2, 1, 1, 3] socmat= [[-0.0001922613, 0.0], [0.0, -0.0], [-0.0001922613, -0.0]] ipair = 34 pairs = [1, 4, 1, 2, 3, 1, 1, 3] socmat= [[-0.0, 0.0], [0.0, -2.31593e-05], [-0.0, -0.0]] ipair = 35 pairs = [1, 4, 1, 2, 4, 1, 1, 3] socmat= [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]] ipair = 36 pairs = [2, 1, 1, 2, 1, 1, 3, 3] socmat= [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, -0.0], [0.0, 0.0], [0.0, 0.0], [0.0, -0.0], [0.0, -0.0], [0.0, 0.0]] ipair = 37 pairs = [2, 1, 1, 2, 2, 1, 3, 3] socmat= [[0.0, -0.0002418587], [0.0, 0.0], [0.0, 0.0], [-0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [-0.0, 0.0], [0.0, 0.0002418587]] ipair = 38 pairs = [2, 1, 1, 2, 3, 1, 3, 3] socmat= [[0.0, -0.0], [-2.7796e-06, 0.0], [0.0, 0.0], [2.7796e-06, 0.0], [0.0, 0.0], [-2.7796e-06, 0.0], [0.0, 0.0], [2.7796e-06, 0.0], [0.0, 0.0]] ipair = 39 pairs = [2, 1, 1, 2, 4, 1, 3, 3] socmat= [[0.0, -0.0], [-0.0, -0.0001122211], [0.0, 0.0], [0.0, -0.0001122211], [0.0, 0.0], [-0.0, -0.0001122211], [0.0, 0.0], [0.0, -0.0001122211], [0.0, 0.0]] ipair = 40 pairs = [2, 2, 1, 2, 2, 1, 3, 3] socmat= [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, -0.0], [0.0, 0.0], [0.0, 0.0], [0.0, -0.0], [0.0, -0.0], [0.0, 0.0]] ipair = 41 pairs = [2, 2, 1, 2, 3, 1, 3, 3] socmat= [[0.0, -0.0], [0.0, 6.64953e-05], [0.0, 0.0], [-0.0, 6.64953e-05], [0.0, 0.0], [0.0, 6.64953e-05], [0.0, 0.0], [-0.0, 6.64953e-05], [0.0, 0.0]] ipair = 42 pairs = [2, 2, 1, 2, 4, 1, 3, 3] socmat= [[0.0, 0.0], [0.000192495, 0.0], [0.0, 0.0], [-0.000192495, 0.0], [0.0, 0.0], [0.000192495, 0.0], [0.0, 0.0], [-0.000192495, 0.0], [0.0, -0.0]] ipair = 43 pairs = [2, 3, 1, 2, 3, 1, 3, 3] socmat= [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, -0.0], [0.0, 0.0], [0.0, 0.0], [0.0, -0.0], [0.0, -0.0], [0.0, 0.0]] ipair = 44 pairs = [2, 3, 1, 2, 4, 1, 3, 3] socmat= [[0.0, -1.55095e-05], [-0.0, -0.0], [0.0, 0.0], [0.0, -0.0], [0.0, 0.0], [-0.0, -0.0], [0.0, 0.0], [0.0, -0.0], [0.0, 1.55095e-05]] ipair = 45 pairs = [2, 4, 1, 2, 4, 1, 3, 3] socmat= [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, -0.0], [0.0, 0.0], [0.0, 0.0], [0.0, -0.0], [0.0, -0.0], [0.0, 0.0]] ### JOB TYPE = RESP_EXGRAD ### nstate/natom= 8 4 istate= 1 state = [1, 1, 1] energy= -111.897341752 egrad = 1 -0.0000000000 -0.0000000000 0.4136839017 2 0.0000000000 -0.0000000000 -0.4346071844 3 -0.0030391817 0.0000000000 0.0104616413 4 0.0030391817 0.0000000000 0.0104616413 istate= 2 state = [1, 2, 1] energy= -112.193386955 egrad = 1 -0.0000000000 -0.0000000000 0.2425215017 2 0.0000000000 -0.0000000000 -0.2013989026 3 -0.0229461214 0.0000000000 -0.0205612996 4 0.0229461214 0.0000000000 -0.0205612996 istate= 3 state = [1, 3, 1] energy= -111.695088932 egrad = 1 -0.0000000000 0.0000000000 -0.0010564203 2 0.0000000000 -0.0000000000 -0.2697570388 3 0.1631768518 0.0000000000 0.1354067295 4 -0.1631768518 0.0000000000 0.1354067295 istate= 4 state = [1, 4, 1] energy= -112.00126975 egrad = 1 -0.0000000000 -0.0000000000 0.3767555079 2 0.0000000000 -0.0000000000 -0.3221802249 3 -0.0071175389 0.0000000000 -0.0272876415 4 0.0071175389 0.0000000000 -0.0272876415 istate= 5 state = [2, 1, 1] energy= -112.198747567 egrad = 1 -0.0000000000 -0.0000000000 0.4885322307 2 0.0000000000 -0.0000000000 -0.4641017184 3 -0.0191644721 0.0000000000 -0.0122152562 4 0.0191644721 0.0000000000 -0.0122152562 istate= 6 state = [2, 2, 1] energy= -112.233431278 egrad = 1 -0.0000000000 -0.0000000000 0.2631090310 2 0.0000000000 -0.0000000000 -0.2100776374 3 -0.0264667592 0.0000000000 -0.0265156968 4 0.0264667592 0.0000000000 -0.0265156968 istate= 7 state = [2, 3, 1] energy= -111.833542453 egrad = 1 -0.0000000000 0.0000000000 -0.2969301734 2 0.0000000000 -0.0000000000 -0.0134824551 3 0.2561475309 -0.0000000000 0.1552063142 4 -0.2561475309 -0.0000000000 0.1552063142 istate= 8 state = [2, 4, 1] energy= -112.063942941 egrad = 1 -0.0000000000 -0.0000000000 0.3514891824 2 0.0000000000 -0.0000000000 -0.2943029219 3 -0.0149237261 0.0000000000 -0.0285931303 4 0.0149237261 0.0000000000 -0.0285931303 ### JOB TYPE = RESP_FNAC ### npair/natom= 16 4 ipair = 1 pairs = [0, 0, 0, 1, 1, 1] epair = [-112.35347426254684, -111.89734175213182] nacmat= [-0.0, 0.0, -0.1642594137] [0.0, 0.0, 0.0619337655] [0.0249537306, -0.0, 0.0741276177] [-0.0249537306, -0.0, 0.0741276177] ipair = 2 pairs = [0, 0, 0, 1, 2, 1] epair = [-112.35347426254684, -112.19338695546372] nacmat= [0.0, -0.0, -0.0] [-0.0, 0.0, -0.0] [-0.0, -0.3084825076, -0.0] [-0.0, 0.3084825076, 0.0] ipair = 3 pairs = [0, 0, 0, 1, 3, 1] epair = [-112.35347426254684, -111.69508893176938] nacmat= [-0.2395755087, 0.0, 0.0] [0.1091754128, -0.0, -0.0] [-0.1355182046, 0.0, -0.0972633809] [-0.1355182046, -0.0, 0.0972633809] ipair = 4 pairs = [0, 0, 0, 1, 4, 1] epair = [-112.35347426254684, -112.00126975036943] nacmat= [-0.0, -0.3757009746, -0.0] [-0.0, 0.7088608799, 0.0] [-0.0, -0.0870383529, -0.0] [0.0, -0.0870383529, -0.0] ipair = 5 pairs = [1, 1, 1, 1, 2, 1] epair = [-111.89734175213182, -112.19338695546372] nacmat= [-0.0, 0.0, -0.0] [0.0, 0.0, 0.0] [0.0, 0.0781656512, 0.0] [0.0, -0.0781656512, -0.0] ipair = 6 pairs = [1, 1, 1, 1, 3, 1] epair = [-111.89734175213182, -111.69508893176938] nacmat= [0.0592465847, 0.0, 0.0] [0.285626323, -0.0, -0.0] [-0.1797565656, 0.0, -0.2123344574] [-0.1797565857, -0.0, 0.2123344574] ipair = 7 pairs = [1, 2, 1, 1, 3, 1] epair = [-112.19338695546372, -111.69508893176938] nacmat= [0.0, -0.3931299931, -0.0] [0.0, 0.1477346234, -0.0] [0.0, 0.1640143348, 0.0] [-0.0, 0.1640143348, 0.0] ipair = 8 pairs = [1, 1, 1, 1, 4, 1] epair = [-111.89734175213182, -112.00126975036943] nacmat= [0.0, -0.3416632221, -0.0] [0.0, 0.0175298544, 0.0] [0.0, 0.1474282182, 0.0] [-0.0, 0.1474282182, 0.0] ipair = 9 pairs = [1, 2, 1, 1, 4, 1] epair = [-112.19338695546372, -112.00126975036943] nacmat= [-0.71061252, -0.0, 0.0] [0.6594135245, 0.0, -0.0] [0.0594083452, -0.0, -0.0454566405] [0.0594083452, 0.0, 0.0454566405] ipair = 10 pairs = [1, 3, 1, 1, 4, 1] epair = [-111.69508893176938, -112.00126975036943] nacmat= [0.0, -0.0, -0.0] [-0.0, 0.0, 0.0] [-0.0, 0.0025202585, -0.0] [0.0, -0.0025202585, -0.0] ipair = 11 pairs = [2, 1, 1, 2, 2, 1] epair = [-112.19874756677972, -112.23343127829399] nacmat= [-0.0, 0.0, 0.0] [-0.0, -0.0, 0.0] [0.0, 0.2926613968, 0.0] [0.0, -0.2926613968, -0.0] ipair = 12 pairs = [2, 1, 1, 2, 3, 1] epair = [-112.19874756677972, -111.83354245330469] nacmat= [0.0501232837, 0.0, -0.0] [-0.0169144001, -0.0, 0.0] [-0.0040500362, -0.0, 0.0005938735] [-0.0040499994, 0.0, -0.0005938735] ipair = 13 pairs = [2, 2, 1, 2, 3, 1] epair = [-112.23343127829399, -111.83354245330469] nacmat= [0.0, -0.3814255489, -0.0] [-0.0, 0.0951559803, -0.0] [0.0, 0.1687002906, 0.0] [-0.0, 0.1687002906, 0.0] ipair = 14 pairs = [2, 1, 1, 2, 4, 1] epair = [-112.19874756677972, -112.06394294114064] nacmat= [-0.0, 0.490738486, 0.0] [-0.0, -0.5361069059, -0.0] [-0.0, -0.0483178262, -0.0] [0.0, -0.0483178262, -0.0] ipair = 15 pairs = [2, 2, 1, 2, 4, 1] epair = [-112.23343127829399, -112.06394294114064] nacmat= [-0.6691857117, -0.0, 0.0] [0.6764960763, 0.0, -0.0] [0.0467607902, -0.0, -0.0522083054] [0.0467607902, 0.0, 0.0522083054] ipair = 16 pairs = [2, 3, 1, 2, 4, 1] epair = [-111.83354245330469, -112.06394294114064] nacmat= [-0.0, 0.0, 0.0] [0.0, -0.0, -0.0] [-0.0, -0.0002096409, -0.0] [-0.0, 0.0002096409, 0.0] Final status: ierror= 0