mistake in the derivative of the bessel function?
mistake in the derivative of the bessel function?
Hi,
I am not sure but it seems to me that there is a mistake in the derivative of the bessel function during the settlement of the kleinman-bylander projector of the pseudopotential, in the file 65_psp/psp5nl.F90.
The mistake would be at the lines :
316
396
473
The derivative of the Bessel function should be :
$dj_n(qr)/dx = 2\pi r [ j_{n-1}(2\pi q r) - \frac{n}{2\pi q r} j_n(2\pi q r) dr]$
whereas the following formula is used :
$dj_n(qr)/dx = 2\pi r [ j_{n-1}(2\pi q r) - \frac{n+1}{2\pi q r} j_n(2\pi q r) dr]$
n+1 is used instead of n in the fraction.
Also lignes 300 and 303, I don't understand the division by 3.0?
Thanks in advance for your answer
Best Regards
PYP
I am not sure but it seems to me that there is a mistake in the derivative of the bessel function during the settlement of the kleinman-bylander projector of the pseudopotential, in the file 65_psp/psp5nl.F90.
The mistake would be at the lines :
316
396
473
The derivative of the Bessel function should be :
$dj_n(qr)/dx = 2\pi r [ j_{n-1}(2\pi q r) - \frac{n}{2\pi q r} j_n(2\pi q r) dr]$
whereas the following formula is used :
$dj_n(qr)/dx = 2\pi r [ j_{n-1}(2\pi q r) - \frac{n+1}{2\pi q r} j_n(2\pi q r) dr]$
n+1 is used instead of n in the fraction.
Also lignes 300 and 303, I don't understand the division by 3.0?
Thanks in advance for your answer
Best Regards
PYP
Re: mistake in the derivative of the bessel function?
ok sorry, this is my mistake, the spline doesn't involve the first but the second derivative.
Sorry again for this message
PYP
Sorry again for this message
PYP
Re: mistake in the derivative of the bessel function?
Sorry for my second post, this is what happen when making several things at a time. But finally I am still thinking that my first post is right,
so maybe somebody would have some suggestions...
Thanks for your answers
ppy wrote:The derivative of the Bessel function should be :
$dj_n(qr)/dx = 2\pi r [ j_{n-1}(2\pi q r) - \frac{n}{2\pi q r} j_n(2\pi q r) dr]$
whereas the following formula is used :
$dj_n(qr)/dx = 2\pi r [ j_{n-1}(2\pi q r) - \frac{n+1}{2\pi q r} j_n(2\pi q r) dr]$
n+1 is used instead of n in the fraction.
so maybe somebody would have some suggestions...
Thanks for your answers
Re: mistake in the derivative of the bessel function?
Hello,
could you supply a patch file with some context lines around the ones you think are wrong? The line numbers change all the time so I don't know which ones you are looking at.
How did you come upon this? Do you have an erroneous result or some failing test of your own?
thanks
Matthieu
could you supply a patch file with some context lines around the ones you think are wrong? The line numbers change all the time so I don't know which ones you are looking at.
How did you come upon this? Do you have an erroneous result or some failing test of your own?
thanks
Matthieu
Matthieu Verstraete
University of Liege, Belgium
University of Liege, Belgium
Re: mistake in the derivative of the bessel function?
Thanks for your answer, I understood MY mistake, I was using the Bessel function of the first kind instead of the spherical ones.
To answer your question I am trying to implement a pseudo empirical code, and I am trying to calculate the Kleinman-Bylander form of the pseudopotential, since I am a fortunate user of Abinit and I like this code, I am checking step by step if what I am doing is fine and my understanding fairly well. This proves that it was necessary.
Best Regards!
PYP
To answer your question I am trying to implement a pseudo empirical code, and I am trying to calculate the Kleinman-Bylander form of the pseudopotential, since I am a fortunate user of Abinit and I like this code, I am checking step by step if what I am doing is fine and my understanding fairly well. This proves that it was necessary.
Best Regards!
PYP
Re: mistake in the derivative of the bessel function?
So the formulas in psp5nl are fine?
If you are looking for a pseudopotential code, the bits of abinit are quite limited. You could look at fhi98pp, APE, or OPIUM for more complete codes with all of the trappings.
cheers
Matthieu
If you are looking for a pseudopotential code, the bits of abinit are quite limited. You could look at fhi98pp, APE, or OPIUM for more complete codes with all of the trappings.
cheers
Matthieu
Matthieu Verstraete
University of Liege, Belgium
University of Liege, Belgium
Re: mistake in the derivative of the bessel function?
Yes I think every thing is fine is the routine pspnl.f90.
Thanks for the advice, actually I am also looking at the fhi98pp code in the same time, but I probably did it too fast and I didn't notice my mistake.
Best Regards
Thanks for the advice, actually I am also looking at the fhi98pp code in the same time, but I probably did it too fast and I didn't notice my mistake.
Best Regards