root / ase / test / exciting.py @ 4
Historique | Voir | Annoter | Télécharger (733 octet)
| 1 |
import os |
|---|---|
| 2 |
from ase import Atoms |
| 3 |
from ase.io import read, write |
| 4 |
from ase.calculators import Exciting |
| 5 |
from ase.units import Bohr, Hartree |
| 6 |
from ase.test import NotAvailable |
| 7 |
|
| 8 |
try:
|
| 9 |
import lxml |
| 10 |
except ImportError: |
| 11 |
raise NotAvailable('This test need lxml module.') |
| 12 |
|
| 13 |
a = Atoms('N3O',
|
| 14 |
[(0, 0, 0), (1, 0, 0), (0, 0, 1), (0.5, 0.5, 0.5)], |
| 15 |
pbc=True)
|
| 16 |
|
| 17 |
raise NotAvailable('Problem with lxml module.') |
| 18 |
|
| 19 |
write('geo.exi', a)
|
| 20 |
b = read('geo.exi')
|
| 21 |
|
| 22 |
print a
|
| 23 |
print a.get_positions()
|
| 24 |
print b
|
| 25 |
print b.get_positions()
|
| 26 |
|
| 27 |
calculator = Exciting(dir='excitingtestfiles',
|
| 28 |
kpts=(4, 4, 3), |
| 29 |
maxscl=3,
|
| 30 |
#bin='/fshome/chm/git/exciting/bin/excitingser'
|
| 31 |
) |