SST Lab Dokuwiki Header header picture

ユーザ用ツール

サイト用ツール


ab_initio:dacapo_tutorial:lesson2

Lesson 2 : 「変数」を使う

from ASE import Atom, ListOfAtoms
x = ListOfAtoms([Atom('C'), Atom('O', (0, 0, 1.0))], cell = (5, 5, 5))
from Dacapo import Dacapo
y = Dacapo(nbands = 6)
x.SetCalculator(y)
y.Calculate()
a0 = 5.0
box0 = (a0, a0, a0)
r1 = (0.0, 0.0, 0.0) 
r2 = (0.0, 0.0, 1.0)
 
from ASE import Atom
atom1 = Atom('C', r1)
atom2 = Atom('O', r2)
molecule0 = [atom1, atom2]
 
from ASE import ListOfAtoms
model0 = ListOfAtoms(molecule0, cell = box0)
 
from Dacapo import Dacapo
method0 = Dacapo(nbands = 6)
 
model0.SetCalculator(method0)
method0.Calculate()
a0 = 5.0
b0 = 1.1
 
a1 = (a0 , 0.0, 0.0)
a2 = (0.0, a0 , 0.0)
a3 = (0.0, 0.0, a0 )
 
box0 = [a1, a2, a3]
 
r1 = (0.0, 0.0, 0.0)
r2 = (0.0, 0.0, b0/a0)
 
from ASE import Atom
atom1 = Atom('C', r1)
atom2 = Atom('O', r2)
 
molecule0 = []
molecule0.append(atom1)
molecule0.append(atom2)
 
from ASE import ListOfAtoms
model0 = ListOfAtoms(molecule0)
 
model1.SetUnitCell(box1)
 
from Dacapo import Dacapo 
method1 = Dacapo()
method1.SetNumberOfBands(6) 
 
model1.SetCalculator(method1)
method1.Calculate()
from ASE import Atom, ListOfAtoms
model0 = ListOfAtoms([])
from Dacapo import Dacapo 
method0 = Dacapo()
 
model0.append(Atom('C', (0, 0, 0)))
model0.SetUnitCell((5, 5, 5))
model0.append(Atom('O', (0, 0, 1.1)))
 
method1.SetNumberOfBands(6) 
 
model1.SetCalculator(method1)
method1.Calculate()
ab_initio/dacapo_tutorial/lesson2.txt · 最終更新: 2022/08/23 13:34 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki