[gpaw-users] Positive and negative part of the wavefunction + electrostatic potential
Jens Jørgen Mortensen
jensj at fysik.dtu.dk
Tue Oct 4 10:53:05 CEST 2011
> > Fra: Andrew Peterson <andy.peterson at stanford.edu>
> > The (pseudo) electrostatic potential can be pulled from GPAW with:
> >
> > from ase import units
> > from gpaw import GPAW
> > calc = GPAW(...)
> > v = calc.hamiltonian.vHt_g * units.Hartree
The vHt_g array is not stored in the gpw file, so one will have to call
"calc.restore_state()" first. This will take the pseudo density from
the file, add compensation charges and solve the Poisson equation.
Please note that the effective potential from
calc.get_effective_potential() is identical to the electrostatic
potential in the vacuum region, so if you just need the work function,
you can use the effective potential - which is in the gpw-file.
> > It's definitely not obvious how to do that; we should add something to
> > the documentation. I also agree it would be good to have a separate
> > .get_...() method for pulling out the electrostatic potential.
Contributions are welcome.
> > A while ago I repeated an old Dacapo example (made originally by John
> > Kitchin) that shows how the dipole correction works and how to extract
> > the electrostatic potential from both codes, and compared the GPAW and
> > DACAPO results. I've been meaning to put this in a form that could go on
> > the GPAW website, but in the meantime I will attach this PDF, in a form
> > inspired by Dr. Kitchin. Others will likely find it useful.
Thanks for the very nice pdf. I would like to adapt it for GPAW's web
page. Can you send me the raw text and the scripts?
Jens Jørgen
> > Best,
> > Andy
> >
> >
> > >
> > > Cheers,
> > > Anders
> > >
> > >
> > > On Oct 4, 2011, at 9:03 AM, Jussi Enkovaara wrote:
> > >
> > >> On 2011-10-04 09:49, Anders Hellman wrote:
> > >>>> wf = calc.get_pseudo_wave_function(band=0, kpt=0)
> > >>>> write('wf_real.cube', atoms, data=wf.real)
> > >>>> write('wf_imag.cube', atoms, data=wf.imag)
> > >>>>
> > >>> Thanks, I will try this. The reason for my confusion is that I always thought that at the Gamma point the wavefuncton is real, no matter if I have several of k-points.
> > >> That might actually be the case, however, the wave functions have the same data
> > >> type for all k-points, and therefore also the type of Gamma point wf is complex,
> > >> the imaginary part is just zero. The code in "write" function checks only the data
> > >> type, and takes absolute value for complex typed data.
> > >>
> > >> Best regards,
> > >> Jussi
> > >
> > > _______________________________________________
> > > gpaw-users mailing list
> > > gpaw-users at listserv.fysik.dtu.dk
> > > https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
> >
> postmeddelelse-bilag
> > -------- Videresendt brev --------
> > Fra: gpaw-users-request at listserv.fysik.dtu.dk
> > <gpaw-users-request at listserv.fysik.dtu.dk>
> > Emne: confirm 11e715ed4b499db2e2b6b9b12fa6d446c67fb878
> >
> > If you reply to this message, keeping the Subject: header intact,
> > Mailman will discard the held message. Do this if the message is
> > spam. If you reply to this message and include an Approved: header
> > with the list password in it, the message will be approved for posting
> > to the list. The Approved: header can also appear in the first line
> > of the body of the reply.
More information about the gpaw-users
mailing list