Commit cc8d5d06 authored by Tuomas Rossi's avatar Tuomas Rossi

Fix LCAOTDDFT Ag55 tutorial script

parent e04187fe
......@@ -212,7 +212,7 @@ in the default setup are not relevant here.
We calculate the icosahedral Ag55 cluster: :download:``
This code uses ScaLAPACK parallelization with 64 cores.
This code uses ScaLAPACK parallelization with 48 cores.
.. literalinclude::
......@@ -3,10 +3,14 @@ from gpaw import GPAW
from gpaw import PoissonSolver
from gpaw.occupations import FermiDirac
from gpaw.lcaotddft import LCAOTDDFT
from gpaw.tddft import photoabsorption_spectrum
from gpaw.lcaotddft.dipolemomentwriter import DipoleMomentWriter
from gpaw.tddft.spectrum import photoabsorption_spectrum
from gpaw import setup_paths
# Set the path for the created basis set
setup_paths.insert(0, '.')
# Read the clusterm from the xyz file
atoms = read('')
......@@ -26,13 +30,13 @@ atoms.set_calculator(calc)
# Relax the ground state
# Save the intermediate ground state result to a file
calc.write('ag55.gpw', mode='all')
calc.write('ag55_gs.gpw', mode='all')
# Restart and calculate time propagation
td_calc = LCAOTDDFT('ag55.gpw',
# Time propagation
td_calc = LCAOTDDFT('ag55_gs.gpw',
parallel={'sl_default': (8, 6, 32), 'band': 2})
DipoleMomentWriter(td_calc, '')
td_calc.absorption_kick([1e-5, 0.0, 0.0])
td_calc.propagate(20, 500, '')
td_calc.propagate(20, 500)
photoabsorption_spectrum('', 'ag55.spec', width=0.2)
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