.. _config: Supported configuration files and their contents ================================================ Pycasino can read input files in well-known `Casino `_ format. Input files are supported ------------------------- - **input** is the main input parameter file. - **correlation.data** file contains all optimizable parameters together with accompanying data (for example, the parameters used to define a Jastrow factor or backflow function). - **gwfn.data** file contains the data that defines the geometry, the gaussian-type orbitals and, if appropriate, the determinant expansion coefficients. - **stowfn.data** file contains the data that defines the geometry and the slater-type orbitals. - **x_pp.data** (where x is the chemical symbol of an element in lower-case letters.) This file contains the pseudopotential data for the corresponding element. Input parameters supported -------------------------- General keywords ~~~~~~~~~~~~~~~~ - **NEU**, **NED** - number of electrons of *up* and *down* spin - **RUNTYPE** - type of QMC calculation: *vmc*, *vmc_dmc*, *vmc_opt* - **TESTRUN** - if this flag is T then read input files, print information and stop - **ATOM_BASIS_TYPE** - the type of orbitals to be used: *gaussian*, *slater-type* VMC keywords ~~~~~~~~~~~~ - **VMC_EQUIL_NSTEP** - number of equilibration steps - **VMC_NSTEP** - number of VMC energy-evaluation steps - **VMC_DECORR_PERIOD** - number of steps between VMC energy-evaluation moves (0 = auto) - **VMC_NCONFIG_WRITE** - number of VMC configurations stored for later use in DMC or optimization - **VMC_NBLOCK** - number of blocks into which the total VMC run is divided post-equilibration - **DTVMC** - VMC time step (size of trial steps in random walk, default 0.02) - **OPT_DTVMC** - if T, automatically adjust the VMC step size to achieve ~50 % acceptance rate (default T) - **VMC_METHOD** - (1) EBES electron-by-electron sampling (work in progress), (3) CBCS configuration-by-configuration sampling (recommended) - **GAUTOL** - Gaussian cut-off tolerance; skip a primitive if :math:`\alpha r^2 > \log(10) \times \text{GAUTOL}` (default 7.0) Optimization keywords ~~~~~~~~~~~~~~~~~~~~~ - **OPT_CYCLES** - number of optimization VMC cycles to perform - **OPT_METHOD** - optimization method to use: *varmin*, *emin* - **OPT_JASTROW** - optimize the Jastrow factor in wave-function optimization - **OPT_BACKFLOW** - optimize backflow parameters in wave-function optimization - **OPT_DET_COEFF** - optimize the coefficients of the determinants in wave-function optimization - **OPT_ORBITALS** - optimize the orbitals in wave-function optimization (work in progress) - **OPT_MAXITER** - maximum number of iterations of the outer optimisation loop (default 10) - **OPT_MAXEVAL** - maximum number of objective-function evaluations per iteration (default 200) - **OPT_NOCTF_CYCLES** - number of optimisation cycles in which the cutoff lengths are not optimised (default 0) - **POSTFIT_VMC** - if T, run a VMC energy accumulation after each optimisation cycle (default T) - **OPT_PLAN** - block keyword to specify different parameters for each optimization cycle; each row sets ``opt_method``, ``opt_cycles``, and optionally ``emin_method`` for that cycle - **OPT_FIXNL** - if T, freeze the nonlocal-pseudopotential contribution during variance minimisation (default T for varmin) - **VM_REWEIGHT** - if T, use the reweighted variance-minimisation algorithm; unreweighted (F) is recommended (default F) - **VM_SMOOTH_LIMIT** - apply a smooth cutoff to the weight limit in reweighted varmin (default T) - **VM_W_MAX** - upper threshold for reweighting weights (default 0.0 = no limit) - **VM_W_MIN** - lower threshold for reweighting weights (default 0.0 = no limit) - **EMIN_METHOD** - energy minimisation method: *linear* (default), *newton*, *reconf* - **EMIN_XI_VALUE** - stabilisation parameter :math:`\xi` for the linear energy-minimisation method (default 1.0) DMC keywords ~~~~~~~~~~~~ - **DMC_TARGET_WEIGHT** - target number of configurations in DMC - **DMC_EQUIL_NSTEP** - number of DMC steps in equilibration - **DMC_STATS_NSTEP** - number of DMC steps in statistics accumulation - **DMC_EQUIL_NBLOCK** - number of blocks into which the DMC equilibration phase is divided - **DMC_STATS_NBLOCK** - number of blocks into which the DMC statistics accumulation phase is divided - **DTDMC** - DMC time step - **DMC_METHOD** - (1) - EBES, (2) - CBCS - **LIMDMC** - set modifications to Green’s function in DMC. Only (4) Umrigar mods to drift velocity, Zen–Sorella–Alfè mods to energy - **ALIMIT** - parameter required by DMC drift-velocity- and energy-limiting schemes - **NUCLEUS_GF_MODS** - this keyword is the switch for enabling the use of the modifications to the DMC Green’s function for the presence of bare nuclei - **EBEST_AV_WINDOW** - averaging window for calculating the ground-state energy during equilibration (work in progress) - **USE_TMOVE** - use Casula T-move scheme for nonlocal pseudopotentials in DMC (default T) WFN definition keywords ~~~~~~~~~~~~~~~~~~~~~~~ - **BACKFLOW** - turns on backflow corrections. Backflow parameters are read from correlation.data - **USE_JASTROW** - use a wave function of the Slater-Jastrow form. The Jastrow factor is read from correlation.data - **USE_GJASTROW** - use gjastrow Jastrow factor. This Jastrow factor is defined in a parameters.casl file (work in progress) Cusp correction keywords ~~~~~~~~~~~~~~~~~~~~~~~~ - **CUSP_CORRECTION** - when the cusp correction flag is activated, the s-type Gaussian basis functions centred on each atom are replaced within a small sphere by a function which ensures that the electron–nucleus cusp condition is obeyed - **CUSP_INFO** - if set then information about how cusp correction is done will be printed to the log-file - **CUSP_THRESHOLD** - if the magnitude of the s-component of a Gaussian orbital is less than this threshold then it will not be cusp corrected Pseudopotential keywords ~~~~~~~~~~~~~~~~~~~~~~~~ - **NON_LOCAL_GRID** - selects the grid for nonlocal integration, can take values between 1 and 7, the default being 4 - **LCUTOFFTOL** - this is used to define the cutoff radius for the local part of the pseudopotential, the default being 10\ :sup:`-5` - **NLCUTOFFTOL** - this is used to define the cutoff radius for the nonlocal parts of the pseudopotential, the default being 10\ :sup:`-5` Configs read/write ------------------ Config loader is represented by the :class:`casino.readers.CasinoConfig` class. The :class:`~casino.readers.CasinoConfig` instance represents the relevant information in various attributes: - config.input - data from input file - config.wfn - data from gwfn.data or stowfn.data files - config.mdet - multideterminant data from correlation.data files - config.jastrow - jastrow related data from correlation.data files - config.backflow - backflow related data from correlation.data files Config files can be read:: from casino.readers import CasinoConfig config_path = config = CasinoConfig(config_path) config.read() modified:: config.title = 'New config title' config.mdet.title = 'New mdet section title' config.jastrow.title = 'New jastrow section title' config.backflow.title = 'New backflow section title' and written to a new destination:: config.write('.', version=0)