digichem-core 6.0.2__py3-none-any.whl → 6.1.0__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.1.0"
24
24
  _v_parts = __version__.split("-")[0].split(".")
25
25
  major_version = int(_v_parts[0])
26
26
  minor_version = int(_v_parts[1])
@@ -39,7 +39,7 @@ __author__ = [
39
39
  ]
40
40
 
41
41
  # Program date (when we were last updated). This is changed automatically.
42
- _last_updated_string = "21/08/2024"
42
+ _last_updated_string = "16/10/2024"
43
43
  last_updated = datetime.strptime(_last_updated_string, "%d/%m/%Y")
44
44
 
45
45
  # The sys attribute 'frozen' is our flag, '_MEIPASS' is the dir location.
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/file/base.py CHANGED
@@ -29,6 +29,9 @@ class File_maker_ABC():
29
29
  """
30
30
  self.output = output
31
31
  self.file_path = {'file': self.output}
32
+
33
+ # A flag of whether we have already created our output file.
34
+ self.done_file_creation = False
32
35
 
33
36
  def get_file(self, name = 'file'):
34
37
  """
@@ -160,9 +163,6 @@ class File_maker(File_maker_ABC):
160
163
  self.dont_modify = dont_modify
161
164
  self.use_existing = use_existing
162
165
 
163
- # A flag of whether we have already created our output file.
164
- self.done_file_creation = False
165
-
166
166
  self.failed_file_creation = False
167
167
 
168
168
  self.full_path_names = full_path_names
@@ -25,9 +25,9 @@ class Turbomole_parser(Cclib_parser):
25
25
  """
26
26
  Sort a list of log files into a particular order, if required for this parser.
27
27
  """
28
- from cclib.io.ccio import sort_turbomole_outputs
28
+ from cclib.parser.turbomoleparser import Turbomole
29
29
 
30
- return sort_turbomole_outputs(log_files)
30
+ return Turbomole.sort_input(log_files)
31
31
 
32
32
  def duration_to_timedelta(self, duration_str):
33
33
  """
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.1.0
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=rZhxVHshLofYYXZTPgc8Y4rCNrpcbPVn8RKtn1Dut0o,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
@@ -33,7 +33,7 @@ digichem/exception/__init__.py,sha256=CkTlww2tI3Cam58KcC39qe-5hxNPiNa6hRJGHZQPJq
33
33
  digichem/exception/base.py,sha256=aL_uEflTcRP-orNL_8RXizMVxXvTztpTDiqNmcVF2UE,4621
34
34
  digichem/exception/uncatchable.py,sha256=OXVkRbzsFc_uzQwCnhor3HTsZv4VuuwfZxNyiIIhgx0,2498
35
35
  digichem/file/__init__.py,sha256=vcDfoYlL0YbFcCyw-3D4SiGtA-hxkFKUtP30DO-JvqE,62
36
- digichem/file/base.py,sha256=841-v2GWdba-o7BP0ZtLMFNyfEMDM2HvBTYiozuV_fI,17342
36
+ digichem/file/base.py,sha256=UZ3CjXEEBOzIqnnnG90wWicGQoIAYgo7GJsWohuSYPc,17342
37
37
  digichem/file/cube.py,sha256=kvNnyKHs0c0L-7LnYggvil-ciDEwNWAhOZT2-KgyP5s,13759
38
38
  digichem/file/fchk.py,sha256=tWhp0daZPMlYmqkGkidUFwVHTA-8wCUf6Py6CNeT7tk,4035
39
39
  digichem/file/prattle.py,sha256=LDayqA7TZVMJKekyl4laHePOCesfBcQ36ul0516OEfo,9927
@@ -64,11 +64,11 @@ digichem/parse/cclib.py,sha256=4-xRCUWj3kRs0MFmoHagbH_6veReKvyFwxNMAdIv0nA,5032
64
64
  digichem/parse/dump.py,sha256=SeQNvtWXG2ntiXz0d2W7Ust_P5Xmf0ft3yZ9pRFT3jQ,9552
65
65
  digichem/parse/gaussian.py,sha256=8Vs07MnlboZiJDJ41dtfRwE2UBHOiVixY3-mQrcoioc,5251
66
66
  digichem/parse/orca.py,sha256=rJ5Rln8mBB7XQZURf9ocwNg4DS1DDA8CaA22CKsugMg,4613
67
- digichem/parse/turbomole.py,sha256=3DJjXcfYw2RHL6bYbw9VUspYJ_dpVEiUVAartLAHlcI,9198
67
+ digichem/parse/turbomole.py,sha256=Tvwp-o-XBG_FEFXpakfOFNi2kUrCbEL0aVF5mCSX6Xw,9198
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.1.0.dist-info/METADATA,sha256=LnROFyuvQzGSNsT564mtd7xyCcONKXBDMUIuyFwGc48,4060
108
+ digichem_core-6.1.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
109
+ digichem_core-6.1.0.dist-info/licenses/COPYING.md,sha256=d-yG6IJrlqLkuiuoOFe331YKzMRS05pnmk4e98gu9pQ,900
110
+ digichem_core-6.1.0.dist-info/licenses/LICENSE,sha256=ZLlePQN2WLgdvmIGLEjjHtgIoneUGR2MgE9yjMg1JiY,1457
111
+ digichem_core-6.1.0.dist-info/RECORD,,