"""Bulk Al(fcc) test"""

from Dacapo import Dacapo
from ASE import Atom, ListOfAtoms
from ASE.Visualization.VMD import VMD


bulk = ListOfAtoms([Atom('Al', (0, 0, 0))] )
a = 4.05
b = a / 2
bulk.SetUnitCell([(0, b, b), 
                  (b, 0, b), 
                  (b, b, 0)])

bulk_plot = VMD(bulk, repeat=(5, 5, 5))

calc = Dacapo(kpts=(4, 4, 4),             # set the k-points (Monkhorst-Pack)
              planewavecutoff=300,        # planewavecutoff in eV
              densitycutoff=400,          # densitycutoff in eV
              nbands=6,                   # set the number of electronic bands
              usesymm=True,               # use symmetry to reduce the k-points
              out='Al-fcc-single.nc',     # define the out netcdf file
              txtout='Al-fcc-single.txt') # define the ascii out file

bulk.SetCalculator(calc)

energy = bulk.GetPotentialEnergy()

print energy
