Skip to content

Commit

Permalink
Merge pull request #286 from MaterSim/network
Browse files Browse the repository at this point in the history
update builder
  • Loading branch information
qzhu2017 authored Oct 15, 2024
2 parents 6b25f1f + 7f65054 commit f30cadd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion pyxtal/interface/ase_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def handler(signum, frame):
signal.signal(signal.SIGALRM, handler)
signal.alarm(timeout)
#logger.info(f"{label} start calculation")
_fmax = 1e+5

try:
#if True:
Expand Down Expand Up @@ -92,7 +93,7 @@ def handler(signum, frame):
tag = 'False' if struc is None else 'True'
logger.info(f"Finishing {label} {tag}")
#signal.alarm(0) # Cancel the alarm
return struc
return struc #, eng, _fmax

class ASE_optimizer:
"""
Expand Down
17 changes: 8 additions & 9 deletions pyxtal/lego/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,16 +1009,15 @@ def optimize_xtal(self, xtal, count=0, opt_type='local',
minimizers=minimizers,
filename=filename)
xtal, xs = result
status = xtal.check_validity(self.criteria, verbose=self.verbose)
sim1 = self.get_similarity(xtal)
#print("after optim", sim1, status)
if result is not None:
status = xtal.check_validity(self.criteria, verbose=self.verbose)
sim1 = self.get_similarity(xtal)
#print("after optim", sim1, status)
else:
xtal, xs, status, sim1 = None, None, False, None
else:
print("Lattice is None", xtal.get_xtal_string())
xtal = None
xs = None
status = False
sim1 = None
xs = None
print("Lattice is None")#, xtal.get_xtal_string())
xtal, xs, status, sim1 = None, None, False, None
#import sys; sys.exit()

if status:
Expand Down

0 comments on commit f30cadd

Please sign in to comment.