====== Jacapo ====== -- Dacapoに対するASEのpythonインターフェイス -- このページは[[https://wiki.fysik.dtu.dk/ase/ase/calculators/jacapo.html|本家サイト]]の日本語訳である。 ===== Introduction ===== JacapoはDacapoのためのASEのインターフェイスで、ASE((訳注:第3版))と完全な互換性がある。JacapoはNumeric pythonとASE第2版を用いていた古いDacapoインターフェイスを置き換えるものである。プログラムは元々John Kitchinによって開発され、詳細な説明書が多くの例題とともに[[http://gilgamesh.cheme.cmu.edu/doc/software/jacapo/index.html|ネットに公開]]((訳注:このURLは現在存在しない))されていた。 JacapoはASEのオプション的な計算エンジンといった位置付けであり、前述の説明書とは若干の差異が生じているが、説明書自体もうメンテナンスをされていない。 ===== Jacapo calculator ===== JacapoインターフェイスはASEのインストールと同時に自動的にインストールされ、以下のように読み込むことができる: from ase.calculators.jacapo import Jacapo (ただし、Dacapoのインストール作業は必要である) ==== class ase.calculators.jacapo.Jacapo ==== 計算エンジンを初期化するために必要なキーワード引数のリストを以下に示す。 ^キーワード引数^型^引数の意味^ |nc |文字列|出力用NetCDFファイル、既に存在するときには入力にも使われる| |outnc |文字列|出力用NetCDFファイル、デフォルトではncと同一| |atoms |オブジェクト|Atomsクラスオブジェクト| |pw |実数|波動函数に対するエネルギーカットオフ(eV単位)| |dw |実数|電荷密度に対するエネルギーカットオフ(eV単位)| |xc |文字列|交換相関汎関数、[‘PZ’,’VWN’,’PW91’,’PBE’,’RPBE’,’revPBE’]から選択| |nbands |整数|固有状態の数| |ft |実数|フェルミ温度| |kpts |リスト|K点サンプルの指定、kpts = (2,2,1)等| |spinpol |論理型|スピン分極計算の可否| |fixmagmom |文字列|単位胞あたりの磁気モーメント| |symmetry |論理型|対称性による計算機リソースの軽減の可否| |stress |論理型|応力計算の可否| |dipole |論理型|電気双極子補正の可否| |ados |辞書|原子軌道に投影した状態密度計算移管する情報| |stay_alive |論理型|Turn on/off stay alive| |debug |整数|Set debug level (0=off, 10=extreme)| |deletenc |論理型|If the nc file exists, delete it (to ensure a fresh run). Default is False.| ===== Example ===== Here is an example of how to calculate the total energy of a H atom. Warning This is an example only - the parameters are not physically meaningful! from ase import Atoms, Atom from ase.io import write from ase.calculators.jacapo import Jacapo atoms = Atoms([Atom('H',[0,0,0])], cell=(2,2,2), pbc=True) calc = Jacapo('Jacapo-test.nc', pw=200, nbands=2, kpts=(1,1,1), spinpol=False, dipole=False, symmetry=False, ft=0.01) atoms.set_calculator(calc) print(atoms.get_potential_energy()) write('Jacapo-test.traj', atoms) Note that all calculator parameters should be set in the calculator definition itself. Do not attempt to use the calc.set_* commands as they are intended to be internal to the calculator. Note also that Dacapo can only operate with periodic boundary conditions, so be sure that pbc is set to True. ===== Restarting from an old calculation ===== If the file you specify to Jacapo with the nc keyword exists, Jacapo will assume you are attempting to restart an existing calculation. If you do not want this behavior, turn the flag deletenc to True in your calculator definition. For example, it is possible to continue a geometry optimization with something like this: calc = Jacapo('old.nc', stay_alive=True) atoms = calc.get_atoms() dyn = QuasiNewton(atoms, logfile='qn.log') dyn.run(fmax=0.05) Note, that the stay_alive flag is not stored in the .nc file and must be set when the calculator instance is created. ===== Atom-projected density of states ===== To find the atom-projected density of states with Jacapo, first specify the ados dictionary in your calculator definition, as in: calc = Jacapo( ... , ados={'energywindow': (-10., 5.), 'energywidth': 0.2, 'npoints': 250, 'cutoff': 1.0}) After this is established, you can use the get_ados command to get the desired ADOS data. For example: energies, dos = calc.get_ados(atoms=[0], orbitals=['d'], cutoff='short', spin=[0]) © Copyright 2017, ASE-developers. Last updated on Wed, 22 May 2019 07:03:39.