Skip to Content.
Sympa Menu

forum - [abinit-forum] how to plot the density

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

[abinit-forum] how to plot the density


Chronological Thread 
  • From: Ondrej Certik <ondrej@certik.cz>
  • To: forum@abinit.org
  • Cc: Brian Granger <bgranger@calpoly.edu>
  • Subject: [abinit-forum] how to plot the density
  • Date: Wed, 25 Feb 2009 00:02:45 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; b=ufczd9p6hQslSYSa4IM5xHo5sJA4msSPQ3bDqUMOeeLXy8TDci7OHf2bRo1Vlq6Qfg +XQ73vbtt83EKtjeZXwUSbPfXoX8yU+I5eiAaGlbh543Ngi3yCIY/s5+a6dXnPOBVdHR zREiYVUZDGyE5rw98bTnZWE+I5LvSPd9yucOE=

Hi,

with Brian Granger (CCed) we want to call abinit from Python, we just
started to work on it couple days ago, our code is here:

http://code.google.com/p/qsnake/

and thanks to Python and Sage, one can then easily use it over the web
browser, here is some example:

http://nb.hpfem.org/home/pub/11/

if you want to play with it, feel free to create an account in our notebook:

http://nb.hpfem.org/

and go ahead. You can just copy that script verbatim into your own
worksheet and then play with different values, different positions and
number of atoms, etc.
Currently it only works for H and it uses one particular
pseudopotential (more below), so it's definitely not production ready,
but it shows the potential --- when we get everything polished, anyone
with the access to a web browser will be able to play with electronic
structure in the comfort of Python, no need to install anything or do
input txt files -- e.g. ideal to show new results during a
presentation or in the classroom. And it's all opensource, so you can
install it on your severs as well.

However, I have a question --- I read the DEN file into Python, the
code that reads it is here:

http://github.com/certik/qsnake/blob/da8f76b5f4c84ff2531de951b378259da00c4f84/qsnake/calculators/abinit.py#L100

It's the parse_header() and parse_density() function. I just followed
the documentation here:

http://www.abinit.org/Infos_v5.5/users/abinis_help.html#densoutputfile

So I read the values in the k-points and I checked with cut3d, that I
got them right. How do I make a plot of the ground state charge
density in real space?
I thought I need to take the fourier transform, but maybe I am doing
something wrong. Here is the result:

http://nb.hpfem.org/home/pub/11/

and here is the documentation to the scipy.fftpack.ffn function that I am
using:

http://docs.scipy.org/doc/scipy/reference/generated/scipy.fftpack.fftn.html


If it helps, these are the abinit input files generated automatically
behind the scene:

$ ls
01h.pspgth a.files a.in

$ cat a.files
a.in
a.out
ai
ao
tmp

$ cat 01h.pspgth
Goedecker-Teter-Hutter Wed May 8 14:27:44 EDT 1996
1 1 960508 zatom,zion,pspdat
2 1 0 0 2001 0. pspcod,pspxc,lmax,lloc,mmax,r2well
0.2000000 -4.0663326 0.6778322 0 0 rloc, c1, c2, c3, c4
0 0 0 rs, h1s, h2s
0 0 rp, h1p
1.36 .2 0.6 rcutoff, rloc

$ cat a.in
acell 10 10 10
ntypat 1
znucl 1
natom 3
typat 1 1 1
xcart
0 0 -1
0 0 1
0.0 0.5 0.0
ecut 10.0
nkpt 1
nstep 10
toldfe 1.0d-6
diemac 2.0


Do you see anything wrong with this? There should be 3 hydrogen atoms,
so imho I should see the charge density concentrated at those 3 places
in the real space.

It's really a beginner question, but once I get this right, it will
get really exciting. So far I was only solving the Schroedinger
equation in the real space directly, so I need to get all the
transforms right with abinit. I also need to learn and gain some
experience with the pseudopotentials, so that I am doing things right.

Btw, I also found the following opensource DFT electronic structure programs:

http://openmx-square.org/
http://www.psicode.org/
http://www.quantum-espresso.org/
http://www.pwscf.org/
https://wiki.fysik.dtu.dk/gpaw/
https://wiki.fysik.dtu.dk/ase/
http://pyquante.sourceforge.net/
http://www.tddft.org/programs/octopus/wiki/index.php/Main_Page
http://dft.physics.cornell.edu/
http://dcwww.camd.dtu.dk/campos/Dacapo/


So I am curious how they compare to abinit. Abinit is the most famous,
at least to me :), so I want to learn it first, but then if I find
time I'll also try to interface the other ones from the same
environment and allow it easily on our web notebook, so that people
can easily play with any of them and see how it goes compared to
abinit.

Ondrej


  • [abinit-forum] how to plot the density, Ondrej Certik, 02/25/2009

Archive powered by MHonArc 2.6.15.

Top of Page