Skip to content

Commit

Permalink
Merge pull request #38 from MasakiYama/master
Browse files Browse the repository at this point in the history
日本語版マニュアルの誤植の修正
  • Loading branch information
k-yoshimi authored Nov 29, 2022
2 parents 341d643 + b39386a commit f3cfb89
Show file tree
Hide file tree
Showing 9 changed files with 453 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/en/dla/tutorial/spinchain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Before executing this script, ``source`` a configuring file ``dsqssvars-VERSION.

The result of :math:`S=1/2,1` will be written to ``xmzu_1.dat`` and ``xmzu_2.dat``, respectively (:numref:`fig_spinchain`).
The :math:`S=1/2` chain is gapless and so the magnetic susceptibility remains finite at absolute zero (note that in the simulation the finite size effect opens energy gap).
On the other hand the magnetic susceptibility of the :math:`S=1` chain drops to zero at finite temperature due to the spin gap.
On the other hand, the magnetic susceptibility of the :math:`S=1` chain drops to zero at finite temperature due to the spin gap.

.. figure:: ../../../image/dla/tutorial/spinchain.*
:name: fig_spinchain
Expand Down
226 changes: 226 additions & 0 deletions doc/en/dla/tutorial/standard_mode
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
Definition of models and lattices of antiferromagnetic Heisenberg dimers by standard mode of DSQSS/DLA
===============================================================

In this tutorial, we will consider a system in which an external magnetic field is applied to a :math:`S=1/2` antiferromagnetic Heisenberg dimer :math:`\mathcal{H}= \sum_{\langle i,j \rangle}-J_z S^z_i S^z_j -\frac{J_{xy}}{2}(S^+_i S^-_j +S^-_i S^+_j)-h\sum_i S^z_i ,~J_z<0, J_xy<0, h>0`
by calculating the approximate form of the lattice,
you learn how to use the standard mode of DSQSS/DLA.

The calculations in the standard mode of DSQSS/DLA are as follows

1. prepare an input file for simple mode,
2. create an input file for standard mode,
3. run the calculation.



Preparing the input file for simple mode
********************

To run DSQSS/DLA, you will need the simple mode file std.toml in TOML format with the following information

#. Hamiltonian Information,
#. Information on lattices,
#. Information on parameters such as inverse temperature and number of Monte Carlo steps.

Thus, the first step is to prepare this input file.
The file of antiferromagnetic Heisenberg dimer is available in the following location
(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

To this file, we add the effect of applying an external magnetic field in the z direction,
and set the lattice dimension and the number of sites to 2 and 4, respectively
::

[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.5 # magnetic field
[lattice]
lattice = "hypercubic" # hypercubic, periodic
dim = 2 # dimension
L = 4 # 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


Writing an input file for standard mode
**********

This file is given to dla_hamgen
::

$ dla_hamgen std.toml

As a result, a text file in TOML format, hamiltonian.toml,
is generated to describe the information of the site Hamiltonian and the many-body interaction.


Next, you give std.toml to dla_latgen
::

$ dla_latgen -t lattice.toml std.toml


As a result, a text file in TOML format, lattice.toml,
is generated to describe the information of the space using unit cells and basic translation vectors.


Running the calculation
****************

With lattice.toml as input file, you can create a gnuplot file lattice.plt::
::

$ dla_latgen -g lattice.plt lattice.toml

Giving lattce.plt to gnuplot will produce a two-dimensional schematic of the lattice::


.. figure:: ../../../image/dla/tutorial/2Dlattice.png
:name: fig_2Dlattice
:alt: Two-dimensional lattice

Schematic of the lattice of an antiferromagnetic Heisenberg spin chain in an external magnetic field in the z direction.



Writing lattice.dat and kpoints.dat
********************

The lattice.toml file defines the lattice information using unit cells and fundamental translation vectors,
while the lattice.dat file defines the lattice information using the number of sites and interactions between sites.
The lattice.dat file also can be generated using the simple mode file std.toml in TOML format.
You give std.toml to dla_latgen, which contains the effect of applying an external magnetic field in the z direction as used earlier
::

$ dla_latgen -o lattice.dat std.toml

As a result, you will get the lattice.dat file as follows
::

name
hypercubic

lattice
2 # dim
4 4 # size
0 0 # 0:open boundary, 1:periodic boundary
0 1.0 0.0 # latvec_0
1 0.0 1.0 # latvec_1

directions
2 # ndirections
# id, coords...
0 1.0 0.0
1 0.0 1.0

sites
16 # nsites
# id, type, coord...
0 0 0.0 0.0
1 0 1.0 0.0
2 0 2.0 0.0
3 0 3.0 0.0
4 0 0.0 1.0
5 0 1.0 1.0
6 0 2.0 1.0
7 0 3.0 1.0
8 0 0.0 2.0
9 0 1.0 2.0
10 0 2.0 2.0
11 0 3.0 2.0
12 0 0.0 3.0
13 0 1.0 3.0
14 0 2.0 3.0
15 0 3.0 3.0

interactions
24 # nints
# id, type, nbody, sites..., edge_flag, direction
0 0 2 0 1 0 0
1 0 2 0 4 0 1
2 1 2 1 2 0 0
3 2 2 1 5 0 1
4 3 2 2 3 0 0
5 2 2 2 6 0 1
6 0 2 3 7 0 1
7 2 2 4 5 0 0
8 1 2 4 8 0 1
9 4 2 5 6 0 0
10 4 2 5 9 0 1
11 5 2 6 7 0 0
12 4 2 6 10 0 1
13 1 2 7 11 0 1
14 2 2 8 9 0 0
15 3 2 8 12 0 1
16 4 2 9 10 0 0
17 5 2 9 13 0 1
18 5 2 10 11 0 0
19 5 2 10 14 0 1
20 3 2 11 15 0 1
21 0 2 12 13 0 0
22 1 2 13 14 0 0
23 3 2 14 15 0 0


Next, you can create kpoints.dat,
which is a text file that specifies the coefficients of the reciprocal grid vector expansion of the wavenumber vector.
You can specify the size by using -s. Please give the std.toml file to dla_wvgen -s ::

$ dla_wvgen -s "8 8" std.toml

As a result, you will get the following kpoints.dat file
::

dim
2

kpoints
4
0 0 0
1 0 4
2 4 0
3 4 4
















2 changes: 1 addition & 1 deletion doc/en/dsqss/about_dsqss.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ About DSQSS

Overview
****************
DSQSS is a program package for solving quantum many-body problems defined on lattices. It is based on the quantum Monte Carlo method in Feynman's path integral representation. It covers a broad range of problems written by flexible input files that define arbitrary unit cells in arbitrary dimensions, and arbitrary matrix elements of the interactions among arbitrary number of degrees of freedom.
DSQSS is a program package for solving quantum many-body problems defined on lattices. It is based on the quantum Monte Carlo method in Feynman's path integral representation. It covers a broad range of problems written by flexible input files that define arbitrary unit cells in arbitrary dimensions and arbitrary matrix elements of the interactions among arbitrary number of degrees of freedom.

For example, you can perform finite temperature calculation of XXZ spin model by specifying parameters such as dimension, size of lattice, anisotropic coupling constants, length of spin, strength of magnetic field, and temperature. You can calculate Bose-Hubbard model as well as quantum spin model. PMWA (Parallel Multi Worm Algorithm) suits for large-scale non-trivial parallel calculation by domain parallelization.

Expand Down
2 changes: 1 addition & 1 deletion doc/en/pmwa/tutorial/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

About DSQSS/PMWA
---------------------------
``DSQSS / PMWA`` is a numerical package of the world-line quantum Monte Carlo method with non-local updates algorithm for large-scale parallel computing. PMWA can treat :math:`S=1/2` quantum many-body system such as XXZ spin model, Heisenberg model, transverse Ising model model and hard-core boson system with large lattice sizes at finite temperatures. Basically, any physical quantities can be calculated within the statistical error. By default, the energy under a longitudinal worm source field, longitudinal magnetization, transverse magnetization, winding number, and imaginary time :math:`S^z S^z` spin correlation function are calculated.
``DSQSS / PMWA`` is a numerical package of the world-line quantum Monte Carlo method with non-local updates algorithm for large-scale parallel computing. PMWA can treat :math:`S=1/2` quantum many-body system such as XXZ spin model, Heisenberg model, transverse Ising model and hard-core boson system with large lattice sizes at finite temperatures. Basically, any physical quantities can be calculated within the statistical error. By default, the energy under a longitudinal worm source field, longitudinal magnetization, transverse magnetization, winding number, and imaginary time :math:`S^z S^z` spin correlation function are calculated.
4 changes: 2 additions & 2 deletions doc/en/pmwa/tutorial/lattgene.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ The parameters to be specified are as follows.

Examples of use are described below.

1. One-dimensional 8-sites chain, inverse temperature 10.0, definition of lattice file when division number is 1:
1. One-dimensional 8-sites chain, inverse temperature 10.0, the definition of lattice file when division number is 1:

``$ lattgene_P 1 8 10.0 1 1 0``

2. Two dimensional 4*4 sites lattice, reverse temperature 10.0, definition of lattice file when division number is 1:
2. Two-dimensional 4*4 sites lattice, reverse temperature 10.0, the definition of lattice file when division number is 1:

``$ lattgene_P 2 4 4 10.0 1 1 0``

Binary file added doc/image/dla/tutorial/2Dlattice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/jp/dla/tutorial/spindimer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ DSQSS/DLA を実行するには,

$ mpiexec -np 4 dla param.in

乱数並列計算では並列数 (この例では4) だけ独立に計算が行われ, その分モンテカルロサンプル数を増えるために計算精度が向上します. [#fn_ompi_macos]_
乱数並列計算では並列数 (この例では4) だけ独立に計算が行われ, その分モンテカルロサンプル数が増えるために計算精度が向上します. [#fn_ompi_macos]_


計算結果の解釈
Expand Down
Loading

0 comments on commit f3cfb89

Please sign in to comment.