generic Jastrow

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
Roman_Nazarov
Posts: 1
Joined: Fri May 23, 2014 11:25 am

generic Jastrow

Post by Roman_Nazarov »

Hi everyone,
I have two questions regarding the use of generic jastrow in parameters.casl file:
1. How can one plot components of generic Jastrow factor? Jastrow_plot block only works with standard Jastrow factor (in correlation.data).
2. Is there any way to transform parameters.casl back into correlation.data? I noticed that DMC calculations with parameters.casl are ~20% slower than with the same Jastrow factor but stored in correlation.data.
Thank you!
Roman
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: generic Jastrow

Post by Mike Towler »

Hi Roman,

Sorry for the slow reply - as you may have seen, email notifications on the forum have stopped working so no-one will have read your post (including me). Recently it's been proving very difficult to convince any SMTP email provider that a forum with the word 'CASINO' in the title that is sent to more than 500 people isn't spam. I've spent several weeks trying to convince Google gmail otherwise but so far without success. They supposedly accept but will not directly respond to solicitations, so it's difficult to know if they're actually listening..

Anyway, as for the general Jastrow factor, you have identified two of the reasons it is not the default: (1) it is significantly slower to evaluate than the usual Jastrow in VMC and DMC caclculations (though optimization will generally proceed faster due to availability of analytic derivatives), and (2) it lacks certain required features, such as plotting and conversion tools. See the files CASINO/doc/gjastrow_guide.README and CASINO/doc/gjastrow_guide.pdf for further details.

I am aware that this situation is unsatisfactory, and I have been trying to get something done about it for a while (in principle, it isn't my problem..). However I don't currently have a timescale in which it will be fixed, and for the moment we officially recommend that people continue to use the standard Jastrow factor. If anybody wants to volunteer to help with any of this, let me know.. :D

Best wishes,
Mike
Vladimir_Konjkov
Posts: 165
Joined: Wed Apr 15, 2015 3:14 pm

Re: generic Jastrow

Post by Vladimir_Konjkov »

Hi, CASINO developers

I tried to use gjastro parameters described in parameters.casl file for jastro optimisation and found strange behavior.

1. If I convert some standard Jastrow factor with F-term to gjastrow I found some strange in parameters_converted.casl file:
It looks like:

Code: Select all

    Linear parameters:
      Channel 1-1-n1:
        c_1,1,1: [ -0.0000000000000000, useless anyway.^@^@^@^@^@ ]
archive with all files including parameters_converted.casl in attachment.
However, you can verify that it is valid YAML file http://www.yamllint.com/

2. If I want set different expansion order for different atom sets, I can not find in documentation how to do it.
This is useful in calculations without PP when in the molecule there are some atoms witout core electrons (H, He) which don't require high expansion order for F-term and atoms with core electrons which do.
Could you tell me how to set such parameters.

Version of product: CASINO v2.13.503 [Mike Towler] (19 May 2015)

Thanks in advance, Vladimir.
Attachments
gjastrow.tgz
(885.2 KiB) Downloaded 797 times
In Soviet Russia Casino plays you.
Pablo_Lopez_Rios
Posts: 53
Joined: Thu Jan 30, 2014 1:25 am

Re: generic Jastrow

Post by Pablo_Lopez_Rios »

Hi Roman,

Apologies for missing your post earlier.
Roman_Nazarov wrote: 1. How can one plot components of generic Jastrow factor? Jastrow_plot block only works with standard Jastrow factor (in correlation.data).
The gjastrow is plotted using the plot input block. This is similar in appearance to qmc_plot, but works differently internally. Have a look at casinohelp plot. To see the dynamic list of available plot subjects for any given system, set runtype : plot and add the following block to the input file:

Code: Select all

%block plot
help
%endblock plot
If you run CASINO, it will print the list of things you can plot using this block to the out file. In particular, to plot the value of each term in the gjastrow, you would use the block:

Code: Select all

%block plot
gjastrow_terms
electron 1 spin 1
1
grid 100
A -1 0 0
B 1 0 0
%endblock plot
Note that the plot facility plots functions against three-dimensional positions, so from the data files the above will produce you will want to use columns 1 and 4 in the plotting program of your choice.
Roman_Nazarov wrote: 2. Is there any way to transform parameters.casl back into correlation.data?
I'm afraid there isn't at present.

Hi Vladimir,
Vladimir_Konjkov wrote: 1. If I convert some standard Jastrow factor with F-term to gjastrow I found some strange in parameters_converted.casl file
Thanks for spotting this array-out-of-bounds bug. I have a fix which will be in the development version soon. The odd-looking string should simply read determined.
Vladimir_Konjkov wrote: 2. If I want set different expansion order for different atom sets, I can not find in documentation how to do it.
This is probably a good idea, although it is not something people usually do. Anyway, it is perfectly possible to do this with the gjastrow. You will need to split the term in question into two, and add "!nn" rules so that the each resulting term affects some atoms but not others. For example, for a two-atom system, instead of declaring the F term as:

Code: Select all

  TERM 3:
    Rank: [ 2, 1 ]
    Rules: [ ]
    e-e basis: [ Type: natural power, Order: 4 ]
    e-n basis: [ Type: natural power, Order: 4 ]
    e-n cutoff:
      Type: alt polynomial
      Constants: [ C: 3 ]
      Parameters:
        Channel 1-n1:
          L: [ 3.00000000000000, fixed ]
        Channel 1-n2:
          L: [ 5.00000000000000, fixed ]
        Channel 2-n1:
          L: [ 3.00000000000000, fixed ]
        Channel 2-n2:
          L: [ 5.00000000000000, fixed ]
you can split it into the following two terms:

Code: Select all

  TERM 3:
    Rank: [ 2, 1 ]
    Rules: [ !n2 ]
    e-e basis: [ Type: natural power, Order: 3 ]
    e-n basis: [ Type: natural power, Order: 3 ]
    e-n cutoff:
      Type: alt polynomial
      Constants: [ C: 3 ]
      Parameters:
        Channel 1-n1:
          L: [ 3.00000000000000, fixed ]
        Channel 2-n1:
          L: [ 3.00000000000000, fixed ]
  TERM 4:
    Rank: [ 2, 1 ]
    Rules: [ !n1 ]
    e-e basis: [ Type: natural power, Order: 4 ]
    e-n basis: [ Type: natural power, Order: 4 ]
    e-n cutoff:
      Type: alt polynomial
      Constants: [ C: 3 ]
      Parameters:
        Channel 1-n2:
          L: [ 5.00000000000000, fixed ]
        Channel 2-n2:
          L: [ 5.00000000000000, fixed ]
The !n2 rule eliminates nucleus number 2 from term 3, while !n1 eliminates nucleus 1 from term 4. Effectively, term 3 is the f term for nucleus 1 and term 4 is the f term for nucleus 2, with the advantage that you can define expansion orders, basis functions, etc, independently for each of them.

Hope this helps.
Pablo
Hey there! I am using CASINO.
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: generic Jastrow

Post by Mike Towler »

I've now added Pablo's bugfix for the above problem into the current beta version - available from the main CASINO website.

Cheers,
Mike
Vladimir_Konjkov
Posts: 165
Joined: Wed Apr 15, 2015 3:14 pm

Re: generic Jastrow

Post by Vladimir_Konjkov »

Mike Towler wrote:I've now added Pablo's bugfix for the above problem into the current beta version - available from the main CASINO website.

Cheers,
Mike
HI, Mike.

Do not exaggerate my role in the improvement of Cassino, I just often use this program. :roll:
At the moment, I'm wondering whether the e-e-e-n (e-e-e-e-n, e-e-e-e-e-n, ....) correlations can significantly improve JASTROW if using without PP.
I think that the n1-n2-e, n1-n2-n3-e, ....correlation make no tangible contribution and e-e-e correlation too.

Hi, Pablo thanks for the quick and exhaustive answer.

with respect Vladimir.
In Soviet Russia Casino plays you.
Pablo_Lopez_Rios
Posts: 53
Joined: Thu Jan 30, 2014 1:25 am

Re: generic Jastrow

Post by Pablo_Lopez_Rios »

Hi Vladimir,
Vladimir_Konjkov wrote:Do not exaggerate my role in the improvement of Cassino, I just often use this program.
The commit message is mine - I usually record the reporter in bugfix commits.
Vladimir_Konjkov wrote:At the moment, I'm wondering whether the e-e-e-n (e-e-e-e-n, e-e-e-e-e-n, ....) correlations can significantly improve JASTROW if using without PP.
I think that the n1-n2-e, n1-n2-n3-e, ....correlation make no tangible contribution and e-e-e correlation too.
Typically, high-rank terms offer little advantage over the usual u/chi/f combo. However, in a 4-body system, a 4-body term (be it e-e-n-n or e-e-e-e) can potentially provide an exact answer (fixed-node DMC at the VMC level, or exact if the nodes are exact). e-e-e terms do offer a significant (though small) gain in the HEG. n-n-e terms have been found to be useful in the presence of bad-quality one-electron orbitals. Our 2012 paper on the gjastrow has some numbers on this.

The main point is that, unless you are studying "weird" systems, you probably don't need very-many-body correlations, and even if you do, DMC gets them all whatever Jastrow factor you use.

Best,
Pablo
Hey there! I am using CASINO.
Vladimir_Konjkov
Posts: 165
Joined: Wed Apr 15, 2015 3:14 pm

Re: generic Jastrow

Post by Vladimir_Konjkov »

Pablo_Lopez_Rios wrote:Hi Vladimir,
Vladimir_Konjkov wrote:Do not exaggerate my role in the improvement of Cassino, I just often use this program.
The commit message is mine - I usually record the reporter in bugfix commits.
Vladimir_Konjkov wrote:At the moment, I'm wondering whether the e-e-e-n (e-e-e-e-n, e-e-e-e-e-n, ....) correlations can significantly improve JASTROW if using without PP.
I think that the n1-n2-e, n1-n2-n3-e, ....correlation make no tangible contribution and e-e-e correlation too.
Typically, high-rank terms offer little advantage over the usual u/chi/f combo. However, in a 4-body system, a 4-body term (be it e-e-n-n or e-e-e-e) can potentially provide an exact answer (fixed-node DMC at the VMC level, or exact if the nodes are exact). e-e-e terms do offer a significant (though small) gain in the HEG. n-n-e terms have been found to be useful in the presence of bad-quality one-electron orbitals. Our 2012 paper on the gjastrow has some numbers on this.

The main point is that, unless you are studying "weird" systems, you probably don't need very-many-body correlations, and even if you do, DMC gets them all whatever Jastrow factor you use.

Best,
Pablo
Thanks you Pablo, this article 2012 paper is very interesting.
But when varmin_linjas supports in generic Jastrow will be available?
At the moment, one can start the calculation with this option but the result is incorrect (energy oscillates).

Best,
Vladimir.
In Soviet Russia Casino plays you.
Pablo_Lopez_Rios
Posts: 53
Joined: Thu Jan 30, 2014 1:25 am

Re: generic Jastrow

Post by Pablo_Lopez_Rios »

Vladimir_Konjkov wrote: But when varmin_linjas supports in generic Jastrow will be available?
At the moment, one can start the calculation with this option but the result is incorrect (energy oscillates).
I'm not aware of any problems with varmin_linjas and the gjastrow. Could you send me the input files to reproduce the issue you are seeing? (pl275 at cam dot ac dot uk)

Best,
Pablo
Hey there! I am using CASINO.
Pablo_Lopez_Rios
Posts: 53
Joined: Thu Jan 30, 2014 1:25 am

Re: generic Jastrow

Post by Pablo_Lopez_Rios »

Hi Vladimir,

Just so you know, there is a fix from December 20th in the current CASINO beta for varmin_linjas + gjastrow which fixes the problem you were seeing.

Best wishes,
Pablo
Hey there! I am using CASINO.
Post Reply