[Pw_forum] About the spline interpolation for charge density.
Paolo Giannozzi
giannozz at democritos.it
Wed Jun 18 21:21:20 CEST 2008
On Jun 18, 2008, at 17:48 , zhaohscas wrote:
> I have the following 18*18*18 charge dentity datagrid as follows:
>
> ------------------------
> a b c Charge
> 1 1 1 0.430034694385803
> 2 1 1 0.433590624875083
> 3 1 1 0.444263507693938
> 4 1 1 0.461808085757678
> 5 1 1 0.485486354576373
> 6 1 1 0.514303497336158
> ... ... ...
> 18 18 18
> ------------------------
>
> Where, the a, b, and c is FFT grid point used for sample the
> charge, and the last column is the corresponding charge density at
> the FFT grid point defined by crystal vectors: (a,b,c).
>
> I want to make a spline interpolation to this datagrid to get a
> more dense and smooth charge density datagrid, I think this should
> be done by spline interpolation.
>
> I've read the the source plotrho.f90 of pp.x, and can't figure it
> out how can I make my issue solved.
plotrho.f90 performs simple linear interpolation. You may have a look
at code
voronoy.f90: it performs a Fourier interpolation, i.e. transforms to
real to
reciprocal space, pads additional Fourier components with zero,
transforms
back to real space onto a denser grid.
Paolo
---
Paolo Giannozzi, Dept of Physics, University of Udine
via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
More information about the Pw_forum
mailing list