pwfn generation

General discussion of the Cambridge quantum Monte Carlo code CASINO; how to install and setup; how to use it; what it does; applications.
Post Reply
samaneh
Posts: 9
Joined: Thu Jun 27, 2013 6:22 am

pwfn generation

Post by samaneh »

Hi Prof Towler
I run the command 'runpwscf --qmc' and the bwfn.data.b1 is generated
but as mentioned in the manual we can obtain other formats of wave function like
pwfn.data
would you please let me know how can I change the pw2casino.dat
or what should I write instead of blip-converts and ...
in the pw2casino.dat file to make pwfn.data?
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: pwfn generation

Post by Mike Towler »

Hi Samaneh,

Given that you are generating the trial wave function with PWSCF, then all this is spelled out in great detail in section 8.8 of the manual (linked top left). Is there something in particular that is not clear?

Best wishes,
Mike
samaneh
Posts: 9
Joined: Thu Jun 27, 2013 6:22 am

Re: pwfn generation

Post by samaneh »

Hi Prof Towler

Yes I have studied the section 8.8 of the manual
but I do not understand the meaning of the
expression 'To change what is produced (pwfn.data, bwfn.data etc..) change the options
in the pw2casino.dat file.'
in the README file
of the PWSCF directory in CASINO.
Here is the copy of the README file
of the PWSCF directory in CASINO.
################################################
Wave function generation with the PWSCF code
--------------------------------------------

Assuming you have setup the PWSCF/Quantum Espresso and CASINO distributions
correctly, then simply type

runpwscf --qmc

in order to generate a CASINO bwfn.data.b1 file.

To change what is produced (pwfn.data, bwfn.data etc..) change the options
in the pw2casino.dat file.
################################################

Best regards
S. Ataei
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: pwfn generation

Post by Mike Towler »

Hi Samaneh,

The README file you quote (from examples/wfn_generation/PWSCF) concludes with the line 'See the manual for more information' . :D

If you look in the manual in section 8.8 - as I said before - it states precisely what you have to do (I quote the text below). I can repeat it to you in different words, but I don't think it would make it any clearer. I repeat, what exactly is it that you don't understand? If there is some genuinely confusing point, I am happy to amend the text.

Mike


EXTRACT FROM MANUAL


PWSCF is capable of doing the plane wave to blip conversion directly (the `blip' utility provided in the CASINO distribution is not required) and so by default, PWSCF produces the `binary blip wave function' file bwfn.data.b1.

Various options may be modified by providing a file `pw2casino.dat' with the following format:

&inputpp
blip_convert=.true.
blip_binary=.true.
blip_single_prec=.false.
blip_multiplicity=1.d0
n_points_for_test=0
/

Some or all of the five keywords may be provided, in any order. The default values are as given above (and these are used if the pw2casino.dat file is not present).

The meanings of the keywords are as follows:

blip_convert: Re-expand the converged plane-wave orbitals in localized blip functions prior to writing the CASINO wave-function file. This is almost always done, since wave functions expanded in blips are considerably more efficient in QMC calculations. If blip_convert is F, a pwfn.data file is produced (orbitals expanded in plane waves); if blip_convert is T, either a bwfn.data file or a bwfn.data.b1 file is produced, depending on the value of blip_binary (see below).

blip_binary: If T, and if blip_convert is also T, write the blip wave function as an unformatted binary bwfn.data.b1 file. This is much smaller than the formatted bwfn.data file, but is not generally portable across all machines.

blip_single_prec: If F, the orbital coefficients in bwfn.data or bwfn.data.b1 are written out in double precision; if the user runs into hardware limits blip_single_prec can be set to T, in which case the coefficients are written in single precision, reducing the memory and disk requirements at the cost of a small amount of accuracy.

etc.
samaneh
Posts: 9
Joined: Thu Jun 27, 2013 6:22 am

Re: pwfn generation

Post by samaneh »

Hi Prof Towler
Yes I have studied the manual (section 8.8)
it says 'If blip convert in the pw2casino.dat file
is F, a pwfn.data file is produced
'
I changed the pw2casino.dat file as the manual mentioned
but it produces the bwfn.data!!!!!
Would you please guide me more.
Thanks
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: pwfn generation

Post by Mike Towler »

Ah! You should have said from the beginning that 'I did what it says in the manual and it doesn't work', rather than 'Please teach me how to do it'.

OK - to quote my patch 2.9.336 from the DIARY file:

" PWSCF contains a small bug whereby the pw2casino.dat file is not read if the
user sets the input keyword 'outdir' (the directory where the output files
are put) to be anything other than '.' (the current directory). Rather, it
expects the pw2casino.dat file to be present in outdir, which is a bit silly.
The practical upshot of this is that when using PWSCF to generate CASINO wave
function files it always produces the default (a bwfn.data.b1 file with
double precision blip coefficients) and ignores any user requests to do
otherwise. This will be fixed in PWSCF, but in the meantime (and for people
who never upgrade their PWSCF) I have implemented a workaround in runpwscf
whereby the script detects the value of outdir and copies the pw2casino.dat
file (if it exists) to outdir.
"

Could it have something to do with that?

To summarize, this is a bug in PWSCF which will manifest itself if you set the outdir keyword to be anything other than the current directory, and you don't use the 'runpwscf' script (included in the CASINO distribution) to run PWSCF. You're guilty of both of these things, I imagine?
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: pwfn generation

Post by Mike Towler »

By the way, I seem to remember that it was too much trouble for the developers to fix that bug in PWSCf, so it was probably never fixed despite what it says in the DIARY entry. Just use 'runpwscf' to run the code, and the bug will magically be bypassed.

Mike
samaneh
Posts: 9
Joined: Thu Jun 27, 2013 6:22 am

Re: pwfn generation

Post by samaneh »

Hi Prof Towler

Thanks
Post Reply