- 帖子
- 4
- 积分
- 17
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2019-9-8
|
各位前辈,你们好!
在下最近使用一款软件来处理科学数据,然后得到一系列txt文件,每个txt文件里都有
Note: Orbital 105 is HOMO, energy: -0.277311 a.u. -7.546013 eV
Orbital 106 is LUMO, energy: -0.022027 a.u. -0.599384 eV
HOMO-LUMO gap: 0.255284 a.u. 6.946629 eV 670.247947 kJ/mol
这样三行数据,数据内容不同,数据所处的行数也不同,但都是“Note”开头的。我想把各个txt里的这三行内容汇总到一个txt文件里,并在各个行之前添加对应txt文件名,请问该如何做到?
例如我有一系列txt文件,abc.txt ABC.txt 123.txt,我想得到的新txt内容为:
abc
Note: Orbital 105 is HOMO, energy: -0.277311 a.u. -7.546013 eV
Orbital 106 is LUMO, energy: -0.022027 a.u. -0.599384 eV
HOMO-LUMO gap: 0.255284 a.u. 6.946629 eV 670.247947 kJ/mol
ABC
Note: Orbital 105 is HOMO, energy: -0.277311 a.u. -7.546013 eV
Orbital 106 is LUMO, energy: -0.022027 a.u. -0.599384 eV
HOMO-LUMO gap: 0.255284 a.u. 6.946629 eV 670.247947 kJ/mol
123
Note: Orbital 105 is HOMO, energy: -0.277311 a.u. -7.546013 eV
Orbital 106 is LUMO, energy: -0.022027 a.u. -0.599384 eV
HOMO-LUMO gap: 0.255284 a.u. 6.946629 eV 670.247947 kJ/mol
完整的txt内容如下:
Multiwfn -- A Multifunctional Wavefunction Analyzer
Version 3.7(dev), release date: 2019-Nov-1
Project leader: Tian Lu (Beijing Kein Research Center for Natural Sciences)
Below paper ***MUST BE CITED*** if Multiwfn is utilized in your work:
Tian Lu, Feiwu Chen, J. Comput. Chem., 33, 580-592 (2012)
Multiwfn official website: http://sobereva.com/multiwfn
Multiwfn English forum: http://sobereva.com/wfnbbs
Multiwfn Chinese forum: http://bbs.keinsci.com/wfn
( The number of threads: 8 Current date: 2019-11-19 Time: 09:55:42 )
Please wait...
Loading various information of the wavefunction
The highest angular moment basis functions is D
Loading basis set definition...
Loading orbitals...
Converting basis function information to GTF information...
Generating overlap matrix...
Back converting basis function information from Cartesian to spherical type...
Generating density matrix based on SCF orbitals...
Total/Alpha/Beta electrons: 210.0000 105.0000 105.0000
Net charge: 0.00000 Expected multiplicity: 1
Atoms: 26, Basis functions: 476, GTFs: 846
Total energy: -2115.836188993044 Hartree, Virial ratio: 2.00238388
This is a restricted single-determinant wavefunction
Orbitals from 1 to 105 are occupied
Title line of this file: Title Card Required
Loaded ABCD_AAA.fchk successfully!
Formula: S8 N2 Cl15 Cs1
Molecule weight: 666.02019
Point group: F4
************ Main function menu ************
0 Show molecular structure and view orbitals
1 Output all properties at a point
2 Topology analysis
3 Output and plot specific property in a line
4 Output and plot specific property in a plane
5 Output and plot specific property within a spatial region (calc. grid data)
6 Check & modify wavefunction
7 Population analysis and atomic charges
8 Orbital composition analysis
9 Bond order analysis
10 Plot total DOS, partial DOS, OPDOS, local DOS and photoelectron spectrum
11 Plot IR/Raman/UV-Vis/ECD/VCD/ROA spectrum
12 Quantitative analysis of molecular surface
13 Process grid data (No grid data is presented currently)
14 Adaptive natural density partitioning (AdNDP) analysis
15 Fuzzy atomic space analysis
16 Charge decomposition analysis (CDA) and extended CDA (ECDA)
17 Basin analysis
18 Electron excitation analysis
19 Orbital localization analysis
20 Visual study of weak interaction
21 Energy decomposition analysis
100 Other functions (Part 1) 200 Other functions (Part 2)
Nucleus list:
1(O ) --> Charge: 8.000000 x,y,z(Bohr): -8.929672 2.024485 1.004248
2(O ) --> Charge: 8.000000 x,y,z(Bohr): -9.763455 -1.109600 -1.832432
3(C ) --> Charge: 6.000000 x,y,z(Bohr): -8.460157 0.006185 -0.174519
4(Na) --> Charge: 11.000000 x,y,z(Bohr): -12.612463 2.160224 -1.450064
5(F ) --> Charge: 9.000000 x,y,z(Bohr): 1.022313 2.849331 -0.896200
6(F ) --> Charge: 9.000000 x,y,z(Bohr): 1.545568 1.347049 2.938965
7(F ) --> Charge: 9.000000 x,y,z(Bohr): -0.779625 -2.267522 -2.106199
8(F ) --> Charge: 9.000000 x,y,z(Bohr): -0.967032 -2.765132 2.013891
9(F ) --> Charge: 9.000000 x,y,z(Bohr): 3.931592 -2.967363 0.401992
10(F ) --> Charge: 9.000000 x,y,z(Bohr): 4.014622 -0.487438 -2.933183
11(F ) --> Charge: 9.000000 x,y,z(Bohr): -3.459239 2.188040 2.000752
12(F ) --> Charge: 9.000000 x,y,z(Bohr): -3.849666 1.587675 -2.090582
13(F ) --> Charge: 9.000000 x,y,z(Bohr): 6.040311 3.320623 0.556040
14(F ) --> Charge: 9.000000 x,y,z(Bohr): 6.588591 0.117457 3.138778
15(F ) --> Charge: 9.000000 x,y,z(Bohr): -6.040318 -1.899865 3.118696
16(F ) --> Charge: 9.000000 x,y,z(Bohr): -5.565383 -3.497473 -0.682380
17(F ) --> Charge: 9.000000 x,y,z(Bohr): 10.788740 0.750137 0.650052
18(F ) --> Charge: 9.000000 x,y,z(Bohr): 8.902838 1.282742 -2.954838
19(F ) --> Charge: 9.000000 x,y,z(Bohr): 8.911750 -2.416307 -1.162048
20(C ) --> Charge: 6.000000 x,y,z(Bohr): 1.360199 0.719358 0.471219
21(C ) --> Charge: 6.000000 x,y,z(Bohr): -0.992835 -1.041976 0.128758
22(C ) --> Charge: 6.000000 x,y,z(Bohr): 3.903294 -0.540107 -0.383137
23(C ) --> Charge: 6.000000 x,y,z(Bohr): -3.574751 0.406503 0.173193
24(C ) --> Charge: 6.000000 x,y,z(Bohr): 6.317275 0.787373 0.696559
25(C ) --> Charge: 6.000000 x,y,z(Bohr): -5.930502 -1.306092 0.602564
26(C ) --> Charge: 6.000000 x,y,z(Bohr): 8.796903 0.075567 -0.742547
Note: Orbital 105 is HOMO, energy: -0.277311 a.u. -7.546013 eV
Orbital 106 is LUMO, energy: -0.022027 a.u. -0.599384 eV
HOMO-LUMO gap: 0.255284 a.u. 6.946629 eV 670.247947 kJ/mol
************ Main function menu ************
0 Show molecular structure and view orbitals
1 Output all properties at a point
2 Topology analysis
3 Output and plot specific property in a line
4 Output and plot specific property in a plane
5 Output and plot specific property within a spatial region (calc. grid data)
6 Check & modify wavefunction
7 Population analysis and atomic charges
8 Orbital composition analysis
9 Bond order analysis
10 Plot total DOS, partial DOS, OPDOS, local DOS and photoelectron spectrum
11 Plot IR/Raman/UV-Vis/ECD/VCD/ROA spectrum
12 Quantitative analysis of molecular surface
13 Process grid data (No grid data is presented currently)
14 Adaptive natural density partitioning (AdNDP) analysis
15 Fuzzy atomic space analysis
16 Charge decomposition analysis (CDA) and extended CDA (ECDA)
17 Basin analysis
18 Electron excitation analysis
19 Orbital localization analysis
20 Visual study of weak interaction
21 Energy decomposition analysis
100 Other functions (Part 1) 200 Other functions (Part 2) |
|