stjames 0.0.110__tar.gz → 0.0.112__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 (83) hide show
  1. {stjames-0.0.110/stjames.egg-info → stjames-0.0.112}/PKG-INFO +1 -1
  2. {stjames-0.0.110 → stjames-0.0.112}/pyproject.toml +1 -1
  3. {stjames-0.0.110 → stjames-0.0.112}/stjames/atom.py +17 -4
  4. {stjames-0.0.110 → stjames-0.0.112}/stjames/opt_settings.py +2 -0
  5. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/admet.py +1 -1
  6. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/pka.py +2 -2
  7. {stjames-0.0.110 → stjames-0.0.112/stjames.egg-info}/PKG-INFO +1 -1
  8. {stjames-0.0.110 → stjames-0.0.112}/LICENSE +0 -0
  9. {stjames-0.0.110 → stjames-0.0.112}/README.md +0 -0
  10. {stjames-0.0.110 → stjames-0.0.112}/setup.cfg +0 -0
  11. {stjames-0.0.110 → stjames-0.0.112}/stjames/__init__.py +0 -0
  12. {stjames-0.0.110 → stjames-0.0.112}/stjames/_deprecated_solvent_settings.py +0 -0
  13. {stjames-0.0.110 → stjames-0.0.112}/stjames/atomium_stjames/__init__.py +0 -0
  14. {stjames-0.0.110 → stjames-0.0.112}/stjames/atomium_stjames/data.py +0 -0
  15. {stjames-0.0.110 → stjames-0.0.112}/stjames/atomium_stjames/mmcif.py +0 -0
  16. {stjames-0.0.110 → stjames-0.0.112}/stjames/atomium_stjames/pdb.py +0 -0
  17. {stjames-0.0.110 → stjames-0.0.112}/stjames/atomium_stjames/utilities.py +0 -0
  18. {stjames-0.0.110 → stjames-0.0.112}/stjames/base.py +0 -0
  19. {stjames-0.0.110 → stjames-0.0.112}/stjames/basis_set.py +0 -0
  20. {stjames-0.0.110 → stjames-0.0.112}/stjames/calculation.py +0 -0
  21. {stjames-0.0.110 → stjames-0.0.112}/stjames/compute_settings.py +0 -0
  22. {stjames-0.0.110 → stjames-0.0.112}/stjames/constraint.py +0 -0
  23. {stjames-0.0.110 → stjames-0.0.112}/stjames/correction.py +0 -0
  24. {stjames-0.0.110 → stjames-0.0.112}/stjames/data/__init__.py +0 -0
  25. {stjames-0.0.110 → stjames-0.0.112}/stjames/data/bragg_radii.json +0 -0
  26. {stjames-0.0.110 → stjames-0.0.112}/stjames/data/elements.py +0 -0
  27. {stjames-0.0.110 → stjames-0.0.112}/stjames/data/isotopes.json +0 -0
  28. {stjames-0.0.110 → stjames-0.0.112}/stjames/data/nist_isotopes.json +0 -0
  29. {stjames-0.0.110 → stjames-0.0.112}/stjames/data/read_nist_isotopes.py +0 -0
  30. {stjames-0.0.110 → stjames-0.0.112}/stjames/data/symbol_element.json +0 -0
  31. {stjames-0.0.110 → stjames-0.0.112}/stjames/engine.py +0 -0
  32. {stjames-0.0.110 → stjames-0.0.112}/stjames/message.py +0 -0
  33. {stjames-0.0.110 → stjames-0.0.112}/stjames/method.py +0 -0
  34. {stjames-0.0.110 → stjames-0.0.112}/stjames/mode.py +0 -0
  35. {stjames-0.0.110 → stjames-0.0.112}/stjames/molecule.py +0 -0
  36. {stjames-0.0.110 → stjames-0.0.112}/stjames/optimization/__init__.py +0 -0
  37. {stjames-0.0.110 → stjames-0.0.112}/stjames/optimization/freezing_string_method.py +0 -0
  38. {stjames-0.0.110 → stjames-0.0.112}/stjames/pdb.py +0 -0
  39. {stjames-0.0.110 → stjames-0.0.112}/stjames/periodic_cell.py +0 -0
  40. {stjames-0.0.110 → stjames-0.0.112}/stjames/py.typed +0 -0
  41. {stjames-0.0.110 → stjames-0.0.112}/stjames/scf_settings.py +0 -0
  42. {stjames-0.0.110 → stjames-0.0.112}/stjames/settings.py +0 -0
  43. {stjames-0.0.110 → stjames-0.0.112}/stjames/solvent.py +0 -0
  44. {stjames-0.0.110 → stjames-0.0.112}/stjames/status.py +0 -0
  45. {stjames-0.0.110 → stjames-0.0.112}/stjames/task.py +0 -0
  46. {stjames-0.0.110 → stjames-0.0.112}/stjames/thermochem_settings.py +0 -0
  47. {stjames-0.0.110 → stjames-0.0.112}/stjames/types.py +0 -0
  48. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/__init__.py +0 -0
  49. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/basic_calculation.py +0 -0
  50. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/bde.py +0 -0
  51. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/conformer.py +0 -0
  52. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/conformer_search.py +0 -0
  53. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/descriptors.py +0 -0
  54. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/docking.py +0 -0
  55. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/double_ended_ts_search.py +0 -0
  56. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/electronic_properties.py +0 -0
  57. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/fukui.py +0 -0
  58. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/hydrogen_bond_basicity.py +0 -0
  59. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/ion_mobility.py +0 -0
  60. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/irc.py +0 -0
  61. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/macropka.py +0 -0
  62. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/molecular_dynamics.py +0 -0
  63. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/multistage_opt.py +0 -0
  64. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/nmr.py +0 -0
  65. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/pose_analysis_md.py +0 -0
  66. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/protein_cofolding.py +0 -0
  67. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/redox_potential.py +0 -0
  68. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/scan.py +0 -0
  69. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/solubility.py +0 -0
  70. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/spin_states.py +0 -0
  71. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/strain.py +0 -0
  72. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/tautomer.py +0 -0
  73. {stjames-0.0.110 → stjames-0.0.112}/stjames/workflows/workflow.py +0 -0
  74. {stjames-0.0.110 → stjames-0.0.112}/stjames.egg-info/SOURCES.txt +0 -0
  75. {stjames-0.0.110 → stjames-0.0.112}/stjames.egg-info/dependency_links.txt +0 -0
  76. {stjames-0.0.110 → stjames-0.0.112}/stjames.egg-info/requires.txt +0 -0
  77. {stjames-0.0.110 → stjames-0.0.112}/stjames.egg-info/top_level.txt +0 -0
  78. {stjames-0.0.110 → stjames-0.0.112}/tests/test_constraints.py +0 -0
  79. {stjames-0.0.110 → stjames-0.0.112}/tests/test_from_extxyz.py +0 -0
  80. {stjames-0.0.110 → stjames-0.0.112}/tests/test_molecule.py +0 -0
  81. {stjames-0.0.110 → stjames-0.0.112}/tests/test_pdb.py +0 -0
  82. {stjames-0.0.110 → stjames-0.0.112}/tests/test_rounding.py +0 -0
  83. {stjames-0.0.110 → stjames-0.0.112}/tests/test_settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.110
3
+ Version: 0.0.112
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.110"
3
+ version = "0.0.112"
4
4
  description = "standardized JSON atom/molecule encoding scheme"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -2,14 +2,23 @@ from typing import Annotated, Self, Sequence
2
2
 
3
3
  from pydantic import AfterValidator, NonNegativeInt
4
4
 
5
- from .base import Base
5
+ from .base import Base, round_optional_float
6
6
  from .data import ELEMENT_SYMBOL, SYMBOL_ELEMENT
7
7
  from .types import Vector3D, round_vector3d
8
8
 
9
9
 
10
10
  class Atom(Base):
11
+ """
12
+ A single atom.
13
+
14
+ :param atomic_number: the atomic number
15
+ :param position: the Cartesian coordinates in Å
16
+ :param mass: the mass, in Daltons. If `None` the most common isotopologue will be employed.
17
+ """
18
+
11
19
  atomic_number: NonNegativeInt
12
- position: Annotated[Vector3D, AfterValidator(round_vector3d(8))] # in Å
20
+ position: Annotated[Vector3D, AfterValidator(round_vector3d(8))]
21
+ mass: Annotated[float | None, AfterValidator(round_optional_float(3))] = None
13
22
 
14
23
  def __repr__(self) -> str:
15
24
  """
@@ -17,6 +26,8 @@ class Atom(Base):
17
26
  Atom(2, [0.00000, 1.00000, 2.00000])
18
27
  """
19
28
  x, y, z = self.position
29
+ if self.mass is not None:
30
+ return f"Atom({self.atomic_number}, [{x:.5f}, {y:.5f}, {z:.5f}], mass={self.mass:.3f})"
20
31
  return f"Atom({self.atomic_number}, [{x:.5f}, {y:.5f}, {z:.5f}])"
21
32
 
22
33
  def __str__(self) -> str:
@@ -35,7 +46,7 @@ class Atom(Base):
35
46
  """
36
47
  return ELEMENT_SYMBOL[self.atomic_number]
37
48
 
38
- def edited(self, atomic_number: int | None = None, position: Sequence[float] | None = None) -> Self:
49
+ def edited(self, atomic_number: int | None = None, position: Sequence[float] | None = None, mass: float | None = None) -> Self:
39
50
  """
40
51
  Create a new Atom with the specified changes.
41
52
 
@@ -50,8 +61,10 @@ class Atom(Base):
50
61
  atomic_number = self.atomic_number
51
62
  if position is None:
52
63
  position = list(self.position)
64
+ if mass is None:
65
+ mass = self.mass
53
66
 
54
- return self.__class__(atomic_number=atomic_number, position=position)
67
+ return self.__class__(atomic_number=atomic_number, position=position, mass=mass)
55
68
 
56
69
  @classmethod
57
70
  def from_xyz(cls: type[Self], xyz_line: str) -> Self:
@@ -20,3 +20,5 @@ class OptimizationSettings(Base):
20
20
  optimize_cell: bool = False
21
21
 
22
22
  constraints: Sequence[Constraint] = tuple()
23
+
24
+ save_intermediate_steps: bool = True
@@ -31,7 +31,7 @@ class ADMETWorkflow(SMILESWorkflow, MoleculeWorkflow):
31
31
  """Ensure that only one of initial_molecule or initial_smiles is set."""
32
32
 
33
33
  if not (bool(self.initial_smiles) ^ bool(self.initial_molecule)):
34
- raise ValueError("Can only set one of initial_molecule should and initial_smiles")
34
+ raise ValueError("Can only set one of initial_molecule and initial_smiles")
35
35
 
36
36
  if self.initial_molecule is not None:
37
37
  warnings.warn(DeprecationWarning("initial_molecule is deprecated. Use initial_smiles instead."))
@@ -79,7 +79,7 @@ class pKaWorkflow(SMILESWorkflow, MoleculeWorkflow):
79
79
 
80
80
  mode: Mode = Mode.CAREFUL
81
81
 
82
- microscopic_pka_method: MicroscopicpKaMethod = MicroscopicpKaMethod.CHEMPROP_NEVOLIANUS2025
82
+ microscopic_pka_method: MicroscopicpKaMethod = MicroscopicpKaMethod.AIMNET2_WAGEN2024
83
83
  solvent: Solvent = Solvent.WATER
84
84
  pka_range: tuple[float, float] = (2, 12)
85
85
  deprotonate_elements: list[int] = [7, 8, 16]
@@ -114,6 +114,6 @@ class pKaWorkflow(SMILESWorkflow, MoleculeWorkflow):
114
114
  """Ensure that only one of initial_molecule or initial_smiles is set."""
115
115
 
116
116
  if not (bool(self.initial_smiles) ^ bool(self.initial_molecule)):
117
- raise ValueError("Can only set one of initial_molecule should and initial_smiles")
117
+ raise ValueError("Can only set one of initial_molecule and initial_smiles")
118
118
 
119
119
  return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.110
3
+ Version: 0.0.112
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
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