stjames 0.0.122__tar.gz → 0.0.123__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 (89) hide show
  1. {stjames-0.0.122/stjames.egg-info → stjames-0.0.123}/PKG-INFO +1 -1
  2. {stjames-0.0.122 → stjames-0.0.123}/pyproject.toml +1 -1
  3. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/conformer_search.py +25 -2
  4. stjames-0.0.123/stjames/workflows/dna.py +13 -0
  5. stjames-0.0.123/stjames/workflows/protein.py +15 -0
  6. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/protein_cofolding.py +5 -1
  7. stjames-0.0.123/stjames/workflows/rna.py +13 -0
  8. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/workflow.py +22 -18
  9. {stjames-0.0.122 → stjames-0.0.123/stjames.egg-info}/PKG-INFO +1 -1
  10. {stjames-0.0.122 → stjames-0.0.123}/stjames.egg-info/SOURCES.txt +3 -0
  11. {stjames-0.0.122 → stjames-0.0.123}/LICENSE +0 -0
  12. {stjames-0.0.122 → stjames-0.0.123}/README.md +0 -0
  13. {stjames-0.0.122 → stjames-0.0.123}/setup.cfg +0 -0
  14. {stjames-0.0.122 → stjames-0.0.123}/stjames/__init__.py +0 -0
  15. {stjames-0.0.122 → stjames-0.0.123}/stjames/_deprecated_solvent_settings.py +0 -0
  16. {stjames-0.0.122 → stjames-0.0.123}/stjames/atom.py +0 -0
  17. {stjames-0.0.122 → stjames-0.0.123}/stjames/atomium_stjames/__init__.py +0 -0
  18. {stjames-0.0.122 → stjames-0.0.123}/stjames/atomium_stjames/data.py +0 -0
  19. {stjames-0.0.122 → stjames-0.0.123}/stjames/atomium_stjames/mmcif.py +0 -0
  20. {stjames-0.0.122 → stjames-0.0.123}/stjames/atomium_stjames/pdb.py +0 -0
  21. {stjames-0.0.122 → stjames-0.0.123}/stjames/atomium_stjames/utilities.py +0 -0
  22. {stjames-0.0.122 → stjames-0.0.123}/stjames/base.py +0 -0
  23. {stjames-0.0.122 → stjames-0.0.123}/stjames/basis_set.py +0 -0
  24. {stjames-0.0.122 → stjames-0.0.123}/stjames/calculation.py +0 -0
  25. {stjames-0.0.122 → stjames-0.0.123}/stjames/compute_settings.py +0 -0
  26. {stjames-0.0.122 → stjames-0.0.123}/stjames/constraint.py +0 -0
  27. {stjames-0.0.122 → stjames-0.0.123}/stjames/correction.py +0 -0
  28. {stjames-0.0.122 → stjames-0.0.123}/stjames/data/__init__.py +0 -0
  29. {stjames-0.0.122 → stjames-0.0.123}/stjames/data/bragg_radii.json +0 -0
  30. {stjames-0.0.122 → stjames-0.0.123}/stjames/data/elements.py +0 -0
  31. {stjames-0.0.122 → stjames-0.0.123}/stjames/data/isotopes.json +0 -0
  32. {stjames-0.0.122 → stjames-0.0.123}/stjames/data/nist_isotopes.json +0 -0
  33. {stjames-0.0.122 → stjames-0.0.123}/stjames/data/read_nist_isotopes.py +0 -0
  34. {stjames-0.0.122 → stjames-0.0.123}/stjames/data/symbol_element.json +0 -0
  35. {stjames-0.0.122 → stjames-0.0.123}/stjames/engine.py +0 -0
  36. {stjames-0.0.122 → stjames-0.0.123}/stjames/message.py +0 -0
  37. {stjames-0.0.122 → stjames-0.0.123}/stjames/method.py +0 -0
  38. {stjames-0.0.122 → stjames-0.0.123}/stjames/mode.py +0 -0
  39. {stjames-0.0.122 → stjames-0.0.123}/stjames/molecule.py +0 -0
  40. {stjames-0.0.122 → stjames-0.0.123}/stjames/opt_settings.py +0 -0
  41. {stjames-0.0.122 → stjames-0.0.123}/stjames/optimization/__init__.py +0 -0
  42. {stjames-0.0.122 → stjames-0.0.123}/stjames/optimization/freezing_string_method.py +0 -0
  43. {stjames-0.0.122 → stjames-0.0.123}/stjames/pdb.py +0 -0
  44. {stjames-0.0.122 → stjames-0.0.123}/stjames/periodic_cell.py +0 -0
  45. {stjames-0.0.122 → stjames-0.0.123}/stjames/py.typed +0 -0
  46. {stjames-0.0.122 → stjames-0.0.123}/stjames/scf_settings.py +0 -0
  47. {stjames-0.0.122 → stjames-0.0.123}/stjames/settings.py +0 -0
  48. {stjames-0.0.122 → stjames-0.0.123}/stjames/solvent.py +0 -0
  49. {stjames-0.0.122 → stjames-0.0.123}/stjames/status.py +0 -0
  50. {stjames-0.0.122 → stjames-0.0.123}/stjames/task.py +0 -0
  51. {stjames-0.0.122 → stjames-0.0.123}/stjames/thermochem_settings.py +0 -0
  52. {stjames-0.0.122 → stjames-0.0.123}/stjames/types.py +0 -0
  53. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/__init__.py +0 -0
  54. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/admet.py +0 -0
  55. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/basic_calculation.py +0 -0
  56. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/batch_docking.py +0 -0
  57. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/bde.py +0 -0
  58. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/conformer.py +0 -0
  59. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/descriptors.py +0 -0
  60. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/docking.py +0 -0
  61. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/double_ended_ts_search.py +0 -0
  62. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/electronic_properties.py +0 -0
  63. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/fukui.py +0 -0
  64. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/hydrogen_bond_basicity.py +0 -0
  65. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/ion_mobility.py +0 -0
  66. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/irc.py +0 -0
  67. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/macropka.py +0 -0
  68. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/molecular_dynamics.py +0 -0
  69. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/msa.py +0 -0
  70. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/multistage_opt.py +0 -0
  71. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/nmr.py +0 -0
  72. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/pka.py +0 -0
  73. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/pose_analysis_md.py +0 -0
  74. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/protein_binder_design.py +0 -0
  75. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/redox_potential.py +0 -0
  76. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/scan.py +0 -0
  77. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/solubility.py +0 -0
  78. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/spin_states.py +0 -0
  79. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/strain.py +0 -0
  80. {stjames-0.0.122 → stjames-0.0.123}/stjames/workflows/tautomer.py +0 -0
  81. {stjames-0.0.122 → stjames-0.0.123}/stjames.egg-info/dependency_links.txt +0 -0
  82. {stjames-0.0.122 → stjames-0.0.123}/stjames.egg-info/requires.txt +0 -0
  83. {stjames-0.0.122 → stjames-0.0.123}/stjames.egg-info/top_level.txt +0 -0
  84. {stjames-0.0.122 → stjames-0.0.123}/tests/test_constraints.py +0 -0
  85. {stjames-0.0.122 → stjames-0.0.123}/tests/test_from_extxyz.py +0 -0
  86. {stjames-0.0.122 → stjames-0.0.123}/tests/test_molecule.py +0 -0
  87. {stjames-0.0.122 → stjames-0.0.123}/tests/test_pdb.py +0 -0
  88. {stjames-0.0.122 → stjames-0.0.123}/tests/test_rounding.py +0 -0
  89. {stjames-0.0.122 → stjames-0.0.123}/tests/test_settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.122
3
+ Version: 0.0.123
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.122"
3
+ version = "0.0.123"
4
4
  description = "standardized JSON atom/molecule encoding scheme"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -41,11 +41,24 @@ class ScreeningSettings(BaseModel):
41
41
  max_confs: int | None = None
42
42
 
43
43
 
44
+ class ConformerClusteringDescriptor(LowercaseStrEnum):
45
+ """
46
+ Potential descriptors to employ in conformer clustering.
47
+ """
48
+
49
+ SOLVENT_ACCESSIBLE_SURFACE_AREA = "solvent_accessible_surface_area"
50
+ POLAR_SOLVENT_ACCESSIBLE_SURACE_AREA = "polar_solvent_accessible_surface_area"
51
+ RADIUS_OF_GYRATION = "radius_of_gyration"
52
+ PLANE_OF_BEST_FIT = "plane_of_best_fit"
53
+ NORMALIZED_PRINCIPAL_MOMENT_RATIO_1 = "normalized_principal_moment_ratio_1"
54
+ NORMALIZED_PRINCIPAL_MOMENT_RATIO_2 = "normalized_principal_moment_ratio_2"
55
+
56
+
44
57
  class ConformerClusteringSettings(Base):
45
58
  """
46
- Settings for (optionally) clustering conformers based on three-dimensional properties.
59
+ Settings for clustering conformers based on their three-dimensional properties.
47
60
 
48
- The properties used for clustering are:
61
+ The properties used for clustering by default are:
49
62
  - Solvent-accessible surface area
50
63
  - Polar solvent-accessible surface area
51
64
  - Radius of gyration
@@ -59,6 +72,15 @@ class ConformerClusteringSettings(Base):
59
72
  :param conformers_per_cluster: the number of compounds to pick from each cluster
60
73
  """
61
74
 
75
+ descriptors: list[ConformerClusteringDescriptor] = [
76
+ ConformerClusteringDescriptor.SOLVENT_ACCESSIBLE_SURFACE_AREA,
77
+ ConformerClusteringDescriptor.POLAR_SOLVENT_ACCESSIBLE_SURACE_AREA,
78
+ ConformerClusteringDescriptor.RADIUS_OF_GYRATION,
79
+ ConformerClusteringDescriptor.PLANE_OF_BEST_FIT,
80
+ ConformerClusteringDescriptor.NORMALIZED_PRINCIPAL_MOMENT_RATIO_1,
81
+ ConformerClusteringDescriptor.NORMALIZED_PRINCIPAL_MOMENT_RATIO_2,
82
+ ]
83
+
62
84
  num_clusters: PositiveInt = 5
63
85
  conformers_per_cluster: PositiveInt = 3
64
86
 
@@ -324,6 +346,7 @@ class ConformerGenMixin(BaseModel):
324
346
  :param constraints: constraints to add
325
347
  :param nci: add a constraining potential for non-covalent interactions
326
348
  :param max_confs: maximum number of conformers to keep
349
+ :param clustering_settings: how to cluster the conformers (if at all)
327
350
  """
328
351
 
329
352
  conf_gen_mode: Mode = Mode.RAPID
@@ -0,0 +1,13 @@
1
+ """DNA-related workflow data models."""
2
+
3
+ from ..base import Base
4
+
5
+
6
+ class DNASequence(Base):
7
+ """
8
+ DNA sequence metadata.
9
+
10
+ :param sequence: nucleotide string
11
+ """
12
+
13
+ sequence: str
@@ -0,0 +1,15 @@
1
+ """Protein-related workflow data models."""
2
+
3
+ from ..base import Base
4
+
5
+
6
+ class ProteinSequence(Base):
7
+ """
8
+ Protein sequence metadata including cyclic flag.
9
+
10
+ :param sequence: amino-acid sequence string
11
+ :param cyclic: whether this sequence forms a cyclic peptide (defaults to False)
12
+ """
13
+
14
+ sequence: str
15
+ cyclic: bool = False
@@ -68,10 +68,14 @@ class AffinityScore(BaseModel):
68
68
 
69
69
  class ProteinCofoldingWorkflow(FASTAWorkflow):
70
70
  """
71
- A workflow for predicting structures. Especially protein structures.
71
+ Workflow for predicting structures.
72
+
73
+ Especially protein structures. At least one biological sequence is required.
72
74
 
73
75
  Inherited:
74
76
  :param initial_protein_sequences: protein sequences of interest
77
+ :param initial_dna_sequences: DNA sequences of interest
78
+ :param initial_rna_sequences: RNA sequences of interest
75
79
  :param initial_smiles_list: SMILES strings of interest
76
80
 
77
81
  New:
@@ -0,0 +1,13 @@
1
+ """RNA-related workflow data models."""
2
+
3
+ from ..base import Base
4
+
5
+
6
+ class RNASequence(Base):
7
+ """
8
+ RNA sequence metadata.
9
+
10
+ :param sequence: nucleotide string
11
+ """
12
+
13
+ sequence: str
@@ -1,5 +1,7 @@
1
1
  """Base classes for workflows."""
2
2
 
3
+ from typing import Any
4
+
3
5
  from pydantic import field_validator
4
6
 
5
7
  from ..base import Base
@@ -7,6 +9,9 @@ from ..message import Message
7
9
  from ..mode import Mode
8
10
  from ..molecule import Molecule
9
11
  from ..types import UUID
12
+ from .dna import DNASequence
13
+ from .protein import ProteinSequence
14
+ from .rna import RNASequence
10
15
 
11
16
 
12
17
  class Workflow(Base):
@@ -22,31 +27,30 @@ class Workflow(Base):
22
27
  return repr(self)
23
28
 
24
29
 
25
- class ProteinSequence(Base):
26
- """
27
- Protein sequence metadata including cyclic flag.
28
-
29
- :param sequence: amino-acid sequence string
30
- :param cyclic: whether this sequence forms a cyclic peptide (defaults to False)
31
- """
32
-
33
- sequence: str
34
- cyclic: bool = False
35
-
36
-
37
30
  class FASTAWorkflow(Workflow):
38
31
  """
39
- Base class for Workflows that operate on protein sequences and SMILES.
32
+ Base class for Workflows that operate on biological sequences and SMILES.
40
33
 
41
- :param initial_protein_sequences: proteins to evaluate, either plain sequence strings or ProteinSequence objects with cyclic flags
34
+ :param initial_protein_sequences: protein sequences to evaluate, either plain sequence strings or ProteinSequence objects with metadata
35
+ :param initial_dna_sequences: DNA sequences to evaluate, either plain sequence strings or DNASequence objects with metadata
36
+ :param initial_rna_sequences: RNA sequences to evaluate, either plain sequence strings or RNASequence objects with metadata
42
37
  :param initial_smiles_list: SMILES strings of interest
43
38
  :param ligand_binding_affinity_index: optional index selecting which ligand affinity to evaluate
39
+ :raises ValueError: if none of the sequence lists are provided
44
40
  """
45
41
 
46
- initial_protein_sequences: list[ProteinSequence] | list[str]
47
- initial_smiles_list: list[str] | None = None
42
+ initial_protein_sequences: list[ProteinSequence] | list[str] = []
43
+ initial_dna_sequences: list[DNASequence] = []
44
+ initial_rna_sequences: list[RNASequence] = []
45
+ initial_smiles_list: list[str] = []
48
46
  ligand_binding_affinity_index: int | None = None
49
47
 
48
+ def model_post_init(self, __context: Any) -> None:
49
+ if not (self.initial_protein_sequences or self.initial_dna_sequences or self.initial_rna_sequences):
50
+ raise ValueError(
51
+ "Provide at least one of `initial_protein_sequences`, `initial_dna_sequences`, or `initial_rna_sequences`.",
52
+ )
53
+
50
54
 
51
55
  class SMILESWorkflow(Workflow):
52
56
  """
@@ -99,10 +103,10 @@ class ProteinSequenceWorkflow(Workflow):
99
103
  """
100
104
  Base class for Workflows that operate on protein sequences.
101
105
 
102
- :param initial_protein_sequences: protein sequences of interest
106
+ :param initial_protein_sequences: protein sequences to evaluate, either plain sequence strings or ProteinSequence objects with metadata
103
107
  """
104
108
 
105
- protein_sequences: list[str]
109
+ initial_protein_sequences: list[ProteinSequence] | list[str] = []
106
110
 
107
111
 
108
112
  class DBCalculation(Base):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.122
3
+ Version: 0.0.123
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
@@ -53,6 +53,7 @@ stjames/workflows/bde.py
53
53
  stjames/workflows/conformer.py
54
54
  stjames/workflows/conformer_search.py
55
55
  stjames/workflows/descriptors.py
56
+ stjames/workflows/dna.py
56
57
  stjames/workflows/docking.py
57
58
  stjames/workflows/double_ended_ts_search.py
58
59
  stjames/workflows/electronic_properties.py
@@ -67,9 +68,11 @@ stjames/workflows/multistage_opt.py
67
68
  stjames/workflows/nmr.py
68
69
  stjames/workflows/pka.py
69
70
  stjames/workflows/pose_analysis_md.py
71
+ stjames/workflows/protein.py
70
72
  stjames/workflows/protein_binder_design.py
71
73
  stjames/workflows/protein_cofolding.py
72
74
  stjames/workflows/redox_potential.py
75
+ stjames/workflows/rna.py
73
76
  stjames/workflows/scan.py
74
77
  stjames/workflows/solubility.py
75
78
  stjames/workflows/spin_states.py
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