<commit_before>// MfiaWLfixed.cpp -- WangLandau methods for Ising AFM with LR Term
//
// <NAME> (<EMAIL>,<EMAIL>)
//

#include"MC_WangLandau.hpp"
#include"WL_Walker.hpp"
#include"Mfia_Hamiltonian.hpp"
#include"Random.hpp"
#include"EMX_Measure.hpp"
#include"ProgramOptions.hpp"

#include<stdio.h>
#include<iomanip>
#include<fstream>
#include<ctime>


void DoIt(int& argc, char* argv[])
{

   //  Get basic MPI information
   MPI_Struct world = MPI_Struct::world();
#  ifdef USE_MPI
   MPI_Comm_rank(world.comm,&world.iproc);
   MPI_Comm_size(world.comm,&world.nproc);
#  endif

   using namespace std;
   ProgramOptions options("Mfia6","Wang-Landau Sampling of Ising model with LR term.");
 
   // Construct a hamiltonian object 
   typedef Mfia_Hamiltonian HAMILTONIAN;
   HAMILTONIAN hamilton;
   hamilton.D     = 2;
   hamilton.L     = 64;
   hamilton.JSIGN = -1;
   hamilton.H     = 0;
   hamilton.A     = 0;
   options.add_option("dim",    "dimension of spin lattice",     'D', &(hamilton.D) );
   options.add_option("length", "extent of lattice in each dim", 'L', &(hamilton.L) );

   // Construct the sampling object
   MC_WangLandau wanglandau;
   wanglandau.wleta = 0;
   wanglandau.wlgamma_start = 1;
   wanglandau.Qquit = 0.05;
   wanglandau.MaxUpdate = 15;
   wanglandau.NWindow = 1;
   options.add_option( "numwalk",   "number of walkers per window",   ' ', &(wanglandau.NWalkPerProcess));
   options.add_option( "nstep",     "number of steps per iteration",  ' ', &(wanglandau.NStep));
   options.add_option( "maxupdate", "maximum number of iterations",   ' ', &(wanglandau.MaxUpdate));
   options.add_option( "wleta",     "weighting between WL and ITTM",  ' ', &(wanglandau.wleta));
   options.add_option( "wlgamma",   "starting value of WL parameter", ' ', &(wanglandau.wlgamma_start));
   options.add_option( "Q",         "target convergence factor",      ' ', &(wanglandau.Qquit));
   options.add_option( "wall_limit","wall_limit limit for run",       ' ', &(wanglandau.wall_limit));
   wanglandau.LinearInterp = 0;

   // Local options
   int NRes = 32;
   options.add_option("res", "Number sampling pts in NA,NB", ' ', &(NRes));

   // Get parameters<commit_msg>Added wall_limit<commit_after>// MfiaWLfixed.cpp -- WangLandau methods for Ising AFM with LR Term
//
// <NAME> (<EMAIL>,<EMAIL>)
//

#include"MC_WangLandau.hpp"
#include"WL_Walker.hpp"
#include"Mfia_Hamiltonian.hpp"
#include"Random.hpp"
#include"EMX_Measure.hpp"
#include"ProgramOptions.hpp"

#include<stdio.h>
#include<iomanip>
#include<fstream>
#include<ctime>


void DoIt(int& argc, char* argv[])
{

   //  Get basic MPI information
   MPI_Struct world = MPI_Struct::world();
#  ifdef USE_MPI
   MPI_Comm_rank(world.comm,&world.iproc);
   MPI_Comm_size(world.comm,&world.nproc);
#  endif

   using namespace std;
   ProgramOptions options("Mfia6","Wang-Landau Sampling of Ising model with LR term.");
 
   // Construct a hamiltonian object 
   typedef Mfia_Hamiltonian HAMILTONIAN;
   HAMILTONIAN hamilton;
   hamilton.D     = 2;
   hamilton.L     = 64;
   hamilton.JSIGN = -1;
   hamilton.H     = 0;
   hamilton.A     = 0;
   options.add_option("dim",    "dimension of spin lattice",     'D', &(hamilton.D) );
   options.add_option("length", "extent of lattice in each dim", 'L', &(hamilton.L) );

   // Construct the sampling object
   MC_WangLandau wanglandau;
   wanglandau.wleta = 0;
   wanglandau.wlgamma_start = 1;
   wanglandau.Qquit = 0.05;
   wanglandau.MaxUpdate = 15;
   wanglandau.NWindow = 1;
   wanglandau.wall_limit = 2*24*60*60;
   options.add_option( "numwalk",   "number of walkers per window",   ' ', &(wanglandau.NWalkPerProcess));
   options.add_option( "nstep",     "number of steps per iteration",  ' ', &(wanglandau.NStep));
   options.add_option( "maxupdate", "maximum number of iterations",   ' ', &(wanglandau.MaxUpdate));
   options.add_option( "wleta",     "weighting between WL and ITTM",  ' ', &(wanglandau.wleta));
   options.add_option( "wlgamma",   "starting value of WL parameter", ' ', &(wanglandau.wlgamma_start));
   options.add_option( "Q",         "target convergence factor",      ' ', &(wanglandau.Qquit));
   options.add_option( "wall_limit","wall_limit limit for run",       ' ', &(wanglandau.wall_limit));
   wanglandau.LinearInterp = 0;

   // Local options
   int NRes = 32;
   options.add_option("res", "Number sampling pts in NA,NB", ' ', &(NRes));

   // Get parameters
{'fraction_non_alphanumeric': 0.14713896457765668, 'fraction_numerical': 0.009763851044504996, 'mean_word_length': 3.772481040086674, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4471431', 'n_tokens_mistral': 1681, 'n_tokens_neox': 1555, 'n_words': 340}