counter charge

1,890 views
Skip to first unread message

Jun

unread,
Apr 9, 2009, 9:47:21 AM4/9/09
to cp2k
Hi all,

I want to calculate a system with a net charge. I know cp2k will
automatically apply a homogeneous neutralizing background charge with
opposite sign in the simulation cell. Is it possible in cp2k to define
an area with any shape (e.g. sheet or slab) in which the counter
charge is evenly dispersed? Or any other way to do this?
Many thanks, and happy Easter holiday.

Jun

Teodoro Laino

unread,
Apr 9, 2009, 10:01:32 AM4/9/09
to cp...@googlegroups.com
Dear Jun,

Just to avoid confusion, the neutralizing background charge is not
something manually added in CP2K because
we don't like to have charged systems.. It comes out of the box from the
EWALD summations and there's
nothing you can do to avoid it (the energy of a charged system would
terribly diverge!!!)...
unless... unless your system is not charged..

The answer to your question is : no, it is not possible. And even if it
would be possible, it may end up in problematic
issues.

Think about putting counterions, instead, in your simulation if you
don't like to have charged systems.

Teo

Teodoro Laino

unread,
Apr 9, 2009, 10:08:38 AM4/9/09
to cp...@googlegroups.com
Just a remark:

of course the energy of an isolated charged system is well defined.
It is not defined in case of a periodic charged system (without
considering the
neutralizing background charge).

cheers,
Teo

Jun

unread,
Apr 17, 2009, 10:55:29 AM4/17/09
to cp2k
hi,

I thought I can put some classical point charges (fractional) in a
cell using Quickstep. But I can't find the way out.
Is that possible in QS? I guess QM/MM can do this. Since I have no
experience on it, I would like not to go that far.
Many thanks in advance.

Cheers,
Jun

Axel

unread,
Apr 18, 2009, 10:48:26 AM4/18/09
to cp2k


On Apr 17, 10:55 am, Jun <chengj...@googlemail.com> wrote:
> hi,
>
> I thought I can put some classical point charges (fractional) in a
> cell using Quickstep. But I can't find the way out.

those fractional charges could be provided as pseudopotentials.
there are DFT codes that allow you to have "fractional hydrogens"
to terminate polar surfaces.

since cp2k also supports all electron calculations, you could add an
all-electron entry with a fractional charge and then define an empty
basis set for that atom type.

however, i would be very careful with a setup of that kind. if the
"fractional atom" is too close to other atoms you may get spill-out,
and many people that program quantum codes tend to implicitly or
explicitly
assume that electrons and charges are integer throughout and thus
you may get unexpected results and should run careful tests on easy
to debug test systems. i am certain that cp2k developers would be
happy to get feedback and test inputs on that subject.

other than that, it might be easier to discuss options, if you could
produce an example input illustrating your setup and ideally also an
example input for a code that does support what you want to do, or
a paper describing such a calculation.

cheers,
axel.

Jun Cheng

unread,
Apr 21, 2009, 6:42:30 AM4/21/09
to cp...@googlegroups.com
Thanks, Axel.
 
Sorry for the late reply.


On Sat, Apr 18, 2009 at 3:48 PM, Axel <akoh...@gmail.com> wrote:


those fractional charges could be provided as pseudopotentials.
there are DFT codes that allow you to have "fractional hydrogens"
to terminate polar surfaces.

since cp2k also supports all electron calculations, you could add an
all-electron entry with a fractional charge and then define an empty
basis set for that atom type.
however, i would be very careful with a setup of that kind. if the
"fractional atom" is too close to other atoms you may get spill-out,
and many people that program quantum codes tend to implicitly or
explicitly
assume that electrons and charges are integer throughout and thus
you may get unexpected results and should run careful tests on easy
to debug test systems. i am certain that cp2k developers would be
happy to get feedback and test inputs on that subject.

I tried to change the charge of all electron H pseudopotential to a fractional, cp2k complained:
an integer type object was expected.
So, the present plan is to use H (integer charged) with modified pseudopotential which keeps electrons
away. Since the H is just used as counter charge and will not be close to the rest of system, I am not
worried about the spill-out of electrons. I am still working on how to modify the pseudopotential of H. If
someone knows how to do this, I am greatly appreciated if letting me know. Many thanks in advance.

other than that, it might be easier to discuss options, if you could
produce an example input illustrating your setup and ideally also an
example input for a code that does support what you want to do, or
a paper describing such a calculation.

I am sorry I don't know other codes being able to calculate fractional hydrogens and haven't found a paper doing similar things yet.
I will get back to you once I work it out.

Cheers,
Jun

Laino Teodoro

unread,
Apr 21, 2009, 7:30:21 AM4/21/09
to cp...@googlegroups.com
> I tried to change the charge of all electron H pseudopotential to a
> fractional, cp2k complained:
> an integer type object was expected.
> So, the present plan is to use H (integer charged) with modified
> pseudopotential which keeps electrons
> away. Since the H is just used as counter charge and will not be
> close to the rest of system, I am not
> worried about the spill-out of electrons. I am still working on how
> to modify the pseudopotential of H. If
> someone knows how to do this, I am greatly appreciated if letting
> me know. Many thanks in advance.

Most of the time, Jun, it is enough to read carefully the few
documentation you have!
This keyword makes that task for you:

http://cp2k.berlios.de/manual/CP2K_INPUT/FORCE_EVAL/SUBSYS/
KIND.html#desc_CORE_CORRECTION

the value of this keyword is summed-up to the core..
>
> I am sorry I don't know other codes being able to calculate
> fractional hydrogens and haven't found a paper doing similar things
> yet.
> I will get back to you once I work it out.

Jun, I think there's a misunderstanding.. or quite probably you are
not used to calculations with plane waves.

Of course you can reinvent the wheel, but if you want the energy of
an isolated charged system then I would highly recommend you to use a
decoupling for the coulomb interactions (Martyna-Tuckermann or
others..).

Teo

>
>
> Cheers,
> Jun
>
>
> >

Jun

unread,
Apr 22, 2009, 8:01:58 AM4/22/09
to cp2k
Thanks, Teo.


> Most of the time, Jun, it is enough to read carefully the few
> documentation you have!
> This keyword makes that task for you:
>
> http://cp2k.berlios.de/manual/CP2K_INPUT/FORCE_EVAL/SUBSYS/
> KIND.html#desc_CORE_CORRECTION
>
> the value of this keyword is summed-up to the core..

I did read the input reference. Sometimes, it is not easy to catch the
key idea
of the keyword, especially when I didn't know where should I focus.
If I understand it correctly, I can combine the keywords
CORE_CORRECTION (fractional or integer)
and BASIS_SET NONE to create a point charge with any amount of charge.
Two questions
come up as follows,
(i) Suppose we have a H2 molecule consisting of one normal H atom and
one fractional charged
(say 0.1) H nucleus without basis set, the system still contains 2
electrons (I saw it from output,
It seems that the number of electrons is decided by the kind of
element). Does it mean that the overall
system carry a net charge (-1-1+1+0.1=-0.9)?
(ii) I tried to assign a negative charge (say -0.1) to it, and cp2k
did allow that. Then, for the above-mentioned
example, the system shoudl consists of one normal H nucleus, one
negative point charge, and two electrons,
in total carrying a net charge of 1-0.1-1-1=-1.1. Am I right?

Thanks in advance.


> Jun, I think there's a misunderstanding.. or quite probably you are
> not used to calculations with plane waves.

Now I understand the difference between plane wave code and gaussian
orbital based code. In plane wave code, it is not possible to freely
switch
off basis sets as in gaussian orbital based code. Plane waves can
always
find the point charge. One have to put a high potential around the
point charge
to keep electrons away by modifying pseudopotential. Whereas, in cp2k
we
can conveniently switch on BASIS_SET NONE to do the same thing.


> Of course you can reinvent the wheel, but if you want the energy of
> an isolated charged system then I would highly recommend you to use a
> decoupling for the coulomb interactions (Martyna-Tuckermann or
> others..).

Thank you for kindly and constantly warning me about the calculation
of charged systems.
Martyna-Tuckermann method is certainly useful for cluster models.
However, we have to use
periodic boundary conditions. We will take into account the finite
size effects due to the spurious
interactions among charge, counter charge and their image.

Cheers,
Jun

Jun

unread,
Apr 22, 2009, 12:13:21 PM4/22/09
to cp2k
I just realised that the core correction is the charge added to the
original nucleus charge, not the target charge.

> (i) Suppose we have a H2 molecule consisting of one normal H atom and
> one fractional charged
> (say 0.1) H nucleus without basis set, the system still contains 2
> electrons (I saw it from output,
> It seems that the number of electrons is decided by the kind of
> element). Does it mean that the overall
> system carry a net charge (-1-1+1+0.1=-0.9)?

Here, the core correction should be -0.9 to get 0.1 charged nucleus.

Jun
Reply all
Reply to author
Forward
0 new messages