## varmin, varmin-linjas

General discussion of the Cambridge quantum Monte Carlo code CASINO; how to install and setup; how to use it; what it does; applications.

### varmin, varmin-linjas

I am running an optimization on a system with PPs.
I started with a small varmin calculation (a couple of thousand configs).
Then I added a varmin_linjas calculation using more configs. Interestingly, I see the following:

Code: Select all
`VMC #1: E     = -1295.332(6) ; var  = 29.14(8) (correlation.out.0)VMC #2: E     = -1294.920(6) ; var  = 33.87(8) (correlation.out.1)VMC #3: E     = -1295.130(6) ; var  = 30.28(7) (correlation.out.2)VMC #4: E     = -1295.054(6) ; var  = 31.9(1) (correlation.out.3)VMC #5: E     = -1295.091(6) ; var  = 31.00(7) (correlation.out.4)VMC #6: E     = -1295.057(6) ; var  = 31.51(9) (correlation.out.5)`

i.e. the energy and variance increase sharply in the first iteration, just to go down again later on. The low value from correlation.out.0 (i.e. the Jastrow resulting from varmin) is, however, never reached again. This kind of does not sound logic to me. May it be related to the use of PPs (I am using opt_fixnl=F)? I did n not only observe this once...

Thanks for any suggestions as to why I see this behaviour.
Katharina Doblhoff

Posts: 84
Joined: Tue Jun 17, 2014 6:50 am

### Re: varmin, varmin-linjas

Katharina,

Obvious one - but does your Jastrow factor have anything non-linear with its optimizable flag set to "T"? Were you perhaps optimizing a cut-off?

Thanks, Ryan.
Ryan_Hunt

Posts: 26
Joined: Thu Mar 10, 2016 10:58 am
Location: Lancaster, UK

### Re: varmin, varmin-linjas

Hi!
I do have the cutoffs optimized in varmin and I do not change the flag for the varmin_linjas, but the flag is automatically ignored in varmin_linjas. So yes, if I were to run varmin_linjas alone, I would expect a higher energy, since the cutoffs are not optimized. However, that is not what I do: I am using the cutoffs from varmin and after reoptimizing optimizing in varmin_linjas (to allow a full relaxation of the linear coefficients), I get a higher energy. This is what I do not understand.
Katharina Doblhoff

Posts: 84
Joined: Tue Jun 17, 2014 6:50 am

### Re: varmin, varmin-linjas

Dear Katharina,

Thanks for your question. The short answer is, "I don't know", but here are a couple more thoughts.

Unreweighted variance minimisation isn't the same as either energy minimisation or variance minimisation, and has its (self-consistent) minimum in a different place. Hence it is quite possible for unreweighted variance minimisation to raise either the energy or the variance.

varmin_linjas (unlike varmin) can escape from local minima of the objective function. This may not always be desirable. Perhaps varmin_linjas is escaping from a "sensible" local minimum (with low energy) to the global minimum of the unreweighted variance, which has a higher energy?

vm_fixnl is true by default for varmin (and always true for varmin_linjas). Unless you have set it to false, this doesn't account for the difference between varmin and varmin_linjas.

Best wishes,

Neil.
Neil Drummond

Posts: 79
Joined: Fri May 31, 2013 10:42 am
Location: Lancaster

### Re: varmin, varmin-linjas

Hi Neil!
Thank you for your answer! Although it does not help of course, I am quite glad you say that short answer is "I don't know"...

A global minimum in variance cannot explain my observation since you can see the variance also going up in the example above.

As to the fixnl: I did set it to false manually, thereby overriding the default. I did this because I expect quite large differences in the non-local energy when the jastrow changes (because I have observed the non-locality error to be quite large too). Thus I wanted the non-local energy to adapt correctly to the changes in the Jastrow. If I read the manual correctly, this is what is done by fixnl=F.

Could the fact that I have a quasi-2D system be relevant?

Best,
Katharina
Katharina Doblhoff

Posts: 84
Joined: Tue Jun 17, 2014 6:50 am

### Re: varmin, varmin-linjas

Dear Katharina,

The unreweighted variance is not the same as the variance. To obtain an unbiased estimate of the latter as a function of parameters, it is necessary to use reweighting (i.e., correlated sampling). To do "true" variance minimisation in CASINO, set vm_reweight to T.

Hence the outcome of variance minimisation is not the same as the self-consistent outcome of unreweighted variance minimisation, even in the limit of perfect sampling. For a toy example of the difference between variance minimisation and unreweighted variance minimisation, see the appendix of Phys. Rev. B 72, 085124.

So, if you do varmin with vm_reweight=T, followed by either varmin_linjas or varmin with vmc_reweight=F, you would expect to see the variance increase.

I don't see why the quasi-2D nature of the system should necessarily be a problem.

One thought: what is the basis set for your orbitals like? Is the DFT energy converged to chemical accuracy or similar?

Best wishes,

Neil.
Neil Drummond

Posts: 79
Joined: Fri May 31, 2013 10:42 am
Location: Lancaster

### Re: varmin, varmin-linjas

Hi Neil!

I understand that reweighted and unreweighted variance are not the same and I would understand if the variance and energy would go up in varmin_linjas (which, if I am not mistaken, is based on the unreweighted varaiance) after having done a varmin on the reweighted varmin. But in the varmin, I did not touch the default behaviour of the reweighting. According to the manual, this is then an unreweighted variance minimization. So I am performing an unreweighted variance minimization after and unreweighted variance minimization, and I would not expect anything odd to happen.

Sorry, for nagging...

All the best,
Katharina
Katharina Doblhoff

Posts: 84
Joined: Tue Jun 17, 2014 6:50 am

### Re: varmin, varmin-linjas

... that was why I mentioned the possibility of jumping out of a local minimum, which varmin_linjas, but not varmin, can do.

However, I think this is all a long elaboration on my original answer of, "I don't know"!

Thanks,

Neil.
Neil Drummond

Posts: 79
Joined: Fri May 31, 2013 10:42 am
Location: Lancaster

### Re: varmin, varmin-linjas

But a very informative one
Thanks!
Katharina Doblhoff

Posts: 84
Joined: Tue Jun 17, 2014 6:50 am