-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--------- Co-authored-by: Thomas Niehaus <[email protected]>
- Loading branch information
1 parent
1c1de79
commit 5820ebf
Showing
11 changed files
with
263 additions
and
51 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
docs/_archives/recipes/linresp/natural-orbitals/dftb_in.hsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Geometry = GenFormat { | ||
<<< "in.gen" | ||
} | ||
|
||
Hamiltonian = DFTB { | ||
|
||
Scc = Yes | ||
SccTolerance = 1.0E-10 | ||
MaxAngularMomentum { | ||
N = "p" | ||
C = "p" | ||
H = "s" | ||
} | ||
SlaterKosterFiles = Type2FileNames { | ||
Prefix = "../../slakos/download/mio/mio-1-1/" | ||
Separator = "-" | ||
Suffix = ".skf" | ||
} | ||
} | ||
|
||
ExcitedState { | ||
Casida { | ||
NrOfExcitations = 10 | ||
StateOfInterest = 2 | ||
Symmetry = Singlet | ||
Diagonaliser = Stratmann {SubSpaceFactor = 30} | ||
WriteEigenvectors = Yes | ||
} | ||
} | ||
|
||
Options { | ||
WriteDetailedXml = Yes | ||
} | ||
|
||
Analysis { | ||
CalculateForces = Yes | ||
WriteEigenvectors = Yes | ||
} | ||
|
||
ParserOptions { | ||
ParserVersion = 10 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
22 C | ||
N C H | ||
1 1 -2.0382600000E+00 2.2050800000E+00 2.5000000000E-04 | ||
2 2 -1.4355300000E+00 1.2277400000E+00 1.3000000000E-04 | ||
3 2 -6.8509500000E-01 0.0000000000E+00 0.0000000000E+00 | ||
4 2 -1.4354800000E+00 -1.2276900000E+00 8.0000000000E-05 | ||
5 2 6.8509500000E-01 0.0000000000E+00 0.0000000000E+00 | ||
6 1 -2.0380300000E+00 -2.2051400000E+00 2.5000000000E-04 | ||
7 2 1.4355200000E+00 -1.2276900000E+00 -1.1000000000E-04 | ||
8 2 1.4354800000E+00 1.2277100000E+00 -9.0000000000E-05 | ||
9 1 2.0382900000E+00 -2.2050000000E+00 -2.3000000000E-04 | ||
10 1 2.0380500000E+00 2.2051400000E+00 -2.4000000000E-04 | ||
11 2 0.0000000000E+00 1.3939400000E+00 5.0000000000E+00 | ||
12 2 1.2071800000E+00 6.9697000000E-01 5.0000000000E+00 | ||
13 2 1.2071800000E+00 -6.9697000000E-01 5.0000000000E+00 | ||
14 2 0.0000000000E+00 -1.3939400000E+00 5.0000000000E+00 | ||
15 2 -1.2071800000E+00 -6.9697000000E-01 5.0000000000E+00 | ||
16 2 -1.2071800000E+00 6.9697000000E-01 5.0000000000E+00 | ||
17 3 -2.1463200000E+00 1.2391800000E+00 5.0000000000E+00 | ||
18 3 -2.1463200000E+00 -1.2391800000E+00 5.0000000000E+00 | ||
19 3 0.0000000000E+00 -2.4783600000E+00 5.0000000000E+00 | ||
20 3 2.1463200000E+00 -1.2391800000E+00 5.0000000000E+00 | ||
21 3 2.1463200000E+00 1.2391800000E+00 5.0000000000E+00 | ||
22 3 0.0000000000E+00 2.4783600000E+00 5.0000000000E+00 |
18 changes: 18 additions & 0 deletions
18
docs/_archives/recipes/linresp/natural-orbitals/waveplot_in.hsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Options { | ||
RealComponent = Yes # Plot real component of the wavefunction | ||
PlottedSpins = 1 -1 | ||
PlottedLevels = 1 -1 # Levels to plot | ||
PlottedRegion = OptimalCuboid {} # Region to plot | ||
NrOfPoints = 50 50 50 # Number of grid points in each direction | ||
NrOfCachedGrids = -1 # Nr of cached grids (speeds up things) | ||
Verbose = Yes # Wanna see a lot of messages? | ||
} | ||
|
||
DetailedXml = "detailed.xml" # File containing the detailed xml output | ||
# of DFTB+ | ||
EigenvecBin = "excitedOrbs.bin" # File cointaining the binary eigenvecs | ||
|
||
Basis { | ||
Resolution = 0.01 | ||
<<+ "../../slakos/wfc/wfc.mio-1-1.hsd" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,4 @@ of TD-DFTB will be exploited. | |
no-titania.rst | ||
rangeseparated.rst | ||
relax.rst | ||
naturalorbitals.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
.. highlight:: none | ||
|
||
*********************************************** | ||
Visualization of natural orbitals with waveplot | ||
*********************************************** | ||
|
||
[Input: `recipes/linresp/natural-orbitals`] | ||
|
||
The majority of excited states are not well described by the | ||
transition of an electron from a single Kohn-Sham orbital to another | ||
single Kohn-Sham orbital. In other words, the excited state is in | ||
general a superposition of many determinants. In such a situation, the | ||
excited state weight in the file EXC.DAT will be smaller than | ||
one. Natural transition orbitals (NTO) allow for a compact | ||
representation of the excitation in such a scenario :cite:`luzanov1976application`. They are obtained | ||
from a singular value decomposition of the transition density matrix | ||
and deliver `hole` and `electron` orbitals for a given excited | ||
state. We discuss their visualization in the context of the | ||
Benzene-Tetracyanoethylene dimer we looked at :ref:`earlier <benz_dimer>`. Strictly | ||
speaking, natural orbitals are not really required for this system, | ||
since for example the lowest excited state is well described by a HOMO | ||
to LUMO transition, without contributions from other single-particle | ||
transitions. We still discuss the NTO feature for this example, because | ||
it allows us to compare the results with the earlier calculations. | ||
|
||
We first run DFTB+ with the following modified input: | ||
|
||
.. literalinclude:: ../_archives/recipes/linresp/natural-orbitals/dftb_in.hsd | ||
:lines: 21-38 | ||
|
||
Here ``CalculateForces`` requests to compute excited forces for state | ||
``StateOfInterest``. During this calculation also the NTO for that state | ||
are created and written to a file (always called `excitedOrbs.bin`), if | ||
``WriteEigenvectors`` in the ``Casida`` block is set to ``Yes``. In the | ||
``Options`` block, the keyword ``WriteDetailedXml`` is required for the | ||
plot. In the ``Analysis`` block, ``WriteEigenvectors`` advises the code to | ||
print out the ground state molecular orbitals also. | ||
|
||
Let us look at an excerpt of the generated file `detailed.xml`:: | ||
|
||
<excitedoccupations> | ||
<spin1> | ||
<k1> | ||
-1.00000341372109 -5.201183337079720E-002 -5.170515789354190E-002 ..... | ||
..................... | ||
5.170515780471528E-002 5.201183337096685E-002 1.00638172624593 | ||
|
||
</k1> | ||
</spin1> | ||
</excitedoccupations> | ||
|
||
We see the state occupations :math:`n_{i}` of the NTO. Negative values | ||
indicate hole orbitals and positive values electron orbitals. Most | ||
excited states (unless you have degeneracy) have only one important | ||
(:math:`n_{i}\approx -1.0`) hole and one important | ||
(:math:`n_{i}\approx 1.0`) electron NTO, even though the CI expansion | ||
might include a large number of single-particle transitions. | ||
|
||
As seen in the section :ref:`here <sec-basics-waveplot>`, we can now visualize these orbitals using the waveplot code. The input file `waveplot_in.hsd` has this form: | ||
|
||
.. literalinclude:: ../_archives/recipes/linresp/natural-orbitals/waveplot_in.hsd | ||
:emphasize-lines: 4,13 | ||
|
||
Important is here the line ``EigenvecBin`` which reads the created file | ||
with natural transition orbitals instead of the ground state MO. The | ||
keyword ``PlottedLevels`` in this example requests the first and last | ||
orbital to be plotted (note that the curly bracket contains the | ||
indices of the NO, not the occupation). These are exactly the natural | ||
transition orbitals with highest occupation. If you do the plot, you | ||
will realize that the hole orbital is essentially Kohn-Sham state 37 | ||
(the HOMO), while the electron orbital is Kohn-Sham state 38 (the | ||
LUMO). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.