Skip to content

Commit

Permalink
Update mlneb.py
Browse files Browse the repository at this point in the history
Removed deepcopy.

Erasing results prior to new calculation restores intended functionality in ASE/FHI-aims/CatLearn setup.

This is a bypass for check_state not working as intended
  • Loading branch information
ikowalec committed Mar 12, 2020
1 parent 1f361a4 commit 463775e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions catlearn/optimize/mlneb.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from ase.calculators.calculator import Calculator, all_changes
from ase.atoms import Atoms
from catlearn import __version__
import copy


class MLNEB(object):
Expand Down Expand Up @@ -863,7 +862,7 @@ def get_energy_catlearn(self, x=None):

self.ase_ini.set_calculator(None)
self.ase_ini = Atoms(self.ase_ini, positions=pos_ase,
calculator=copy.deepcopy(self.ase_calc))
calculator=self.ase_calc)
energy = self.ase_ini.get_potential_energy(force_consistent=self.fc)
return energy

Expand Down Expand Up @@ -916,7 +915,10 @@ def eval_and_append(self, interesting_point):

self.list_train = np.append(self.list_train,
interesting_point, axis=0)


# Remove old calculation information
self.ase_calc.results = {}

energy = get_energy_catlearn(self)

self.list_targets = np.append(self.list_targets, energy)
Expand Down

0 comments on commit 463775e

Please sign in to comment.