Page 1 of 1

Plot dvscf files in real space

Posted: Wed Nov 17, 2021 5:45 pm
by rbombin
Hello,
I am wondering if there is a simple way for plotting the dvscf file corresponding to one of the perturbations in real space. Is it posible?

thanks in advance.
Raúl

Re: Plot dvscf files in real space

Posted: Wed Nov 17, 2021 6:00 pm
by hlee
Dear Raúl:

Yes, we can, but we need some coding (not complex).
Basically, we need to generate the data which pp.x (https://www.quantum-espresso.org/Doc/INPUT_PP.html) or any other programs can plot.

Sincerely,

H. Lee

Re: Plot dvscf files in real space

Posted: Wed Nov 17, 2021 6:08 pm
by rbombin
Dear H. Lee,
thanks a lot for your fast answer. I'll try to go through the pp.x code to understand what it does.

If I understood correctly, the dvscf files are written in blocks and each block corresponds to one perturbation. That's why I was wondering if is possible to plot the different componentes :)

Raúl

Re: Plot dvscf files in real space

Posted: Wed Nov 17, 2021 6:20 pm
by hlee
Dear Raúl:

Yes, you are correct.

The last dimension is for the perturbation: https://gitlab.com/QEF/q-e/-/blob/devel ... on.f90#L86 .

The first dimension is the same as potential or charge density. So, basically it is not complex to plot. In any case, you first need to split the data into the perturbing potential for each perturbation.

Sincerely,

H. Lee

Re: Plot dvscf files in real space

Posted: Wed Nov 17, 2021 6:34 pm
by rbombin
Thanks again. I see, I am spliting the dvscf binary filse with the "dd" bash command.
I have one last question, the dvscf files are writen in q space, right?

Sincerely,

Raúl

Re: Plot dvscf files in real space

Posted: Thu Nov 18, 2021 9:15 pm
by hlee
Dear Raúl:

It is written in real space after gathering the distributed data with the first dimension of dfftp%nr1x*dfftp%nr2x*dfftp%nr3x [ z (3)-direction fastest ] : See https://gitlab.com/QEF/q-e/-/blob/devel ... ho.f90#L43
In addition, I don't know about the "dd" bash command, but the dvscf file is a direct-access binary file.

Sincerely,

H. Lee