seminar:graphene
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン次のリビジョン両方とも次のリビジョン | ||
seminar:graphene [2019/12/03 15:10] – [原子の情報の設定] kimi | seminar:graphene [2019/12/04 12:24] – [総合演習] kimi | ||
---|---|---|---|
行 2: | 行 2: | ||
グラフェンを例に、より詳しい計算の演習を行おう。 | グラフェンを例に、より詳しい計算の演習を行おう。 | ||
- | ===== 単位格子の設定 | + | {{ : |
+ | ===== 計算の実行 | ||
<code python> | <code python> | ||
- | # ---------------------- | ||
- | # Constant parameters | ||
- | # ---------------------- | ||
- | |||
a0 = 2.461 # Lattice constant of Graphene | a0 = 2.461 # Lattice constant of Graphene | ||
- | |||
- | # ---------------------- | ||
- | # Setting up unit cell | ||
- | # ---------------------- | ||
from math import sqrt | from math import sqrt | ||
- | root3 = sqrt(3.0) | + | c1 = ( a0*sqrt(3.0)/2.0, a0/2.0, 0.0) |
- | ax = a0*sqrt(3.0)/ | + | c2 = (-a0*sqrt(3.0)/ |
- | ay = a0/2.0 | + | c3 = (0.0, 0.0, a0*8.0) |
- | az = a0*8.0 # Height of 3D unit cell | + | |
- | c1 = ( ax, ay, 0.0) | + | from ase import Atom |
- | c2 = (-ax, ay, 0.0) | + | atom1 = Atom(' |
- | c3 = (0.0, 0.0, az) | + | atom2 = Atom(' |
+ | |||
+ | from ase import Atoms | ||
+ | box1 = Atoms([atom1, | ||
+ | box1.set_cell([c1, c2, c3], scale_atoms | ||
+ | |||
+ | from ase.calculators.jacapo import Jacapo | ||
+ | solver1 = Jacapo(nbands = 8, kpts = (2, 2, 1), pw = 150, dw = 150) | ||
+ | box1.set_calculator(solver1) | ||
+ | solver1.calculate() | ||
+ | </ | ||
+ | |||
+ | ===== 単位格子の設定 ===== | ||
+ | <code python> | ||
+ | a0 = 2.461 # Lattice constant of Graphene | ||
+ | |||
+ | from math import sqrt | ||
+ | c1 = ( a0*sqrt(3.0)/ | ||
+ | c2 = (-a0*sqrt(3.0)/ | ||
+ | c3 = (0.0, 0.0, a0*8.0) # Height of 3D unit cell | ||
unit_cell = [c1, c2, c3] # Unit cell | unit_cell = [c1, c2, c3] # Unit cell | ||
</ | </ | ||
- | ===== 原子の情報の設定 | + | ===== 原子の位置と種類 |
<code python> | <code python> | ||
- | # ------------------------- | + | |
- | # Elements and positions of | + | |
- | # atoms in the unit cell | + | |
- | # ------------------------- | + | |
from ase import Atom | from ase import Atom | ||
atom1 = Atom(' | atom1 = Atom(' | ||
行 50: | 行 59: | ||
kwargs[' | kwargs[' | ||
kwargs[' | kwargs[' | ||
- | </python> | + | </code> |
===== 計算の実行 ===== | ===== 計算の実行 ===== | ||
行 64: | 行 73: | ||
box1.set_calculator(solver1) | box1.set_calculator(solver1) | ||
solver1.calculate() | solver1.calculate() | ||
- | </python> | + | </code> |
===== 結果の出力 ===== | ===== 結果の出力 ===== | ||
行 72: | 行 81: | ||
# ------------------ | # ------------------ | ||
print box1.get_total_energy() | print box1.get_total_energy() | ||
- | </python> | + | </code> |
seminar/graphene.txt · 最終更新: 2022/08/23 13:34 by 127.0.0.1