Skip to content

Commit

Permalink
Merge pull request #97 from vladislavivanistsev/master
Browse files Browse the repository at this point in the history
Some compatibility updates
  • Loading branch information
mhangaard committed Nov 14, 2022
2 parents 9cb2712 + fbfbadc commit d4a4ae0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion catlearn/optimize/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def ase_to_catlearn(list_atoms):
images = []
constraints = first_image.constraints
number_images = len(list_atoms)
num_atoms = first_image.get_number_of_atoms()
num_atoms = first_image.get_global_number_of_atoms()
list_train = []
list_targets = []
list_gradients = []
Expand Down
4 changes: 2 additions & 2 deletions catlearn/optimize/mlneb.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ase.neb import NEBTools
from ase.io import read, write
from ase.optimize import MDMin
from ase.parallel import parprint, rank, parallel_function
from ase.parallel import parprint, world, parallel_function
from scipy.spatial import distance
import os
from catlearn.regression import GaussianProcess
Expand Down Expand Up @@ -611,7 +611,7 @@ def run(self, fmax=0.05, unc_convergence=0.050, steps=500,
parprint('The optimized predicted path can be found in: ',
trajectory)
# Clean up:
if rank == 0:
if world.rank == 0:
os.remove('./last_predicted_path.traj')
os.remove('./all_predicted_paths.traj')
break
Expand Down
2 changes: 1 addition & 1 deletion tutorials/12_MLMin/3_GPAW/min_gpaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
# 3. Summary of the results:
###############################################################################

print('\n Summary of the results:\n ------------------------------------')
parprint('\n Summary of the results:\n ------------------------------------')

fire_results = read('results_fire.traj', ':')
parprint('Number of function evaluations using FIRE:',
Expand Down

0 comments on commit d4a4ae0

Please sign in to comment.