[gpaw-users] gpaw-users Digest, Vol 175, Issue 6

Mikael Kuisma kuisma at dtu.dk
Mon Aug 12 10:04:33 CEST 2024


Hi!

I suggest you have a look of some of the Poisson tests in GPAW for code examples. They are in gpaw/test/poisson folder.

You need to create a PoissonSolver and a GridDescriptor object. Set the grid descriptor to the poisson solver, and then call,
poissonsolver.solve(v, n) and that is it.

If you have a 2D density, you can just define it in a 3d grid by assigning it as

n3d[:] = n2d[:, :, np.newaxis]

Note that internet is probably full of 2D-poisson solver examples, which would fit your usecase better than modifying GPAW's solvers for the task.

BR,
Mikael


________________________________
From: DAMEGARIN SAMBIANI <sambianidamegarin at gmail.com>
Sent: Sunday, August 11, 2024 6:43 PM
To: Mikael Kuisma <kuisma at dtu.dk>
Cc: gpaw-users at listserv.fysik.dtu.dk <gpaw-users at listserv.fysik.dtu.dk>
Subject: Re: [gpaw-users] gpaw-users Digest, Vol 175, Issue 6


Hi Mikael,

Thank you for the explanation. I understand that there isn't a direct 2D Poisson solver with the logarithmic kernel in GPAW. The suggestion to define a 3D density that is constant in the z-direction seems like a practical approach.

However, I’m still a bit unclear on how to implement this. Could you provide further details or an example on how to define this 3D density correctly? I want to ensure I’m applying the approach accurately to achieve the desired results on the xy-plane.

Thank you for your assistance!

Best regards,

SAMBIANI

PhD students

Le ven. 9 août 2024 à 14:25, DAMEGARIN SAMBIANI <sambianidamegarin at gmail.com<mailto:sambianidamegarin at gmail.com>> a écrit :
Re: Poisson GPAW
Dear professor  Mikael,

Thank you for your explanation. I am trying to implement this approach, but I am encountering difficulties. Could you provide me with a concrete example of code to help me better understand? And yes, I do want to consider the Coulomb interaction between two line charge elements.

Thank you in advance for your help.

Best regards,

PhD student

Le ven. 9 août 2024 à 14:07, Mikael Kuisma <kuisma at dtu.dk<mailto:kuisma at dtu.dk>> a écrit :
Hi!

>How can one physically explain adding a third direction that will be constant?

The constant direction will have a zero second derivative, thus the 3D Laplacian operator will be effectively 2D. Physically, 2D poisson is equivalent to solving 3D poisson with line charges defined by the 2D-density (is this what you actually want, Coulomb interaction of two line charge elements?).

You can choose the Poisson solver depending on your required boundary conditions, but the constant direction should be periodic.

BR,
Mikael

________________________________
From: DAMEGARIN SAMBIANI <sambianidamegarin at gmail.com<mailto:sambianidamegarin at gmail.com>>
Sent: Friday, August 9, 2024 3:53 PM
To: Mikael Kuisma <kuisma at dtu.dk<mailto:kuisma at dtu.dk>>
Cc: gpaw-users at listserv.fysik.dtu.dk<mailto:gpaw-users at listserv.fysik.dtu.dk> <gpaw-users at listserv.fysik.dtu.dk<mailto:gpaw-users at listserv.fysik.dtu.dk>>
Subject: Re: [gpaw-users] gpaw-users Digest, Vol 175, Issue 6

Dear professor Mikael,

Thank you for your response. This means that I need to construct my density in a 3D space. How can one physically explain adding a third direction that will be constant? My density is constructed as follows: ρ=ψ⋅ψ†. The values of ψ are obtained from the shifted matrix: [E⋅S−H−self]⋅ψ=eigenvalue⋅eigenvector, from the self matrix. Additionally, could you recommend a Poisson code that I could use.

SAMBIANI
PhD student

Le ven. 9 août 2024 à 11:45, Mikael Kuisma <kuisma at dtu.dk<mailto:kuisma at dtu.dk>> a écrit :
Hi!

So effectively, you want to solve a 2D Poisson using a logarithmic kernel ln |r-r'|, instead of the typical 1/|r-r'| kernel?

There is no direct 2D poisson solver with that kernel in GPAW.  What you could do, is to define a 3D density which is constant in z-direction,
AFAIK, up to possible prefactors, that should give the desired result on xy-plane if one knows what one is doing.

BR,
Mikael

________________________________
From: gpaw-users <gpaw-users-bounces at listserv.fysik.dtu.dk<mailto:gpaw-users-bounces at listserv.fysik.dtu.dk>> on behalf of DAMEGARIN SAMBIANI via gpaw-users <gpaw-users at listserv.fysik.dtu.dk<mailto:gpaw-users at listserv.fysik.dtu.dk>>
Sent: Friday, August 9, 2024 12:54 PM
To: gpaw-users at listserv.fysik.dtu.dk<mailto:gpaw-users at listserv.fysik.dtu.dk> <gpaw-users at listserv.fysik.dtu.dk<mailto:gpaw-users at listserv.fysik.dtu.dk>>
Subject: Re: [gpaw-users] gpaw-users Digest, Vol 175, Issue 6


Dear GPAW users,

I have a concern regarding the use of GPAW's Poisson solver. I am constructing my densities from wave functions that are in 2D, and I would like to use this 2D density to solve the Poisson equation. However, the Poisson solver code is designed in such a way that it cannot handle 2D densities. I would like to know how to resolve this issue. Please help me.

SAMBIANI

PhD student

Le ven. 9 août 2024 à 10:27, <gpaw-users-request at listserv.fysik.dtu.dk<mailto:gpaw-users-request at listserv.fysik.dtu.dk>> a écrit :
Send gpaw-users mailing list submissions to
        gpaw-users at listserv.fysik.dtu.dk<mailto:gpaw-users at listserv.fysik.dtu.dk>

To subscribe or unsubscribe via the World Wide Web, visit
        https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
or, via email, send a message with subject or body 'help' to
        gpaw-users-request at listserv.fysik.dtu.dk<mailto:gpaw-users-request at listserv.fysik.dtu.dk>

You can reach the person managing the list at
        gpaw-users-owner at listserv.fysik.dtu.dk<mailto:gpaw-users-owner at listserv.fysik.dtu.dk>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gpaw-users digest..."


Today's Topics:

   1. Re: PAW for Ce (Jens J?rgen Mortensen)


----------------------------------------------------------------------

Message: 1
Date: Thu, 8 Aug 2024 16:19:03 +0200
From: Jens J?rgen Mortensen <jjmo at dtu.dk<mailto:jjmo at dtu.dk>>
To: Desalegn Nigatu <desalegnnigatu at gmail.com<mailto:desalegnnigatu at gmail.com>>,
        gpaw-users at listserv.fysik.dtu.dk<mailto:gpaw-users at listserv.fysik.dtu.dk>
Cc: Thomas Bligaard <tbli at dtu.dk<mailto:tbli at dtu.dk>>
Subject: Re: [gpaw-users] PAW for Ce
Message-ID: <49258d40-ad70-4ff5-92c1-da9031a4df17 at dtu.dk<mailto:49258d40-ad70-4ff5-92c1-da9031a4df17 at dtu.dk>>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 8/4/24 20:47, Desalegn Nigatu via gpaw-users wrote:
> Dear all
>
> Where can i find PAW for Ce?

You can create a PAW-potential for Ce with this command:

   $ gpaw dataset Ce -fPBE -s -r 2.5,2.4,2.4,2.2 -w

Jens J?rgen

> with regards
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk<mailto:gpaw-users at listserv.fysik.dtu.dk>
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users



------------------------------

Subject: Digest Footer

_______________________________________________
gpaw-users mailing list
gpaw-users at listserv.fysik.dtu.dk<mailto:gpaw-users at listserv.fysik.dtu.dk>
https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users


------------------------------

End of gpaw-users Digest, Vol 175, Issue 6
******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20240812/b4436630/attachment-0001.htm>


More information about the gpaw-users mailing list