[gpaw-users] a write problem
Yuelin Li
ylli at aps.anl.gov
Tue Dec 14 21:38:57 CET 2010
I have this problem:
_______________________________________
Traceback (most recent call last):
File "testTDDFT.py", line 26, in <module>
obs.write('bda_fourier.ftd')
File "/soft/gpaw/gpaw-0.7.2/gpaw/tddft/fourier.py", line 224, in write
tar = Writer(filename)
TypeError: __init__() takes exactly 3 arguments (2 given)
_________________________________________
when runing this script
_____________________________________________
from gpaw.tddft import TDDFT
from gpaw.tddft.fourier import DensityFourierTransform
time_step = 4.0 # 1 attoseconds = 0.041341 autime
iterations = 5000 # 5000 x 4 as => 20 fs
kick_strength = [0.0,5e-3,0.0] # Kick to y-direction
frequencies = [4.26,6.27,13.0, \
16.9,18.1,19.9] # Pre-determined peak frequencies in eV
sigma = 0.05 # Width of Gaussian envelope in eV
td_calc = TDDFT('bda_gs.gpw')
td_calc.absorption_kick(kick_strength=kick_strength)
obs = DensityFourierTransform(timestep, frequencies, sigma)
obs.initialize(td_calc)
td_calc.propagate(time_step, iterations, 'bda_dm.dat', 'bda_td.gpw')
obs.write('bda_fourier.ftd')
More information about the gpaw-users
mailing list