[gpaw-users] (no subject)
Tuomas Rossi
tuomas.rossi at aalto.fi
Thu Apr 7 08:15:43 CEST 2016
For the record, the time-propagation TDDFT energy output is changed to
eV as of
https://gitlab.com/gpaw/gpaw/commit/7b7fc71f99e5a20620c3b2654adf2c84ebb75cd1
Best,
Tuomas
On 2016-04-06 09:58, Tuomas Rossi wrote:
> Hi,
>
> It seems that in the current version the energy is written in atomic
> units during the time propagation. This explains the difference here,
> 669/24 ~ Hartree energy.
>
> Best,
> Tuomas
> On 2016-04-06 08:53, mohamed amin wrote:
>> Thank you.
>> I have tried your suggestion and the energy improved but still didn't
>> match the ground state energy. So it starts the TD iterations with
>> -24 energy while the ground state energy converged at -669. However,
>> before adding your solution the energy used to start with 2043. My in
>> gs and td script are:
>> /////////// GS ///////////////////////////
>> import sys
>> import numpy as np
>> from ase import Atoms, Atom
>> from ase.units import Bohr
>> from gpaw import GPAW
>> from ase.io import write
>> from gpaw import GPAW, FermiDirac
>> from jellium_cluster import *
>> from gpaw import Mixer
>>
>> mixer=Mixer(beta=0.02, nmaxold=5, weight=100.0)
>> L = 32.
>> jellium = Atoms(cell=(L, L, L)) # simulation cell with no atoms (cube
>> LxLxL)
>>
>> convergence ={'density': 1.0e-5}
>>
>> # radius of positive sphere
>> R = 14.276
>> # charge of positive sphere
>> Z = 331.
>> # center of
>> center = (L/2,L/2,L/2)
>> # special poisson solver
>> poissonsolver = SphericalJelliumClusterPoissonSolver(Z, R, center)
>>
>> nelec = 331 # number of electrons
>> nstates = 192 # number of states
>> jellium.calc = GPAW( poissonsolver=poissonsolver, # use special
>> Poisson solver
>> xc='LDA',
>> charge=-nelec, # charge of electrons,
>> total charge = Z - nelec
>> nbands=nstates,
>> h=.50,
>> txt='Na_out.txt',
>> eigensolver='cg', #'rmm-diis','cg'
>> occupations=FermiDirac(width=0.05),
>> mixer=mixer,
>> convergence=convergence,
>> maxiter=2000)
>>
>> jellium.calc.attach(jellium.calc.write, 10, 'rest.gpw')
>> # find electronic states
>> e0 = jellium.get_potential_energy()
>>
>> # save states
>> jellium.calc.write('na.gpw', mode='all')
>>
>>
>>
>> //////////////////// TD ////////////////////////
>> from ase import Atoms
>> from gpaw import GPAW
>> from gpaw.tddft import TDDFT, photoabsorption_spectrum
>> from jellium_cluster import *
>>
>>
>> L = 32.
>> jellium = Atoms(cell=(L, L, L)) # simulation cell with no atoms (cube
>> LxLxL)
>> # radius of positive sphere
>> R = 14.276
>> # charge of positive sphere
>> Z = 331.
>> # center of
>> center = (L/2,L/2,L/2)
>> # special poisson solver
>> poissonsolver = SphericalJelliumClusterPoissonSolver(Z, R, center)
>> time_step = 1.0 # 8.0 as (1 as = 0.041341 autime)5D
>> iters = 4000 # 2000 x 8 as => 16 fs
>> kick = [0,0,5e-3]
>> # TDDFT calculator
>> td_calc = TDDFT('na.gpw',
>> poissonsolver=poissonsolver)
>>
>> # Kick
>> td_calc.absorption_kick(kick)
>>
>>
>> # Propagate
>> td_calc.propagate(time_step, iters, '331_jell.dat', '331_JELLIUM_td.gpw')
>> td_calc.write('331_JELLIUM_td.gpw', mode='all')
>> photoabsorption_spectrum('331_jell.dat', '331_spectrum_z.dat')
>>
>> //////////////////////////////////////////////////////////////////////////////////////////
>> Thank you for you help
>> Sincerely,
>>
>> Muhamed Amin
>>
>>
>> On Monday, April 4, 2016 12:07 PM, Tuomas Rossi
>> <tuomas.rossi at aalto.fi> wrote:
>>
>>
>> Hi,
>>
>> The following should work:
>>
>> td_calc = TDDFT('na.gpw',
>> poissonsolver=poissonsolver)
>>
>> (TDDFT calculator inherits from GPAW class, so it supports similar
>> arguments.)
>>
>> Best,
>> Tuomas
>>
>>
>> On 2016-04-04 11:39, mohamed amin wrote:
>> > Thanks for reply,
>> > I checked the GPAW manual and I didn't see a way to give poissonsolver
>> > to TDDFT object. It only allows you to provide the linear equation
>> solver.
>> > Do you know how to provide the poissonsolver to TDDFT object?
>> > Thanks again
>> > Sincerely,
>> >
>> > Muhamed Amin
>> >
>> >
>> > On Monday, April 4, 2016 8:59 AM, Tuomas Rossi <tuomas.rossi at aalto.fi>
>> > wrote:
>> >
>> >
>> > Hi,
>> >
>> > It seems that the TDDFT calculator is using the default poissonsolver
>> > and thus the jellium potential is not present there. So, you need to
>> > give the same jellium poissonsolver to TDDFT calculator also.
>> >
>> > Note: the poissonsolver is not stored in gpw file (question to
>> > developers: should it be?).
>> >
>> > If this doesn't help, please attach the entire input scripts and output
>> > files.
>> >
>> > Best,
>> > Tuomas
>> >
>> >
>> > On 2016-04-01 13:39, Ask Hjorth Larsen via gpaw-users wrote:
>> > > Hello Amin
>> > >
>> > > 2016-03-31 18:42 GMT+02:00 mohamed amin <siasas at yahoo.com
>> > <mailto:siasas at yahoo.com <mailto:siasas at yahoo.com>>>:
>> > >> Hi Ask,
>> > >> I have tried to send my questions to the GPAW list many times but I
>> > never see them posted although I'm getting the messages from other
>> users.
>> > >> I wanted to know why when I start td propagation the energy is very
>> > different that the ground state energy. For example, when I ran the
>> same
>> > calculations on octopus, the td calculations start with the ground
>> state
>> > energy then it changes gradually with time. In GPAW, the td
>> energies are
>> > positive while the gs are negative. I don't know what is the source of
>> > error.
>> > >
>> > > I guess this will reach the mailing list now then.
>> Unfortunately I am
>> > > not so well into the time-dependent code. Maybe someone else can
>> have
>> > > a look?
>> > >
>> > > Note: I recommend attaching entire scripts rather than inline
>> snippets.
>> > >
>> > > Also, who can tell why Amin's e-mails might not be arriving to the
>> > mailing list?
>> > >
>> > > Best regards
>> > > Ask
>> > >
>> > >> Here is my gs input:
>> > >> jellium.calc = GPAW( poissonsolver=poissonsolver, # use special
>> > Poisson solver
>> > >> xc='LDA',
>> > >> charge=-nelec, # charge of electrons,
>> > total charge = Z - nelec
>> > >> nbands=nstates,
>> > >> h=.50,
>> > >> txt='Na.txt',
>> > >> eigensolver='cg',
>> #'rmm-diis','cg'
>> > >> occupations=FermiDirac(width=0.05),
>> > >> mixer=mixer,
>> > >> convergence=convergence,
>> > >> maxiter=2000)
>> > >>
>> > >> jellium.calc.attach(jellium.calc.write, 10, 'rest.gpw')
>> > >> # find electronic states
>> > >> e0 = jellium.get_potential_energy()
>> > >>
>> > >> # save states
>> > >> jellium.calc.write('na.gpw', mode='all')
>> > >>
>> > >> and my td input
>> > >>
>> > >> time_step = 1.0 # 8.0 as (1 as = 0.041341 autime)5D
>> > >> iters = 4000 # 2000 x 8 as => 16 fs
>> > >> # Weak delta kick to z-direction
>> > >> kick = [0,0,5e-3]
>> > >> print "*********************************Starting TDDFT
>> > calculations******************************"
>> > >> # TDDFT calculator
>> > >> td_calc = TDDFT('na.gpw')
>> > >> # Kick
>> > >> td_calc.absorption_kick(kick)
>> > >>
>> > >> frequencies = [2.80, 2.98] # Frequencies of interest in eV
>> > >> folding = 'Gauss' # Folding function
>> > >> width = 0.1 # Line width for folding in eV
>> > >> ind = TDDFTInducedField(paw=td_calc,
>> > >> frequencies=frequencies,
>> > >> folding=folding,
>> > >> width=width,
>> > >> restart_file='331_jellium_td.ind')
>> > >>
>> > >>
>> > >> # Propagate
>> > >> td_calc.propagate(time_step, iters, '331_jell.dat',
>> > '331_JELLIUM_td.gpw')
>> > >> td_calc.write('331_JELLIUM_td.gpw', mode='all')
>> > >> ind.write('331_jellium_td.ind')
>> > >> photoabsorption_spectrum('331_jell.dat', '331_spectrum_z.dat')
>> > >>
>> > >> Thanks
>> > >>
>> > >> Sincerely,
>> > >>
>> > >> Muhamed Amin
>> >
>> > >
>> > > _______________________________________________
>> > > gpaw-users mailing list
>> > > gpaw-users at listserv.fysik.dtu.dk
>> <mailto:gpaw-users at listserv.fysik.dtu.dk>
>> > <mailto:gpaw-users at listserv.fysik.dtu.dk
>> <mailto:gpaw-users at listserv.fysik.dtu.dk>>
>>
>> > > https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>> >
>> > >
>> >
>> >
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20160407/de3c76c1/attachment-0001.html>
More information about the gpaw-users
mailing list