From 0943e9fd033e81015e934d6f9da1f2671a8b8583 Mon Sep 17 00:00:00 2001 From: qzhu2017 Date: Thu, 22 Aug 2024 11:20:53 -0400 Subject: [PATCH] fix GULP class name and opt error in lego module --- pyxtal/interface/gulp.py | 5 ++--- pyxtal/lego/builder.py | 9 +++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pyxtal/interface/gulp.py b/pyxtal/interface/gulp.py index 1d72fd6a..94992146 100644 --- a/pyxtal/interface/gulp.py +++ b/pyxtal/interface/gulp.py @@ -96,10 +96,9 @@ } -class GULP_OC: +class GULP: """ - A calculator to perform structure optimization in GULP - At the moment, only inorganic crystal is considered + A calculator to perform atomic structure optimization in GULP Args: diff --git a/pyxtal/lego/builder.py b/pyxtal/lego/builder.py index a116ea88..c7cb808e 100644 --- a/pyxtal/lego/builder.py +++ b/pyxtal/lego/builder.py @@ -1107,8 +1107,13 @@ def process_xtal(self, xtal, sim, count=0, xs=None, energy=None, 'similarity': sim[1], } if xs is not None: - kvp['x_init'] = np.array2string(xs[0]) - kvp['x_opt'] = np.array2string(xs[1]) + try: + kvp['x_init'] = np.array2string(xs[0]) + kvp['x_opt'] = np.array2string(xs[1]) + except: + print("Error in xs", xs) + kvp['x_init'] = 'N/A' + kvp['x_opt'] = 'N/A' if energy is not None: kvp['ff_energy'] = energy if topology is not None: kvp['topology'] = topology if status: db.add_xtal(xtal, kvp)