[Pw_forum] small bug zmesh=0
Paolo Giannozzi
giannozz at nest.sns.it
Wed Sep 20 15:52:49 CEST 2006
On Sep 19, 2006, at 23:23 , Fernando A Reboredo wrote:
> I found a problem in PP/pw2casino
only one ? not bad for a piece of code that was last tested two years
ago. It has been updated several times since then.
> WRITE(io,'(i6,3f20.14)') INT(zmesh(ityp(na))), (alat*tau(j,na),j=1,3)
>
> Is supposed to write the atomic number Z of the atom "na".
not a good idea anyway: zmesh is a parameter defining the atomic
radial grid, which happens to be traditionally equal to Z. It is however
not necessarily so, and not always defined or available. Unfortunately,
Z is written nowhere in pseudopotential files.
> The quit fix for me has been to change pw2casino in the following way
> [...] Please let me know if there is another way to fix this.
the best you can do is the following. Define
integer, external:: atomic_number
integer :: at_num
then
DO na = 1, nat
nt = ityp(na)
at_num = atomic_number(TRIM(atm(nt)))
WRITE(io,'(i6,3f20.14)') at_num, (alat*tau(j,na),j=1,3)
ENDDO
if atm(nt) happens to be the symbol of an element, you will get Z.
Paolo
More information about the users
mailing list