[Pw_forum] question on q2r.f90
Stefano de Gironcoli
degironc at sissa.it
Wed Dec 5 21:51:56 CET 2007
in q2r one declares a regular grid and then provide a number of matrices
that should correspond to that grid.
This is what is checked in that part of the code.
If this is the error you get, some of your q-points does not correspond
to the grid you declared.
Stefano de Gironcoli - SISSA and DEMOCRITOS
PS: Please provide your affiliation
Guoying Gao wrote:
> Dear everyone,
> When I read the routine q2r.f90 given in the pwtools directory,
> I find the following lines:
> %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> lq = .true.
> do ipol=1,3
> xq = 0.0
> do icar=1,3
> xq = xq + at(icar,ipol) * q(icar,nq) * nr(ipol)
> end do
> lq = lq .and. (abs(nint(xq) - xq) .lt. eps)
> iq = nint(xq)
> !
> m(ipol)= mod(iq,nr(ipol)) + 1
> if (m(ipol) .lt. 1) m(ipol) = m(ipol) + nr(ipol)
> end do
> if (.not.lq) call errore('init','q not allowed',1)
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> I know the parameters at(icar, ipol) means the components of the
> crystal vectors, q(icar, np) is the coordinates of the qpoints and
> nr(ipol) are the dimensions
> of the FFT grid formed by the q-point grid. What I don't understand is
> why the three parameters multiply and sum for x, y and z
> components:that is,
> do icar=1,3
> xq = xq + at(icar,ipol) * q(icar,nq) * nr(ipol)
> end do
> and then there is another line: lq = lq .and. (abs(nint(xq) - xq) .lt. eps
> what makes (abs(nint(xq) - xq) should be less than eps.
> Is there anyone familiar with this part? Any small suggestions may be
> a great help for me.
> Thanks for your help!
> Best wishes,
> Guoying
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
>
More information about the users
mailing list