Skip to content

Commit

Permalink
fix reading Cl-
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhu2017 committed Apr 8, 2024
1 parent 2ccde5f commit f37e24b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
20 changes: 8 additions & 12 deletions doc/Usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.,
Expand Down Expand Up @@ -788,7 +788,7 @@ Database
--------------------------------
For molecular crystals, PyXtal provides a
`db <pyxtal.db.html>`_ class to handle store the database with additional information related to the Cambridge Crystallographic Database. **This function requires the access of `CSD Python-api <https://downloads.ccdc.cam.ac.uk/documentation/API/index.html>`.**
`db <pyxtal.db.html>`_ class to handle store the database with additional information related to the Cambridge Crystallographic Database. **This function requires the access of `CSD Python-api <https://downloads.ccdc.cam.ac.uk/documentation/API/index.html>`_.**
To create a new database file (e.g., `test.db`),
Expand Down Expand Up @@ -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')
Expand All @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion pyxtal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion pyxtal/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 + ']'
Expand Down
2 changes: 1 addition & 1 deletion pyxtal/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.6.4"
__version__ = "0.6.5"

0 comments on commit f37e24b

Please sign in to comment.