$ python Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from ASE import Atom, ListOfAtoms >>> from Dacapo import Dacapo >>>
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named ASE
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name ListOfAtoms
ASE/Dacapoがインストールされていないか、綴りが間違っている。Atoms
とかListOfAtom
とかListofAtoms
とかになっていないかよく確認すること。特にpythonは大文字と小文字を区別するので注意。
>>> x = ListOfAtoms([Atom('C'), Atom('O', (0, 0, 1.0))], cell = (5, 5, 5)) >>> y = Dacapo(nbands = 6) >>> x.SetCalculator(y)
>>> x = ListOfAtoms([Atom('C'), Atom('O', (0, 0, 1.0)], cell = (5, 5, 5)) File "<stdin>", line 1 x = ListOfAtoms([Atom('C'), Atom('O', (0, 0, 1.0)], cell = (5, 5, 5)) ^ SyntaxError: invalid syntax >>>
>>> x = ListOfAtoms([Atom('C'), Atm('O', (0, 0, 1.0))], cell = (5, 5, 5)) Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'Atm' is not defined >>>
>>> x = ListOfAtoms([Atom('C'), Atom('O', (0, 0, 1.0))], cel = (5, 5, 5)) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __init__() got an unexpected keyword argument 'cel' >>>
>>> y.Execute() Running /usr/bin//dacapo_2.7.7.run ./tmpC8HATr ./tmpC8HATr -scratch . -stop stop &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& & This job was run on not implemented & This job was run on host: not implemented & ============================================================ & & & & Welcome to: & & & & D A C A P O & & & & The plane wave - pseudopotential program & & & & Version: & . . . . TIM: -Eig. proj 0.1% 0.0 CPU seconds ( 0.001 sec/iter) TIM: -Residual 0.1% 0.0 CPU seconds ( 0.001 sec/iter) TIM: Subroutine apply_H was called 44 times ( 0.043 sec/call) TIM: -Form_BHB 0.5% 0.1 CPU seconds ( 0.006 sec/iter) TIM: -vec_rotat 0.5% 0.1 CPU seconds ( 0.006 sec/iter) TIM: -residual 0.1% 0.0 CPU seconds ( 0.001 sec/iter) clexit: exiting the program >>>
. . . ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>> MAIN LOOP ITERATION 14 <<<<<<<<<<<<<<<<<<<< ------------------------------------------------------------------ DAM: 9 0.000097 damden: setup new d-matrix TR1 -589.082407 254.859425 -518.355649 -426.731066 42.326849 0.000000 -56.832013 3.433968 -151.280145 0.000000 -589.082407 -589.082407 0.000000 EXC -138.522627 -141.959863 -138.560863 -141.361356 -142.097703 -142.230561 TOT: 17.3 -585.6452 -589.0824 -585.6834 DFT: 17.3 -585.6834 -589.0824 -588.4839 -589.2202 -589.3531 FOR: 1 0.0000000 0.0000000 -34.8886869 FOR: 2 0.0000000 0.0000000 34.8379919 TOT: stopping 0.000001 convergence: 0.000097 0.000000 0.000000841 0.001 0.000 49.304 ANALYSIS PART OF CODE EIG Nb Nkpt Eigen value Occupation EIG 1 1 -25.8563919270 2.0000000000 EIG 2 1 -8.0228595022 2.0000000000 EIG 3 1 -7.4154524687 2.0000000000 EIG 4 1 -7.4154179758 2.0000000000 EIG 5 1 -2.9299508547 2.0000000000 EIG 6 1 5.3464812016 0.0000000000 WFG: created WaveFunction in netCDF file . . .
>>> y.Calculate() Running /usr/bin//dacapo_2.7.7.run ./tmpr4h3oL out.nc -out out.txt -scratch . -stop stop >>>
>>> y.GetPotentialEnergy() -589.08240661316802 >>> y.GetCartesianForces() array([[ 1.97510707e-14, -1.08964989e-14, -3.48886869e+01], [ 3.27677239e-14, 3.36101215e-14, 3.48379919e+01]])