stjames 0.0.50__py3-none-any.whl → 0.0.51__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.

Potentially problematic release.


This version of stjames might be problematic. Click here for more details.

stjames/pdb.py CHANGED
@@ -4,7 +4,7 @@ from typing import Any, Literal
4
4
 
5
5
  import atomium # type: ignore [import-untyped]
6
6
  from atomium.pdb import pdb_dict_to_data_dict, pdb_string_to_pdb_dict # type: ignore [import-untyped]
7
- from pydantic import BaseModel, ConfigDict, Field
7
+ from pydantic import BaseModel, ConfigDict, Field, field_validator
8
8
 
9
9
  from stjames.types import Matrix3x3, Vector3D
10
10
 
@@ -166,9 +166,17 @@ class PDBDescription(BaseModel):
166
166
  title: str | None
167
167
  authors: list[str] = []
168
168
  classification: str | None
169
- deposition_date: date | None
169
+ deposition_date: str | None
170
170
  keywords: list[str] = []
171
171
 
172
+ @field_validator("deposition_date", mode="before")
173
+ @classmethod
174
+ def date_to_string(cls, v: str | date | None) -> str | None:
175
+ if v is None:
176
+ return v
177
+
178
+ return str(date)
179
+
172
180
 
173
181
  class PDB(BaseModel):
174
182
  """A PDB formatted file."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: stjames
3
- Version: 0.0.50
3
+ Version: 0.0.51
4
4
  Summary: standardized JSON atom/molecule encoding scheme
5
5
  Author-email: Corin Wagen <corin@rowansci.com>
6
6
  Project-URL: Homepage, https://github.com/rowansci/stjames
@@ -15,7 +15,7 @@ stjames/method.py,sha256=5hBHk2xQLpxZ52LwJ9FHWaqQMdFKnsbQEOxaVe6O4Go,2321
15
15
  stjames/mode.py,sha256=xw46Cc7f3eTS8i35qECi-8DocAlANhayK3w4akD4HBU,496
16
16
  stjames/molecule.py,sha256=DeNYmFdvbuKeXvLqlu-UxHMyZVK6y4j-Lw3HITGMnHw,12406
17
17
  stjames/opt_settings.py,sha256=gxXGtjy9l-Q5Wen9eO6T6HHRCuS8rfOofdVQIJj0JcI,550
18
- stjames/pdb.py,sha256=goigN-UO72y-nnHmNF4HWp8K_ZYfJorg6TCqWpsNQIU,4519
18
+ stjames/pdb.py,sha256=LDAxBLwd_xAzpEmls5G3fdvq77O7Cf7nMY8_ApDPfH8,4742
19
19
  stjames/periodic_cell.py,sha256=eV_mArsY_MPEFSrFEsTC-CyCc6V8ITAXdk7yhjjNI7M,1080
20
20
  stjames/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  stjames/scf_settings.py,sha256=WotVgVrayQ_8PUHP39zVtG7iLT9PV41lpzruttFACP8,2356
@@ -52,8 +52,8 @@ stjames/workflows/scan.py,sha256=uNSuUmVMAV4exNvcv1viVe7930i7GZMn7RtEimnwEE8,100
52
52
  stjames/workflows/spin_states.py,sha256=b-uCf-pHjF_JHbExeb5GdRToE0pIxP0JTd50U130ckI,4693
53
53
  stjames/workflows/tautomer.py,sha256=x3TC8hkMs87ZUodLyhce5EUzYoV276ePfPMi7ISWyNU,651
54
54
  stjames/workflows/workflow.py,sha256=tIu5naADYgYS7kdW8quvGEWHWosBcrIdcD7L86v-uMQ,976
55
- stjames-0.0.50.dist-info/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
56
- stjames-0.0.50.dist-info/METADATA,sha256=RP-MVxDFYu3Ofca3znVgBwmNdbCLGVXsYzd-nniBE7c,1689
57
- stjames-0.0.50.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
58
- stjames-0.0.50.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
59
- stjames-0.0.50.dist-info/RECORD,,
55
+ stjames-0.0.51.dist-info/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
56
+ stjames-0.0.51.dist-info/METADATA,sha256=jzVVfTfwoI1DUMLSneJa8yejvEyOcNZgbBqx1UGVXD8,1689
57
+ stjames-0.0.51.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
58
+ stjames-0.0.51.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
59
+ stjames-0.0.51.dist-info/RECORD,,