A user friendly program to do Monte Carlo sims for magnetic systems
Project description
# mcsolver A user friendly tools implementing Monte Carlo simulations to estimate Curie/Neel temperature
Original version contributor: Dr. Liang Liu* 1.Shenzheng University 2.Shandong University Email: liangliu@mail.sdu.edu.cn
You can download the packed .exe (only tested in Windows 10 platform) from the following link. Wish it can find something helpful for you. And if it was used for publication, please cite: [1] Magnetic switches via electric field in BN nanoribbons. Applied Surface Science 480(2019)
Link for exe: https://pan.baidu.com/s/1EaDqOOdB7AP9WXrwEIEaxQ passwd: 52ze
Brief tutorial:
using mcsolver via .exe, e.g., in Windows platform
NOTE: the mcsolver.exe maybe reported to be virus and removed by some anti-virus software. I still have no ideal about this and maybe you need add it into white list. Otherwise you can use mcsolver as a python package (see Section B below).
Download .exe file from upper link, then open exe (maybe wait 10+ sec.), fill out all parameters, click startMC Btn, then wait for the results.
How to define parameters?
Style I Define parameters via GUI:
Define the three lattice vectors of primitive cell.
Define all basic spins in primitive cell, note that the fractional coordinates are supposed. Ani represents the single-ion anisotropies in xyz directions (It is useless in Ising model, and only former two are used in XY model). As well as, note that the units of anisotropies are in Kelvin.
Define all exchange interactions (bonds). Only Jz is used for Ising model, and Jz, Jx are used for XY model, and all three J for Heisenberg model. In this step, you can click one of the bonds to review the actual linking in lattice on view pannel. Activated bond is depicted with bold and yellow line while others are green. You may drag left/right mouse Btn to rotate and expand/shrink the model shown in view pannel.
Define other parameters, including the start and end temperatures, number of temperature interpolations, nthermal the total steps to make system enter balanced states, nsweep the total steps involved in mesearing, tau the MC updates for each step, and model type, algorithm (only Metropolis and Wolff are supported now)
Set spin_i and spin_j and the lattice vector between them, for correlation mesearments.
Set the core resources for parallel calc.
(Optional) Save current parameters into file.
Click startMC Btn to start.
Wait for the diagram update in right pannel. Afterwards, you can find a file result.txt in the root directory of mcsolver, there are many useful informations including the averaged spin (on spin_i and j defined in step 5), correlation between spin_i and j, internal energy, specific heat capacith, and Binder cumulant U4, etc. If you handle the sims with more than one cores then the results may not be ordered according to temperature, however, the correspondences in every line are ok.
Style II Define parameters via load file
click load Btn to load settings, and here I prepared the setting for CrI3 with exchanges up to 2nd nearest neiboring. You can modify the sample file for your own purposes, with any txt editor.
Click startMC Btn to start.
using mcsolver as a python package e.g., in the commandline mode in Linux platform
Download all codes presented here, use install command:
python setup.py install
Afterwards, you can import mcsolver into your own python code and use function:
loadMC(“parameterfile”)
to start simulation. Preparation of parameterfile is the same as in section A.
Note that the parallelization of mcsolver is not perfect. Now it cannot parallelize between multiple machines but amongst mutiple cores in a single machine (that is, only SMP mode is efficient). Therefore submit the job into one node if you are working with clusters.
using code mode (not recommend)
Download all codes, compile the .c file inito .so using c99 standard and run cmd: “python win.py” to load GUI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.