Skip to content

Commit

Permalink
ASE/FHI-aims compatibility
Browse files Browse the repository at this point in the history
FHI-aims calculator requires a separate calculator object to be assigned for each Atoms object. Otherwise references are created and calculations do not proceed after the first DFT calculation. 

Line 866 - added a deepcopy to create new calculator objects

This change restores intended functionality. Since Catlearn does not stop until it arrives at a result, this prevents other users from burning their computational time (and diskspace with growing .traj file!), when using an ASE/FHI-aims/Catlearn setup
  • Loading branch information
ikowalec committed Mar 5, 2020
1 parent 6582bac commit 1f361a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion catlearn/optimize/mlneb.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
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 @@ -862,7 +863,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=self.ase_calc)
calculator=copy.deepcopy(self.ase_calc))
energy = self.ase_ini.get_potential_energy(force_consistent=self.fc)
return energy

Expand Down

0 comments on commit 1f361a4

Please sign in to comment.