Spin-Fermion Models Documentation

Classical spins and itinerant electrons

Spin-Fermion Models

Monte Carlo simulations of lattice models with classical spins and itinerant fermions, using the C++ code Monte_Carlo_TCA_MultiOrb.

Overview

Monte_Carlo_TCA_MultiOrb combines classical-spin Monte Carlo with diagonalization of the fermionic Hamiltonian. Inputs specify lattice and cluster dimensions, orbitals, hopping, Hund coupling, classical exchange, filling, and temperature.

The entry point main.cpp selects the Monte Carlo executable sf, a single-diagonalization path NI, or the observables executable observe. The Monte Carlo loop is implemented in MCEngine.h.

Getting started

Use a C++11-capable compiler and OpenBLAS with LAPACK support. Review the compiler and library settings in the Makefile for your machine, then build:

git clone https://github.com/nkphys/Monte_Carlo_TCA_MultiOrb.git
cd Monte_Carlo_TCA_MultiOrb
make

The build creates sf, NI, and observe. Run from the repository root so the input's relative file paths resolve correctly.

1-orbital Spin-Fermion model on a Square Lattice

This first example uses the original input_1orb_SqrLat.inp from the local working directory. The downloadable copy preserves all supplied values.

Download example input →

  • Lattice: 48 × 48 sites, periodic boundaries, one orbital and one classical spin per site.
  • Hopping: nearest-neighbor amplitudes along x and y are 1; both diagonal hopping amplitudes are zero.
  • Filling: one electron per site, with the chemical potential adjusted (Fix_mu=0).
  • Hund coupling: J_Hund0=0, the decoupled spin–fermion limit. Disorder and the listed scalar exchange couplings are also zero.
  • Cluster: 48 × 48, equal to the full lattice, with Perform_ED=0.
  • Temperature: Cooling=2 uses Temperature_Values=1 0.001, selecting a single temperature T = 0.001.
  • Spin updates: Metropolis sampling of theta_and_phi with the 4qPeak_Checkerboard initial ansatz.

Prepare the exchange matrices

The input references J_px.txt, J_py.txt, and J_mxpy.txt, which were absent from the supplied directory. For zero matrix exchange, create three 3 × 3 zero matrices in the run directory. Preserve any existing files and check their values first.

printf '0 0 0\n0 0 0\n0 0 0\n' > J_px.txt
cp J_px.txt J_py.txt
cp J_px.txt J_mxpy.txt

Run the example

Save the downloaded input in the repository root, then run:

./sf input_1orb_SqrLat.inp > run_square_lattice.log
Starting configuration: The input sets MaxMCsweeps=2, Last_n_sweeps_for_measurement=100, and Measurement_after_each_m_sweeps=5. The engine reserves 595 sweeps for this measurement schedule. Increase the total beyond 595 to allow thermalization, and establish convergence before interpreting averages. Two sweeps are not a production measurement run. A 48 × 48 full-size cluster also requires substantial diagonalization work.

For a coupled spin-fermion calculation, set a nonzero J_Hund0 in a working copy and choose the exchange parameters appropriate to the model. The original download retains the supplied zero-coupling values.

Full input

View input_1orb_SqrLat.inp
PBC=1
Perform_ED=0
Xsite=24
Ysite=24
Cluster_lx=24
Cluster_ly=24
N_Orbs=1
TwistedBoundaryCond_mx=0
TwistedBoundaryCond_my=0
TBC_cellsX=2
TBC_cellsY=2
Filling_per_site=1.0

RandomSeed=20
Fix_mu=0
fixed_mu_value=-2.8

Boltzman_constant=1.0

RandomDisorderSeed=413
Disorder_Strength=0.0

J_Hund0=0

OnSiteE0=0.0
OnSiteE1=0.0

lambda_lattice=0.0

hz_mag=0
Delta_z=0.0

No_of_classical_spins_per_site=1

K_0X_0Y_row0=0 0.0

K_1X_0Y_row0=0 0

K_0X_1Y_row0=0 0.0

K_m1X_1Y_row0=0 0.0

Nearest_neighbour_Exc_px_Matrix_file_name=J_px.txt
Nearest_neighbour_Exc_py_Matrix_file_name=J_py.txt
Nearest_neighbour_Exc_mxpy_Matrix_file_name=J_mxpy.txt

IgnoreFermions=0
NnBiquadratic_A=0.0

Hopping_0X_0Y_row0=0
Hopping_1X_0Y_row0=1.00
Hopping_0X_1Y_row0=1.00
Hopping_m1X_1Y_row0=0.00
Hopping_m1X_m1Y_row0=0.00

SavingMicroscopicStates=1
NoOfMicroscopicStates=2

Cooling=2
Temperature_min=0.01
Temperature_max=0.1
dTemperature=0.01

#this is around chemical potential
omega_min_dos=-10.0
omega_max_dos=10.0
d_omega_dos=0.05
eta_dos=0.05

Temperature_Values=1 0.001

#36 10.0 8.0 6.0 4.0 3.0 2.0 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.09 0.08 0.07 0.06 0.05 0.04 0.03 0.02 0.01 0.009 0.008 0.007 0.006 0.005 0.004 0.003 0.002 0.001 0.0005 0.0001
#5 0.5 0.05 0.01 0.0001

Temperature=0.0001

Metropolis_Algo=1
MaxMCsweeps=1
Last_n_sweeps_for_measurement=100
Measurement_after_each_m_sweeps=5


Monte_Carlo_variables=1 theta_and_phi
# theta_and_phi

UsingInbuiltAnsatz=4qPeak_Checkerboard
#4qPeak_Checkerboard
#Vortex_Checkerboard
#ALM_Checkerboard

Read_Seed_from_file=0
Seed_file_name=ThetaPhi_Temp0.0001000000MicroStateSeed.txt



#4 phi theta moment_size local_density

Outputs

The workflow writes temperature-labelled progress, spin configurations, local densities, density of states, and classical and quantum correlation files. Examples include output_Temp0.0010000000.txt, ThetaPhi_Temp0.0010000000.txt, and DOS_temp_0.0010000000.txt.

This example documents the input and workflow; it does not present a converged simulation result.