Coder Social home page Coder Social logo

mcsolver's Introduction

mcsolver

A user friendly and efficient tool implementing Monte Carlo simulations to estimate Curie/Neel temperature

Support multiple ocassions, e.g. standard ferromangetic/anti-ferromagnetic systems, DMI, Kiteav non-diagonal exchange interactions, dipole-dipole long-range couplings, with external fields.

The newest version is 3, which supports the calculations on topological charges (the number of (anti-)Skyrmions and (anti-)Merons).

Original version contributor: Dr. Liang Liu* 1.Shenzheng University 2.Shandong University Email: [email protected]

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/1kRtvPFXDBANga1StRxG7Wg?pwd=1234

Brief tutorial:

A. 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 and extract file from upper link (or download the .zip from https://github.com/golddoushi/mcsolver/raw/master/mcsolver.20.10.10update.zip), 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:

1. Define the three lattice vectors of primitive cell.

2. 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. 

3. Define all exchange interactions (bonds). There are nine matrix elements for one J including Jxx, Jyy, Jzz, Jxy, Jxz, Jyz, Jyx, Jzx, Jzy, respectively. Each element discribes the coupling between two components of spins. For example, a basic bond term can be expressed as 
$$S1\dot J\dot S2 = S_{1x}J_{xx}S_{2x} + S_{1y}J_{yy}S_{2y} + S_{1z}J_{zz}S_{2z} + S_{1x}J_{xy}S_{2y} + ...$$
For Ising model, since only one component is available for each spin, only the first element Jxx is used. As well as for XY model, only Jxx, Jyy, Jxy, Jyz are used. 
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. 
By the way, these parameters can be obtained via fitting experimental spin-wave spectra or DFT calculations. One of the general method for calculating anisotropic bonds and orbitals was introduced in dio: 10.1021/acs.jpclett.0c01911.

4. Define other parameters, including 
the start and end temperatures, number of temperature interpolations (for the temperature scanning)
the start, end and number of samplings for external field (for the magnetic field scanning)
nthermal is the total steps to make system enter balanced states, nsweep is the total steps involved in mesearing, tau denotes the MC updates for each step
xAxis denote the physical quantity put in x-axis of right-hand Result viewer, it can be either T(for illustration of M-T curv) or H (for illustration of hysteresis loop).
model type, algorithm (only Metropolis and Wolff are supported now)
nFrame is the num. of output spin configurations, using for illustrating spin configurations in equilibrium or non-equilibrium states.

5. Set spin_i and spin_j and the lattice vector between them, for correlation mesearments. (if spin_i=spin_j and overLat=0 0 0, then you will get susceptibility for spin_i)

6. Set the core resources for parallel calc.

7. (Optional) Save current parameters into file.

8. Click startMC Btn to start.

9. 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 loading file

1. 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. 

2. You can define the Topological section to compute the (thermally averaged) topological charges. Every circuits are made by three orbitals enclosing the triangle anti-clockwisely. And all the circuits should cover the zone with exactly the same area of unit cell. 

3. Click startMC Btn to start.

B. using mcsolver as a python package

Style I Build form binary file in Windows platform

Install the package via command:

pip install mcsolver

Note that python>=3, matplotlib, numpy, tkinter are prerequisite

Afterwards, you can import mcsolver into your own python code and use function:

mcsolver.loadMC("parameterfile")

to start simulation. Preparation of parameterfile is the same as in section A.

There are one sample file sim_XYmodel_under_Windows.py in sample folder. To use this, change your current path (in console) into sample folder, and type command: python sim_XYmodel_under_Windows.py

NOTE: since mcsolver employ python-parallel you have to use freeze_support() before calling loadMC(...).

Style II Build from source 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:

mcsolver.loadMC("parameterfile")

to start simulation. Preparation of parameterfile is the same as in section A.

There are one sample file sim_XYmodel_under_Linux.py in sample folder. To use this, cd to sample folder, and type command: python sim_XYmodel_under_Linux.py

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.

C. using code mode (not recommend)

Download all codes, compile all .c files inito .so files the dynamic libraries. And run cmd: "python win.py" to load GUI and go on.

mcsolver's People

Contributors

golddoushi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mcsolver's Issues

参数设置问题

This is mcsolver's save file, version: 2.3
Lattice:
1.000000000 0.000000000 0.000000000
0.000000000 1.000000000 0.000000000
0.000000000 0.000000000 0.988000000
Supercell used in MC simulations:
8 8 8
Orbitals in cell:
4
Postions, initial spin states and onsite-anisotropy of every orbitals:
orb 0: type 0 spin 1.500000000 pos [0.0000000014324610 0.9999999995976279 0.9999999955755224] Dx 0.000000000 Dy 0.000000000 Dz 0.000000000 h 0.000000000
orb 1: type 0 spin -1.500000000 pos [0.9999999980583267 0.5000000005806763 0.5000000006137180] Dx 0.000000000 Dy 0.000000000 Dz 0.000000000 h 0.000000000
orb 2: type 0 spin 1.500000000 pos [ 0.4999999978528786 0.0000000008749412 0.5000000004321106] Dx 0.000000000 Dy 0.000000000 Dz 0.000000000 h 0.000000000
orb 3: type 0 spin -1.500000000 pos [0.5000000024815558 0.4999999993270164 0.0000000036736649] Dx 0.000000000 Dy 0.000000000 Dz 0.000000000 h 0.000000000
Bonds:
48
id, source, target, overLat, exchange matrix elements of each bond:
bond 0: Jx -105.923 Jy -105.923 Jz -105.923 orb 0 to orb 2 over [0 1 0]
bond 1: Jx -105.904 Jy -105.904 Jz -105.904 orb 1 to orb 3 over [0 0 0]
bond 2: Jx -105.904 Jy -105.904 Jz -105.904 orb 1 to orb 3 over [0 0 1]
bond 3: Jx -105.923 Jy -105.923 Jz -105.923 orb 0 to orb 2 over [-1 1 0]
bond 4: Jx -105.923 Jy -105.923 Jz -105.923 orb 0 to orb 2 over [0 1 1]
bond 5: Jx -105.906 Jy -105.906 Jz -105.906 orb 1 to orb 3 over [1 0 0]
bond 6: Jx -105.909 Jy -105.909 Jz -105.909 orb 1 to orb 3 over [1 0 1]
bond 7: Jx -105.929 Jy -105.929 Jz -105.929 orb 0 to orb 2 over [-1 1 1]
bond 8: Jx -477.895 Jy -477.895 Jz -477.895 orb 0 to orb 1 over [-1 0 0]
bond 9: Jx -477.895 Jy -477.895 Jz -477.895 orb 2 to orb 3 over [0 0 0]
bond 10: Jx -477.895 Jy -477.895 Jz -477.895 orb 0 to orb 1 over [-1 1 0]
bond 11: Jx -477.895 Jy -477.895 Jz -477.895 orb 2 to orb 3 over [0 -1 0]
bond 12: Jx -477.887 Jy -477.887 Jz -477.887 orb 2 to orb 3 over [0 0 1]
bond 13: Jx -477.887 Jy -477.887 Jz -477.887 orb 0 to orb 1 over [-1 0 1]
bond 14: Jx -477.887 Jy -477.887 Jz -477.887 orb 2 to orb 3 over [0 -1 1]
bond 15: Jx -477.887 Jy -477.887 Jz -477.887 orb 0 to orb 1 over [-1 1 1]
bond 16: Jx -425.829 Jy -425.829 Jz -425.829 orb 0 to orb 3 over [-1 1 1]
bond 17: Jx -425.822 Jy -425.822 Jz -425.822 orb 0 to orb 3 over [-1 0 1]
bond 18: Jx -425.825 Jy -425.825 Jz -425.825 orb 1 to orb 2 over [0 0 0]
bond 19: Jx -425.822 Jy -425.822 Jz -425.822 orb 1 to orb 2 over [1 0 0]
bond 20: Jx -425.829 Jy -425.829 Jz -425.829 orb 1 to orb 2 over [1 1 0]
bond 21: Jx -425.831 Jy -425.831 Jz -425.831 orb 0 to orb 3 over [0 1 1]
bond 22: Jx -425.831 Jy -425.831 Jz -425.831 orb 1 to orb 2 over [0 1 0]
bond 23: Jx -425.825 Jy -425.825 Jz -425.825 orb 0 to orb 3 over [0 0 1]
bond 24: Jx 47.52819 Jy 47.52819 Jz 47.52819 orb 2 to orb 2 over [0 0 1]
bond 25: Jx 47.53473 Jy 47.53473 Jz 47.53473 orb 0 to orb 0 over [0 0 -1]
bond 26: Jx 47.5510 Jy 47.5510 Jz 47.5510 orb 1 to orb 1 over [0 0 -1]
bond 27: Jx 47.52819 Jy 47.52819 Jz 47.52819 orb 2 to orb 2 over [0 0 -1]
bond 28: Jx 47.5510 Jy 47.5510 Jz 47.5510 orb 3 to orb 3 over [0 0 -1]
bond 29: Jx 47.53473 Jy 47.53473 Jz 47.53473 orb 0 to orb 0 over [0 0 1]
bond 30: Jx 47.5510 Jy 47.5510 Jz 47.5510 orb 1 to orb 1 over [0 0 1]
bond 31: Jx 47.5510 Jy 47.5510 Jz 47.5510 orb 3 to orb 3 over [0 0 1]
bond 32: Jx 43.12406 Jy 43.12406 Jz 43.12406 orb 0 to orb 0 over [-1 0 0]
bond 33: Jx 43.12174 Jy 43.12174 Jz 43.12174 orb 1 to orb 1 over [-1 0 0]
bond 34: Jx 43.11942 Jy 43.11942 Jz 43.11942 orb 2 to orb 2 over [-1 0 0]
bond 35: Jx 43.12406 Jy 43.12406 Jz 43.12406 orb 3 to orb 3 over [-1 0 0]
bond 36: Jx 43.12406 Jy 43.12406 Jz 43.12406 orb 0 to orb 0 over [1 0 0]
bond 37: Jx 43.12174 Jy 43.12174 Jz 43.12174 orb 1 to orb 1 over [1 0 0]
bond 38: Jx 43.11942 Jy 43.11942 Jz 43.11942 orb 2 to orb 2 over [1 0 0]
bond 39: Jx 43.12406 Jy 43.12406 Jz 43.12406 orb 3 to orb 3 over [1 0 0]
bond 40: Jx 583.685 Jy 583.685 Jz 583.685 orb 1 to orb 1 over [0 1 0]
bond 41: Jx 583.686 Jy 583.686 Jz 583.686 orb 0 to orb 0 over [0 -1 0]
bond 42: Jx 583.685 Jy 583.685 Jz 583.685 orb 1 to orb 1 over [0 -1 0]
bond 43: Jx 583.680 Jy 583.680 Jz 583.680 orb 2 to orb 2 over [0 -1 0]
bond 44: Jx 583.685 Jy 583.685 Jz 583.685 orb 3 to orb 3 over [0 -1 0]
bond 45: Jx 583.686 Jy 583.686 Jz 583.686 orb 0 to orb 0 over [0 1 0]
bond 46: Jx 583.680 Jy 583.680 Jz 583.680 orb 2 to orb 2 over [0 1 0]
bond 47: Jx 583.685 Jy 583.685 Jz 583.685 orb 3 to orb 3 over [0 1 0]

Temperature scanning region:
Tmin 200 Tmax 1000 nT 100
Mesurement:
mesure the correlation function between orb0 and orb0 over [0 0 0]
Sweeps for thermalization and statistics, and relaxiation step for each sweep:
80000 640000 0
Dipole long range correction:
alpha 0.0
Field scanning region:
Hmin 0 Hmax 0.1 nH 1
Distribution output frame: 0
OrbGroup: 1
XAxis type:
T
Model type:
Heisenberg
Algorithm:
Wolff
Ncores:
4
设置了这样的反铁磁参数,最后运行报错,IndexError: list index out of range 哪个超出了范围。。

mcsolver使用问题

作者您好!
我在我们课题组服务器的CentOS Linux release 7.9.2009系统上使用anaconda环境用pip show mcsolver安装mcsolver后算官网给的例题算了5个多小时都没出数据,请问是我安装的mcsolver版本与例题对应的版本不相符还是我系统的问题?

例题网站
https://github.com/golddoushi/mcsolver/tree/master/samples

版本信息
(base) [chris@node05 sim_XY]$ pip show mcsolver
Name: mcsolver
Version: 2.3.0
Summary: A user friendly program to do Monte Carlo sims for magnetic systems
Home-page: https://github.com/golddoushi/mcsolver
Author: Liang Liu
Author-email: [email protected]
License: UNKNOWN
Location: /home/chris/anaconda3/lib/python3.9/site-packages
Requires:
Required-by:

如何绘制2D的skymion图?

老师您好,我在您给的例子中看到了关于skymion的计算,但我不知道该如何通过结果文件绘制相应的2D图像,因为我目前能得到的文件只有spinDotspin.txt 和result.txt,这两个文件似乎并没有每个点的自旋排布信息,请问老师是需要添加什么参数才能得到位置自旋排布相关的信息?

动态库

老师,您好!
用python3.9用mcsolver最新版本出不了数据是加载动态库的问题,一直卡在这个地方不动了,不知道什么原因?

(base) [chris@node05 sim_XY]$ python sim_XYmodel_under_Linux.py
loading dynamic library in /home/chris/anaconda3/lib/python3.9/site-packages/mcsolver/lib/_xylib.cpython-39-x86_64-linux-gnu.so

XY模型计算报错

您好,在尝试使用您的软件计算 XY 模型的磁有序温度。下载了最新的安装包,使用 samples 中的 Square_XY_isotropic 进行测试,使用 4 核心计算时,输出正常,但是将核心数增大到 8 以后,计算报错。错误信息如下:

================
loading dynamic library in /public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/xylib.so
loading dynamic library in /public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/xylib.so
loading dynamic library in /public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/xylib.so
loading dynamic library in /public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/xylib.so
loading dynamic library in /public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/xylib.so
loading dynamic library in /public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/xylib.so
loading dynamic library in /public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/xylib.so
loading dynamic library in /public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/xylib.so
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/public/home/Pwudx/anaconda3/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/win.py", line 28, in startMCForOn
spin_i, spin_j, spin_ij, autoCorr, E, E2, U4=mcslave.mainLoopViaCLib_On(nsweep=nsweep,nthermal=nthermal,ninterval=ninterval,algo=algorithm,On=On)
File "/public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/mcMain.py", line 326, in mainLoopViaCLib_On
mylib=CDLL(dll_path)
File "/public/home/Pwudx/anaconda3/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: /public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/xylib.so: cannot map zero-fill pages: Cannot allocate memory
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "sim_XYmodel_under_Linux.py", line 3, in
mcsolver.loadMC("./Square_XY_isotropic")
File "/public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/init.py", line 9, in loadMC
win.startSimulation(updateGUI=False,rpath=rpath)
File "/public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/win.py", line 124, in startSimulation
for result in pool.imap_unordered(startMCForOn,paramPack_tmp):
File "/public/home/Pwudx/anaconda3/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
OSError: /public/home/Pwudx/anaconda3/lib/python3.6/site-packages/mcsolver/xylib.so: cannot map zero-fill pages: Cannot allocate memory

其他信息:

  1. 为了提高测试速度,将超胞大小降为了 16 16 1,thermalization 和 relaxiation 步数降为了 40000 和 80000。
  2. 用了 anoconda3 部署环境

感谢您的耐心回复。

多类型原子时,Tc模拟出现错误

老师您好,我在尝试两层不同类型的2D材料磁性Tc模拟的时候,计算得到的热容是发散的,老师您可以帮我看看是什么设置出现了问题吗,谢谢老师。
参数设置如下:
This is mcsolver's save file, version: 3.0
Lattice:
1.000000000 0.000000000 0.000000000
-0.500000000 0.866000000 0.000000000
0.000000000 0.000000000 1.000000000
Supercell used in MC simulations:
30 30 1
Orbitals in cell:
2
Positions, initial spin states and onsite-anisotropy of every orbital:
orb 0: type 0 spin 0.435 pos [0.000000000 0.000000000 0.400000000] Dx 0.000000000 Dy 0.000000000 Dz 5.6 h 0.000000000
orb 1: type 0 spin 0.37 pos [0.333333333 0.666666667 0.500000000] Dx 0.000000000 Dy 0.000000000 Dz 5.6 h 0.000000000
Bonds:
17
id, source, target, overLat, exchange matrix elements of each bond:
bond 0: Jx -1494.300000000 Jy -1494.300000000 Jz -1494.300000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [0 1 0]
bond 1: Jx -1494.300000000 Jy -1494.300000000 Jz -1494.300000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [1 1 0]
bond 2: Jx -1494.300000000 Jy -1494.300000000 Jz -1494.300000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [1 0 0]
bond 3: Jx -1494.300000000 Jy -1494.300000000 Jz -1494.300000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [0 -1 0]
bond 4: Jx -1494.300000000 Jy -1494.300000000 Jz -1494.300000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [-1 -1 0]
bond 5: Jx -1494.300000000 Jy -1494.300000000 Jz -1494.300000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [-1 0 0]
bond 6: Jx -1302.800000000 Jy -1302.800000000 Jz -1302.800000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [0 1 0]
bond 7: Jx -1302.800000000 Jy -1302.800000000 Jz -1302.8300000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [1 1 0]
bond 8: Jx -1302.800000000 Jy -1302.800000000 Jz -1302.800000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [1 0 0]
bond 9: Jx -1302.800000000 Jy -1302.800000000 Jz -1302.800000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [0 -1 0]
bond 10: Jx -1302.800000000 Jy -1302.800000000 Jz -1302.800000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [-1 -1 0]
bond 11: Jx -1302.800000000 Jy -1302.800000000 Jz -1302.800000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [-1 0 0]
bond 12: Jx 732.80 Jy 732.8 Jz 732.8 Jxy 0 Jxz 0 Jyz 0 Jyx 0 Jzx 0 Jzy 0 orb 0 to orb 1 over [0 0 0]
bond 13: Jx 732.80 Jy 732.8 Jz 732.8 Jxy 0 Jxz 0 Jyz 0 Jyx 0 Jzx 0 Jzy 0 orb 0 to orb 1 over [0 -1 0]
bond 14: Jx 732.80 Jy 732.8 Jz 732.8 Jxy 0 Jxz 0 Jyz 0 Jyx 0 Jzx 0 Jzy 0 orb 0 to orb 1 over [-1 -1 0]
bond 15: Jx 732.80 Jy 732.8 Jz 732.8 Jxy 0 Jxz 0 Jyz 0 Jyx 0 Jzx 0 Jzy 0 orb 1 to orb 0 over [0 1 0]
bond 16: Jx 732.80 Jy 732.8 Jz 732.8 Jxy 0 Jxz 0 Jyz 0 Jyx 0 Jzx 0 Jzy 0 orb 1 to orb 0 over [1 1 0]
Temperature scanning region:
Tmin 0.900000000 Tmax 800.000000000 nT 160
Field scanning region (in unit 1.48872 T, only if Kelvin and uB is used for energy and spin):
Hmin 0.000000000 Hmax 0.100000000 nH 1
Dipole long-range coupling:
alpha 0.000000
Measurement:
measure the correlation function between orb0 and orb0 over [0 0 0]
Supergroup
OrbGroup:1
Supergroup
group0 orb0-orb0
#group1 orb1-orb1

  Topological section      <<<

LocalCircuit per cell: 0 (set to 0 to skip the calc. for topo. Q)

End of Topological section <<<
Distribution output frame: 0
Sweeps for thermalization and statistics, and relaxiation step for each sweep:
50000 100000 1
XAxis type:
T
Model type:
Heisenberg
Algorithm:
Wolff
Ncores:
10

nFrame设置问题

老师您好,我想请教一下nFrame的设置问题。如果说我想得到平衡状态的spin构型,应该设置多少合适呢?或者说如果我设置nFrame=1,得到的是所谓平衡状态的spin构型吗

参数设置

您好,请教一下 对于 Heisenberg model 是不是一定要设 Single-ion anisotropy

对于一个特定的晶体模型怎么得到这个参数呢,通过DFT软件的计算结果能不能求?

继续上一问题2

老师,您好!
我又把最新版安装了一遍,现在发现出不了数据的原因是python版本的问题,python3.8可以出一部分数据然后卡住,python3.9是完全卡住,老师请您帮忙看看是什么原因?

(base) [hpc192201004@ln03 samples]$ ls
CrI3With2NNCoupling sim_XYmodel_under_Linux.py sim_XYmodel_under_Windows.py Square_XY_isotropic
(base) [hpc192201004@ln03 samples]$ python sim_XYmodel_under_Linux.py
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
1.029 0.000 0.608 0.608 0.608 0.001 0.001 0.001 0.547 0.547 1.000 0.299703 -1.299 1.693 0.925 1.000 0.418 -1.420 2.037
0.986 0.000 0.653 0.653 0.653 -0.004 -0.004 -0.004 0.588 0.588 1.000 0.345648 -1.354 1.838 0.954 1.000 0.470 -1.495 2.250
0.943 0.000 0.687 0.687 0.687 0.003 0.003 0.003 0.619 0.619 1.000 0.383669 -1.401 1.967 0.970 1.000 0.510 -1.551 2.416
0.900 0.000 0.714 0.714 0.714 0.003 0.003 0.003 0.643 0.643 1.000 0.413906 -1.443 2.087 0.979 1.000 0.540 -1.598 2.562
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
1.200 0.000 0.361 0.361 0.361 0.002 0.002 0.002 0.325 0.325 1.000 0.105591 -1.058 1.127 0.687 1.000 0.163 -1.030 1.093

(base) [hpc192201004@ln03 samples]$ ls
CrI3With2NNCoupling sim_XYmodel_under_Linux.py sim_XYmodel_under_Windows.py Square_XY_isotropic
(base) [hpc192201004@ln03 samples]$ python sim_XYmodel_under_Linux.py
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
1.029 0.000 0.608 0.608 0.608 0.001 0.001 0.001 0.547 0.547 1.000 0.299703 -1.299 1.693 0.925 1.000 0.418 -1.420 2.037
0.986 0.000 0.653 0.653 0.653 -0.004 -0.004 -0.004 0.588 0.588 1.000 0.345648 -1.354 1.838 0.954 1.000 0.470 -1.495 2.250
0.943 0.000 0.687 0.687 0.687 0.003 0.003 0.003 0.619 0.619 1.000 0.383669 -1.401 1.967 0.970 1.000 0.510 -1.551 2.416
0.900 0.000 0.714 0.714 0.714 0.003 0.003 0.003 0.643 0.643 1.000 0.413906 -1.443 2.087 0.979 1.000 0.540 -1.598 2.562
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
loading dynamic library in /public/home/hpc192201004/.local/lib/python3.8/site-packages/mcsolver/lib/_xylib.cpython-38-x86_64-linux-gnu.so
1.200 0.000 0.361 0.361 0.361 0.002 0.002 0.002 0.325 0.325 1.000 0.105591 -1.058 1.127 0.687 1.000 0.163 -1.030 1.093

三维体系模拟

刘老师您好!
[我用Mcsolver模拟一个三维体系的居里温度,格点为323232,原胞内两个orbital。看您之前关于超大晶胞的模拟问题有如下回复“目前发布的软件吃不下150x150x1的模型,建议尺寸设置在100x100x1以下也就是总共磁矩不要过万”,这样的话是不是三维的323232也不能模拟?

此外还有一个问题,我的原胞中两个磁性原子分别占据立方体顶角及体心位置,仅考虑第一近邻。如下输入文件中orbital及bond设置是否有问题?我模拟的结果磁矩平均值一直震荡。选用wolff算法,tau设置为1是否合适?
Lattice:
1.000000000 0.000000000 0.000000000
0.000000000 1.000000000 0.000000000
0.000000000 0.000000000 1.000000000
Supercell used in MC simulations:
32 32 32
Orbitals in cell:
2
Positions, initial spin states and onsite-anisotropy of every orbital:
orb 0: type 0 spin 1.000000000 pos [0.000000000 0.000000000 0.000000000] Dx 0.000000000 Dy 0.000000000 Dz 0.000000000 h 0.000000000
orb 1: type 0 spin 1.000000000 pos [0.500000000 0.500000000 0.500000000] Dx 0.000000000 Dy 0.000000000 Dz 0.000000000 h 0.000000000
Bonds:
1
id, source, target, overLat, exchange matrix elements of each bond:
bond 0: Jx -101.4800000 Jy -101.4800000 Jz -101.4800000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [0 0 0]
Temperature scanning region:
Tmin 10.000000000 Tmax 630.000000000 nT 32
Field scanning region:
Hmin 0.000000000 Hmax 0.100000000 nH 1
Dipole long-range coupling:
alpha 0.000000
Measurement:
measure the correlation function between orb0 and orb0 over [0 0 0]
Supergroup
OrbGroup:1
Supergroup
group0 orb0-orb0
Distribution output frame: 0
Sweeps for thermalization and statistics, and relaxiation step for each sweep:
50000000 10000000 1
XAxis type:
T
Model type:
Heisenberg
Algorithm:
Wolff
Ncores:
32

模型参数设置问题

@golddoushi
尊敬的刘老师,您好!我们按照您提供的宝贵意见重复了二维铁磁半导体CrI3的各向异性海森堡模型蒙特卡洛模拟,效果非常好!非常感谢您提供的帮助!最近我们在进行二维铁磁金属材料的海森堡模型蒙特卡洛模拟时,遇到了一些困惑:
1.我们在通过不同方向的ΔE算Jx,Jy,Jz,即非共线计算反铁磁AFM+SOC时,它是不收敛的,只能收敛到10-3,这可能是因为它本身是金属材料难收敛。在不考虑SOC计算FM、AFM它可以收敛,能求出J,但是二维各向异性海森堡模型又必须考虑SOC,实属困扰。
2.上述收敛问题我们会努力调试,如果实在不行,我们的二维材料可能只能用Ising模型。我想请问一下老师,如果用Ising模型,是否直接令不虑SOC算的J等于mcsolver程序里的Jz,同时Jx=Jy=0即可?
3.海森堡模型或Ising模型,tau设置为0,采用Metroplis算法(感觉这样计算效率很快)可以吗?
希望老师能百忙之中抽空回复!万分感谢!!

参数问题

尊敬的刘老师,您好!首先非常感谢您制作的优良软件,目前在学习使用,有一个疑惑,想请教您,例如:bond 0: Jz -19.49182553875 Jx -18.47237479 Jy -18.47237479 0 0 0 0 0 0 orb 0 to orb 1 over [0 0 0]或[-1 0 0]或[0 1 0],之中的"over [0 0 0]或[-1 0 0]或[0 1 0]"是什么含义?
打扰您了,非常感谢您!

继续上一个问题

刘老师,您好! 最新版本实在是出不了数据,我将其换成了1.2.0版本,但又报错了

(base) [chris@node05 CrI3]$ python CrI3.py
unknown file or version (only support v1.2)
Traceback (most recent call last):
File "/home/chris/mcsolver/CrI3/CrI3.py", line 3, in
mcsolver.loadMC("./CrI3With2NNCoupling")
File "/home/chris/anaconda3/lib/python3.9/site-packages/mcsolver/init.py", line 9, in loadMC
win.startSimulation(updateGUI=False,rpath=rpath)
File "/home/chris/anaconda3/lib/python3.9/site-packages/mcsolver/win.py", line 40, in startSimulation
TList=np.linspace(io.T0,io.T1,io.nT)
AttributeError: module 'fileio' has no attribute 'T0'

不同版本低温热容计算结果疑问

老师您好,我分别使用v2.3和v3.0两个版本,使用相同参数计算,发现v2.3版本在接近0K时热容接近0,v3.0版本在接近0K时热容接近1。按照固体物理,低温时热容应该接近0,请问是什么原因造成高版本的计算结果与0有偏差呢?

以下部分是v2.3版本的计算参数。v3.0的计算参数与之完全相同,包括nthermal,nsweep,tau等
This is mcsolver's save file, version: 2.3
Lattice:
1.000000000 0.000000000 0.000000000
0.000000000 1.000000000 0.000000000
0.000000000 0.000000000 1.000000000
Supercell used in MC simulations:
16 16 1
Orbitals in cell:
2
Positions, initial spin states and onsite-anisotropy of every orbital:
orb 0: type 0 spin 1.000000000 pos [0.000000000 0.000000000 0.000000000] Dx 0.000000000 Dy 0.000000000 Dz 4.635500000 h 0.000000000
orb 1: type 0 spin 1.000000000 pos [0.555555556 0.555555556 0.000000000] Dx 0.000000000 Dy 0.000000000 Dz 4.635500000 h 0.000000000
Bonds:
8
id, source, target, overLat, exchange matrix elements of each bond:
bond 0: Jx -824.389630000 Jy -824.389630000 Jz -824.389630000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [0 0 0]
bond 1: Jx -824.389630000 Jy -824.389630000 Jz -824.389630000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [-1 0 0]
bond 2: Jx -824.389630000 Jy -824.389630000 Jz -824.389630000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [0 -1 0]
bond 3: Jx -824.389630000 Jy -824.389630000 Jz -824.389630000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [-1 -1 0]
bond 4: Jx -455.199943000 Jy -455.199943000 Jz -455.199943000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [1 0 0]
bond 5: Jx -455.199943000 Jy -455.199943000 Jz -455.199943000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [0 1 0]
bond 6: Jx -455.199943000 Jy -455.199943000 Jz -455.199943000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [1 0 0]
bond 7: Jx -455.199943000 Jy -455.199943000 Jz -455.199943000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [0 1 0]
Temperature scanning region:
Tmin 2.000000000 Tmax 10.000000000 nT 5
Field scanning region:
Hmin 0.000000000 Hmax 0.100000000 nH 1
Dipole long-range coupling:
alpha 0.000000
Measurement:
measure the correlation function between orb0 and orb0 over [0 0 0]
Supergroup
OrbGroup:1
Supergroup
group0 orb0-orb0
Distribution output frame: 0
Sweeps for thermalization and statistics, and relaxiation step for each sweep:
120000 1200000 0
XAxis type:
T
Model type:
Heisenberg
Algorithm:
Metropolis
Ncores:
8

低温时的热容问题

您好,感谢您一直更新软件,最新的版本发现一个问题:在测试CrI3的海森堡模型时,当温度低于25K,capacity反而会突然增大而不是趋于常数 ,不知道是什么原因造成的?

sample/CrI3With2NNCoupling里J值的疑问

感谢您分享的程序,有个疑问请教:最早JMCC文献里单层CrI3的J1=-2.86 meV,转换成温度是-33.14 K,但程序里默认的CrI3的J1=-16.6 K,为何这里需要除以2?

构建大的超晶胞模拟,磁矩随温度的演化是离散的,没有演化的规律。

您好,老师:
首先很感谢您写了这么好用的软件模拟居里温度。在使用mcsolver的过程中,我遇到了一个新问题。当构建30x30x1超晶胞的时候,模拟出来的结果是有规律的,能获得想要的距离温度。然而,同样的参数,当采用150x150x1这么大的超晶胞的时候,模拟出来的居里温度是离散。 不知道哪里设置有问题?麻烦老师有时间帮忙看看。祝老师身体健康,一切顺利!
以下是我的输入文件
This is mcsolver's save file, version: 3.0
Lattice:
1.000000000 0.000000000 0.000000000
0.000000000 2.000000000 0.000000000
0.000000000 0.000000000 1.000000000
Supercell used in MC simulations:
30 30 1
Orbitals in cell:
2
Positions, initial spin states and onsite-anisotropy of every orbital:
orb 0: type 0 spin 2.000000000 pos [0.500000000 0.166666000 0.000000000] Dx 0.000000000 Dy 0.000000000 Dz -0.012000000 h 0.000000000
orb 1: type 0 spin 2.000000000 pos [0.000000000 0.666666667 0.000000000] Dx 0.000000000 Dy 0.000000000 Dz -0.012000000 h 0.000000000
Bonds:
12
id, source, target, overLat, exchange matrix elements of each bond:
bond 0: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [1 0 0]
bond 1: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [1 0 0]
bond 2: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 0 over [0 1 0]
bond 3: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [1 0 0]
bond 4: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [0 0 0]
bond 5: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 0 over [-1 1 0]
bond 6: Jx 10.140000000 Jy 10.140000000 Jz 10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [0 1 0]
bond 7: Jx 10.140000000 Jy 10.140000000 Jz 10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [2 -1 0]
bond 8: Jx 10.140000000 Jy 10.140000000 Jz 10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [-1 0 0]
bond 9: Jx 10.140000000 Jy 10.140000000 Jz 10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [-1 -1 0]
bond 10: Jx 10.140000000 Jy 10.140000000 Jz 10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [2 0 0]
bond 11: Jx 10.140000000 Jy 10.140000000 Jz 10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [0 2 0]
Temperature scanning region:
Tmin 400.000000000 Tmax 800.000000000 nT 80
Field scanning region (in unit 1.48872 T, only if Kelvin and uB is used for energy and spin):
Hmin 0.000000000 Hmax 0.100000000 nH 1
Dipole long-range coupling:
alpha 0.000000
Measurement:
measure the correlation function between orb0 and orb0 over [0 0 0]
Supergroup
OrbGroup:1
Supergroup
group0 orb0-orb0

  Topological section      <<<

LocalCircuit per cell: 0 (set to 0 to skip the calc. for topo. Q)

End of Topological section <<<
Distribution output frame: 0
Sweeps for thermalization and statistics, and relaxiation step for each sweep:
80000 640000 0
XAxis type:
T
Model type:
Heisenberg
Algorithm:
Metropolis
Ncores:
40

奈尔温度模拟设置

您好,非常感谢您提供这么好用的软件。想请教一下,对于反铁磁材料奈尔温度的模拟,应该怎么设置参数?
似乎单纯更改格点的磁矩正负值和 J 的正负值,不能给出合理的结果。

It could not run in ubuntu linux18.04

what the latest version of it?It is 2.0.1 or 2.3,the code about fileversion has disturb my mcslover in linux version.I could not succeed in running the samples!

比热容的单位

刘老师您好,我最近计算了一个反铁磁材料的比热容随温度的变化曲线,想问一下程序输出的数据中比热容的单位是什么呢?我看到您关于二维FeTe2 的论文中比热容并没有给出单位,是什么原因呢?

请问哈密顿量J前面的系数问题

刘老师您好!
关于哈密顿量,我看程序的可视化界面上写的是H=∑JSmSn,而文章(doi:10.1021/acs.jpclett.0c01911)中则写的是H=-(1/2)∑JSiSj。
后者文章中式子所得的J,已经考虑到了求和过程中相互作用被重复计算的问题。那么程序的输入文件是直接使用这个J,还是要乘以1/2再作为参数输入呢?

关于capacity的单位问题

您好!我看到新版更正了capacity的scale的尺度,最后的文件里面单位显示为(K/K),是不是换算成常用的meV/T,要除以11.58875呢?

请问输出文件result中,每一列都是什么?

请问计算出来的输出信息都是什么

  1. Si、Sj是不是磁化率?
  2. capacity_per_orb这一列是比热的信息吗?
  3. 做居里温度时,我们是不是只需要取温度,Si和capacity_per_orb这三列直接作图就可以了,不需进行其他变换?

J值符号对计算过程的影响

刘老师您好,请问通过映射不同自旋构型能量求解出的J值符号和基态磁构型不一致(如:次近邻为铁磁态,但J值却为正)时,输入文件中应该如何设置,或需注意什么?
因为我在计算时遇到这个问题,按照计算结果填写时,一直算不出结果

关于比热的数值

老师,您好。非常感谢老师开发这样一个好用的软件,关于这个软件,我在使用的时候,遇到了两个问题:

  1. 我用了两个类似的输入文件,两个文件只有初末温度及插点数不一样,计算出来的比热的数值会不一样,有时会有一个数量级的差别。并且,有时候计算出来的数值范围会到小数点后4位如(0.0000 - 0.0016)。请问这两种现像是正常的吗?

考虑DM相互作用

刘老师您好,很感谢您为大家提供了一个可以模拟磁转变温度的软件。
请问在mcsolver程序中该如何考虑DM相互作用呢?需要额外配置参量嘛?

版本选择和参数设置

@golddoushi 尊敬的老师您好!非常感谢您提供这么好用的软件!我刚开始学习您的软件,有许多地方不太懂,真的非常抱歉打扰您啦!这是我在用海森堡模型模拟二维方形铁磁材料居里温度时遇到以下问题:
1.我使用的是您的第二个版本(mcsolver 20.05.21)我需要使用最新版本(mcsolver 21.03.08)吗?
2.我的材料的易磁轴是面外,请问用海森堡模型可以忽略磁各向异性吗?我平时只算了一个J,是否只输入Jz一个值,其他都设置为0就可以了?还是说海森堡模型的这些J的分量也都要有数值吗?我再去想一想Jx,Jz怎么求。如果我的材料易磁轴在面内,不考虑磁各项异性影响大吗?
3.我用VASP计算了不加SOC的超胞铁磁和反铁磁的能量,求出了ΔE,在求J的时,我发现有的文献公式说J前面有1/2,有的文献却说没有,文献中S的取值也各不相同,有的文献取单个原子磁矩,有的取3/2,有的直接取1。我比较笨,有点懵了,我再想想。有文献在CrI3做图时磁矩直接用单个Cr的磁矩3随温度变化,我们的mcslover提供例子是单个Cr用1.5,请问老师,这里S和J只是单纯的倍数关系吗?我的材料单个磁性原子是4,我应该怎么设置ID 0的spin更加准确呢?
4.我重复了一些其他文献最近邻J,我得到的居里温度和文献有一些差别,可能因为VASP参数设置不一样,或者大家用的蒙特卡洛模拟器不一样。我设置初始温度为0.1K,在低温范围的比热有时会有凸起,这是因为我步数设置少还是某些材料体系本身导致的,还是我用的不是最新版本的mcslover?
感谢老师百忙之中抽时间看我的留言!我才疏学浅,今后一定好好学习!感谢老师提供如此棒的软件!谢谢老师!

在Linux下运行sim_XYmodel_under_Linux.py出现版本问题

您好,打扰您了!
我最近在安装完成mcsolver之后,运行例程文件 执行python sim_XYmodel_under_Linux.py 之后出现了错误:
unknown file or version (only support v2.3)
因为我发现Square_XY_isotropic和CrI3With2NNCoupling都显示是2.2版本,无法被新版本的mcsolver运行。v2.3 比 v2.2版本的文件需要添加或修改哪些参数和内容呢?
十分感谢!

相同的交换参数在新版本mcsolver3.0模拟得不到有规律的结果。

您好,作者;
我采用了我的体系获得的交换参数,在mcsolver1.2版本模拟可以得到合理的结果,但是新版本mcsolver3.0在linux系统上模拟获得的磁矩与温度的关系是离散化的,没有演变的规律。请问是什么原因造成的?以
下贴出了我的输入文件,麻烦您帮忙解答一下,谢谢。
This is mcsolver's save file, version: 3.0
Lattice:
1.000000000 0.000000000 0.000000000
0.000000000 2.000000000 0.000000000
0.000000000 0.000000000 1.000000000
Supercell used in MC simulations:
30 30 1
Orbitals in cell:
2
Positions, initial spin states and onsite-anisotropy of every orbital:
orb 0: type 0 spin 2.000000000 pos [0.500000000 0.166666000 0.000000000] Dx 0.000000000 Dy 0.000000000 Dz -0.012000000 h 0.000000000
orb 1: type 0 spin 2.000000000 pos [0.000000000 0.666666667 0.000000000] Dx 0.000000000 Dy 0.000000000 Dz -0.012000000 h 0.000000000
Bonds:
11
id, source, target, overLat, exchange matrix elements of each bond:
bond 0: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [1 0 0]
bond 1: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [1 0 0]
bond 2: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 0 over [0 1 0]
bond 3: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [1 0 0]
bond 4: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [0 0 0]
bond 5: Jx -159.210000000 Jy -159.210000000 Jz -160.620000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 0 over [-1 1 0]
bond 6: Jx -10.140000000 Jy -10.140000000 Jz -10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [0 1 0]
bond 7: Jx -10.140000000 Jy -10.140000000 Jz -10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [2 -1 0]
bond 8: Jx -10.140000000 Jy -10.140000000 Jz -10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [-1 0 0]
bond 9: Jx -10.140000000 Jy -10.140000000 Jz -10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [-1 -1 0]
bond 10: Jx -10.140000000 Jy -10.140000000 Jz -10.610000000 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [2 0 0]
Temperature scanning region:
Tmin 400.000000000 Tmax 1000.000000000 nT 50
Field scanning region (in unit 1.48872 T, only if Kelvin and uB is used for energy and spin):
Hmin 0.000000000 Hmax 0.100000000 nH 1
Dipole long-range coupling:
alpha 0.000000
Measurement:
measure the correlation function between orb0 and orb0 over [0 0 0]
Supergroup
OrbGroup:1
Supergroup
group0 orb0-orb0

  Topological section      <<<

LocalCircuit per cell: 0 (set to 0 to skip the calc. for topo. Q)

End of Topological section <<<
Distribution output frame: 0
Sweeps for thermalization and statistics, and relaxiation step for each sweep:
80000 640000 1
XAxis type:
T
Model type:
Heisenberg
Algorithm:
Metropolis
Ncores:
40

海森堡模型中localupdate 函数

老师,您好,我想问一下在海森堡模型中localupdate函数计算transspin时候,为啥没有用S_after-S_before, 而是用的是一个s1n函数乘以新的方向向量,我简单计算了一下发现一般情况下二者并不相等,这是有什么说法吗?

期待您的回复

关于海森堡模型的参数问题

老师您好,我想重复一些文章的工作,他们用的海森堡模型,但是他们一般只给了参数J1,J2和MAE,我不知道用什么办法可以得到Jx,Jy,Jz来进行重复他们的工作。请问是他们少给了数据,我需要自己通过vasp或者其他软件去算Jx,Jy,Jz?还是说可以通过他们的参数得到Jx,Jy,Jz呢?我不是很懂这方面。

orb 0 to orb 2 over [0 1 0]参数不知道该如何设置

我的单胞结构中只有一个磁原子,而Crl3中有两个,所以磁交换作用方向不知道该如何设置。老师。您有空可以回个消息吗。
9 1
10 Positions, initial spin states and onsite-anisotropy of every orbital:
11 orb 0: type 0 spin 1.00000000 pos [0.333333333 0.666666667 0.000000000] Dz 67.2176251875 Dx 0.000000000 Dy 0.000000000
12 Bonds:
13 6
14 id, source, target, overLat, Jz, Jx, Jy of each bond:
15 bond 0: Jz 762.540000 Jx 762.540000 Jy 757.9000000 0 0 0 0 0 0 orb 0 to orb 0 over [1 0 0]
16 bond 1: Jz 762.540000 Jx 762.540000 Jy 757.9000000 0 0 0 0 0 0 orb 0 to orb 0 over [0 1 0]
17 bond 3: Jz 762.540000 Jx 762.540000 Jy 757.9000000 0 0 0 0 0 0 orb 0 to orb 0 over [1 1 0]
18 bond 4: Jz 762.540000 Jx 762.540000 Jy 757.9000000 0 0 0 0 0 0 orb 0 to orb 0 over [-1 0 0]
19 bond 5: Jz 762.540000 Jx 762.540000 Jy 757.9000000 0 0 0 0 0 0 orb 0 to orb 0 over [0 -1 0]
20 bond 6: Jz 762.540000 Jx 762.540000 Jy 757.9000000 0 0 0 0 0 0 orb 0 to orb 0 over [-1 -1 0]

在Linux下运行CrI3With2NNCoupling出现版本问题

您好,再次打扰您了,最近我在Linux下运行CrI3With2NNCoupling时会出现unknown file or version (only support v2.2),运行Square_XY_isotropic则可以正常运行。然后发现CrI3With2NNCoupling文件是version2.0,请问v2.2的参数文件格式相较v2.0多哪些设置。万分感谢!

结果得到的图像不对

老师,您好!
我计算了异质结构,考虑了层内最近邻和次近邻以及层间最近邻,所以最下面有一层磁性原子没有参与耦合就没有设置,是个反铁磁结构,但是计算了好几遍出来的结果就是不对,不知道问题出现在哪里,寻求老师帮助。下面是我的相关参数
This is mcsolver's save file, version: 3.0
Lattice:
1.000000000 0.000000000 0.000000000
-0.500000000 0.870000000 0.000000000
0.000000000 0.000000000 1.000000000
Supercell used in MC simulations:
20 20 1
Orbitals in cell:
3
Positions, initial spin states and onsite-anisotropy of every orbital:
orb 0: type 0 spin 2.000000000 pos [0.000000000 0.000000000 0.630990000] Dx 0.000000000 Dy 0.000000000 Dz -1.617968000 h 0.000000000
orb 1: type 0 spin -2.000000000 pos [0.666670000 0.333330000 0.735660000] Dx 0.000000000 Dy 0.000000000 Dz -1.617968000 h 0.000000000
orb 2: type 0 spin -2.000000000 pos [0.333330000 0.666670000 0.407730000] Dx 0.000000000 Dy 0.000000000 Dz -1.617968000 h 0.000000000
Bonds:
12
id, source, target, overLat, exchange matrix elements of each bond:
bond 0: Jx 232.404064167 Jy 232.404056667 Jz 233.315905833 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [0 0 0]
bond 1: Jx 232.404064167 Jy 232.404056667 Jz 233.315905833 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [-1 0 0]
bond 2: Jx 232.404064167 Jy 232.404056667 Jz 233.315905833 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 1 over [-1 -1 0]
bond 3: Jx 55.650612500 Jy 55.621897500 Jz 55.349792500 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [1 1 0]
bond 4: Jx 55.650612500 Jy 55.621897500 Jz 55.349792500 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [1 0 0]
bond 5: Jx 55.650612500 Jy 55.621897500 Jz 55.349792500 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 0 over [0 1 0]
bond 6: Jx 55.650612500 Jy 55.621897500 Jz 55.349792500 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [1 0 0]
bond 7: Jx 55.650612500 Jy 55.621897500 Jz 55.349792500 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [1 1 0]
bond 8: Jx 55.650612500 Jy 55.621897500 Jz 55.349792500 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 1 to orb 1 over [0 1 0]
bond 9: Jx -0.473410833 Jy -0.473410833 Jz -0.470702500 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 2 over [0 0 0]
bond 10: Jx -0.473410833 Jy -0.473410833 Jz -0.470702500 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 2 over [0 -1 0]
bond 11: Jx -0.473410833 Jy -0.473410833 Jz -0.470702500 Jxy 0.000000000 Jxz 0.000000000 Jyz 0.000000000 Jyx 0.000000000 Jzx 0.000000000 Jzy 0.000000000 orb 0 to orb 2 over [-1 -1 0]
Temperature scanning region:
Tmin 100.000000000 Tmax 1000.000000000 nT 900
Field scanning region (in unit 1.48872 T, only if Kelvin and uB is used for energy and spin):
Hmin 0.000000000 Hmax 0.100000000 nH 1
Dipole long-range coupling:
alpha 0.000000
Measurement:
measure the correlation function between orb0 and orb0 over [0 0 0]
Supergroup
OrbGroup:1
Supergroup
group0 orb0-orb0

  Topological section      <<<

LocalCircuit per cell: 0 (set to 0 to skip the calc. for topo. Q)

End of Topological section <<<
Distribution output frame: 0
Sweeps for thermalization and statistics, and relaxiation step for each sweep:
40000 320000 0
XAxis type:
T
Model type:
Heisenberg
Algorithm:
Metropolis
Ncores:
4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.