[Pw_forum] small bug zmesh=0

Fernando A Reboredo reboredofa at ornl.gov
Wed Sep 20 18:58:25 CEST 2006


Thanks Paolo!
Fernando
----- Original Message ----- 
From: "Paolo Giannozzi" <giannozz at nest.sns.it>
To: <pw_forum at pwscf.org>
Sent: Wednesday, September 20, 2006 9:52 AM
Subject: Re: [Pw_forum] small bug zmesh=0


> 
> 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
> 
> 
> 
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum



More information about the Pw_forum mailing list