Exemplo n.º 1
0
    def __init__(self, ham_filename, **kwargs):
        ham_opts, param_opts, misc_opts = self.set_defaults(kwargs)

        # Read in the Hamiltonian integrals from file
        self.sys_ham = det_ops.HAM(filename=ham_filename, **ham_opts)
        ref_energy = self.sys_ham.slater_condon(self.sys_ham.ref_det,
                                                self.sys_ham.ref_det, None,
                                                None)

        # Setup simulation parameters. See system.py for details.
        self.sim_params = system.PARAMS(**param_opts)

        # Setup a statistics object, which accumulates various run-time variables.
        # See system.py for more details.
        self.sim_stats = system.STATS(self.sim_params,
                                      filename='fciqmc_stats',
                                      ref_energy=ref_energy)

        # Set up walker object as a dictionary.
        # Label determinants by the string representation of the list of occupied orbitals
        self.walkers = {repr(self.sys_ham.ref_det): self.sim_params.nwalk_init}
        self.sim_stats.nw = self.sim_params.nwalk_init
Exemplo n.º 2
0
import numpy as np
import ast
import system
import det_ops

# Read in the Hamiltonian integrals from file
sys_ham = det_ops.HAM(filename='FCIDUMP.6H', p_single=0.1)
ref_energy = sys_ham.slater_condon(sys_ham.ref_det, sys_ham.ref_det, None,
                                   None)

# Setup simulation parameters. See system.py for details.
sim_params = system.PARAMS(totwalkers=400,
                           initwalkers=10,
                           init_shift=0.1,
                           shift_damp=0.025,
                           timestep=2.e-2,
                           det_thresh=0.75,
                           eqm_iters=250,
                           max_iter=150000,
                           stats_cycle=5,
                           seed=7,
                           init_thresh=2.0)
# Setup a statistics object, which accumulates various run-time variables.
# See system.py for more details.
sim_stats = system.STATS(sim_params,
                         filename='fciqmc_stats',
                         ref_energy=ref_energy)

# Set up walker object as a dictionary.
# Label determinants by the string representation of the list of occupied orbitals
walkers = {repr(sys_ham.ref_det): sim_params.nwalk_init}