From 64ad84aaaeef0f5b88635df19c07ed4c62a68ead Mon Sep 17 00:00:00 2001 From: Jonathan Vandermause Date: Sat, 26 Oct 2024 15:55:46 -0400 Subject: [PATCH] call get forces in run dft method --- flare/learners/otf.py | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/flare/learners/otf.py b/flare/learners/otf.py index 68d361eef..1a5f9cda1 100644 --- a/flare/learners/otf.py +++ b/flare/learners/otf.py @@ -585,32 +585,7 @@ def run_dft(self): # avoid duplicating a previous DFT calculation self.dft_calc.reset() self.atoms.calc = self.dft_calc - - # Calculate DFT energy, forces, and stress. - # Note that ASE and QE stresses differ by a minus sign. - if "forces" in self.dft_calc.implemented_properties: - if "forces" in self.atoms.calc.results: - forces = self.atoms.get_forces() - else: - forces = None - else: - forces = None - - if "stress" in self.dft_calc.implemented_properties: - if "stress" in self.atoms.calc.results: - stress = self.atoms.get_stress() - else: - stress = None - else: - stress = None - - if "energy" in self.dft_calc.implemented_properties: - if "energy" in self.atoms.calc.results: - energy = self.atoms.get_potential_energy() - else: - energy = None - else: - energy = None + self.atoms.get_forces() # write wall time of DFT calculation self.dft_count += 1