stjames 0.0.79__py3-none-any.whl → 0.0.81__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/types.py CHANGED
@@ -19,6 +19,17 @@ def round_list(round_to: int = 6) -> Callable[[Iterable[float]], list[float]]:
19
19
  return rounder
20
20
 
21
21
 
22
+ def round_optional_list(round_to: int = 6) -> Callable[[Iterable[float] | None], list[float] | None]:
23
+ """Create a validator that rounds each float in a list to a given number of decimal places."""
24
+
25
+ def rounder(values: Iterable[float] | None) -> list[float] | None:
26
+ if values is None:
27
+ return None
28
+ return [round(value, round_to) for value in values]
29
+
30
+ return rounder
31
+
32
+
22
33
  def round_vector3d(round_to: int = 6) -> Callable[[Vector3D], Vector3D]:
23
34
  """Create a validator that rounds each component of a Vector3D to a given number of decimal places."""
24
35
 
@@ -1,9 +1,11 @@
1
1
  """Protein Cofolding Workflow."""
2
2
 
3
- from pydantic import BaseModel
3
+ from typing import Annotated
4
4
 
5
- from ..base import LowercaseStrEnum
6
- from ..types import UUID
5
+ from pydantic import AfterValidator, BaseModel
6
+
7
+ from ..base import LowercaseStrEnum, round_float
8
+ from ..types import UUID, round_optional_list
7
9
  from .workflow import FASTAWorkflow
8
10
 
9
11
 
@@ -16,18 +18,19 @@ class CofoldingModel(LowercaseStrEnum):
16
18
 
17
19
 
18
20
  class CofoldingScores(BaseModel):
19
- confidence_score: float
20
- ptm: float # predicted template modeling score
21
- iptm: float # interface predicted template modeling score
21
+ confidence_score: Annotated[float, AfterValidator(round_float(3))]
22
+ ptm: Annotated[float, AfterValidator(round_float(3))] # predicted template modeling score
23
+ iptm: Annotated[float, AfterValidator(round_float(3))] # interface predicted template modeling score
24
+ avg_lddt: Annotated[float, AfterValidator(round_float(3))]
22
25
 
23
26
 
24
27
  class AffinityScore(BaseModel):
25
- pred_value: float
26
- probability_binary: float
27
- pred_value1: float
28
- probability_binary1: float
29
- pred_value2: float
30
- probability_binary2: float
28
+ pred_value: Annotated[float, AfterValidator(round_float(3))]
29
+ probability_binary: Annotated[float, AfterValidator(round_float(3))]
30
+ pred_value1: Annotated[float, AfterValidator(round_float(3))]
31
+ probability_binary1: Annotated[float, AfterValidator(round_float(3))]
32
+ pred_value2: Annotated[float, AfterValidator(round_float(3))]
33
+ probability_binary2: Annotated[float, AfterValidator(round_float(3))]
31
34
 
32
35
 
33
36
  class ProteinCofoldingWorkflow(FASTAWorkflow):
@@ -51,3 +54,8 @@ class ProteinCofoldingWorkflow(FASTAWorkflow):
51
54
  scores: CofoldingScores | None = None
52
55
  model: CofoldingModel = CofoldingModel.BOLTZ_2
53
56
  affinity_score: AffinityScore | None = None
57
+ lddt: Annotated[list[float] | None, AfterValidator(round_optional_list(3))] = None
58
+
59
+
60
+ reduced_mass: Annotated[float, AfterValidator(round_float(3))] # amu
61
+ solubilities: Annotated[list[float] | None, AfterValidator(round_optional_list(3))]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.79
3
+ Version: 0.0.81
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
@@ -24,7 +24,7 @@ stjames/solvent.py,sha256=u037tmu-9oa21s-WEDZ7VC7nuNVjkqR2ML4JWjWSME4,1158
24
24
  stjames/status.py,sha256=0mOeF9CoW2gGMfOkAlxTOL32jXNdJ0cU1-Xwo9DCxUc,455
25
25
  stjames/task.py,sha256=OLINRqe66o7t8arffilwmggrF_7TH0L79u6DhGruxV8,329
26
26
  stjames/thermochem_settings.py,sha256=ZTLz31v8Ltutde5Nfm0vH5YahWjcfFWfr_R856KffxE,517
27
- stjames/types.py,sha256=rs2CdpkruIfU-PS98rjr9HAJNFGdZDB_zl-u3wa5rAs,4092
27
+ stjames/types.py,sha256=Fco-Lw8DYvUhbSvOjYZHaE_AaMyFNdWLUjNvb5aTAzw,4498
28
28
  stjames/atomium_stjames/__init__.py,sha256=gZkzC7i9D_fmWUTN55gtygITo3-qvJUda5CXLR0jyCQ,306
29
29
  stjames/atomium_stjames/data.py,sha256=-hzwBpTHq5JetsOVyopUJswKnKAkMtJ_XkONxjXVupU,5675
30
30
  stjames/atomium_stjames/mmcif.py,sha256=em1fNt6577OaUjL7Pctru7aJp3ceZ9kEnj5w6BRWdVs,27090
@@ -54,15 +54,15 @@ stjames/workflows/macropka.py,sha256=KRIyk4gsSYL3eqyzCDndStGLwjWSo60cgCAzvAoD1Nk
54
54
  stjames/workflows/molecular_dynamics.py,sha256=kxugE73Ntzpj-xpJSoQ1EwGzXXdvi_NTyeP4913EVwE,3173
55
55
  stjames/workflows/multistage_opt.py,sha256=P8rxMUhKXMmDi7Id95IOTEmM0xN1ErsKcDJfgY08vjc,16538
56
56
  stjames/workflows/pka.py,sha256=j3vBh2YM3nJzJ1XJKPsmYahRCeaU9n3P-G-u9_moaFw,2065
57
- stjames/workflows/protein_cofolding.py,sha256=d6S-YdnR_Qq_K2FidarrxRit6Gd1szZFJS_fFhSgDa4,1487
57
+ stjames/workflows/protein_cofolding.py,sha256=5qBjB_O68gV4k-NDf9aU2O3vP583XjURhdSiA7_S7ic,2260
58
58
  stjames/workflows/redox_potential.py,sha256=7S18t9Y3eynSnA3lZbRlvLfdbgeBopdiigLzt1zxg5c,3871
59
59
  stjames/workflows/scan.py,sha256=DXQBpa2t2PowAtOwmdgpxaSLq--fEShljzAGSb8Nf5U,2993
60
60
  stjames/workflows/solubility.py,sha256=kGfVyPPGDLRpf2j6dSY7woCkfsoXSbUzdSImA4mcMpw,1898
61
61
  stjames/workflows/spin_states.py,sha256=0degmE-frovgoXweshZyjfjqL7nkbaFoO9YoJhvQnaI,4748
62
62
  stjames/workflows/tautomer.py,sha256=7eYKziGPg8Km6lfowTzSkgJfJ4SHUPrAmnTf8Bi-SB0,1164
63
63
  stjames/workflows/workflow.py,sha256=OE05pt2ZOd8TzTOlBngXCVg9wv_553ZR60VNRPlq0f8,1953
64
- stjames-0.0.79.dist-info/licenses/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
65
- stjames-0.0.79.dist-info/METADATA,sha256=_MlYA1jVA3VRnLn1C_U-aUutcD3MLTn2QxefJdyHsCc,1724
66
- stjames-0.0.79.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
67
- stjames-0.0.79.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
68
- stjames-0.0.79.dist-info/RECORD,,
64
+ stjames-0.0.81.dist-info/licenses/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
65
+ stjames-0.0.81.dist-info/METADATA,sha256=OSoOiqYYzKOW3kA_VcJvIrUxFhxz1WbcoIWJJ8Gzd98,1724
66
+ stjames-0.0.81.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
67
+ stjames-0.0.81.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
68
+ stjames-0.0.81.dist-info/RECORD,,