From d5457309cfaf514fc56c31aa9ea36ab22518896c Mon Sep 17 00:00:00 2001 From: qzhu2017 Date: Thu, 29 Aug 2024 08:48:50 -0400 Subject: [PATCH] update the doc to support the display of optimize module --- doc/requirements.txt | 1 + pyxtal/db.py | 4 ++-- setup.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index aaba6b7d..de333020 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -7,3 +7,4 @@ scipy>=1.7.3 importlib_metadata>=1.4 ase>=3.18.0 sphinx_rtd_theme +pyocse>=0.1.1 diff --git a/pyxtal/db.py b/pyxtal/db.py index fddeb6b3..c529dbb5 100644 --- a/pyxtal/db.py +++ b/pyxtal/db.py @@ -1343,6 +1343,7 @@ def export_structures( status = xtal.check_validity(criteria, True) if criteria is not None else True except: status = False + label = "Error" if status: try: @@ -1352,10 +1353,9 @@ def export_structures( _l, _sp, _cn = s.wp.get_label(), s.specie, s.coordination label += f"-{_l:s}-{_sp:s}{_cn:d}" label += f"-S{sim:.3f}" + if len(label) > 40: label = label[:40] except: print("Problem in setting site coordination") - if len(label) > 40: - label = label[:40] if den is not None: label += f"-D{abs(den):.2f}" diff --git a/setup.py b/setup.py index adf1d957..5636d16d 100755 --- a/setup.py +++ b/setup.py @@ -70,6 +70,7 @@ def run(self): "vasprun-xml>=1.0.4", # prevent the use of numpy2 "importlib_metadata>=1.4", "typing-extensions>=4.12", + "pyocse>=0.1.1", ], extras_require={ "visualization": ["py3Dmol>=0.8.0"],