Skip to content

Commit 6aae94f

Browse files
committed
fix a tiny bug
1 parent f138fa1 commit 6aae94f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyxtal/optimize/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def select_xtals(self, ref_xtals, ids, N_max):
395395
xtals = []
396396
for id in ids:
397397
(xtal, _) = ref_xtals[id]
398-
if xtal.energy <= self.E_max and self.new_struc(xtal, xtals):
398+
if xtal.energy is not None and xtal.energy <= self.E_max and self.new_struc(xtal, xtals):
399399
xtals.append(xtal) # .to_ase(resort=False))
400400
if len(xtals) == N_max:
401401
break

0 commit comments

Comments
 (0)