Saved in:
Bibliographic Details
Main Author: Siqueira Rocha, Julio Cesar
Format: Recurso digital
Language:English
Published: Zenodo 2025
Subjects:
Online Access:https://doi.org/10.5281/zenodo.16059921
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866902037333016576
author Siqueira Rocha, Julio Cesar
author_facet Siqueira Rocha, Julio Cesar
contents <h1>REWL_NiPressure: Replica Exchange 1/t Wang-Landau Simulation for NiI2 Monolayer</h1> <p>This repository contains Fortran code for simulating the magnetic behavior of a NiI2 monolayer using a spin model on a triangular lattice with periodic boundary conditions. The simulation employs the Replica Exchange Wang-Landau (REWL) algorithm, transitioning from a regular Wang-Landau sampling phase to a 1/t update scheme for improved efficiency and accuracy in calculating the density of states. The code is parallelized using MPI to distribute the simulation across multiple processors and energy windows.</p> <h2>Features</h2> <ul> <li> <p><strong>Spin Model:</strong> Simulates magnetic spins on a triangular lattice.</p> </li> <li> <p><strong>Periodic Boundary Conditions (PBC):</strong> Ensures proper simulation of bulk material.</p> </li> <li> <p><strong>Replica Exchange Wang-Landau (REWL):</strong> A powerful Monte Carlo method for overcoming energy barriers and efficiently sampling phase space to compute the density of states.</p> </li> <li> <p><strong>1/t Update Scheme:</strong> Transitions from a constant factor update to a 1/t factor update for improved accuracy and convergence in the later stages of the Wang-Landau simulation.</p> </li> <li> <p><strong>MPI Parallelization:</strong> Utilizes Message Passing Interface for distributed computing across multiple CPU cores or nodes, enabling the simulation of larger systems or faster convergence.</p> </li> <li> <p><strong>Configurable Parameters:</strong> Simulation parameters are read from external input files, allowing for flexible setup and experimentation.</p> </li> </ul> <h2>Prerequisites</h2> <p>To compile and run this code, you will need:</p> <ul> <li> <p><strong>Fortran Compiler:</strong> A Fortran 90/95/2003/2008 compliant compiler (e.g., <code>gfortran</code> from GCC).</p> </li> <li> <p><strong>MPI Library:</strong> An MPI implementation (e.g., OpenMPI, MPICH) for parallel execution. The <code>mpif90</code> wrapper script is typically used for compilation.</p> </li> </ul> <h2>Files</h2> <ul> <li> <p><code>REWL_NiPressure.f90</code>: The main Fortran source code for the simulation.</p> </li> <li> <p><code>inputREWL_parametersr.dat</code>: Input file containing parameters for the Replica Exchange Wang-Landau algorithm.</p> </li> <li> <p><code>input_NipressureMonolayer.dat</code>: Input file containing system-specific parameters (lattice size, interaction constants, energy range).</p> </li> </ul> <h2>Compilation</h2> <p>Navigate to the directory containing the source code and compile using <code>mpif90</code>:</p> <pre><code>mpif90 -o NiPressure REWL_NiPressure.f90 <br></code></pre> <p>This command will create an executable file named <code>NiPressure</code>.</p> <h2>Execution</h2> <p>Run the simulation using <code>mpirun</code> (or your MPI implementation's equivalent command), specifying the number of processes (<code>N_PROCS</code>):</p> <pre><code>mpirun -np N_PROCS ./NiPressure <br></code></pre> <p>Replace <code>N_PROCS</code> with the desired number of MPI processes. The code expects <code>N_PROCS</code> to be equal to <code>nWindows * nWalkers</code> as defined in <code>inputREWL_parametersr.dat</code>.</p> <p><strong>Example:</strong> If <code>nWindows = 3</code> and <code>nWalkers = 2</code> (from <code>inputREWL_parametersr.dat</code>), you would run with 6 processes:</p> <pre><code>mpirun -np 6 ./NiPressure <br></code></pre> <h2>Input Files</h2> <h3><code>inputREWL_parametersr.dat</code></h3> <p>This file defines the parameters for the Wang-Landau and Replica Exchange algorithms.</p> <p><strong>Format:</strong></p> <pre><code>nEbins ireplica mcs_bin mcs_bin_term lnf_min accept_min p nWindows nWalkers overlap_ratio increase_ratio S_initial tcountMAx <br></code></pre> <p><strong>Description of Parameters:</strong></p> <ul> <li> <p><strong><code>nEbins</code></strong>: Integer. The number of energy bins for the density of states histogram.</p> </li> <li> <p><strong><code>ireplica</code></strong>: Integer. The number of Monte Carlo sweeps (MCS) between attempts to perform replica exchanges.</p> </li> <li> <p><strong><code>mcs_bin</code></strong>: Integer. The number of Monte Carlo sweeps after which the histogram flatness is checked in the regular Wang-Landau phase.</p> </li> <li> <p><strong><code>mcs_bin_term</code></strong>: Integer. The number of Monte Carlo sweeps after which the solid angle for spin trial moves might be adjusted (related to acceptance rate).</p> </li> <li> <p><strong><code>lnf_min</code></strong>: Double Precision. The minimum value of the modification factor ln(f) in the Wang-Landau algorithm. When ln(f) drops below this value, the simulation typically transitions to the 1/t phase.</p> </li> <li> <p><strong><code>accept_min</code></strong>: Double Precision. The target acceptance ratio for Monte Carlo moves. Used in <code>define_acceptance</code> (if implemented) to adjust the solid angle of spin trial moves.</p> </li> <li> <p><strong><code>p</code></strong>: Double Precision. The flatness criterion for the energy histogram. The histogram is considered flat if all bins are within <code>p</code> percent of the average histogram count.</p> </li> <li> <p><strong><code>nWindows</code></strong>: Integer. The total number of energy windows used in the Replica Exchange part of the simulation.</p> </li> <li> <p><strong><code>nWalkers</code></strong>: Integer. The number of independent walkers (simulations) running within each energy window.</p> </li> <li> <p><strong><code>overlap_ratio</code></strong>: Double Precision. A parameter related to the overlap between neighboring energy windows.</p> </li> <li> <p><strong><code>increase_ratio</code></strong>: Double Precision. A parameter related to how the energy range increases between windows.</p> </li> <li> <p><strong><code>S_initial</code></strong>: Double Precision. The initial size of the vector defining the solid angle for spin trial moves. This controls the magnitude of spin changes.</p> </li> <li> <p><strong><code>tcountMAx</code></strong>: Integer. The maximum number of 1/t steps in the 1/t Wang-Landau phase.</p> </li> </ul> <h3><code>input_NipressureMonolayer.dat</code></h3> <p>This file defines the physical parameters of the NiI2 monolayer system.</p> <p><strong>Format:</strong></p> <pre><code>L J1 J2 J3 Anis<br>Jxx Jyy Jzz Jyz E_min_N E_max_N <br></code></pre> <p><strong>Description of Parameters:</strong></p> <ul> <li> <p><strong><code>L</code></strong>: Integer. The linear size of the system (L x L lattice). The total number of sites will be <code>L*L</code>.</p> </li> <li> <p><strong><code>J1</code>, <code>J2</code>, <code>J3</code></strong>: Double Precision. Isotropic Heisenberg exchange interaction parameters for 1st, 2nd, and 3rd nearest neighbors, respectively.</p> </li> <li> <p><strong><code>Anis</code></strong>: Double Precision. The single-ion anisotropy constant.</p> </li> <li> <p><strong><code>Jxx</code>, <code>Jyy</code>, <code>Jzz</code></strong>: Double Precision. Triaxial Spin Anisotropy (TSA) parameters for the x, y, and z components.</p> </li> <li> <p><strong><code>Jyz</code></strong>: Double Precision. Triaxial Spin Anisotropy (TSA) parameter for the yz component.</p> </li> <li> <p><strong><code>E_min_N</code></strong>: Double Precision. The minimum energy value for the overall density of states range (normalized by |J1|).</p> </li> <li> <p><strong><code>E_max_N</code></strong>: Double Precision. The maximum energy value for the overall density of states range (normalized by |J1|).</p> </li> </ul> <h2>Output Files</h2> <p>Each file contains two columns:</p> <ol> <li> <p><strong>Energy Value:</strong> The center energy of the bin.</p> </li> <li> <p><strong>:</strong> The natural logarithm of the density of states (entropy).</p> </li> </ol>
format Recurso digital
id zenodo_https___doi_org_10_5281_zenodo_16059921
institution Zenodo
language eng
publishDate 2025
publisher Zenodo
record_format zenodo
spellingShingle Replica Exchange 1/t Wang-Landau Simulation for NiI2 Monolayer
Siqueira Rocha, Julio Cesar
Wang-Landau
<h1>REWL_NiPressure: Replica Exchange 1/t Wang-Landau Simulation for NiI2 Monolayer</h1> <p>This repository contains Fortran code for simulating the magnetic behavior of a NiI2 monolayer using a spin model on a triangular lattice with periodic boundary conditions. The simulation employs the Replica Exchange Wang-Landau (REWL) algorithm, transitioning from a regular Wang-Landau sampling phase to a 1/t update scheme for improved efficiency and accuracy in calculating the density of states. The code is parallelized using MPI to distribute the simulation across multiple processors and energy windows.</p> <h2>Features</h2> <ul> <li> <p><strong>Spin Model:</strong> Simulates magnetic spins on a triangular lattice.</p> </li> <li> <p><strong>Periodic Boundary Conditions (PBC):</strong> Ensures proper simulation of bulk material.</p> </li> <li> <p><strong>Replica Exchange Wang-Landau (REWL):</strong> A powerful Monte Carlo method for overcoming energy barriers and efficiently sampling phase space to compute the density of states.</p> </li> <li> <p><strong>1/t Update Scheme:</strong> Transitions from a constant factor update to a 1/t factor update for improved accuracy and convergence in the later stages of the Wang-Landau simulation.</p> </li> <li> <p><strong>MPI Parallelization:</strong> Utilizes Message Passing Interface for distributed computing across multiple CPU cores or nodes, enabling the simulation of larger systems or faster convergence.</p> </li> <li> <p><strong>Configurable Parameters:</strong> Simulation parameters are read from external input files, allowing for flexible setup and experimentation.</p> </li> </ul> <h2>Prerequisites</h2> <p>To compile and run this code, you will need:</p> <ul> <li> <p><strong>Fortran Compiler:</strong> A Fortran 90/95/2003/2008 compliant compiler (e.g., <code>gfortran</code> from GCC).</p> </li> <li> <p><strong>MPI Library:</strong> An MPI implementation (e.g., OpenMPI, MPICH) for parallel execution. The <code>mpif90</code> wrapper script is typically used for compilation.</p> </li> </ul> <h2>Files</h2> <ul> <li> <p><code>REWL_NiPressure.f90</code>: The main Fortran source code for the simulation.</p> </li> <li> <p><code>inputREWL_parametersr.dat</code>: Input file containing parameters for the Replica Exchange Wang-Landau algorithm.</p> </li> <li> <p><code>input_NipressureMonolayer.dat</code>: Input file containing system-specific parameters (lattice size, interaction constants, energy range).</p> </li> </ul> <h2>Compilation</h2> <p>Navigate to the directory containing the source code and compile using <code>mpif90</code>:</p> <pre><code>mpif90 -o NiPressure REWL_NiPressure.f90 <br></code></pre> <p>This command will create an executable file named <code>NiPressure</code>.</p> <h2>Execution</h2> <p>Run the simulation using <code>mpirun</code> (or your MPI implementation's equivalent command), specifying the number of processes (<code>N_PROCS</code>):</p> <pre><code>mpirun -np N_PROCS ./NiPressure <br></code></pre> <p>Replace <code>N_PROCS</code> with the desired number of MPI processes. The code expects <code>N_PROCS</code> to be equal to <code>nWindows * nWalkers</code> as defined in <code>inputREWL_parametersr.dat</code>.</p> <p><strong>Example:</strong> If <code>nWindows = 3</code> and <code>nWalkers = 2</code> (from <code>inputREWL_parametersr.dat</code>), you would run with 6 processes:</p> <pre><code>mpirun -np 6 ./NiPressure <br></code></pre> <h2>Input Files</h2> <h3><code>inputREWL_parametersr.dat</code></h3> <p>This file defines the parameters for the Wang-Landau and Replica Exchange algorithms.</p> <p><strong>Format:</strong></p> <pre><code>nEbins ireplica mcs_bin mcs_bin_term lnf_min accept_min p nWindows nWalkers overlap_ratio increase_ratio S_initial tcountMAx <br></code></pre> <p><strong>Description of Parameters:</strong></p> <ul> <li> <p><strong><code>nEbins</code></strong>: Integer. The number of energy bins for the density of states histogram.</p> </li> <li> <p><strong><code>ireplica</code></strong>: Integer. The number of Monte Carlo sweeps (MCS) between attempts to perform replica exchanges.</p> </li> <li> <p><strong><code>mcs_bin</code></strong>: Integer. The number of Monte Carlo sweeps after which the histogram flatness is checked in the regular Wang-Landau phase.</p> </li> <li> <p><strong><code>mcs_bin_term</code></strong>: Integer. The number of Monte Carlo sweeps after which the solid angle for spin trial moves might be adjusted (related to acceptance rate).</p> </li> <li> <p><strong><code>lnf_min</code></strong>: Double Precision. The minimum value of the modification factor ln(f) in the Wang-Landau algorithm. When ln(f) drops below this value, the simulation typically transitions to the 1/t phase.</p> </li> <li> <p><strong><code>accept_min</code></strong>: Double Precision. The target acceptance ratio for Monte Carlo moves. Used in <code>define_acceptance</code> (if implemented) to adjust the solid angle of spin trial moves.</p> </li> <li> <p><strong><code>p</code></strong>: Double Precision. The flatness criterion for the energy histogram. The histogram is considered flat if all bins are within <code>p</code> percent of the average histogram count.</p> </li> <li> <p><strong><code>nWindows</code></strong>: Integer. The total number of energy windows used in the Replica Exchange part of the simulation.</p> </li> <li> <p><strong><code>nWalkers</code></strong>: Integer. The number of independent walkers (simulations) running within each energy window.</p> </li> <li> <p><strong><code>overlap_ratio</code></strong>: Double Precision. A parameter related to the overlap between neighboring energy windows.</p> </li> <li> <p><strong><code>increase_ratio</code></strong>: Double Precision. A parameter related to how the energy range increases between windows.</p> </li> <li> <p><strong><code>S_initial</code></strong>: Double Precision. The initial size of the vector defining the solid angle for spin trial moves. This controls the magnitude of spin changes.</p> </li> <li> <p><strong><code>tcountMAx</code></strong>: Integer. The maximum number of 1/t steps in the 1/t Wang-Landau phase.</p> </li> </ul> <h3><code>input_NipressureMonolayer.dat</code></h3> <p>This file defines the physical parameters of the NiI2 monolayer system.</p> <p><strong>Format:</strong></p> <pre><code>L J1 J2 J3 Anis<br>Jxx Jyy Jzz Jyz E_min_N E_max_N <br></code></pre> <p><strong>Description of Parameters:</strong></p> <ul> <li> <p><strong><code>L</code></strong>: Integer. The linear size of the system (L x L lattice). The total number of sites will be <code>L*L</code>.</p> </li> <li> <p><strong><code>J1</code>, <code>J2</code>, <code>J3</code></strong>: Double Precision. Isotropic Heisenberg exchange interaction parameters for 1st, 2nd, and 3rd nearest neighbors, respectively.</p> </li> <li> <p><strong><code>Anis</code></strong>: Double Precision. The single-ion anisotropy constant.</p> </li> <li> <p><strong><code>Jxx</code>, <code>Jyy</code>, <code>Jzz</code></strong>: Double Precision. Triaxial Spin Anisotropy (TSA) parameters for the x, y, and z components.</p> </li> <li> <p><strong><code>Jyz</code></strong>: Double Precision. Triaxial Spin Anisotropy (TSA) parameter for the yz component.</p> </li> <li> <p><strong><code>E_min_N</code></strong>: Double Precision. The minimum energy value for the overall density of states range (normalized by |J1|).</p> </li> <li> <p><strong><code>E_max_N</code></strong>: Double Precision. The maximum energy value for the overall density of states range (normalized by |J1|).</p> </li> </ul> <h2>Output Files</h2> <p>Each file contains two columns:</p> <ol> <li> <p><strong>Energy Value:</strong> The center energy of the bin.</p> </li> <li> <p><strong>:</strong> The natural logarithm of the density of states (entropy).</p> </li> </ol>
title Replica Exchange 1/t Wang-Landau Simulation for NiI2 Monolayer
topic Wang-Landau
url https://doi.org/10.5281/zenodo.16059921