Skip to content

Commit

Permalink
Update get number of atoms function
Browse files Browse the repository at this point in the history
In Ase 3.22, get_number_of_atoms() is deprecated.
It is suggested, "if your atoms are distributed, use (and see) get_global_number_of_atoms()."
  • Loading branch information
vladislavivanistsev committed May 20, 2022
1 parent 9cb2712 commit f4d5d2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion catlearn/optimize/mlmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(self, x0, prev_calculations=None, restart=False,
assert self.ase_calc, msg
self.constraints = self.ase_ini.constraints
self.x0 = self.ase_ini.get_positions().flatten()
self.num_atoms = self.ase_ini.get_number_of_atoms()
self.num_atoms = self.ase_ini.get_global_number_of_atoms()

# Information from the initial structure.
new_atoms = self.ase_ini
Expand Down

0 comments on commit f4d5d2e

Please sign in to comment.