digichem-core 6.0.2__py3-none-any.whl → 6.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
digichem/__init__.py CHANGED
@@ -20,7 +20,7 @@ from digichem.datas import get_resource
20
20
  # development = prerelease is not None
21
21
  # # The full version number of this package.
22
22
  # __version__ = "{}.{}.{}{}".format(major_version, minor_version, revision, "-pre.{}".format(prerelease) if development else "")
23
- __version__ = "6.0.2"
23
+ __version__ = "6.0.3"
24
24
  _v_parts = __version__.split("-")[0].split(".")
25
25
  major_version = int(_v_parts[0])
26
26
  minor_version = int(_v_parts[1])
digichem/basis.py CHANGED
@@ -62,7 +62,7 @@ class BSE_basis_set(dict):
62
62
  import basis_set_exchange.misc
63
63
 
64
64
  if elements_filter is not None and not isinstance(elements_filter, str):
65
- elements_filter = ",".join(elements_filter)
65
+ elements_filter = ",".join((str(item) for item in elements_filter))
66
66
 
67
67
  if elements_filter is not None:
68
68
  elements_filter = basis_set_exchange.misc.expand_elements(elements_filter)
digichem/result/atom.py CHANGED
@@ -315,11 +315,18 @@ class Atom_list(Result_container, Unmergeable_container_mixin, Molecule_mixin):
315
315
  from rdkit.Chem import MolToSmiles
316
316
  from rdkit.Chem.rdmolops import RemoveHs
317
317
 
318
+ # TODO: Find some other way of generating SMILES.
319
+
318
320
  mol = self.to_rdkit_molecule()
319
- mol = RemoveHs(mol)
321
+ try:
322
+ # TODO: rdkit is unreliable, this method can fail for lots of reasons...
323
+ mol = RemoveHs(mol)
324
+ except Exception:
325
+ pass
326
+
320
327
  self._smiles = MolToSmiles(mol)
321
328
  return self._smiles
322
-
329
+
323
330
  # # TODO: Handle cases where obabel isn't available
324
331
  # conv = Openprattle_converter.get_cls("xyz")(input_file = self.to_xyz(), input_file_type = "xyz")
325
332
  # # Cache the result in case we need it again.
@@ -450,10 +457,16 @@ class Atom_list(Result_container, Unmergeable_container_mixin, Molecule_mixin):
450
457
  """
451
458
  Get a representation of this result object in primitive format.
452
459
  """
460
+ try:
461
+ smiles = self.smiles
462
+
463
+ except Exception:
464
+ smiles = None
465
+
453
466
  dump_dict = {
454
467
  "formula": self.formula_string,
455
468
  "charge": self.charge,
456
- "smiles": self.smiles,
469
+ "smiles": smiles,
457
470
  "exact_mass": {
458
471
  "value": float(self.mass) if self.safe_get("mass") is not None else None,
459
472
  "units": "g mol^-1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: digichem-core
3
- Version: 6.0.2
3
+ Version: 6.0.3
4
4
  Summary: Open-source library for Digichem core components
5
5
  Project-URL: Homepage, https://github.com/Digichem-Project/digichem-core
6
6
  Project-URL: Documentation, https://doc.digi-chem.co.uk
@@ -25,7 +25,7 @@ Classifier: Programming Language :: Python :: 3
25
25
  Requires-Python: >=3.9
26
26
  Requires-Dist: adjusttext
27
27
  Requires-Dist: basis-set-exchange
28
- Requires-Dist: cclib
28
+ Requires-Dist: cclib<2,>=1.7.1
29
29
  Requires-Dist: colour-science
30
30
  Requires-Dist: configurables
31
31
  Requires-Dist: deepmerge
@@ -1,5 +1,5 @@
1
- digichem/__init__.py,sha256=JosxWsyFqv1HWRd0V0cXHWuy9-Vwt4tkqKYa21UY_qk,2287
2
- digichem/basis.py,sha256=PDcfA8LuboEqLwMX4cktewdchxFJ5fMPdzR9-Ui16K4,4851
1
+ digichem/__init__.py,sha256=VXwR3w3mBw0HAulV05Nvn0ANT28uZiZ361hLkrTFfPo,2287
2
+ digichem/basis.py,sha256=khzIS9A_w8QH2vsXctWr16Bw5TA84_9_Fo-vuveP_5w,4875
3
3
  digichem/datas.py,sha256=t2PuQFvPb55WO_qVF3Xz67XNodQDimqYD26VkRPEWLA,433
4
4
  digichem/log.py,sha256=tjl8Er16HUsAibBZGZMu8KyT0w53YM3u0Neh_l2jD9Q,6166
5
5
  digichem/memory.py,sha256=jfeb1AYMOdm22vSKMHf01IDzRJCCoDnowh_OB38VVNM,5375
@@ -68,7 +68,7 @@ digichem/parse/turbomole.py,sha256=3DJjXcfYw2RHL6bYbw9VUspYJ_dpVEiUVAartLAHlcI,9
68
68
  digichem/parse/util.py,sha256=tcjGVRDESBXEVn680wr3VdqLWj_WoinqXgDFFzBJU-o,25494
69
69
  digichem/result/__init__.py,sha256=FUNL2pc2bP3XNVFRrlyrTppVWEsPRHcThLiVytpsH84,222
70
70
  digichem/result/angle.py,sha256=jehU0dRN4nALvUFzIdkh4GGQORq4lgXre8ZfFQMzB94,5043
71
- digichem/result/atom.py,sha256=1eYBrZnE8jwycwt39vg8qhn3ShEPqhXwY7VCDrooVLw,27637
71
+ digichem/result/atom.py,sha256=KnXtWPvKNYnzMAw3G8USNwnoJzurXFSQmG1_JYwt8pA,27977
72
72
  digichem/result/base.py,sha256=SH4GAZt-6GsHihAUWLUXjnIhhp_jSmpebx2yJQkIr9M,9630
73
73
  digichem/result/dipole_moment.py,sha256=Pbx9o3j7ZQB5vtZlvt5yhLrvKTXpC69EGlhTXj00HT4,11075
74
74
  digichem/result/emission.py,sha256=0OPXNR1ZX9ALpjD0Ie5OkrOHNDDz6FsK3pK_0GyqqLI,19754
@@ -104,8 +104,8 @@ digichem/test/test_prattle.py,sha256=x-CeVX3Gbs5BHGndBGrtseGZwgUm3jamxstFijmKB5w
104
104
  digichem/test/test_result.py,sha256=BPo9-weVCBL_0dgcETDdWkQ20msCSDTStZ7tPB1t55o,24328
105
105
  digichem/test/test_translate.py,sha256=_3FkYottqHZGxMSTJkbcE8dQXhQlrNlVS0FjMopIwl4,3575
106
106
  digichem/test/util.py,sha256=R4lE1pg0SzpTbJIQnFh_ffeNb9jAnfFIhp-6F-_fX7Q,8576
107
- digichem_core-6.0.2.dist-info/METADATA,sha256=Gt8S4ID5lkIeQUJiJMSpJrNELChoCTyByUS7q-x0yNw,4050
108
- digichem_core-6.0.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
109
- digichem_core-6.0.2.dist-info/licenses/COPYING.md,sha256=d-yG6IJrlqLkuiuoOFe331YKzMRS05pnmk4e98gu9pQ,900
110
- digichem_core-6.0.2.dist-info/licenses/LICENSE,sha256=ZLlePQN2WLgdvmIGLEjjHtgIoneUGR2MgE9yjMg1JiY,1457
111
- digichem_core-6.0.2.dist-info/RECORD,,
107
+ digichem_core-6.0.3.dist-info/METADATA,sha256=cqz8FznZ0DYCdI3v9v6ZM5Iu75v2Z8Gk3VkOCJq6XJs,4060
108
+ digichem_core-6.0.3.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
109
+ digichem_core-6.0.3.dist-info/licenses/COPYING.md,sha256=d-yG6IJrlqLkuiuoOFe331YKzMRS05pnmk4e98gu9pQ,900
110
+ digichem_core-6.0.3.dist-info/licenses/LICENSE,sha256=ZLlePQN2WLgdvmIGLEjjHtgIoneUGR2MgE9yjMg1JiY,1457
111
+ digichem_core-6.0.3.dist-info/RECORD,,