[Pw_forum] Format of charge-density.dat

Paul M. Grant w2agz at pacbell.net
Fri Feb 13 02:40:41 CET 2009


OK, now I got it! Thanks, Axel (and Lex Kemper who e-mailed me off-forum).

I actually use pp.x a lot, with plot_num=0 (or 6) and output_format=5
(xcrysden), and before posting this matter to the forum I poked around a lot
in the postproc.f90 and chdens.f90 code and their output looking for what I
wanted.  I never knew what output_format=6 was for...I thought it might be
for "Gaussian" one of PWscf's "alternatives."  I'll test it out...I assume
the "cube" indices are mapable onto the unit cell parameters and units (au?)
in some fashion?

BTW, I never could figure out or get answered what plot_num=3 was doing in a
plot preparation utility, so I've modified the Fortran code for epsilon.x
and dos.x to explicitly calculate the DOS at Ef.  If anyone wants the code,
e-mail me.

Paul M. Grant, PhD
Principal, W2AGZ Technologies
Visiting Scholar, Applied Physics, Stanford (2005-2008)
EPRI Science Fellow (Retired)
IBM Research Staff Member Emeritus
w2agz at pacbell.net
http://www.w2agz.com
 
 


-----Original Message-----
From: pw_forum-bounces at pwscf.org [mailto:pw_forum-bounces at pwscf.org] On
Behalf Of Axel Kohlmeyer
Sent: Wednesday, February 11, 2009 8:28 PM
To: Paul M. Grant
Cc: 'PWSCF Forum'
Subject: Re: [Pw_forum] Format of charge-density.dat

On Wed, 11 Feb 2009, Paul M. Grant wrote:

PG> I realize charge-density.dat is stored in iotk binary format and the
reasons
PG> why.   But is there any documentation illuminating the layout of the
file or
PG> how to access the data stored therein?  I've poked around in the source
code
PG> of chden and electrons but it's not terribly obvious how they load the
data,
PG> which I assume is a necessary task somewhere in these two routines.at
least
PG> not in four or five minutes of manual scanning.  All I really want to do
is
PG> write a (hopefully small) Fortran routine to load data from
PG> charge-density.dat into a four (x, y, z, rho) by number-of-points array.
PG> Maybe there's even an iotk subroutine someone has laying around to do
just
PG> that.

paul, 

there is an example code, qexml.f90 (check out qexml_write/read_rho())
that should demonstrate how to read iotk files. not sure whether it
still works, though. it has not been touched in a while.

if you are more concerned about a fast result rather than performance, 
why don't you use pp.x to convert it into (gaussian) .cube format, which 
is plain text and easier to read into fortran. 

the way it is usually read is that you just have one 3-dim array, 
with the grid vector index positions as the indices.

if you give me a hint about what exactly you're after, perhaps 
i can give you a more specific suggestion.

PG> BTW, I assume the units are electrons/cubic-au as a function of x, y, z?

right, at least that is what i remember, summing over the indivdual
rho entries and multiplying with the volume of a single voxel should
yield the total number of electrons.

cheers,
   axel.
PG> 
PG> Best to all, -Paul
PG> 
PG> Paul M. Grant, PhD
PG> Principal, W2AGZ Technologies
PG> Visiting Scholar, Applied Physics, Stanford (2005-2008)
PG> EPRI Science Fellow (Retired)
PG> IBM Research Staff Member Emeritus
PG> w2agz at pacbell.net
PG> http://www.w2agz.com <http://www.w2agz.com/> 
PG>  
PG>  
PG> 
PG> 
PG> 

-- 
=======================================================================
Axel Kohlmeyer   akohlmey at cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.
_______________________________________________
Pw_forum mailing list
Pw_forum at pwscf.org
http://www.democritos.it/mailman/listinfo/pw_forum




More information about the users mailing list