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

@@ -18,6 +18,7 @@ from .ion_mobility import *
18
18
  from .irc import *
19
19
  from .macropka import *
20
20
  from .molecular_dynamics import *
21
+ from .msa import *
21
22
  from .multistage_opt import *
22
23
  from .nmr import *
23
24
  from .pka import *
@@ -49,6 +50,7 @@ WORKFLOW_NAME = Literal[
49
50
  "irc",
50
51
  "macropka",
51
52
  "molecular_dynamics",
53
+ "msa",
52
54
  "multistage_opt",
53
55
  "nmr",
54
56
  "pka",
@@ -81,6 +83,7 @@ WORKFLOW_MAPPING: dict[WORKFLOW_NAME, Workflow] = {
81
83
  "macropka": MacropKaWorkflow, # type: ignore [dict-item]
82
84
  "molecular_dynamics": MolecularDynamicsWorkflow, # type: ignore [dict-item]
83
85
  "multistage_opt": MultiStageOptWorkflow, # type: ignore [dict-item]
86
+ "msa": MSAWorkflow, # type: ignore [dict-item]
84
87
  "nmr": NMRSpectroscopyWorkflow, # type: ignore [dict-item]
85
88
  "pka": pKaWorkflow, # type: ignore [dict-item]
86
89
  "pose_analysis_md": PoseAnalysisMolecularDynamicsWorkflow, # type: ignore [dict-item]
@@ -3,9 +3,9 @@
3
3
  from abc import ABC
4
4
  from typing import Annotated, Literal, Self, Sequence, TypeVar
5
5
 
6
- from pydantic import AfterValidator, BaseModel, Field, field_validator, model_validator
6
+ from pydantic import AfterValidator, BaseModel, Field, PositiveInt, field_validator, model_validator
7
7
 
8
- from ..base import LowercaseStrEnum
8
+ from ..base import Base, LowercaseStrEnum
9
9
  from ..constraint import Constraint
10
10
  from ..method import Method, XTBMethod
11
11
  from ..mode import Mode
@@ -41,6 +41,28 @@ class ScreeningSettings(BaseModel):
41
41
  max_confs: int | None = None
42
42
 
43
43
 
44
+ class ConformerClusteringSettings(Base):
45
+ """
46
+ Settings for (optionally) clustering conformers based on three-dimensional properties.
47
+
48
+ The properties used for clustering are:
49
+ - Solvent-accessible surface area
50
+ - Polar solvent-accessible surface area
51
+ - Radius of gyration
52
+ - Plane of best fit
53
+ - Normalized principal moment ratios 1 and 2
54
+
55
+ Rowan uses k-means clustering to identify representative conformers.
56
+ This loosely follows Wilcken and co-workers (10.1007/s10822-020-00337-7).
57
+
58
+ :param num_clusters: the number of clusters to include
59
+ :param conformers_per_cluster: the number of compounds to pick from each cluster
60
+ """
61
+
62
+ num_clusters: PositiveInt = 5
63
+ conformers_per_cluster: PositiveInt = 3
64
+
65
+
44
66
  class ConformerGenSettings(BaseModel):
45
67
  """
46
68
  Conformer generation settings.
@@ -310,6 +332,8 @@ class ConformerGenMixin(BaseModel):
310
332
  nci: bool = False
311
333
  max_confs: int | None = None
312
334
 
335
+ conformer_clustering_settings: ConformerClusteringSettings | None = None
336
+
313
337
  @model_validator(mode="after")
314
338
  def validate_and_build_conf_gen_settings(self) -> Self:
315
339
  """Validate and build the ConformerGenSettings."""
@@ -0,0 +1,31 @@
1
+ from ..base import LowercaseStrEnum
2
+ from .workflow import ProteinSequenceWorkflow
3
+
4
+
5
+ class MSAFormat(LowercaseStrEnum):
6
+ """Format of the MSA."""
7
+
8
+ COLABFOLD_DEFAULT = "colabfold_default"
9
+ AF3_JSON = "af3_json"
10
+
11
+
12
+ class MSAWorkflow(ProteinSequenceWorkflow):
13
+ """
14
+ Workflow for generating a MSA from protein sequences.
15
+
16
+ Inherited:
17
+ :param initial_protein_sequences: protein sequences of interest
18
+
19
+ New:
20
+ :param format: the format of the MSA return files
21
+
22
+ Results:
23
+ :param a3m_file: A3M file string
24
+ :param m8_file: M8 file string
25
+ :param af3_json_file: AF3 JSON file string
26
+ """
27
+
28
+ format: MSAFormat = MSAFormat.COLABFOLD_DEFAULT
29
+ a3m_file: str | None = None
30
+ m8_file: str | None = None
31
+ af3_json_file: str | None = None
@@ -95,6 +95,16 @@ class MoleculeWorkflow(Workflow):
95
95
  return mode
96
96
 
97
97
 
98
+ class ProteinSequenceWorkflow(Workflow):
99
+ """
100
+ Base class for Workflows that operate on protein sequences.
101
+
102
+ :param initial_protein_sequences: protein sequences of interest
103
+ """
104
+
105
+ protein_sequences: list[str]
106
+
107
+
98
108
  class DBCalculation(Base):
99
109
  """Encodes a calculation that's in the database. This isn't terribly useful by itself."""
100
110
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.121
3
+ Version: 0.0.122
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
@@ -37,13 +37,13 @@ stjames/data/read_nist_isotopes.py,sha256=y10FNjW43QpC45qib7VHsIghEwT7GG5rsNwHdc
37
37
  stjames/data/symbol_element.json,sha256=vl_buFusTqBd-muYQtMLtTDLy2OtBI6KkBeqkaWRQrg,1186
38
38
  stjames/optimization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  stjames/optimization/freezing_string_method.py,sha256=eEQBqbYHgJH9gVRLDIFtGuPcsHHMLAAt1hF3jtq70lo,2285
40
- stjames/workflows/__init__.py,sha256=GiSXuBCA2tE5eXHnVYJvjtoqX_zvCn8t0wpkvK1HEls,3438
40
+ stjames/workflows/__init__.py,sha256=wzLBi71MgMxlxRXw3N7feazCym6qNRJ8e4pRk3UXPHM,3520
41
41
  stjames/workflows/admet.py,sha256=qFUpCFiLW-3gzuEjCMNBJ6DEG_vquJcPAsN4SVZRfdE,1289
42
42
  stjames/workflows/basic_calculation.py,sha256=wIiq2lFRN4nxN0__X_JbPSeaUeJ4tKUyg6NaB1xqoEY,1079
43
43
  stjames/workflows/batch_docking.py,sha256=o-t5FkfLlbe60jX1_ZeqWSJJ5vsjEIbTa5GLN3ny_tk,1590
44
44
  stjames/workflows/bde.py,sha256=g_In-caftXiimrhfdptHjpfrYQUs3vF58qYmRnaTN8g,10825
45
45
  stjames/workflows/conformer.py,sha256=18aO6ngMBeGAmQkBdLGCCHr398RIYr1v2hD2IT1u4cc,3005
46
- stjames/workflows/conformer_search.py,sha256=1kBUT0yCcTPTCtxg1tlTKHRRXkfNYNqzla_89lDEL9k,15696
46
+ stjames/workflows/conformer_search.py,sha256=b3xbyFdulc8VLtk12a_v_zWaS_bkyi6cVVqNyTucD38,16544
47
47
  stjames/workflows/descriptors.py,sha256=T4tc7xdtBdxESGO86KR323jPQ2pgwxBqgV0khA6MEgQ,584
48
48
  stjames/workflows/docking.py,sha256=t30kqeFXQ0yrlqvN6Jdwt0SdfnJLDsfK-7yFi0gwNbY,4753
49
49
  stjames/workflows/double_ended_ts_search.py,sha256=ovJgEVFc6c3mijCE3TKAY70YvqNmAZ5Y4XgV4-tIxBI,3127
@@ -54,6 +54,7 @@ stjames/workflows/ion_mobility.py,sha256=5vUjEYCnF9sN3dTqqEgWAq0jAfdoFvkLubemoXE
54
54
  stjames/workflows/irc.py,sha256=ZP7icylW8rgo_Uh7h3bmyumn0ru1IyF-61nP5Jnmq3M,3402
55
55
  stjames/workflows/macropka.py,sha256=Krj0xXuB-u57Kqlf4bbRiHDUWCpliFr6YPiYqPmYaWk,3803
56
56
  stjames/workflows/molecular_dynamics.py,sha256=cgjede9TWf-eXRFeUcM59cyVQAhSduL6L0J0oMrX3xc,3543
57
+ stjames/workflows/msa.py,sha256=nK3KmPQv9Sr7yRjNfDWSXIgBrk3PnhvDYHnsVoqoS-M,773
57
58
  stjames/workflows/multistage_opt.py,sha256=UN-4WLsT2WEjO5KqDPrcCkb708Co-ZScHx3g2bto768,16597
58
59
  stjames/workflows/nmr.py,sha256=1QEF4SB6dWIr-jzLEZ7V972UnRUOTufOJSHwIGyV3dM,2681
59
60
  stjames/workflows/pka.py,sha256=i-jzl2lN0yRWc0tgrWSBCplITEByfRyEQrlUhjnzcBc,4580
@@ -66,9 +67,9 @@ stjames/workflows/solubility.py,sha256=lfCVvJjqEaddLUpK6WBxjB7u12Sci-K95A5_qIMkI
66
67
  stjames/workflows/spin_states.py,sha256=0degmE-frovgoXweshZyjfjqL7nkbaFoO9YoJhvQnaI,4748
67
68
  stjames/workflows/strain.py,sha256=paYxDDQTB1eYP_c2kLVz1-QX7Vpw0LLb3ujnFin_SOM,1834
68
69
  stjames/workflows/tautomer.py,sha256=7eYKziGPg8Km6lfowTzSkgJfJ4SHUPrAmnTf8Bi-SB0,1164
69
- stjames/workflows/workflow.py,sha256=cYNP_tK1afJTscXJzYv5VGe8n2Est6PpthS268oRi1U,2494
70
- stjames-0.0.121.dist-info/licenses/LICENSE,sha256=i05z7xEhyrg6f8j0lR3XYjShnF-MJGFQ-DnpsZ8yiVI,1084
71
- stjames-0.0.121.dist-info/METADATA,sha256=TeYRvGYD3m3c1KxoQa197eGf6oJ9KvyNkJ0gLN4kEJ0,1725
72
- stjames-0.0.121.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
- stjames-0.0.121.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
74
- stjames-0.0.121.dist-info/RECORD,,
70
+ stjames/workflows/workflow.py,sha256=nwSX-KO2J9Lgd_uNuoYxS1Lv8rZB-jmTfphb8KJODC8,2720
71
+ stjames-0.0.122.dist-info/licenses/LICENSE,sha256=i05z7xEhyrg6f8j0lR3XYjShnF-MJGFQ-DnpsZ8yiVI,1084
72
+ stjames-0.0.122.dist-info/METADATA,sha256=9McsAFJMWpw8ymFCC3VTRWKU6cXslDyZKGvTHt1u7Og,1725
73
+ stjames-0.0.122.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
74
+ stjames-0.0.122.dist-info/top_level.txt,sha256=FYCwxl6quhYOAgG-mnPQcCK8vsVM7B8rIUrO-WrQ_PI,8
75
+ stjames-0.0.122.dist-info/RECORD,,