SST Lab Dokuwiki Header header picture

ユーザ用ツール

サイト用ツール


seminar:graphene

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
seminar:graphene [2019/12/03 15:12] – [計算の実行] kimiseminar:graphene [2022/08/23 13:34] (現在) – 外部編集 127.0.0.1
行 1: 行 1:
 ====== 総合演習 ====== ====== 総合演習 ======
-グラフェンを例に、より詳しい計算の演習を行う。+グラフェンを例に、より詳しい計算の演習を行う。
  
-===== 単位格子設定 ===== +===== 計算前に =====
-<code python> +
-# ---------------------- +
-# Constant parameters +
-# ----------------------+
  
 +
 +{{ :seminar:graphene.png.001.png?400 |}}
 +===== プログラムの概要 =====
 +<code python>
 a0 = 2.461 # Lattice constant of Graphene a0 = 2.461 # Lattice constant of Graphene
  
 +from math import sqrt
 +c1 = ( a0*sqrt(3.0)/2.0, a0/2.0, 0.0)
 +c2 = (-a0*sqrt(3.0)/2.0, a0/2.0, 0.0)
 +c3 = (0.0, 0.0, a0*8.0)              # Height of 3D unit cell
 +
 +from ase import Atom
 +atom1 = Atom('C', (1.0/3.0, 2.0/3.0, 0.5))
 +atom2 = Atom('C', (2.0/3.0, 1.0/3.0, 0.5))
 +
 +from ase import Atoms
 +box1 = Atoms([atom1, atom2], pbc = True)
 +box1.set_cell([c1, c2, c3], scale_atoms = True)
 +
 +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>
 +
 +===== 単位格子の設定 =====
 +<code python>
 +b0 = 1.42 # C-C bond length
  
-# ---------------------- 
-# Setting up unit cell 
-# ---------------------- 
 from math import sqrt from math import sqrt
-root3 = sqrt(3.0) +a0 b0*sqrt(3.0) 
-ax = a0*sqrt(3.0)/2.0+ax = a0*sqrt(3.0)/2.0    # ax = b0*3.0/2.0
 ay = a0/2.0 ay = a0/2.0
-az = a0*8.0 # Height of 3D unit cell +az = a0*8                # Height of 3D unit cell
 c1 = ( ax, ay, 0.0) c1 = ( ax, ay, 0.0)
 c2 = (-ax, ay, 0.0) c2 = (-ax, ay, 0.0)
行 26: 行 44:
 unit_cell = [c1, c2, c3] # Unit cell unit_cell = [c1, c2, c3] # Unit cell
 </code> </code>
-===== 原子の情報の設定 =====+===== 原子の位置と種類 ===== 
 <code python> <code python>
-# ------------------------- +v1 = (1.0/3.0, 2.0/3.0, 0.5) 
-# Elements and positions of +v2 = (2.0/3.0, 1.0/3.0, 0.5) 
-# atoms in the unit cell +positions = [v1, v2] 
-# -------------------------+
 from ase import Atom from ase import Atom
-atom1 = Atom('C', (1.0/3.0, 2.0/3.0, 0.5)) 
-atom2 = Atom('C', (2.0/3.0, 1.0/3.0, 0.5)) 
  
-list_of_atoms = [atom1, atom2]+list_of_atoms = [] 
 +for pos in positions: 
 +  atm = Atom('C', pos) 
 +  list_of_atoms.append(atm) 
 +   
 +# # list_of_atoms is a list of [atom1, atom2]
  
 </code> </code>
行 72: 行 94:
 # ------------------  # ------------------ 
 print box1.get_total_energy() print box1.get_total_energy()
-</python>+</code>
  
  
  
seminar/graphene.1575353552.txt.gz · 最終更新: 2022/08/23 13:34 (外部編集)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki