stjames 0.0.50__tar.gz → 0.0.51__tar.gz

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.

Files changed (70) hide show
  1. {stjames-0.0.50/stjames.egg-info → stjames-0.0.51}/PKG-INFO +1 -1
  2. {stjames-0.0.50 → stjames-0.0.51}/pyproject.toml +1 -1
  3. {stjames-0.0.50 → stjames-0.0.51}/stjames/pdb.py +10 -2
  4. {stjames-0.0.50 → stjames-0.0.51/stjames.egg-info}/PKG-INFO +1 -1
  5. {stjames-0.0.50 → stjames-0.0.51}/tests/test_pdb.py +8 -2
  6. {stjames-0.0.50 → stjames-0.0.51}/LICENSE +0 -0
  7. {stjames-0.0.50 → stjames-0.0.51}/README.md +0 -0
  8. {stjames-0.0.50 → stjames-0.0.51}/setup.cfg +0 -0
  9. {stjames-0.0.50 → stjames-0.0.51}/stjames/__init__.py +0 -0
  10. {stjames-0.0.50 → stjames-0.0.51}/stjames/_deprecated_solvent_settings.py +0 -0
  11. {stjames-0.0.50 → stjames-0.0.51}/stjames/atom.py +0 -0
  12. {stjames-0.0.50 → stjames-0.0.51}/stjames/base.py +0 -0
  13. {stjames-0.0.50 → stjames-0.0.51}/stjames/basis_set.py +0 -0
  14. {stjames-0.0.50 → stjames-0.0.51}/stjames/calculation.py +0 -0
  15. {stjames-0.0.50 → stjames-0.0.51}/stjames/compute_settings.py +0 -0
  16. {stjames-0.0.50 → stjames-0.0.51}/stjames/constraint.py +0 -0
  17. {stjames-0.0.50 → stjames-0.0.51}/stjames/correction.py +0 -0
  18. {stjames-0.0.50 → stjames-0.0.51}/stjames/data/__init__.py +0 -0
  19. {stjames-0.0.50 → stjames-0.0.51}/stjames/data/bragg_radii.json +0 -0
  20. {stjames-0.0.50 → stjames-0.0.51}/stjames/data/elements.py +0 -0
  21. {stjames-0.0.50 → stjames-0.0.51}/stjames/data/isotopes.json +0 -0
  22. {stjames-0.0.50 → stjames-0.0.51}/stjames/data/nist_isotopes.json +0 -0
  23. {stjames-0.0.50 → stjames-0.0.51}/stjames/data/read_nist_isotopes.py +0 -0
  24. {stjames-0.0.50 → stjames-0.0.51}/stjames/data/symbol_element.json +0 -0
  25. {stjames-0.0.50 → stjames-0.0.51}/stjames/diis_settings.py +0 -0
  26. {stjames-0.0.50 → stjames-0.0.51}/stjames/grid_settings.py +0 -0
  27. {stjames-0.0.50 → stjames-0.0.51}/stjames/int_settings.py +0 -0
  28. {stjames-0.0.50 → stjames-0.0.51}/stjames/message.py +0 -0
  29. {stjames-0.0.50 → stjames-0.0.51}/stjames/method.py +0 -0
  30. {stjames-0.0.50 → stjames-0.0.51}/stjames/mode.py +0 -0
  31. {stjames-0.0.50 → stjames-0.0.51}/stjames/molecule.py +0 -0
  32. {stjames-0.0.50 → stjames-0.0.51}/stjames/opt_settings.py +0 -0
  33. {stjames-0.0.50 → stjames-0.0.51}/stjames/periodic_cell.py +0 -0
  34. {stjames-0.0.50 → stjames-0.0.51}/stjames/py.typed +0 -0
  35. {stjames-0.0.50 → stjames-0.0.51}/stjames/scf_settings.py +0 -0
  36. {stjames-0.0.50 → stjames-0.0.51}/stjames/settings.py +0 -0
  37. {stjames-0.0.50 → stjames-0.0.51}/stjames/solvent.py +0 -0
  38. {stjames-0.0.50 → stjames-0.0.51}/stjames/status.py +0 -0
  39. {stjames-0.0.50 → stjames-0.0.51}/stjames/task.py +0 -0
  40. {stjames-0.0.50 → stjames-0.0.51}/stjames/thermochem_settings.py +0 -0
  41. {stjames-0.0.50 → stjames-0.0.51}/stjames/types.py +0 -0
  42. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/__init__.py +0 -0
  43. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/admet.py +0 -0
  44. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/basic_calculation.py +0 -0
  45. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/bde.py +0 -0
  46. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/conformer.py +0 -0
  47. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/conformer_search.py +0 -0
  48. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/descriptors.py +0 -0
  49. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/docking.py +0 -0
  50. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/electronic_properties.py +0 -0
  51. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/fukui.py +0 -0
  52. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/hydrogen_bond_basicity.py +0 -0
  53. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/irc.py +0 -0
  54. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/molecular_dynamics.py +0 -0
  55. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/multistage_opt.py +0 -0
  56. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/pka.py +0 -0
  57. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/redox_potential.py +0 -0
  58. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/scan.py +0 -0
  59. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/spin_states.py +0 -0
  60. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/tautomer.py +0 -0
  61. {stjames-0.0.50 → stjames-0.0.51}/stjames/workflows/workflow.py +0 -0
  62. {stjames-0.0.50 → stjames-0.0.51}/stjames.egg-info/SOURCES.txt +0 -0
  63. {stjames-0.0.50 → stjames-0.0.51}/stjames.egg-info/dependency_links.txt +0 -0
  64. {stjames-0.0.50 → stjames-0.0.51}/stjames.egg-info/requires.txt +0 -0
  65. {stjames-0.0.50 → stjames-0.0.51}/stjames.egg-info/top_level.txt +0 -0
  66. {stjames-0.0.50 → stjames-0.0.51}/tests/test_constraints.py +0 -0
  67. {stjames-0.0.50 → stjames-0.0.51}/tests/test_from_extxyz.py +0 -0
  68. {stjames-0.0.50 → stjames-0.0.51}/tests/test_molecule.py +0 -0
  69. {stjames-0.0.50 → stjames-0.0.51}/tests/test_rounding.py +0 -0
  70. {stjames-0.0.50 → stjames-0.0.51}/tests/test_settings.py +0 -0
@@ -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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "stjames"
3
- version = "0.0.50"
3
+ version = "0.0.51"
4
4
  description = "standardized JSON atom/molecule encoding scheme"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -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
@@ -1,6 +1,6 @@
1
1
  from pytest import mark
2
2
 
3
- from stjames.pdb import fetch_pdb, pdb_from_string
3
+ from stjames.pdb import PDB, fetch_pdb, pdb_from_string
4
4
 
5
5
 
6
6
  def test_1ema() -> None:
@@ -15,6 +15,9 @@ def test_read_pdb() -> None:
15
15
  pdb = pdb_from_string(data)
16
16
  assert pdb.description.code == "1EMA"
17
17
 
18
+ json = pdb.model_dump()
19
+ PDB.model_validate(json)
20
+
18
21
 
19
22
  # fmt: off
20
23
  @mark.regression
@@ -41,4 +44,7 @@ def test_read_pdb() -> None:
41
44
  ]
42
45
  ) # fmt: on
43
46
  def test_pdb(code: str) -> None:
44
- fetch_pdb(code)
47
+ pdb = fetch_pdb(code)
48
+
49
+ json = pdb.model_dump()
50
+ PDB.model_validate(json)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes