Commit d3f11567 authored by kuismam's avatar kuismam

Add creation script for Na8_imag.png

parent 83e5f15c

27.7 KB | W: | H:


70.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
......@@ -13,7 +13,7 @@ from gpaw.lcaotddft import LCAOTDDFT
# Increase accuragy of density for ground state
convergence = {'density': 1e-7}
# Increase accuracy of Poisson Solver and apply multipole corrections up to l=2
# Increase accuracy of Poisson Solver and apply multipole corrections up to l=1
poissonsolver = PoissonSolver(eps=1e-14, remove_moment=1 + 3)
td_calc = LCAOTDDFT(
......@@ -36,20 +36,20 @@ propagates the system forward using H(t) and solving a linear equation
.. math::
\left( \mathbf{S} + {\rm i} H(t) {\rm d}t / 2 \right) C'(t+{\rm d}t) = \left( S - {\rm i} H(t) {\rm d}t / 2 \right) C(t)
\left( \mathbf{S} + {\rm i} \mathbf{H}(t) {\rm d}t / 2 \right) \mathbf{C}'(t+{\rm d}t) = \left( \mathbf{S} - {\rm i} \mathbf{H}(t) {\rm d}t / 2 \right) \mathbf{C}(t)
Using the predicted wave functions at C'(t+dt), the Hamiltonian H'(t+dt) is
calculated and the Hamiltonian at middle of the time step is estimated as
.. math::
H(t+{\rm d}t/2) = (H(t) + H'(t+{\rm d}t)) / 2
\mathbf{H}(t+{\rm d}t/2) = (\mathbf{H}(t) + \mathbf{H}'(t+{\rm d}t)) / 2
With the improved Hamiltonian, have functions are again propagated from t to t+dt
.. math::
\left( \mathbf{S} + {\rm i} H(t+{\rm d}t/2) {\rm d}t / 2 \right) C(t+{\rm d}t) = \left( S - {\rm i} H(t+{\rm d}t/2) {\rm d}t / 2 \right) C(t)
\left( \mathbf{S} + {\rm i} \mathbf{H}(t+{\rm d}t/2) {\rm d}t / 2 \right) \mathbf{C}(t+{\rm d}t) = \left( \mathbf{S} - {\rm i} \mathbf{H}(t+{\rm d}t/2) {\rm d}t / 2 \right) \mathbf{C}(t)
This procedure is repeated using time step of 5-40as and for 500-2000 times to
obtain time evolution of electrons.
from gpaw.lcaotddft.tddfpt import transform_local_operator
from import read_cube
import matplotlib.pyplot as plt
import numpy as np
# gpw_file='Na8_gs.gpw', tdop_file='Na8.TdDen', fqop_file='Na8.FqDen', omega=1.8, eta=0.23)
data, atoms = read_cube('Na8.FqDen.imag.cube', read_data=True)
data = data[:,:, 16] #data = np.sum(data, axis=2)
extent = [0,atoms.cell[0][0],0,atoms.cell[1][1]]
plt.imshow(data.T, origin='lower', extent=extent)
for atom in atoms:
circle=plt.Circle((atom.position[0],atom.position[1]),.3,color='r', clip_on=False)
fig = plt.gcf()
plt.title('Induced density of $Na_{8}$')
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment