from ase.eos import EquationOfState from ase.build import bulk from gpaw import GPAW al = bulk('Al', 'fcc', a=4.0) calc = GPAW(mode='pw', kpts=(4, 4 ,4)) al.calc = calc cell = al.get_cell() v = [] e = [] for x in [0.9, 0.95, 1.0, 1.05, 1.1]: al.set_cell(x * cell) v.append(al.get_volume()) e.append(al.get_potential_energy()) eos = EquationOfState(v, e) v0, e0, B = eos.fit() eos.plot('eos_Al.pdf')