TRIQS/triqs_ctseg 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
split_spin_segment.hpp
1// Copyright (c) 2022--present, The Simons Foundation
2// Copyright (c) 2022--present, Max Planck Institute for Polymer Research, Mainz, Germany
3// This file is part of TRIQS/ctseg and is licensed under the terms of GPLv3 or later.
4// SPDX-License-Identifier: GPL-3.0-or-later
5// See LICENSE in the root of this distribution for details.
6
7#pragma once
8#include "../work_data.hpp"
9#include "../configuration.hpp"
10#include "../invariants.hpp"
11
12namespace triqs_ctseg::moves {
13
14 class split_spin_segment {
15 work_data_t &wdata;
16 configuration_t &config;
17 triqs::mc_tools::random_generator &rng;
18
19 // Internal dataseg;
20 long line_idx, idx_c_up, idx_c_dn, idx_cdag_up, idx_cdag_dn;
21 tau_t tau_up, tau_dn;
22 double ln_trace_ratio, prop_ratio, det_sign;
23 std::tuple<long, long, tau_t> propose(int color);
24
25 public:
26 split_spin_segment(work_data_t &data_, configuration_t &config_, triqs::mc_tools::random_generator &rng_)
27 : wdata(data_), config(config_), rng(rng_) {}
28
29 // ------------------
30 double attempt();
31 double accept();
32 void reject();
33 };
34
35} // namespace triqs_ctseg::moves