[gpaw-users] Positive and negative part of the wavefunction + electrostatic potential
Anders Hellman
ahell at chalmers.se
Tue Oct 4 10:04:53 CEST 2011
Hi Andrew,
Looks promising. However, I must be doing something wrong. Writing calc.hamiltonian.vHt_g gives me nothing. It seems to be not callable. Do I need something more?
Cheers,
Anders
On Oct 4, 2011, at 9:49 AM, Andrew Peterson wrote:
> Hi Anders,
>
> On 10/04/2011 12:12 AM, Anders Hellman wrote:
>> Thanks once again. I am already pick out the stuff.
>>
>> I have had a quick look at the .get_effective_potential(), however, the routine does the summing further down in the code. If you have some qucik fix I would appreciate it very much.
>>
>> I would need to get just the electrostatic (Coulomb) potential out, and I think that having separate handles for getting both the electrostatic and xc-poential could be useful for many other GPAW users.
>
> 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
>
> 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.
>
> 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 link to a PDF I made, in a
> form inspired by Dr. Kitchin. Others will likely find it useful.
>
> http://dl.dropbox.com/u/2530436/gpaw-users/dipole.pdf
>
> 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
>
> --
> ------------
> Andrew Peterson
> andy.peterson at stanford.edu
> aap at alum.mit.edu (permanent)
>
More information about the gpaw-users
mailing list