TRIQS/triqs_cthyb 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
shift.hpp
1/*******************************************************************************
2 *
3 * TRIQS: a Toolbox for Research in Interacting Quantum Systems
4 *
5 * Copyright (C) 2014, P. Seth, I. Krivenko, M. Ferrero and O. Parcollet
6 *
7 * TRIQS is free software: you can redistribute it and/or modify it under the
8 * terms of the GNU General Public License as published by the Free Software
9 * Foundation, either version 3 of the License, or (at your option) any later
10 * version.
11 *
12 * TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 * details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * TRIQS. If not, see <http://www.gnu.org/licenses/>.
19 *
20 ******************************************************************************/
21#pragma once
22#include <triqs/mc_tools.hpp>
23#include "../qmc_data.hpp"
24
25namespace triqs_cthyb {
26
27 // Move a C or C^dagger operator to a different time
28 class move_shift_operator {
29
30 qmc_data &data;
31 configuration &config;
32 mc_tools::random_generator &rng;
33 histogram *histo_proposed, *histo_accepted; // Analysis histograms
34 double dtau;
35 h_scalar_t new_atomic_weight, new_atomic_reweighting;
36 time_pt tau_old, tau_new;
37 op_desc op_old, op_new;
38 using det_type = det_manip::det_manip<qmc_data::delta_block_adaptor>;
39 det_type::RollDirection roll_direction;
40 int block_index;
41
42 histogram *add_histo(std::string const &name, histo_map_t *histos);
43
44 public:
45 move_shift_operator(qmc_data &data, mc_tools::random_generator &rng, histo_map_t *histos);
46 mc_weight_t attempt();
47 mc_weight_t accept();
48 void reject();
49 };
50}