stjames 0.0.110__py3-none-any.whl → 0.0.112__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/atom.py CHANGED
@@ -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:
stjames/opt_settings.py CHANGED
@@ -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."))
stjames/workflows/pka.py CHANGED
@@ -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
@@ -1,6 +1,6 @@
1
1
  stjames/__init__.py,sha256=i_vqziEdoBNXhD7Gjb2_1zLkSx0Ko1N8BnCk6No_T6A,522
2
2
  stjames/_deprecated_solvent_settings.py,sha256=gj5j9p3zakIwSTK5_ndqBXJx--IzjZNxZ75z-wipLOo,450
3
- stjames/atom.py,sha256=hQCTMu3y30dvqjyCInnSs47DkUEnwhm_M2qB2jTD4Ik,2153
3
+ stjames/atom.py,sha256=RnlAgWsZZJEZnSBWCeoj6NtWht8mZTf4qDWfT_Ot05U,2704
4
4
  stjames/base.py,sha256=YhmNZqFdWYD_lCw8rD2fZtt17nh8g7lUFBnGMezB-u8,1837
5
5
  stjames/basis_set.py,sha256=wI3M2q9uPf9jhKpAi4E2DrsyKzloDGLRjAlk7krdYgc,949
6
6
  stjames/calculation.py,sha256=O2LwwQ_cOLmDOGXTHA9J71YbUZXigUSbvbLA-fSVm3w,915
@@ -12,7 +12,7 @@ stjames/message.py,sha256=Rq6QqmHZKecWxYH8fVyXmuoCCPZv8YinvgykSeorXSU,216
12
12
  stjames/method.py,sha256=3HJ-dSK75HG-YPzgDVT8lQ0Ttld-TF984qDDTTAJk9A,4762
13
13
  stjames/mode.py,sha256=xw46Cc7f3eTS8i35qECi-8DocAlANhayK3w4akD4HBU,496
14
14
  stjames/molecule.py,sha256=4Tsa_gRC4C-qGPop24jRIs2q07r0LGbSRb-ApOaZa5c,20839
15
- stjames/opt_settings.py,sha256=LEwGXUEKq5TfU5rr60Z4QQBhCqiw1Ch5w0M_lXawWo8,642
15
+ stjames/opt_settings.py,sha256=HjKbyFWcxD10FZfbqLxx1RKT0rcXGBr8bmi4ms4U3Sw,684
16
16
  stjames/pdb.py,sha256=6ayVUUdTufkXs_nfpRQuT1yGvymuyICB4L5Wh55OsaA,26507
17
17
  stjames/periodic_cell.py,sha256=eV_mArsY_MPEFSrFEsTC-CyCc6V8ITAXdk7yhjjNI7M,1080
18
18
  stjames/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -38,7 +38,7 @@ stjames/data/symbol_element.json,sha256=vl_buFusTqBd-muYQtMLtTDLy2OtBI6KkBeqkaWR
38
38
  stjames/optimization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  stjames/optimization/freezing_string_method.py,sha256=eEQBqbYHgJH9gVRLDIFtGuPcsHHMLAAt1hF3jtq70lo,2285
40
40
  stjames/workflows/__init__.py,sha256=I-s6f6uz7PXpeKsvQlL04wswId2mW2u7thk309TC7ng,3165
41
- stjames/workflows/admet.py,sha256=h8ph6oeRCxU3-_jqRRWPg3RZcheu9JzCHiWqSC9VYKY,1296
41
+ stjames/workflows/admet.py,sha256=qFUpCFiLW-3gzuEjCMNBJ6DEG_vquJcPAsN4SVZRfdE,1289
42
42
  stjames/workflows/basic_calculation.py,sha256=sAgHBcNHE72ZbZPB9vyZShALRC4zOVw6It6cpJlbX2A,911
43
43
  stjames/workflows/bde.py,sha256=g_In-caftXiimrhfdptHjpfrYQUs3vF58qYmRnaTN8g,10825
44
44
  stjames/workflows/conformer.py,sha256=18aO6ngMBeGAmQkBdLGCCHr398RIYr1v2hD2IT1u4cc,3005
@@ -55,7 +55,7 @@ stjames/workflows/macropka.py,sha256=Krj0xXuB-u57Kqlf4bbRiHDUWCpliFr6YPiYqPmYaWk
55
55
  stjames/workflows/molecular_dynamics.py,sha256=HqWNxxPSAphfI0DdbTERFkq8UeBjEvhnA_ETv0xw_RY,3522
56
56
  stjames/workflows/multistage_opt.py,sha256=UN-4WLsT2WEjO5KqDPrcCkb708Co-ZScHx3g2bto768,16597
57
57
  stjames/workflows/nmr.py,sha256=1QEF4SB6dWIr-jzLEZ7V972UnRUOTufOJSHwIGyV3dM,2681
58
- stjames/workflows/pka.py,sha256=24mpGNPMc-hOaVqQFFlUdGadB65fb3DyOt4XXQvB2YY,4593
58
+ stjames/workflows/pka.py,sha256=EaeC61dIiG_-ymA_BY0Be-pATpI2sHhYVRu4DXKRYzA,4580
59
59
  stjames/workflows/pose_analysis_md.py,sha256=ES0XlzaLpTjhLrNvcB0zFZa1b1ZHXekN72EbLsx0Skw,4723
60
60
  stjames/workflows/protein_cofolding.py,sha256=cN0WUh8trrWwzNvoU75hB-VectIer-g5sMKgibQJcfE,4293
61
61
  stjames/workflows/redox_potential.py,sha256=7S18t9Y3eynSnA3lZbRlvLfdbgeBopdiigLzt1zxg5c,3871
@@ -65,8 +65,8 @@ stjames/workflows/spin_states.py,sha256=0degmE-frovgoXweshZyjfjqL7nkbaFoO9YoJhvQ
65
65
  stjames/workflows/strain.py,sha256=paYxDDQTB1eYP_c2kLVz1-QX7Vpw0LLb3ujnFin_SOM,1834
66
66
  stjames/workflows/tautomer.py,sha256=7eYKziGPg8Km6lfowTzSkgJfJ4SHUPrAmnTf8Bi-SB0,1164
67
67
  stjames/workflows/workflow.py,sha256=OE05pt2ZOd8TzTOlBngXCVg9wv_553ZR60VNRPlq0f8,1953
68
- stjames-0.0.110.dist-info/licenses/LICENSE,sha256=i05z7xEhyrg6f8j0lR3XYjShnF-MJGFQ-DnpsZ8yiVI,1084
69
- stjames-0.0.110.dist-info/METADATA,sha256=U5ELdyppOGvFvZRXvktt8mqT-knNDdcl9wZJ2fY9h3o,1725
70
- stjames-0.0.110.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
71
- stjames-0.0.110.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
72
- stjames-0.0.110.dist-info/RECORD,,
68
+ stjames-0.0.112.dist-info/licenses/LICENSE,sha256=i05z7xEhyrg6f8j0lR3XYjShnF-MJGFQ-DnpsZ8yiVI,1084
69
+ stjames-0.0.112.dist-info/METADATA,sha256=uFnIQFjjqEHxaIKFXI-WxX5521fRNUfGQZiFqZfl6Fw,1725
70
+ stjames-0.0.112.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
71
+ stjames-0.0.112.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
72
+ stjames-0.0.112.dist-info/RECORD,,