diff --git a/flare/ase/otf.py b/flare/ase/otf.py index d164477ce..33feb3e63 100644 --- a/flare/ase/otf.py +++ b/flare/ase/otf.py @@ -144,10 +144,11 @@ def md_step(self): Get new position in molecular dynamics based on the forces predicted by FLARE_Calculator or DFT calculator ''' - pos = np.copy(self.structure.positions) self.md.step() - self.structure.positions = pos - return self.atoms.positions + + # Return a copy so that future updates to atoms.positions doesn't also + # update structure.positions. + return np.copy(self.atoms.positions) # TODO: fix the temperature output in the log file diff --git a/flare/otf.py b/flare/otf.py index 6ce120d9c..a4628bdae 100644 --- a/flare/otf.py +++ b/flare/otf.py @@ -213,13 +213,7 @@ def run(self): # compute forces and stds with GP self.dft_step = False self.compute_properties() - # print('positions pre:') - # print(self.structure.positions) new_pos = self.md_step() - # print('positions post:') - # print(self.structure.positions) - # print('new pos:') - # print(new_pos) # get max uncertainty atoms std_in_bound, target_atoms = \ @@ -239,8 +233,6 @@ def run(self): dft_frcs = deepcopy(self.structure.forces) # run MD step & record the state - # new_pos = self.md_step() - # self.update_temperature(new_pos) self.record_state() # compute mae and write to output