3.2. DSQSS/DLA による反強磁性ハイゼンベルグダイマーのエネルギー計算¶
このチュートリアルでは,
DSQSS/DLA による計算は,
入力ファイルの準備
計算の実行
計算結果の解釈
の3段階に分かれます.
3.2.1. 入力ファイルの準備¶
DSQSS/DLA を実行するには,
パラメータファイル
格子定義ファイル
アルゴリズム定義ファイル
の3つの入力ファイルが必要です. そのため, まずはこれらの入力ファイルを作成します. そのためのユーティリティツールが dla_pre です. これは単一の入力ファイルから, DSQSS/DLA の入力ファイルを生成するPython スクリプトです. まず, dla_pre.py の入力ファイルとして, 次の内容を持つテキストファイル std.toml を準備します(sample/dla/01_spindimer/std.toml).
[hamiltonian]
model = "spin"
M = 1 # S=1/2
Jz = -1.0 # coupling constant, negative for AF
Jxy = -1.0 # coupling constant, negative for AF
h = 0.0 # magnetic field
[lattice]
lattice = "hypercubic" # hypercubic, periodic
dim = 1 # dimension
L = 2 # number of sites along each direction
bc = false # open boundary
[parameter]
beta = 100 # inverse temperature
nset = 5 # set of Monte Carlo sweeps
npre = 10 # MCSteps to estimate hyperparameter
ntherm = 10 # MCSweeps for thermalization
nmcs = 100 # MCSweeps for measurement
seed = 31415 # seed of RNG
このファイルを dla_pre.py に与えます.
$ dla_pre std.toml
この結果, パラメータファイル param.in, 格子定義ファイル lattice.xml, アルゴリズム定義ファイル algorithm.xml が生成されます。
3.2.2. 計算の実行¶
入力ファイルを作成したら, DSQSS/DLA による計算を実行します.
$ dla param.in
なお, 計算を実行するときにMPI を用いることで, 乱数並列計算が可能です.
$ mpiexec -np 4 dla param.in
乱数並列計算では並列数 (この例では4) だけ独立に計算が行われ, その分モンテカルロサンプル数が増えるために計算精度が向上します. [1]
3.2.3. 計算結果の解釈¶
計算結果は出力ファイル sample.log に書き出されます.
サイトあたりのエネルギーは ene
という名前で記されており, たとえば grep
コマンドで
$ grep ene sample.log
R ene = -3.74380000e-01 5.19493985e-03
と取得できます.
2つある数字はそれぞれ期待値と統計誤差です.
反強磁性ハイゼンベルグダイマーの基底状態でのサイトあたりエネルギーは
脚注