From f37e24b3dbd9a183fb497cbe89a4355e878b2c15 Mon Sep 17 00:00:00 2001 From: qzhu2017 Date: Sun, 7 Apr 2024 21:05:27 -0400 Subject: [PATCH] fix reading Cl- --- doc/Usage.rst | 20 ++++++++------------ pyxtal/__init__.py | 2 +- pyxtal/molecule.py | 4 +++- pyxtal/version.py | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/doc/Usage.rst b/doc/Usage.rst index b48f2245..5da202e7 100644 --- a/doc/Usage.rst +++ b/doc/Usage.rst @@ -625,13 +625,13 @@ O atoms. Group: Pnnm (58) 7.8758, 7.9794, 5.6139, 90.0000, 90.0000, 90.0000, orthorhombic Wyckoff sites: - Al @ [ 0.0000 0.0000 0.2418], WP [4e] Site [..2] - Al @ [ 0.1294 0.6392 0.0000], WP [4g] Site [..m] - Si @ [ 0.2458 0.2522 0.0000], WP [4g] Site [..m] - O @ [ 0.4241 0.3636 0.0000], WP [4g] Site [..m] - O @ [ 0.5538 0.2648 0.0000], WP [4g] Site [..m] - O @ [ 0.0000 0.5000 0.6057], WP [4f] Site [..2] - O @ [ 0.8809 0.5970 0.0786], WP [8h] Site [1] + Al @ [ 0.0000 0.0000 0.2418], WP [4e] Site [..2] + Al @ [ 0.1294 0.6392 0.0000], WP [4g] Site [..m] + Si @ [ 0.2458 0.2522 0.0000], WP [4g] Site [..m] + O @ [ 0.4241 0.3636 0.0000], WP [4g] Site [..m] + O @ [ 0.5538 0.2648 0.0000], WP [4g] Site [..m] + O @ [ 0.0000 0.5000 0.6057], WP [4f] Site [..2] + O @ [ 0.8809 0.5970 0.0786], WP [8h] Site [1] Similarly, PyXtal allows the user to pre-assign the partial information (e.g., @@ -788,7 +788,7 @@ Database -------------------------------- For molecular crystals, PyXtal provides a -`db `_ class to handle store the database with additional information related to the Cambridge Crystallographic Database. **This function requires the access of `CSD Python-api `.** +`db `_ class to handle store the database with additional information related to the Cambridge Crystallographic Database. **This function requires the access of `CSD Python-api `_.** To create a new database file (e.g., `test.db`), @@ -826,8 +826,6 @@ To update some information, .. code-block:: Python -:: - from pyxtal.db import database db = database('test.db') db.add_from_code('XATJOT') @@ -849,8 +847,6 @@ To access the pyxtal structure .. code-block:: Python -:: - from pyxtal.db import database db = database('test.db') xtal = db.get_pyxtal('XATJOT') diff --git a/pyxtal/__init__.py b/pyxtal/__init__.py index 5f326328..37c0449e 100644 --- a/pyxtal/__init__.py +++ b/pyxtal/__init__.py @@ -2846,7 +2846,7 @@ def from_CSD(self, csd_code): smi = entry.molecule.smiles if smi is None: raise CSDError("No smile from CSD") - elif len(smi) > 250: + elif len(smi) > 350: raise CSDError("long smile {:s}".format(smi)) else: if Chem.MolFromSmiles(smi) is None: diff --git a/pyxtal/molecule.py b/pyxtal/molecule.py index 95a40654..36b80eeb 100644 --- a/pyxtal/molecule.py +++ b/pyxtal/molecule.py @@ -289,7 +289,9 @@ def __init__(self, self.tols_matrix = self.get_tols_matrix() xyz = self.mol.cart_coords self.reset_positions(xyz-self.get_center(xyz)) - if self.smile is not None: ori, _, self.reflect = self.get_orientation(xyz) + if self.smile is not None and self.smile not in ["Cl-", "F-", "Br-", "I-", "Li+", "Na+"]: + #print(self.smile) + ori, _, self.reflect = self.get_orientation(xyz) def __str__(self): return '[' + self.name + ']' diff --git a/pyxtal/version.py b/pyxtal/version.py index 364e7bae..7bbb2ef5 100644 --- a/pyxtal/version.py +++ b/pyxtal/version.py @@ -1 +1 @@ -__version__ = "0.6.4" +__version__ = "0.6.5"