Skip to content

Commit 7f89ca4

Browse files
committed
Add example for bxsf2frmsf
1 parent 33a5327 commit 7f89ca4

File tree

6 files changed

+2822
-114
lines changed

6 files changed

+2822
-114
lines changed

doc/manual_right_en.html

+97-23
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<body bgcolor="CCFFCC">
1919

2020
<center><h1>Manual for FermiSurfer</h1></center>
21-
<center><h2>Version 1.5</h2></center>
21+
<center><h2>Version 1.6</h2></center>
2222
<center><h2>Mitsuaki Kawamura</h2></center>
2323

2424
<hr>
@@ -54,11 +54,14 @@ <h1><a name="introduction">1, Introduction</a></h1>
5454
<hr><h1><a name="files-in-this-package">3, Files in this package</a></h1>
5555

5656
<dl>
57-
<p><code>bin/fermisurfer.exe</code> : Executable for Windows</p>
57+
<p><code>bin/fermisurfer.exe</code> : Executable for Windows (Main program)</p>
58+
<p><code>bin/bxsf2frmsf.exe</code> : Executable for Windows (Utility to convert file)</p>
5859
<p><code>doc/manual_en.pdf</code> : Manual (English)</p>
5960
<p><code>doc/manual_ja.pdf</code> : Manual (Japanese)</p>
60-
<p><code>examples/mgb2_vfz.frmsf</code> : Sample input file</p>
61-
<p><code>src/fermisurfer.c</code> : Source file</p>
61+
<p><code>examples/mgb2_vfz.frmsf</code> : Sample input file for <code>fermisurfer</code></p>
62+
<p><code>examples/pb.bxsf</code> : Sample input file for <code>bxsf2frmsf</code></p>
63+
<p><code>src/fermisurfer.c</code> : Source file (Main program)</p>
64+
<p><code>src/bxsf2frmsf.c</code> : Source file (Utility to convert file)</p>
6265
<p><code>src/Makefile</code> : Makefile for Linux & Mac OSX</p>
6366
</dl>
6467

@@ -109,7 +112,9 @@ <h1><a name="introduction">1, Introduction</a></h1>
109112

110113
<hr><h2 id="installation-in-windows">4.3, Installation in Windows</h2>
111114

112-
<p>Use an executable <code>bin/fermisurfer.exe</code></p>
115+
<p>Use an executable <code>bin/fermisurfer.exe</code> .
116+
You can also compile <code>fermisurfer</code> manually
117+
by using freeglut library.</p>
113118

114119
<hr><h1><a name="input-file">5, Input file</a></h1>
115120

@@ -123,9 +128,6 @@ <h1><a name="introduction">1, Introduction</a></h1>
123128
<li><p>The orbital energy at each band and $k$ (We call it "energy") .</p></li>
124129
<li><p>Variables that you want to plot with color (We call it "matrix elements").</p></li>
125130
</ul>
126-
<p>This program supports two kind of uniform $k$ grid,
127-
a grid (${\rm \Gamma}$ centered) and grid with a half-grid shift.
128-
The latter is used when the matrix element becomes singular at ${\rm \Gamma}$.</p>
129131
<p>The input file is as follows (<code>mgb2_vfz.fs</code>):</p>
130132
<pre><code>
131133
40 40 36 (1)
@@ -154,18 +156,84 @@ <h1><a name="introduction">1, Introduction</a></h1>
154156
-10.315671
155157
</code></pre>
156158
<ol>
157-
<li><p>The $k$ point grid</p></li>
158-
<li><p>0 for ${\rm \Gamma}$ centered grid. 1 for shifted grid.</p></li>
159+
<li><p>The number of $k$ in each direction</p></li>
160+
<li><p>Switch to specify type of $k$ grid (Choose from <code>0, 1, 2</code>)</p>
161+
<p>$k$ grid is represented as follows:<p>
162+
<p>$$\begin{aligned}
163+
{\boldsymbol k}_{i,j,k} =
164+
x_i {\boldsymbol b}_1
165+
+y_j {\boldsymbol b}_2
166+
+z_k {\boldsymbol b}_3,
167+
\end{aligned}$$</p>
168+
where $i, j, k = 1 \cdots N_1, 1 \cdots N_2, 1 \cdots N_3$,
169+
and $N_1, N_2, N_3$ are the number of $k$ in each direction.
170+
</p>$x_i, y_j,z_k$ can be chosen from below:</p>
171+
<ul>
172+
<li><p><code>0</code> (Monkhorst-Pack grid) :
173+
$x_i = \frac{2 i - 1 - N_1}{2 N_1}$</p>
174+
</li>
175+
<li><p><code>1</code> :
176+
$x_i = \frac{i - 1}{N_1}$</p>
177+
</li>
178+
<li><p><code>2</code> :
179+
$x_i = \frac{2 i - 1}{2 N_1}$</p>
180+
</li>
181+
</ul>
182+
</li>
159183
<li><p>The number of bands</p></li>
160184
<li><p>Reciprocal lattice vector 1 (arbitrary unit)</p></li>
161185
<li><p>Reciprocal lattice vector 2</p></li>
162186
<li><p>Reciprocal lattice vector 3</p></li>
163-
<li><p>Energy</p></li>
164-
<li><p>Matrix elements</p></li>
187+
<li><p>Energy</p>
188+
<p><code>fermisurfer</code> assume that the Fermi energy is <code>0.0</code>
189+
in the default.
190+
You can shift the Fermi energy by using
191+
<code>Shift Fermi Energy</code> menu described at the section 6.5.</p></li>
192+
<li><p>Matrix elements</p>
193+
<p>If you have no quantity to plot on Fermi surfaces,
194+
please use <code>Unicolor</code> switch in
195+
<code>Color scale mode</code> menu described at section 6.7.
196+
In that case, although this &quot;Matrix elements&quot;
197+
is not used by <code>fermisurfer</code>,
198+
please fill them with arbitrary numbers.</p>
199+
</li>
165200
</ol>
166201

202+
<hr><h2>5.2, Converting bxsf file</h2>
203+
204+
<p>
205+
You can generate input files for <code>fermisurfer</code> from
206+
an input file for XCrysDen (the bxsf format)
207+
by using the utility program <code>bxsf2frmsf</code>.
208+
</p>
209+
<p>使い方は次のとおりです.<code>examples/</code>ディレクトリにある<code>pb.bxsf</code>
210+
ファイルを例として使います.</p>
211+
212+
<h3>5.2.1, For Linuxの場合</h2>
213+
214+
<p>You can launch generated executable as follows:</p>
215+
<pre><code>
216+
$ bxsf2frmsf pb.bxsf
217+
</code></pre>
218+
<p>You need a space between the command and input-file name.
219+
After it finishes, the following files are generated:</p>
220+
<ul>
221+
<li><code>pb_vf.frmsf</code>: Absolute value of the Fermi velocity</li>
222+
<li><code>pb_vfx.frmsf</code>: $x$ component of the Fermi velocity</li>
223+
<li><code>pb_vfy.frmsf</code>: $y$ component of the Fermi velocity</li>
224+
<li><code>pb_vfz.frmsf</code>: $z$ component of the Fermi velocity</li>
225+
<li><code>pb_vfa1.frmsf</code>: Component of the Fermi velocity (along ${a_1}$)</li>
226+
<li><code>pb_vfa2.frmsf</code>: Component of the Fermi velocity (along ${a_2}$)</li>
227+
<li><code>pb_vfa3.frmsf</code>: Component of the Fermi velocity (along ${a_3}$)</li>
228+
</ul>
229+
230+
<h3>5.2.2, For Windows</h3>
231+
232+
<p>Click mouse right button on the input file.
233+
Choose "Open With ..." menu, then choose <code>bxsf2frmsf.exe</code>.</p>
234+
167235
<hr><h2 id="how-to-produce-the-input-file-in-c-and-fortran-programs">
168-
5.2, How to produce the input file in C and fortran programs</h2>
236+
5.3, How to produce the input file in C and fortran programs</h2>
169237

170238
<p>fortran</p>
171239
<pre><code>
@@ -216,19 +284,19 @@ <h1><a name="introduction">1, Introduction</a></h1>
216284

217285
FILE* fo;
218286
int ibnd, ik1, ik2, ik3;
219-
220-
fo = fopen(&quot;sample.fs&quot;, &quot;w&quot;);
221-
ierr = fprintf(fo, &quot;%d %d %d&quot;, nk1, nk2, nk3);
222-
ierr = fprintf(fo, &quot;%d, iswitch);
223-
ierr = fprintf(fo, &quot;%d, nbnd);
224-
ierr = fprintf(fp, &quot;%e %e %e&quot;, bvec1[0], bvec1[1], bvec1[2]);
225-
ierr = fprintf(fp, &quot;%e %e %e&quot;, bvec2[0], bvec2[1], bvec2[2]);
226-
ierr = fprintf(fp, &quot;%e %e %e&quot;, bvec3[0], bvec3[1], bvec3[2]);
287+
288+
fo = fopen(sample.frmsf”, “w”);
289+
ierr = fprintf(fo, &quot;%d %d %d\n&quot;, nk1, nk2, nk3);
290+
ierr = fprintf(fo, &quot;%d\n&quot;, iswitch);
291+
ierr = fprintf(fo, &quot;%d\n&quot;, nbnd);
292+
ierr = fprintf(fo, &quot;%e %e %e\n&quot;, bvec1[0], bvec1[1], bvec1[2]);
293+
ierr = fprintf(fo, &quot;%e %e %e\n&quot;, bvec2[0], bvec2[1], bvec2[2]);
294+
ierr = fprintf(fo, &quot;%e %e %e\n&quot;, bvec3[0], bvec3[1], bvec3[2]);
227295
for (ibnd = 0; ibnd &lt; nbnd; ++ibnd) {
228296
for (ik1 = 0; ik1 &lt; nk1; ++ik1) {
229297
for (ik2 = 0; ik2 &lt; nk2; ++ik2) {
230298
for (ik3 = 0; ik3 &lt; nk3; ++ik3) {
231-
ierr = fprintf(fo, &quot;%e&quot;, eig[ibnd][ik1][ik2][ik3]);
299+
ierr = fprintf(fo, &quot;%e\n&quot;, eig[ibnd][ik1][ik2][ik3]);
232300
}
233301
}
234302
}
@@ -237,7 +305,7 @@ <h1><a name="introduction">1, Introduction</a></h1>
237305
for (ik1 = 0; ik1 &lt; nk1; ++ik1) {
238306
for (ik2 = 0; ik2 &lt; nk2; ++ik2) {
239307
for (ik3 = 0; ik3 &lt; nk3; ++ik3) {
240-
ierr = fprintf(fo, &quot;%e&quot;, x[ibnd][ik1][ik2][ik3]);
308+
ierr = fprintf(fo, &quot;%e\n&quot;, x[ibnd][ik1][ik2][ik3]);
241309
}
242310
}
243311
}
@@ -427,6 +495,12 @@ <h1><a name="introduction">1, Introduction</a></h1>
427495

428496
<p>This finishes <code>fermisurfer</code>.</p>
429497

498+
<hr><h2>6.14, Saving images</h2>
499+
500+
<p><code>fermisurfer</code> does not have any functions to
501+
save images to a file.
502+
Please use the screenshot on your PC.</p>
503+
430504
<hr><h1><a name="gallery">7, Gallery</a></h1>
431505

432506
<p>Contributions of each Fermi surfaces to the Hall effect in IrO$_2$

0 commit comments

Comments
 (0)