from ase import Atoms
from gpaw import GPAW, PW

a = 2.87
m = 2.2

fe = Atoms('Fe2',
           scaled_positions=[(0, 0, 0),
                             (0.5, 0.5, 0.5)],
           cell=(a, a, a),
           pbc=True)

calc = GPAW(mode=PW(350),
            kpts=(6, 6, 6),
            txt='non.txt')

fe.calc = calc
e = fe.get_potential_energy()
calc.write('non.gpw')
