cp2k and Bader analysis

2,020 views
Skip to first unread message

Jörg Saßmannshausen

unread,
Sep 18, 2009, 5:15:55 AM9/18/09
to cp...@googlegroups.com
Dear all

I was wondering whether it is possible (at least in theory) to use cp2k to
generate the wavefunktion-file for Bader's AIM analysis.
So basically I would need an ASCII file, similar to the uploaded file (which
is the file for propene). Is that possible at all with cp2k or as we are
using plane waves here not possible?

The file location is:
http://groups.google.com/group/cp2k/web/bader-aim-file.wfn

All the best from Glasgow!

Jörg

--
*************************************************************
Jörg Saßmannshausen
Research Fellow
University of Strathclyde
Department of Pure and Applied Chemistry
295 Cathedral St.
Glasgow
G1 1XL

email: jorg.sassm...@strath.ac.uk
web: http://sassy.formativ.net

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Ondrej Marsalek

unread,
Sep 18, 2009, 5:59:36 AM9/18/09
to cp...@googlegroups.com
Dear Jörg,

the implementation of Bader analysis that you can find here:

http://theory.cm.utexas.edu/bader/

can use Cube files as input. You can save volumetric data (for example
the density and KS orbitals) from CP2K into Cube files, so you should
be fine. The density is straightforward, if you want to do something
with orbitals, you would perhaps need to use some Cube file
manipulation program to obtain the densities from individual KS
obrbitals first.

Best regards from Prague,
Ondrej

Axel Kohlmeyer

unread,
Sep 18, 2009, 9:03:07 AM9/18/09
to cp2k

On Sep 18, 5:59 am, Ondrej Marsalek <ondrej.marsa...@gmail.com> wrote:

dear ondrej,

> Dear Jörg,
>
> the implementation of Bader analysis that you can find here:
>
> http://theory.cm.utexas.edu/bader/
>
> can use Cube files as input. You can save volumetric data (for example
> the density and KS orbitals) from CP2K into Cube files, so you should
> be fine. The density is straightforward, if you want to do something

not quite. for AIM you need the _complete_ wavefunction, whereas
cp2k usually only outputs the valence part (even with *PAW) and
that can have a significant impact on the validity and accuracy
of the results. so you have to first add the core wavefunction
part back that is subtracted out during pseudopotential generation
or through the PAW procedure.

matthias krack once implemented a feature that you can do this
from GPAW, but it turned out to be extremely slow and had artefacts
that threw the bader code from the group in texas off.

i have been toying with the idea of constructing density files
to add to the existing valence density after the fact, by taking
the difference from a single atoms all-electron and pseudopotential
calculation, and then adding them to the valence density cube.
but that scheme only worked for me to some degree for s-electrons.

> with orbitals, you would perhaps need to use some Cube file
> manipulation program to obtain the densities from individual KS
> obrbitals first.

why the individual KS orbitals? AIM only works on the total density,
IIRC.

cheers,
axel.

>
> Best regards from Prague,
> Ondrej
>
> On Fri, Sep 18, 2009 at 11:15, Jörg Saßmannshausen
>
> <jorg.sassmannshau...@strath.ac.uk> wrote:
>
> > Dear all
>
> > I was wondering whether it is possible (at least in theory) to use cp2k to
> > generate the wavefunktion-file for Bader's AIM analysis.
> > So basically I would need an ASCII file, similar to the uploaded file (which
> > is the file for propene). Is that possible at all with cp2k or as we are
> > using plane waves here not possible?
>
> > The file location is:
> >http://groups.google.com/group/cp2k/web/bader-aim-file.wfn
>
> > All the best from Glasgow!
>
> > Jörg
>
> > --
> > *************************************************************
> > Jörg Saßmannshausen
> > Research Fellow
> > University of Strathclyde
> > Department of Pure and Applied Chemistry
> > 295 Cathedral St.
> > Glasgow
> > G1 1XL
>
> > email: jorg.sassmannshau...@strath.ac.uk

Ondrej Marsalek

unread,
Sep 18, 2009, 9:14:50 AM9/18/09
to cp...@googlegroups.com
On Fri, Sep 18, 2009 at 15:03, Axel Kohlmeyer <akoh...@gmail.com> wrote:
>
>
> On Sep 18, 5:59 am, Ondrej Marsalek <ondrej.marsa...@gmail.com> wrote:
>
> dear ondrej,
>
>> Dear Jörg,
>>
>> the implementation of Bader analysis that you can find here:
>>
>> http://theory.cm.utexas.edu/bader/
>>
>> can use Cube files as input. You can save volumetric data (for example
>> the density and KS orbitals) from CP2K into Cube files, so you should
>> be fine. The density is straightforward, if you want to do something
>
> not quite. for AIM you need the _complete_ wavefunction, whereas
> cp2k usually only outputs the valence part (even with *PAW) and
> that can have a significant impact on the validity and accuracy
> of the results. so you have to first add the core wavefunction
> part back that is subtracted out during pseudopotential generation
> or through the PAW procedure.

OK, I thought it is safe to add the cores to their atoms (as they
would be always localized in one of the partitions) to get the correct
total charge. But I have never needed AIM myself, so I have no
practical experience with this.

So doing Bader analysis on the valence density is no good, even with
norm-conserving PP? I would only expect this to be a problem with USPP
or the PAW transformation, but as I said, no experience in this.

> matthias krack once implemented a feature that you can do this
> from GPAW, but it turned out to be extremely slow and had artefacts
> that threw the bader code from the group in texas off.
>
> i have been toying with the idea of constructing density files
> to add to the existing valence density after the fact, by taking
> the difference from a single atoms all-electron and pseudopotential
> calculation, and then adding them to the valence density cube.
> but that scheme only worked for me to some degree for s-electrons.
>
>> with orbitals, you would perhaps need to use some Cube file
>> manipulation program to obtain the densities from individual KS
>> obrbitals first.
>
> why the individual KS orbitals? AIM only works on the total density,
> IIRC.

That's right, AFAIK. I was not sure wheter the wavefunction mentioned
in the original post was not meant to be a KS wavefunction. Also, you
might want to partition the spin density as well, which in ROKS is the
density of the SOMO. I thought that perhaps someone has some use (that
I am unaware of) for the partitioning of other orbitals as well.

Ondrej

Jörg Saßmannshausen

unread,
Sep 18, 2009, 9:16:56 AM9/18/09
to cp...@googlegroups.com
Dear Axel and Ondrej,

thanks for your feedbacks, much appreciated.

I actually tried the Bader code from the group in Texas once and after a long
calculation it segfaulted. So I gave up on that and went back to the AIM2000
program.

So the bottom line is that it is not a straightforward task. I was somehow
afraid of that.

The reason behind my question was, I am trying to tackle a rather difficult
system right now and I was hoping to overcome some of the problems with a
plane wave code, rather then using programs uitilizing GTO (like GAMESS,
Gaussian etc.).

Thanks for your help!

Jörg
email: jorg.sassm...@strath.ac.uk

Axel Kohlmeyer

unread,
Sep 18, 2009, 9:46:20 AM9/18/09
to cp2k


On Sep 18, 9:14 am, Ondrej Marsalek <ondrej.marsa...@gmail.com> wrote:
> On Fri, Sep 18, 2009 at 15:03, Axel Kohlmeyer <akohl...@gmail.com> wrote:

> OK, I thought it is safe to add the cores to their atoms (as they
> would be always localized in one of the partitions) to get the correct

it is a pretty good approximation, otherwise you could not
be using pseudopotentials in the first place.

the problem is to get the matching densities. the simple way
is to generate them and write them out when building the
pseudopotential itself, but the atomic code for GTH potentials
scared the hell out of me, and when doing it "empirically" you
have the problem that you cannot easily extract the radial
component of l!=0 orbitals as they have different orientations
in the all electron or pseudopotential calculations.

> total charge. But I have never needed AIM myself, so I have no
> practical experience with this.
>
> So doing Bader analysis on the valence density is no good, even with
> norm-conserving PP? I would only expect this to be a problem with USPP
> or the PAW transformation, but as I said, no experience in this.

it is not completely bogus to do AIM on valence densities, but
one has to be very, very careful. obviously the zero-flux
surfaces will be shifted, particularly if you have partitioning
between elements where a different number of electrons has been
put into the core. you can still extract trends and relative
differences, but absolute values will be bogus in a large number
of cases.

as for USPP, you actually do have the size of the augmentation charges
and thus you can place them on the grid. codes like quantum-espresso
do support this, and for GPAW it had been implemented into cp2k
even, but i don't know whether it still works.

cheers,
axel.

Axel Kohlmeyer

unread,
Sep 18, 2009, 9:49:06 AM9/18/09
to cp2k

On Sep 18, 9:16 am, Jörg Saßmannshausen
<jorg.sassmannshau...@strath.ac.uk> wrote:
> Dear Axel and Ondrej,
>
> thanks for your feedbacks, much appreciated.
>
> I actually tried the Bader code from the group in Texas once and after a long
> calculation it segfaulted. So I gave up on that and went back to the AIM2000
> program.

the Utexas code is the fastest and best bader code, that i have
ever come across. same as cp2k, it puts some demands on the compiler,
so if it crashed for you, most likely it was miscompiled or you fed
it bad data. i have been using it several times and it was always
working well, fast, and efficient.

cheers,
axel.

Jörg Saßmannshausen

unread,
Sep 18, 2009, 10:02:32 AM9/18/09
to cp...@googlegroups.com
Dear Axel,

> > I actually tried the Bader code from the group in Texas once and after a
> > long calculation it segfaulted. So I gave up on that and went back to the
> > AIM2000 program.
>
> the Utexas code is the fastest and best bader code, that i have
> ever come across. same as cp2k, it puts some demands on the compiler,
> so if it crashed for you, most likely it was miscompiled or you fed
> it bad data. i have been using it several times and it was always
> working well, fast, and efficient.

That was the original intension for using the code: speed.
I had downloaded their binary file (Linux x86-64) and was running it on Debian
Lenny 64bit (Intel i7 quadcore) machine. The input file was a Gaussian
calculation and I thus generated the cube file with Gaussian. The calculation
itself was ok, I was using the G03 generated wfn file as the input file for
the AIM2000 program which worked well (same calculation).
So, assuming their compiled binary file is ok and assuming the calculation was
ok, the problem could be a missgenerated cube file. Maybe I should look into
it again now that I got a bit more time on my hands.

All the best from Glasgow!

Jörg

--
*************************************************************
Jörg Saßmannshausen
Research Fellow
University of Strathclyde
Department of Pure and Applied Chemistry
295 Cathedral St.
Glasgow
G1 1XL

email: jorg.sassm...@strath.ac.uk

wolfshow

unread,
Jun 20, 2014, 6:32:21 AM6/20/14
to
Dear ALL
Can we  use cp2k to generate the wavefunktion-file of Bader's type now? 

I saw Axel said that "for AIM you need the _complete_ wavefunction, whereas 
cp2k usually only outputs the valence part (even with *PAW) and 
that can have a significant impact on the validity and accuracy 
of the results. so you have to first add the core wavefunction 
part back that is subtracted out during pseudopotential generation 
or through the PAW procedure. "

Is it possible to get the _complete_ wavefunction in CP2K now?

Thanks all in advance!

Fengchao


在 2009年9月18日星期五UTC+8下午10时02分32秒,Jörg Saßmannshausen写道:
Reply all
Reply to author
Forward
0 new messages