stjames 0.0.92__tar.gz → 0.0.93__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 (81) hide show
  1. {stjames-0.0.92/stjames.egg-info → stjames-0.0.93}/PKG-INFO +1 -1
  2. {stjames-0.0.92 → stjames-0.0.93}/pyproject.toml +1 -1
  3. {stjames-0.0.92 → stjames-0.0.93}/stjames/pdb.py +2 -1
  4. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/docking.py +38 -8
  5. {stjames-0.0.92 → stjames-0.0.93/stjames.egg-info}/PKG-INFO +1 -1
  6. {stjames-0.0.92 → stjames-0.0.93}/LICENSE +0 -0
  7. {stjames-0.0.92 → stjames-0.0.93}/README.md +0 -0
  8. {stjames-0.0.92 → stjames-0.0.93}/setup.cfg +0 -0
  9. {stjames-0.0.92 → stjames-0.0.93}/stjames/__init__.py +0 -0
  10. {stjames-0.0.92 → stjames-0.0.93}/stjames/_deprecated_solvent_settings.py +0 -0
  11. {stjames-0.0.92 → stjames-0.0.93}/stjames/atom.py +0 -0
  12. {stjames-0.0.92 → stjames-0.0.93}/stjames/atomium_stjames/__init__.py +0 -0
  13. {stjames-0.0.92 → stjames-0.0.93}/stjames/atomium_stjames/data.py +0 -0
  14. {stjames-0.0.92 → stjames-0.0.93}/stjames/atomium_stjames/mmcif.py +0 -0
  15. {stjames-0.0.92 → stjames-0.0.93}/stjames/atomium_stjames/pdb.py +0 -0
  16. {stjames-0.0.92 → stjames-0.0.93}/stjames/atomium_stjames/utilities.py +0 -0
  17. {stjames-0.0.92 → stjames-0.0.93}/stjames/base.py +0 -0
  18. {stjames-0.0.92 → stjames-0.0.93}/stjames/basis_set.py +0 -0
  19. {stjames-0.0.92 → stjames-0.0.93}/stjames/calculation.py +0 -0
  20. {stjames-0.0.92 → stjames-0.0.93}/stjames/compute_settings.py +0 -0
  21. {stjames-0.0.92 → stjames-0.0.93}/stjames/constraint.py +0 -0
  22. {stjames-0.0.92 → stjames-0.0.93}/stjames/correction.py +0 -0
  23. {stjames-0.0.92 → stjames-0.0.93}/stjames/data/__init__.py +0 -0
  24. {stjames-0.0.92 → stjames-0.0.93}/stjames/data/bragg_radii.json +0 -0
  25. {stjames-0.0.92 → stjames-0.0.93}/stjames/data/elements.py +0 -0
  26. {stjames-0.0.92 → stjames-0.0.93}/stjames/data/isotopes.json +0 -0
  27. {stjames-0.0.92 → stjames-0.0.93}/stjames/data/nist_isotopes.json +0 -0
  28. {stjames-0.0.92 → stjames-0.0.93}/stjames/data/read_nist_isotopes.py +0 -0
  29. {stjames-0.0.92 → stjames-0.0.93}/stjames/data/symbol_element.json +0 -0
  30. {stjames-0.0.92 → stjames-0.0.93}/stjames/diis_settings.py +0 -0
  31. {stjames-0.0.92 → stjames-0.0.93}/stjames/engine.py +0 -0
  32. {stjames-0.0.92 → stjames-0.0.93}/stjames/grid_settings.py +0 -0
  33. {stjames-0.0.92 → stjames-0.0.93}/stjames/int_settings.py +0 -0
  34. {stjames-0.0.92 → stjames-0.0.93}/stjames/message.py +0 -0
  35. {stjames-0.0.92 → stjames-0.0.93}/stjames/method.py +0 -0
  36. {stjames-0.0.92 → stjames-0.0.93}/stjames/mode.py +0 -0
  37. {stjames-0.0.92 → stjames-0.0.93}/stjames/molecule.py +0 -0
  38. {stjames-0.0.92 → stjames-0.0.93}/stjames/opt_settings.py +0 -0
  39. {stjames-0.0.92 → stjames-0.0.93}/stjames/periodic_cell.py +0 -0
  40. {stjames-0.0.92 → stjames-0.0.93}/stjames/py.typed +0 -0
  41. {stjames-0.0.92 → stjames-0.0.93}/stjames/scf_settings.py +0 -0
  42. {stjames-0.0.92 → stjames-0.0.93}/stjames/settings.py +0 -0
  43. {stjames-0.0.92 → stjames-0.0.93}/stjames/solvent.py +0 -0
  44. {stjames-0.0.92 → stjames-0.0.93}/stjames/status.py +0 -0
  45. {stjames-0.0.92 → stjames-0.0.93}/stjames/task.py +0 -0
  46. {stjames-0.0.92 → stjames-0.0.93}/stjames/thermochem_settings.py +0 -0
  47. {stjames-0.0.92 → stjames-0.0.93}/stjames/types.py +0 -0
  48. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/__init__.py +0 -0
  49. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/admet.py +0 -0
  50. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/basic_calculation.py +0 -0
  51. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/bde.py +0 -0
  52. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/conformer.py +0 -0
  53. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/conformer_search.py +0 -0
  54. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/descriptors.py +0 -0
  55. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/electronic_properties.py +0 -0
  56. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/fukui.py +0 -0
  57. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/hydrogen_bond_basicity.py +0 -0
  58. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/ion_mobility.py +0 -0
  59. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/irc.py +0 -0
  60. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/macropka.py +0 -0
  61. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/molecular_dynamics.py +0 -0
  62. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/multistage_opt.py +0 -0
  63. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/pka.py +0 -0
  64. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/pose_analysis_md.py +0 -0
  65. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/protein_cofolding.py +0 -0
  66. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/redox_potential.py +0 -0
  67. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/scan.py +0 -0
  68. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/solubility.py +0 -0
  69. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/spin_states.py +0 -0
  70. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/tautomer.py +0 -0
  71. {stjames-0.0.92 → stjames-0.0.93}/stjames/workflows/workflow.py +0 -0
  72. {stjames-0.0.92 → stjames-0.0.93}/stjames.egg-info/SOURCES.txt +0 -0
  73. {stjames-0.0.92 → stjames-0.0.93}/stjames.egg-info/dependency_links.txt +0 -0
  74. {stjames-0.0.92 → stjames-0.0.93}/stjames.egg-info/requires.txt +0 -0
  75. {stjames-0.0.92 → stjames-0.0.93}/stjames.egg-info/top_level.txt +0 -0
  76. {stjames-0.0.92 → stjames-0.0.93}/tests/test_constraints.py +0 -0
  77. {stjames-0.0.92 → stjames-0.0.93}/tests/test_from_extxyz.py +0 -0
  78. {stjames-0.0.92 → stjames-0.0.93}/tests/test_molecule.py +0 -0
  79. {stjames-0.0.92 → stjames-0.0.93}/tests/test_pdb.py +0 -0
  80. {stjames-0.0.92 → stjames-0.0.93}/tests/test_rounding.py +0 -0
  81. {stjames-0.0.92 → stjames-0.0.93}/tests/test_settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.92
3
+ Version: 0.0.93
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.92"
3
+ version = "0.0.93"
4
4
  description = "standardized JSON atom/molecule encoding scheme"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -448,6 +448,7 @@ def _format_atom_line(
448
448
  chg = " "
449
449
 
450
450
  atom_name = atom.name if atom.name else atom.element
451
+
451
452
  occupancy = atom.occupancy if atom.occupancy else 1.0
452
453
 
453
454
  # Construct the line.
@@ -455,7 +456,7 @@ def _format_atom_line(
455
456
  line = (
456
457
  f"{record_type}"
457
458
  f"{serial:5d} " # atom serial number (columns 7-11)
458
- f"{atom_name:<4}" # atom name (columns 13-16, left-justified in this snippet)
459
+ f"{(' ' + atom_name if len(atom_name) < 4 else atom_name):<4}" # atom name (columns 13-16, left-justified in this snippet)
459
460
  f"{alt_loc_char}" # altLoc (column 17)
460
461
  f"{residue_name:>3}" # residue name (columns 18-20)
461
462
  f" {chain_char}" # chain ID (column 22)
@@ -7,6 +7,7 @@ from pydantic import AfterValidator, ConfigDict, field_validator, model_validato
7
7
  from ..base import Base, round_float
8
8
  from ..pdb import PDB
9
9
  from ..types import UUID, Vector3D
10
+ from .conformer_search import ConformerGenSettings, ETKDGSettings
10
11
  from .workflow import MoleculeWorkflow
11
12
 
12
13
 
@@ -20,6 +21,28 @@ class Score(Base):
20
21
 
21
22
  pose: UUID | None # for calculation
22
23
  score: Annotated[float, AfterValidator(round_float(3))]
24
+ posebusters_valid: bool
25
+
26
+
27
+ class DockingSettings(Base):
28
+ """
29
+ Base class for controlling how docked poses are generated.
30
+
31
+ :param max_poses: the maximum number of poses generated per input molecule
32
+ """
33
+
34
+ max_poses: int = 4
35
+
36
+
37
+ class VinaSettings(DockingSettings):
38
+ """
39
+ Controls how AutoDock Vina is run.
40
+
41
+ :param exhaustiveness: how many times Vina attempts to find a pose.
42
+ 8 is typical, 32 is considered relatively careful.
43
+ """
44
+
45
+ exhaustiveness: int = 8
23
46
 
24
47
 
25
48
  class DockingWorkflow(MoleculeWorkflow):
@@ -35,31 +58,38 @@ class DockingWorkflow(MoleculeWorkflow):
35
58
  :param mode: Mode for workflow (currently unused)
36
59
 
37
60
  New:
38
- :param molecules: Molecules to dock (optional)
39
- :param smiles: SMILES strings of the ligands (optional)
61
+ :param docking_engine: which docking method to use
40
62
  :param do_csearch: whether to csearch starting structures
63
+ :param csearch_settings: settings for initial conformer search.
41
64
  :param do_optimization: whether to optimize starting structures
65
+ :param opt_settings: settings for conformer optimization.
42
66
  :param do_pose_refinement: whether to optimize non-rotatable bonds in output poses
43
- :param conformers: UUIDs of optimized conformers
44
67
  :param target: PDB of the protein.
45
68
  :param target_uuid: UUID of the protein.
46
69
  :param pocket: center (x, y, z) and size (x, y, z) of the pocket
47
70
 
48
71
  Results:
72
+ :param conformers: UUIDs of optimized conformers
49
73
  :param scores: docked poses sorted by score
50
74
  """
51
75
 
52
76
  model_config = ConfigDict(arbitrary_types_allowed=True)
53
77
 
54
- do_csearch: bool = True
55
- do_optimization: bool = True
56
- conformers: list[UUID] = []
57
-
58
78
  target: PDB | None = None
59
79
  target_uuid: UUID | None = None
60
80
  pocket: tuple[Vector3D, Vector3D]
61
81
 
82
+ do_csearch: bool = True
83
+ conformer_gen_settings: ConformerGenSettings = ETKDGSettings(mode="reckless")
84
+
85
+ do_optimization: bool = True
86
+ # optimization_settings - here in future once we have a cleaner mode sol'n, ccw 7.9.25
87
+
88
+ docking_settings: DockingSettings = VinaSettings()
89
+
62
90
  do_pose_refinement: bool = True
91
+
92
+ conformers: list[UUID] = []
63
93
  scores: list[Score] = []
64
94
 
65
95
  def __str__(self) -> str:
@@ -80,7 +110,7 @@ class DockingWorkflow(MoleculeWorkflow):
80
110
  def check_protein(self) -> Self:
81
111
  """Check if protein is provided."""
82
112
  if not self.target and not self.target_uuid:
83
- raise ValueError("Must provide either molecules or smiles")
113
+ raise ValueError("Must provide either target or target_uuid")
84
114
  return self
85
115
 
86
116
  @field_validator("pocket", mode="after")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stjames
3
- Version: 0.0.92
3
+ Version: 0.0.93
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
File without changes
File without changes
File without changes