Natural transition orbitals
Contents
Natural transition orbitals¶
Objectives
Learn how to generate cube files for natural transition orbitals (NTOs).
Keypoints
Generate cube files for NTOs.
Compare the number of NTOs with the number of important excitations.
Visualize selected cube files for NTOs.
Introduction¶
In this exercise we will generate NTO cube files for visualizing exitations. NTOs are given by singular value decomposition (SVD) of single particle transition density matrix T
where S is diagonal matrix and U and V are unitary transformation matrices. Transformation of orbital sets by U and V makes it more straightforward to interpret the excitations. The square of the diagonal elements of S reflect the importance of the associated particle-hole excitations. You can read more about NTOs in this paper [Mar03].
System: BPVB¶
Input file¶
Below is the input file for generating NTO cube files. You can read more about the input keywords in this page.
@jobs
task: response
@end
@method settings
basis: def2-sv(p)
@end
@response
property: absorption
nstates: 5
nto: yes
@end
@molecule
charge: 0
multiplicity: 1
xyz:
C -0.84284 -1.02840 0.00963
C -1.45123 0.22734 0.13199
C -0.56813 1.31753 0.20330
C 0.79861 1.16984 0.14857
C 1.40475 -0.08580 0.02124
C 0.52270 -1.17632 -0.04573
C 2.83288 -0.25642 -0.05712
C 3.76548 0.67937 0.19550
C 5.19289 0.48407 0.10731
C 5.77992 -0.66818 -0.43060
C 7.14548 -0.81294 -0.48567
C 7.99149 0.18848 0.00120
C 7.41766 1.34742 0.53085
C 6.04993 1.48831 0.57516
N 9.37377 0.02902 -0.04283
C 9.93244 -1.24442 0.11269
C 10.20821 1.12848 -0.26234
C -2.88190 0.39460 0.16902
C -3.79623 -0.58764 0.07004
C -5.22951 -0.42765 0.07697
C -5.87775 0.80936 0.18224
C -7.24988 0.89923 0.15782
C -8.03929 -0.24763 0.02735
C -7.40348 -1.48895 -0.06584
C -6.03165 -1.57039 -0.04241
C 11.44362 1.22068 0.38117
C 12.26503 2.30099 0.15564
C 11.89576 3.33640 -0.71341
C 10.65419 3.22959 -1.35281
C 9.82892 2.15058 -1.13546
C 11.04148 -1.63387 -0.63985
C 11.57259 -2.89457 -0.49144
C 11.02315 -3.82332 0.40271
C 9.92056 -3.41216 1.16287
C 9.38808 -2.15161 1.02454
N -9.42733 -0.15899 -0.01657
C -10.10310 0.81339 0.72665
C -10.15980 -1.05823 -0.79941
C -11.37880 -1.56595 -0.34756
C -12.08835 -2.45679 -1.11970
C -11.61809 -2.88420 -2.36853
C -10.39907 -2.35720 -2.81366
C -9.68587 -1.46321 -2.04912
C -11.24256 1.43256 0.21001
C -11.91737 2.37442 0.95148
C -11.49006 2.74391 2.23387
C -10.34144 2.11940 2.73616
C -9.66274 1.17423 2.00184
Br -1.22596 3.10477 0.37084
Br 1.18173 -2.96391 -0.20622
H -1.46192 -1.90929 -0.04438
H 1.42157 2.04915 0.19107
H 3.15814 -1.24941 -0.33082
H 3.46472 1.66683 0.52108
H 5.16098 -1.45623 -0.82953
H 7.57560 -1.70447 -0.91774
H 8.05634 2.12895 0.91546
H 5.62653 2.38873 0.99739
H -3.22302 1.41372 0.27662
H -3.47028 -1.61398 -0.03752
H -5.30134 1.71678 0.27090
H -7.72831 1.86531 0.22466
H -7.99890 -2.38608 -0.15037
H -5.56074 -2.54083 -0.11172
H 11.74642 0.43909 1.06273
H 13.21515 2.35773 0.66757
H 10.33513 3.99768 -2.03977
H 8.88126 2.08182 -1.64989
H 11.47252 -0.94131 -1.34816
H 12.42439 -3.18240 -1.09107
H 9.48023 -4.08629 1.88056
H 8.54218 -1.85239 1.62644
H -11.75585 -1.26098 0.61779
H -13.02563 -2.84678 -0.74906
H -10.00831 -2.64471 -3.77710
H -8.75168 -1.06217 -2.41506
H -11.58760 1.16845 -0.77908
H -12.79529 2.84594 0.53326
H -9.98123 2.36872 3.72191
H -8.78721 0.69413 2.41458
C 12.79848 4.44330 -0.90794
C 11.60189 -5.14004 0.49225
C -12.24825 3.72640 2.96718
C -12.39522 -3.83630 -3.12216
H -13.07666 4.05313 2.37398
H -11.62135 4.56284 3.19578
H -12.60953 3.29251 3.87608
H -11.89722 -4.05312 -4.04405
H -13.36173 -3.42540 -3.32692
H -12.50350 -4.73704 -2.55484
H 12.42903 -5.21273 -0.18262
H 10.86525 -5.87176 0.23370
H 11.94111 -5.31331 1.49216
H 12.36632 5.13927 -1.59623
H 13.72598 4.08233 -1.30082
H 12.97323 4.92991 0.02885
@end
Exercise¶
Submit a job
Runs the above example. On Dardel this calculation takes several minutes on 4 nodes.
Compare number of NTOs with number of important excitations
Use the python script in this page to extract important excitations from output files.
ml PDC/21.11 Anaconda3/2021.05 vim/8.2 python3 analyze_response_output.py bpvb.out
Visualize the cube files. You can launch a MyBinder instance to look at your NTOs in a Jupyter notebook. Once instance has started up, you can upload your cube files to it and use py3Dmol (already installed) as follows:
import py3Dmol as p3d h2o_xyz = """3 water O 0.000000000000 0.000000000000 0.000000000000 H 0.000000000000 0.740848095288 0.582094932012 H 0.000000000000 -0.740848095288 0.582094932012 """ # generate view v = p3d.view(width=400, height=400) # to show the molecular geometry, we read it from a XYZ file v.addModel(h2o_xyz, "xyz") v.setStyle({'stick':{}}) # we read in the cube file we uploaded (might take a bit of time, depending on the filesize) with open("HOMO.cube", "r") as f: cube = f.read() # negative lobe v.addVolumetricData(cube, "cube", {"isoval": -0.02, "color": "blue", "opacity": 0.75}) # positive lobe v.addVolumetricData(cube, "cube", {"isoval": 0.02, "color": "red", "opacity": 0.75}) v.show()