from math import cos, sin, pi

from ASE import ListOfAtoms, Atom
from Dacapo import Dacapo

atoms = Dacapo.ReadAtoms('2H2O.nc') # Restart from the old calculation
del atoms[3:]                       # Delete the last three atoms
calc = atoms.GetCalculator()        # Get a hold on the calculator
calc.SetNumberOfBands(6)            # Reduce the number of bands
calc.SetNetCDFFile('H2Ob.nc')       # Write output to 'H2Oa.nc'
print atoms.GetPotentialEnergy()    # Go!
