14.09.2014 Views

CASINO manual - Theory of Condensed Matter

CASINO manual - Theory of Condensed Matter

CASINO manual - Theory of Condensed Matter

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Jastrow factor from each cycle <strong>of</strong> the variance-minimization process. When casino has finished, type<br />

envmc. The output should look something like this (again, I ran the calculation on 12 cores):<br />

ENVMC v0.60: Script to extract VMC energies from <strong>CASINO</strong> output files.<br />

Usage: envmc [-kei] [-ti] [-fisq] [-pe] [-vee] [-vei] [-vnl] [-nc]<br />

[-vr] [-rel] [-ct] [-nf ] [files]<br />

File: ./out<br />

(energies in au/particle, variances in au)<br />

VMC #1: E = -0.03892(8) ; var = 0.191(5) (correlation.out.0)<br />

VMC #2: E = -0.04640(5) ; var = 0.0601(9) (correlation.out.1)<br />

VMC #3: E = -0.05335(1) ; var = 0.0056(1) (correlation.out.2)<br />

Total <strong>CASINO</strong> CPU time ::: 189.9371 seconds<br />

We see that optimizing the parameters in this way lowers the variance and total energy significantly.<br />

You should use the output <strong>of</strong> envmc to choose which correlation.out file you want to use in subsequent<br />

calculations, e.g., for DMC. In general, one should choose the correlation.out file that gives<br />

the lowest variational energy. Therefore, in the example above, correlation.out.2 should be copied<br />

to correlation.data for use in subsequent DMC calculations.<br />

To get an even better wave function with varmin one could try additional things, such as optimizing<br />

the cut<strong>of</strong>fs, or using more parameters, or having different functional forms between different spin types<br />

to optimize the Jastrow still further. Feel free to try this.<br />

For this example we have only used the RPA form <strong>of</strong> the electron–electron term u in the Jastrow<br />

factor, along with a three-body W -term. If we were optimizing a wave function for a real system with<br />

atoms then we would include atom-centred electron–nucleus χ terms (one for each type <strong>of</strong> atom), and<br />

possibly electron–electron–nucleus f terms (again, one for each atom type). There are two additional<br />

types <strong>of</strong> term, p and q, which are plane-wave extensions <strong>of</strong> u and χ, respectively, for periodic systems.<br />

The p term is known to improve answers for periodic systems, but the q term is rarely used. A<br />

three-electron homogeneous term h can be used too: see Sec. 7.4.2.<br />

If you are only interested in optimizing linear parameters in casino’s Jastrow factor (i.e., all Jastrow<br />

parameters except cut<strong>of</strong>fs, RPA parameters and parameters in the three-body terms), then the<br />

‘varmin-linjas’ method should be used, as it is considerably faster (see Sec. 25.2). The input files<br />

should be set up exactly as for an ordinary variance minimization, except that the opt method keyword<br />

should be set to ‘varmin linjas’. Unfortunately you can’t use this on the example above, because<br />

it only contains non-linear terms, but feel free to experiment with some <strong>of</strong> the other examples.<br />

6.3.2 How to do an energy-minimization calculation<br />

casino also includes a different optimization method, in which the variational energy is minimized.<br />

Full details <strong>of</strong> the method and its usage are given in Sec. 25.3.<br />

Energy minimization is done in a very similar manner to standard variance minimization, and is<br />

selected by setting opt method to ‘emin’. As before, the process consists <strong>of</strong> cycles, each comprising a<br />

VMC configuration-generation stage followed by an optimization stage. The number <strong>of</strong> configurations<br />

which must be generated per cycle (vmc nconfig write) is usually similar to the number required<br />

for variance minimization.<br />

There are some differences in the capabilities and behaviour <strong>of</strong> energy and variance minimization.<br />

Whereas variance minimization typically achieves all <strong>of</strong> its improvement to the wave function in one<br />

or two cycles, energy minimization will <strong>of</strong>ten require up to ten cycles to converge. The exception to<br />

this is that when optimizing only determinant coefficients, energy minimization should converge in<br />

at most two cycles (see Sec. 25.3 for an explanation <strong>of</strong> this). Energy-minimization cycles are usually<br />

faster than variance-minimization cycles, so that the overall time to convergence is similar for both<br />

methods. Energy minimization is also more sensitive than variance minimization to the presence <strong>of</strong><br />

optimizable parameters which have very little effect on the wave function (it is <strong>of</strong>ten best to avoid<br />

including such parameters). More importantly, energy minimization has some difficulty in optimizing<br />

cut<strong>of</strong>f parameters (in the Jastrow, backflow, or orbital functions). Lastly, if the Jastrow u term is<br />

present and being optimized, starting from zeroed parameters, it is possible for the energy to increase<br />

after the first cycle <strong>of</strong> energy minimization. Subsequent cycles should lower the energy as usual. This<br />

behaviour is explained in Sec. 25.3.<br />

19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!