[Pw_forum] DATAGRID_3D total points

Guido Fratesi fratesi at mater.unimib.it
Wed Nov 7 11:25:34 CET 2012


Dear Liu,
I guess your case falls into those handled by the "plot_fast" routine in 
PP/src/chdens.f90. In that case, nx, ny, nz are ignored in input but 
determined by the code as the number of FFT grid points inside the 
plotting box, which allows one saving a lot of time not doing 
reinterpolation of data. Have a look, into your pp.x output, for the 
strings:

Requested parallelepiped sides
Redefined parallelepiped sides

and similar for the origin. What do they say, if present?
Your X and Z vectors are not that strange because you ask them to be 
1alat long, ie 1celldm(1)=30au=15.875316AA which is what you get.
Your Y vector is a factor 1.2 longer because of a typo in your input:
     e3(1) =0.0, e2(2)=0.0, e3(3) = 1.0,
should be
     e3(1) =0.0, e3(2)=0.0, e3(3) = 1.0,

If you actually want to reinterpolate the grid, you could manually set 
fast3d=.false. in PP/src/chdens.f90 and recompile. The code will use the 
plot_3d routine. Apparently, however, it looks like that was meant only 
for gopenmol format, see the comment therein: "user has calculated for 
very long, be nice and write some output even if the output_format is 
wrong; use XSF format as default". I don't understand the logic beyond 
this fully.

If you want the charge of molecule-in-a-box, what you might really need 
is to shift the origin so that it embraces the molecule, and to resize 
it so that the vacuum portion is not included. If you need a denser mesh 
for a smoother plot (why? if your cutoff is high enough, that could not 
be needed) you can perform interpolation within xcrysden when you open 
the datagrid. I actually had the need of a coarser grid to have lighter 
files: for that I preferred to take the xsf file and to keep one point 
every N in each direction by a simple awk script (I can send it if you 
want).

NB from your input nx, ny, nz it looks like you want VERY few points in 
a so large box. Is that correct?

Guido

-- 
Guido Fratesi

Dipartimento di Scienza dei Materiali
Universita` degli Studi di Milano-Bicocca
via Cozzi 53, 20125 Milano, Italy

Phone: +39 02 6448 5183
email: fratesi at mater.unimib.it



More information about the users mailing list