# [Octopus-users] Setting a chemical potential but not a number of electrons

David Strubbe dstrubbe at berkeley.edu
Thu Apr 22 21:45:08 WEST 2010

Hi Dylan,

I think there is no problem in principle to constrain the calculation this
way, but I have never seen it done in a code. The easiest way to do what you
are looking for in the way the code is set up is to try a number of
electrons and see what chemical potential results, then guess a new N based
on that, and repeat until you get the chemical potential you want. The
dangerous part to keep in mind is: the chemical potential with respect to
what energy zero? In a periodic calculation, there is no vacuum level per
se. In a finite calculation however there is, and you can unambigously
reference energies to that.

David

On Thu, Apr 22, 2010 at 1:19 PM, Dylan Gorman <dgorman at berkeley.edu> wrote:

> Hi Folks,
>
> I'm pretty new to DFT and octopus, so please forgive a probably naive
> question--nevertheless, I haven't been able to find the answer with a
> fair bit of googling.
>
> The problem I'm trying to solve using octopus is this: I have a
> mesoscopic electric potential well for which I want to know the total
> energy of all the electrons in the well. I don't care at all about
> atoms in the lattice, so the system really is just electrons sitting
> in a potential.
>
> The problem is: I don't want to fix the number of electrons in the
> system. I would like to fix just the chemical potential of the system,
> and have octopus then produce the electron density \rho and the total
> energy of the system. In fact, the number of electrons will certainly
> change as the electric potential changes.
>
> Is this something that's possible to do within the framework of
> octopus, or possibly another DFT package? If there's not a
> straightforward way to do it, could someone direct me to a publication
> which addresses a problem like this?
>
> Thanks!
> Dylan Gorman
> _______________________________________________
> Octopus-users mailing list
> Octopus-users at tddft.org
> http://www.tddft.org/mailman/listinfo/octopus-users
>
-------------- next part --------------
An HTML attachment was scrubbed...