from gpaw import GPAW from ase.data.molecules import molecule from gpaw.utilities import h2gpts from gpaw.poisson import PoissonSolver from gpaw.dipole_correction import DipoleCorrectionPoissonSolver system = molecule('H2O') system.center(vacuum=3.0) system.center(vacuum=6.0, axis=2) ps = PoissonSolver(relax='GS', eps=1e-9) dcps = DipoleCorrectionPoissonSolver(ps, 2) # 2 refers to the z axis calc = GPAW(mode='lcao', basis='dzp', poissonsolver=dcps) system.set_calculator(calc) system.get_potential_energy()