rowan-python 2.1.16__tar.gz → 3.0.0__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.
Files changed (132) hide show
  1. {rowan_python-2.1.16 → rowan_python-3.0.0}/.gitignore +8 -0
  2. {rowan_python-2.1.16 → rowan_python-3.0.0}/PKG-INFO +3 -3
  3. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/PROTAC_solubility.py +9 -10
  4. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/admet.py +6 -3
  5. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/analogue_docking.py +12 -5
  6. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/aqueous_solubility.py +7 -4
  7. rowan_python-3.0.0/examples/basic_calculation.py +28 -0
  8. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/basic_calculation_from_json.py +8 -4
  9. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/basic_calculation_with_constraint.py +6 -3
  10. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/basic_calculation_with_solvent.py +8 -10
  11. rowan_python-3.0.0/examples/batch_docking.py +39 -0
  12. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/bde.py +6 -3
  13. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/boltz_paired_msa.py +6 -6
  14. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/boltz_single_msa.py +6 -6
  15. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/chai_paired_msa.py +6 -6
  16. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/chai_single_msa.py +6 -6
  17. rowan_python-3.0.0/examples/cofolding_screen.py +37 -0
  18. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/colabfold_paired_msa.py +6 -6
  19. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/colabfold_single_msa.py +6 -6
  20. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/conformer_dependent_redox.py +8 -12
  21. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/conformers.py +7 -3
  22. rowan_python-3.0.0/examples/data/tyk2_ligands.sdf +1593 -0
  23. rowan_python-3.0.0/examples/data/tyk2_structure.pdb +4687 -0
  24. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/dcd_download.py +1 -1
  25. rowan_python-3.0.0/examples/docking_screen.py +56 -0
  26. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/double_ended_ts_search.py +8 -6
  27. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/electronic_properties.py +6 -3
  28. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/fukui_index.py +6 -3
  29. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/hydrogen_bond_basicity.py +6 -3
  30. rowan_python-3.0.0/examples/interaction_energy_decomposition.py +74 -0
  31. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/ion_mobility.py +5 -3
  32. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/irc.py +6 -3
  33. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/macropka.py +6 -3
  34. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/membrane_permeability.py +8 -5
  35. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/multistage_optimization.py +14 -3
  36. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/nmr.py +6 -4
  37. rowan_python-3.0.0/examples/optimization.py +39 -0
  38. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/pdb_download.py +1 -1
  39. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/phenol_pka.py +7 -8
  40. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/pka.py +10 -5
  41. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/pose_analysis_md.py +8 -5
  42. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/protein_binder_design.py +6 -3
  43. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/protein_cofolding.py +6 -3
  44. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/protein_md.py +6 -5
  45. rowan_python-3.0.0/examples/rbfe_graph.py +30 -0
  46. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/redox_potential.py +7 -4
  47. rowan_python-3.0.0/examples/relative_binding_free_energy_perturbation.py +63 -0
  48. rowan_python-3.0.0/examples/retrieve_workflow.py +32 -0
  49. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/scan.py +6 -3
  50. rowan_python-3.0.0/examples/solvent_dependent_conformers.py +37 -0
  51. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/spin_states.py +7 -3
  52. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/strain.py +6 -3
  53. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/tautomer.py +6 -3
  54. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/template.py +6 -3
  55. {rowan_python-2.1.16 → rowan_python-3.0.0}/pixi.lock +288 -318
  56. {rowan_python-2.1.16 → rowan_python-3.0.0}/pyproject.toml +4 -4
  57. rowan_python-3.0.0/rowan/__init__.py +15 -0
  58. rowan_python-3.0.0/rowan/calculation.py +112 -0
  59. rowan_python-3.0.0/rowan/config.py +680 -0
  60. {rowan_python-2.1.16 → rowan_python-3.0.0}/rowan/folder.py +57 -16
  61. rowan_python-3.0.0/rowan/molecule.py +268 -0
  62. {rowan_python-2.1.16 → rowan_python-3.0.0}/rowan/project.py +36 -9
  63. {rowan_python-2.1.16 → rowan_python-3.0.0}/rowan/protein.py +147 -26
  64. rowan_python-3.0.0/rowan/rowan_rdkit/__init__.py +14 -0
  65. {rowan_python-2.1.16 → rowan_python-3.0.0}/rowan/rowan_rdkit/chem_utils.py +49 -42
  66. rowan_python-3.0.0/rowan/types.py +15 -0
  67. {rowan_python-2.1.16 → rowan_python-3.0.0}/rowan/user.py +1 -1
  68. {rowan_python-2.1.16 → rowan_python-3.0.0}/rowan/utils.py +14 -3
  69. rowan_python-3.0.0/rowan/workflows/__init__.py +123 -0
  70. rowan_python-3.0.0/rowan/workflows/admet.py +69 -0
  71. rowan_python-3.0.0/rowan/workflows/analogue_docking.py +220 -0
  72. rowan_python-3.0.0/rowan/workflows/base.py +766 -0
  73. rowan_python-3.0.0/rowan/workflows/basic_calculation.py +167 -0
  74. rowan_python-3.0.0/rowan/workflows/batch_docking.py +93 -0
  75. rowan_python-3.0.0/rowan/workflows/bde.py +169 -0
  76. rowan_python-3.0.0/rowan/workflows/conformer_search.py +199 -0
  77. rowan_python-3.0.0/rowan/workflows/constants.py +19 -0
  78. rowan_python-3.0.0/rowan/workflows/descriptors.py +66 -0
  79. rowan_python-3.0.0/rowan/workflows/docking.py +204 -0
  80. rowan_python-3.0.0/rowan/workflows/double_ended_ts_search.py +196 -0
  81. rowan_python-3.0.0/rowan/workflows/electronic_properties.py +188 -0
  82. rowan_python-3.0.0/rowan/workflows/fukui.py +119 -0
  83. rowan_python-3.0.0/rowan/workflows/hydrogen_bond_donor_acceptor_strength.py +137 -0
  84. rowan_python-3.0.0/rowan/workflows/interaction_energy_decomposition.py +149 -0
  85. rowan_python-3.0.0/rowan/workflows/ion_mobility.py +96 -0
  86. rowan_python-3.0.0/rowan/workflows/irc.py +200 -0
  87. rowan_python-3.0.0/rowan/workflows/macropka.py +162 -0
  88. rowan_python-3.0.0/rowan/workflows/membrane_permeability.py +127 -0
  89. rowan_python-3.0.0/rowan/workflows/msa.py +132 -0
  90. rowan_python-3.0.0/rowan/workflows/multistage_optimization.py +172 -0
  91. rowan_python-3.0.0/rowan/workflows/nmr.py +151 -0
  92. rowan_python-3.0.0/rowan/workflows/pka.py +200 -0
  93. rowan_python-3.0.0/rowan/workflows/pose_analysis_md.py +241 -0
  94. rowan_python-3.0.0/rowan/workflows/protein_binder_design.py +201 -0
  95. rowan_python-3.0.0/rowan/workflows/protein_cofolding.py +322 -0
  96. rowan_python-3.0.0/rowan/workflows/protein_md.py +179 -0
  97. rowan_python-3.0.0/rowan/workflows/rbfe_graph.py +149 -0
  98. rowan_python-3.0.0/rowan/workflows/redox_potential.py +140 -0
  99. rowan_python-3.0.0/rowan/workflows/relative_binding_free_energy_perturbation.py +319 -0
  100. rowan_python-3.0.0/rowan/workflows/scan.py +156 -0
  101. rowan_python-3.0.0/rowan/workflows/solubility.py +228 -0
  102. rowan_python-3.0.0/rowan/workflows/solvent_dependent_conformers.py +175 -0
  103. rowan_python-3.0.0/rowan/workflows/spin_states.py +190 -0
  104. rowan_python-3.0.0/rowan/workflows/strain.py +162 -0
  105. rowan_python-3.0.0/rowan/workflows/tautomer_search.py +148 -0
  106. rowan_python-3.0.0/uv.lock +500 -0
  107. rowan_python-2.1.16/examples/basic_calculation.py +0 -19
  108. rowan_python-2.1.16/examples/batch_docking.py +0 -130
  109. rowan_python-2.1.16/examples/cofolding_screen.py +0 -134
  110. rowan_python-2.1.16/examples/docking_screen.py +0 -162
  111. rowan_python-2.1.16/examples/optimization.py +0 -24
  112. rowan_python-2.1.16/rowan/__init__.py +0 -9
  113. rowan_python-2.1.16/rowan/rowan_rdkit/__init__.py +0 -29
  114. rowan_python-2.1.16/rowan/workflow.py +0 -2230
  115. rowan_python-2.1.16/tests/test_macropka_loop.py +0 -69
  116. {rowan_python-2.1.16 → rowan_python-3.0.0}/.envrc +0 -0
  117. {rowan_python-2.1.16 → rowan_python-3.0.0}/.github/workflows/build-and-deploy-docs.yml +0 -0
  118. {rowan_python-2.1.16 → rowan_python-3.0.0}/.github/workflows/python-publish.yml +0 -0
  119. {rowan_python-2.1.16 → rowan_python-3.0.0}/.github/workflows/test.yml +0 -0
  120. {rowan_python-2.1.16 → rowan_python-3.0.0}/.pre-commit-config.yaml +0 -0
  121. {rowan_python-2.1.16 → rowan_python-3.0.0}/LICENSE +0 -0
  122. {rowan_python-2.1.16 → rowan_python-3.0.0}/README.md +0 -0
  123. {rowan_python-2.1.16 → rowan_python-3.0.0}/docs/images/deciduous-tree-favicon.png +0 -0
  124. {rowan_python-2.1.16 → rowan_python-3.0.0}/docs/index.md +0 -0
  125. {rowan_python-2.1.16 → rowan_python-3.0.0}/docs/rowan_rdkit.md +0 -0
  126. {rowan_python-2.1.16 → rowan_python-3.0.0}/docs/stylesheets/colors.css +0 -0
  127. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/data/1iep_receptorH.pdb +0 -0
  128. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/data/citalopram_1iep.xyz +0 -0
  129. {rowan_python-2.1.16 → rowan_python-3.0.0}/examples/data/workflow_example.json +0 -0
  130. {rowan_python-2.1.16 → rowan_python-3.0.0}/mkdocs.yml +0 -0
  131. {rowan_python-2.1.16 → rowan_python-3.0.0}/rowan/constants.py +0 -0
  132. {rowan_python-2.1.16 → rowan_python-3.0.0}/rowan/py.typed +0 -0
@@ -198,3 +198,11 @@ local/
198
198
  .pixi/
199
199
 
200
200
  cyp/
201
+
202
+ # AI agent instructions (not part of the project source)
203
+ AGENTS.md
204
+
205
+ # MSA download output directories
206
+ msa_directory/
207
+
208
+ notes.md
@@ -1,17 +1,17 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rowan-python
3
- Version: 2.1.16
3
+ Version: 3.0.0
4
4
  Summary: Rowan Python Library
5
5
  Project-URL: Homepage, https://github.com/rowansci/rowan-client
6
6
  Project-URL: Bug Tracker, https://github.com/rowansci/rowan-client/issues
7
7
  Author-email: Corin Wagen <corin@rowansci.com>
8
8
  License-File: LICENSE
9
- Requires-Python: >=3.11
9
+ Requires-Python: >=3.12
10
10
  Requires-Dist: httpx
11
11
  Requires-Dist: nest-asyncio
12
12
  Requires-Dist: rdkit
13
13
  Requires-Dist: setuptools
14
- Requires-Dist: stjames>=0.0.155
14
+ Requires-Dist: stjames>=0.0.168
15
15
  Description-Content-Type: text/markdown
16
16
 
17
17
  # Rowan Python Library
@@ -1,9 +1,12 @@
1
1
  # ruff: noqa: E501
2
2
 
3
+ # WARNING: This example submits many workflows and will consume significant credits.
4
+
3
5
  import rowan
4
6
 
5
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
7
+ # Set your API key or use the ROWAN_API_KEY environment variable
6
8
  # rowan.api_key = "rowan-sk..."
9
+ folder = rowan.get_folder("examples/protac-solubility")
7
10
 
8
11
  PROTACs = {
9
12
  4564: "CC1=C(C2=CC=C(CNC(=O)[C@@H]3C[C@@H](O)CN3C(=O)[C@@H](NC(=O)CCCCCCCCCN3C=C(CCCOC(=O)NCC4=CC=C(C(=O)NC5=CC=CC=C5N)C=C4)N=N3)C(C)(C)C)C=C2)SC=N1",
@@ -28,29 +31,25 @@ PROTACs = {
28
31
  2428: "CC1=C(C2=CC=C(CNC(=O)[C@@H]3C[C@@H](O)CN3C(=O)[C@@H](NC(=O)COCCOCCOCC(=O)NC3=CC=C(C(=O)NC4=CC=CC=C4N)C=C3)C(C)(C)C)C=C2)SC=N1",
29
32
  }
30
33
 
31
- protac_solubility_folder = rowan.create_folder(name="PROTAC Solubility")
32
-
33
34
  workflows = []
34
35
  for id, smiles in PROTACs.items():
35
36
  workflows.append(
36
37
  rowan.submit_solubility_workflow(
37
38
  initial_smiles=smiles,
38
- solubility_method="fastsolv",
39
+ method="fastsolv",
39
40
  solvents=["CS(=O)C"],
40
41
  temperatures=[293.15],
41
- folder_uuid=protac_solubility_folder.uuid,
42
42
  name=f"solubility {id}",
43
+ folder=folder,
43
44
  )
44
45
  )
45
46
 
46
47
 
47
- for workflow in workflows:
48
- workflow.wait_for_result()
49
- workflow.fetch_latest(in_place=True)
48
+ workflow_results = [w.result() for w in workflows]
50
49
 
51
50
  print(
52
51
  [
53
- (workflow.name, workflow.data["solubilities"]["CS(=O)C"]["solubilities"])
54
- for workflow in workflows
52
+ (w.name, r.data["solubilities"]["CS(=O)C"]["solubilities"])
53
+ for w, r in zip(workflows, workflow_results, strict=True)
55
54
  ]
56
55
  )
@@ -1,15 +1,18 @@
1
1
  import rowan
2
2
 
3
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
3
+ # Set your API key or use the ROWAN_API_KEY environment variable
4
4
  # rowan.api_key = "rowan-sk..."
5
+ folder = rowan.get_folder("examples")
5
6
 
6
7
  oseltamivir_SMILES = "C1CCOC(=O)C1=C[C@@H](OC(CC)CC)[C@H](NC(C)=O)[C@@H]([NH3+])C1CCC1"
7
8
 
8
9
  workflow = rowan.submit_admet_workflow(
9
10
  initial_smiles=oseltamivir_SMILES,
10
11
  name="Oseltamivir ADMET",
12
+ folder=folder,
11
13
  )
12
14
 
13
15
  print(f"View workflow privately at: https://labs.rowansci.com/solubility/{workflow.uuid}")
14
- workflow.wait_for_result().fetch_latest(in_place=True)
15
- print(workflow)
16
+ result = workflow.result()
17
+ print(result)
18
+ # e.g. <ADMETResult properties=42 preview={'mw': 180.16, 'tpsa': 75.3, ...}>
@@ -4,24 +4,31 @@ import stjames
4
4
 
5
5
  import rowan
6
6
 
7
+ # Set your API key or use the ROWAN_API_KEY environment variable
8
+ # rowan.api_key = "rowan-sk..."
9
+
10
+ folder = rowan.get_folder("examples")
11
+
7
12
  citalopram_analogues = [
8
13
  "CN(C)CCC[C@@]1(c2ccccc2)OCc2cc(C#N)ccc21",
9
14
  "CN(C)CCC[C@@]1(c2ccc(F)cc2)OCc2c(CC)c(C#N)ccc21",
10
15
  "CN(C)CCC[C@@]1(c2ccc(CCC)cc2)OCc2cc(C#N)ccc21",
11
16
  ]
12
17
 
13
- bound_pose = stjames.Molecule.from_file("examples/data/citalopram_1iep.xyz")
18
+ data_dir = Path(__file__).parent / "data"
19
+ bound_pose = stjames.Molecule.from_file(str(data_dir / "citalopram_1iep.xyz"))
14
20
 
15
- protein = rowan.upload_protein("1IEP receptor", Path("examples/data/1iep_receptorH.pdb"))
21
+ protein = rowan.upload_protein("1IEP receptor", data_dir / "1iep_receptorH.pdb")
16
22
 
17
23
  workflow = rowan.submit_analogue_docking_workflow(
18
24
  analogues=citalopram_analogues,
19
25
  protein=protein,
20
26
  initial_molecule=bound_pose,
27
+ folder=folder,
21
28
  )
22
29
 
23
30
  print(f"View MD workflow privately at: https://labs.rowansci.com/analogue-docking/{workflow.uuid}")
24
- workflow.wait_for_result().fetch_latest(in_place=True)
31
+ result = workflow.result()
25
32
 
26
- # print ligand RMSD by frame
27
- print(workflow.data)
33
+ print(result)
34
+ # e.g. <AnalogueDockingResult analogues=3 best=(-8.30, 'CN(C)CCC...')>
@@ -1,18 +1,21 @@
1
1
  import rowan
2
2
 
3
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
3
+ # Set your API key or use the ROWAN_API_KEY environment variable
4
4
  # rowan.api_key = "rowan-sk..."
5
+ folder = rowan.get_folder("examples")
5
6
 
6
7
  oseltamivir_SMILES = "C1CCOC(=O)C1=C[C@@H](OC(CC)CC)[C@H](NC(C)=O)[C@@H]([NH3+])C1CCC1"
7
8
 
8
9
  workflow = rowan.submit_solubility_workflow(
9
10
  initial_smiles=oseltamivir_SMILES,
10
- solubility_method="kingfisher",
11
+ method="kingfisher",
11
12
  solvents=["O"],
12
13
  temperatures=[298.15],
13
14
  name="Oseltamivir aqueous solubility",
15
+ folder=folder,
14
16
  )
15
17
 
16
18
  print(f"View workflow privately at: https://labs.rowansci.com/workflow/{workflow.uuid}")
17
- workflow.wait_for_result().fetch_latest(in_place=True)
18
- print(workflow) # Solubility in log(mol/L), temperature in kelvin
19
+ result = workflow.result()
20
+ print(result)
21
+ # e.g. <SolubilityResult solvents=['water']>
@@ -0,0 +1,28 @@
1
+ from stjames import Method, Molecule
2
+
3
+ import rowan
4
+
5
+ # Set your API key or use the ROWAN_API_KEY environment variable
6
+ # rowan.api_key = "rowan-sk..."
7
+ folder = rowan.get_folder("examples")
8
+
9
+ workflow = rowan.submit_basic_calculation_workflow(
10
+ initial_molecule=Molecule.from_smiles("CC(=C)C=C"),
11
+ method=Method.OMOL25_CONSERVING_S,
12
+ tasks=["optimize"],
13
+ mode="auto",
14
+ engine="omol25",
15
+ name="Isoprene Optimization",
16
+ folder=folder,
17
+ )
18
+
19
+ print(f"View workflow privately at: https://labs.rowansci.com/calculation/{workflow.uuid}")
20
+
21
+ # Stream optimization steps as they complete; final iteration is the complete result.
22
+ for result in workflow.stream_result(poll_interval=3):
23
+ if result.calculation_uuid:
24
+ mols = rowan.retrieve_calculation_molecules(result.calculation_uuid)
25
+ print(f" {len(mols)} opt steps, energy={mols[-1].get('energy') if mols else None}")
26
+
27
+ print(result)
28
+ # e.g. <BasicCalculationResult energy=-76.234567 H>
@@ -1,11 +1,13 @@
1
1
  import json
2
+ from pathlib import Path
2
3
 
3
4
  import rowan
4
5
 
5
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
6
+ # Set your API key or use the ROWAN_API_KEY environment variable
6
7
  # rowan.api_key = "rowan-sk..."
8
+ folder = rowan.get_folder("examples")
7
9
 
8
- with open("examples/data/workflow_example.json") as f:
10
+ with open(Path(__file__).parent / "data/workflow_example.json") as f:
9
11
  workflow_data = json.load(f)
10
12
 
11
13
  workflow = rowan.submit_workflow(
@@ -13,8 +15,10 @@ workflow = rowan.submit_workflow(
13
15
  workflow_data=workflow_data,
14
16
  name="basic calculation from json",
15
17
  initial_molecule=workflow_data["initial_molecule"],
18
+ folder_uuid=folder,
16
19
  )
17
20
 
18
21
  print(f"View workflow privately at: https://labs.rowansci.com/calculation/{workflow.uuid}")
19
- workflow.wait_for_result().fetch_latest(in_place=True)
20
- print(workflow)
22
+ result = workflow.result()
23
+ print(result)
24
+ # e.g. <BasicCalculationResult energy=-76.234567 H>
@@ -2,13 +2,15 @@ from stjames import Molecule
2
2
 
3
3
  import rowan
4
4
 
5
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
5
+ # Set your API key or use the ROWAN_API_KEY environment variable
6
6
  # rowan.api_key = "rowan-sk..."
7
+ folder = rowan.get_folder("examples")
7
8
 
8
9
  workflow = rowan.submit_workflow(
9
10
  initial_molecule=Molecule.from_smiles("CCCC"),
10
11
  workflow_type="basic_calculation",
11
12
  name="Constrained Butane",
13
+ folder_uuid=folder,
12
14
  workflow_data={
13
15
  "settings": {
14
16
  "method": "gfn2_xtb",
@@ -28,5 +30,6 @@ workflow = rowan.submit_workflow(
28
30
  )
29
31
 
30
32
  print(f"View workflow privately at: https://labs.rowansci.com/calculation/{workflow.uuid}")
31
- workflow.wait_for_result().fetch_latest(in_place=True)
32
- print(workflow)
33
+ result = workflow.result()
34
+ print(result)
35
+ # e.g. <BasicCalculationResult energy=-76.234567 H>
@@ -2,8 +2,9 @@ from stjames import Method, Molecule
2
2
 
3
3
  import rowan
4
4
 
5
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
5
+ # Set your API key or use the ROWAN_API_KEY environment variable
6
6
  # rowan.api_key = "rowan-sk..."
7
+ folder = rowan.get_folder("examples")
7
8
 
8
9
 
9
10
  def compute_energy_with_solvent_correction(molecule: Molecule, method: Method, name: str) -> float:
@@ -11,21 +12,20 @@ def compute_energy_with_solvent_correction(molecule: Molecule, method: Method, n
11
12
  initial_molecule=molecule,
12
13
  workflow_type="basic_calculation",
13
14
  name=f"{name} {method} optimization",
15
+ folder_uuid=folder,
14
16
  workflow_data={
15
17
  "settings": {"method": method, "tasks": ["optimize"]},
16
18
  },
17
19
  )
18
20
 
19
21
  print(f"View workflow privately at: https://labs.rowansci.com/calculation/{opt_workflow.uuid}")
20
- opt_workflow.wait_for_result().fetch_latest(in_place=True)
21
-
22
- calculation_uuid = opt_workflow.data["calculation_uuid"]
23
- optimized_molecule = rowan.retrieve_calculation_molecules(calculation_uuid)[-1]
22
+ opt_result = opt_workflow.result()
24
23
 
25
24
  sp_workflow = rowan.submit_workflow(
26
- initial_molecule=optimized_molecule,
25
+ initial_molecule=opt_result.molecule,
27
26
  workflow_type="basic_calculation",
28
27
  name=f"{name} {method} single point",
28
+ folder_uuid=folder,
29
29
  workflow_data={
30
30
  "settings": {
31
31
  "method": method,
@@ -36,11 +36,9 @@ def compute_energy_with_solvent_correction(molecule: Molecule, method: Method, n
36
36
  )
37
37
 
38
38
  print(f"View workflow privately at: https://labs.rowansci.com/calculation/{sp_workflow.uuid}")
39
- sp_workflow.wait_for_result().fetch_latest(in_place=True)
39
+ sp_result = sp_workflow.result()
40
40
 
41
- calculation_uuid = sp_workflow.data["calculation_uuid"]
42
- final_molecule = rowan.retrieve_calculation_molecules(calculation_uuid)[0]
43
- return final_molecule["energy"]
41
+ return sp_result.energy
44
42
 
45
43
 
46
44
  E1 = compute_energy_with_solvent_correction(
@@ -0,0 +1,39 @@
1
+ import rowan
2
+
3
+ # Set your API key or use the ROWAN_API_KEY environment variable
4
+ # rowan.api_key = "rowan-sk..."
5
+ folder = rowan.get_folder("examples")
6
+
7
+ ligands = [
8
+ "CCC(C)(C)NC1=NCC2(CCC(=O)C2C)N1",
9
+ "CCC(C)CN=C1NCC2(CCCOC2)CN1",
10
+ "CC(C)CCNC1=NCC2CC(COC2=N)O1",
11
+ "CCC(CC)NC1=NCC2CC(CO)CC12",
12
+ "CCC(C)CN=C1NC=C2CCC(O)CC2=N1",
13
+ ]
14
+
15
+ protein = rowan.create_protein_from_pdb_id(
16
+ "CDK2", "1HCK", project_uuid=rowan.default_project().uuid
17
+ )
18
+
19
+ protein.prepare()
20
+
21
+ workflow = rowan.submit_batch_docking_workflow(
22
+ ligands,
23
+ protein.uuid,
24
+ pocket=[[103.55, 100.59, 82.99], [27.76, 32.67, 48.79]],
25
+ executable="qvina2",
26
+ scoring_function="vina",
27
+ folder=folder,
28
+ )
29
+
30
+
31
+ print(f"View workflow privately at: https://labs.rowansci.com/batch-docking/{workflow.uuid}")
32
+ print(f"Workflow UUID: {workflow.uuid}")
33
+
34
+ # Stream partial scores as each ligand completes; final iteration is the complete result.
35
+ for result in workflow.stream_result(poll_interval=30):
36
+ completed = sum(s is not None for s in result.scores.values())
37
+ print(f" {completed}/{len(ligands)} complete...")
38
+
39
+ print(result.scores) # dict of SMILES → best docking score
@@ -24,16 +24,19 @@ from stjames import Molecule
24
24
 
25
25
  import rowan
26
26
 
27
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
27
+ # Set your API key or use the ROWAN_API_KEY environment variable
28
28
  # rowan.api_key = "rowan-sk..."
29
+ folder = rowan.get_folder("examples")
29
30
 
30
31
  workflow = rowan.submit_bde_workflow(
31
32
  initial_molecule=Molecule.from_smiles("CCCC"),
32
33
  mode="rapid",
33
34
  all_CH=True,
34
35
  name="Butane BDE",
36
+ folder=folder,
35
37
  )
36
38
 
37
39
  print(f"View workflow privately at: https://labs.rowansci.com/bde/{workflow.uuid}")
38
- workflow.wait_for_result().fetch_latest(in_place=True)
39
- print(workflow.data)
40
+ result = workflow.result()
41
+ print(result)
42
+ # e.g. <BDEResult energy=-152.234567 Ha bdes=8>
@@ -1,12 +1,11 @@
1
1
  import tarfile
2
2
  from pathlib import Path
3
3
 
4
- from stjames import MSAFormat
5
-
6
4
  import rowan
7
5
 
8
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
6
+ # Set your API key or use the ROWAN_API_KEY environment variable
9
7
  # rowan.api_key = "rowan-sk..."
8
+ folder = rowan.get_folder("examples")
10
9
 
11
10
  msa_directory = Path("msa_directory")
12
11
 
@@ -15,13 +14,14 @@ msa_workflow = rowan.submit_msa_workflow(
15
14
  "VLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSHGSAQVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKLRVDPVNFKLLSHCLLVTLAAHLPAEFTPAVHASLDKFLASVSTVLTSKYR",
16
15
  "VHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHKYH",
17
16
  ],
18
- output_formats=[MSAFormat.BOLTZ],
17
+ output_formats=["boltz"],
19
18
  name="Boltz Paired MSA Example",
19
+ folder=folder,
20
20
  )
21
21
 
22
- msa_workflow.wait_for_result().fetch_latest(in_place=True)
22
+ msa_result = msa_workflow.result()
23
23
 
24
- msa_workflow.download_msa_files(MSAFormat.BOLTZ, path=msa_directory)
24
+ msa_result.download_files("boltz", path=msa_directory)
25
25
 
26
26
  tar_path = next(msa_directory.glob("*.tar.gz"))
27
27
  with tarfile.open(tar_path, "r") as tar_ref:
@@ -1,12 +1,11 @@
1
1
  import tarfile
2
2
  from pathlib import Path
3
3
 
4
- from stjames import MSAFormat
5
-
6
4
  import rowan
7
5
 
8
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
6
+ # Set your API key or use the ROWAN_API_KEY environment variable
9
7
  # rowan.api_key = "rowan-sk..."
8
+ folder = rowan.get_folder("examples")
10
9
 
11
10
  msa_directory = Path("msa_directory")
12
11
 
@@ -14,13 +13,14 @@ msa_workflow = rowan.submit_msa_workflow(
14
13
  initial_protein_sequences=[
15
14
  "HPETLVKVKDAEDQLGARVGYIELDLNSGKILESFRPEERFPMMSTFKVLLCGAVLSRIDAGQEQLGRRIHYSQNDLVEYSPVTEKHLTDGMTVRELCSAAITMSDNTAANLLLTTIGGPKELTAFLHNMGDHVTRLDRWEPELNEAIPNDERDTTMPVAMATTLRKLLTGELLTLASRQQLIDWMEADKVAGPLLRSALPAGWFIADKSGAGERGSRGIIAALGPDGKPSRIVVIYTTGSQATMDERNRQIAEIGASLIKHW"
16
15
  ],
17
- output_formats=[MSAFormat.BOLTZ],
16
+ output_formats=["boltz"],
18
17
  name="Boltz MSA Example",
18
+ folder=folder,
19
19
  )
20
20
 
21
- msa_workflow.wait_for_result().fetch_latest(in_place=True)
21
+ msa_result = msa_workflow.result()
22
22
 
23
- msa_workflow.download_msa_files(MSAFormat.BOLTZ, path=msa_directory)
23
+ msa_result.download_files("boltz", path=msa_directory)
24
24
 
25
25
  tar_path = next(msa_directory.glob("*.tar.gz"))
26
26
  with tarfile.open(tar_path, "r") as tar_ref:
@@ -2,12 +2,11 @@ import tarfile
2
2
  from pathlib import Path
3
3
 
4
4
  # from chai_lab.chai1 import run_inference
5
- from stjames import MSAFormat
6
-
7
5
  import rowan
8
6
 
9
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
7
+ # Set your API key or use the ROWAN_API_KEY environment variable
10
8
  # rowan.api_key = "rowan-sk..."
9
+ folder = rowan.get_folder("examples")
11
10
 
12
11
  example_fasta = (
13
12
  ">protein|name=example-protein\n"
@@ -26,13 +25,14 @@ msa_workflow = rowan.submit_msa_workflow(
26
25
  "VLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSHGSAQVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKLRVDPVNFKLLSHCLLVTLAAHLPAEFTPAVHASLDKFLASVSTVLTSKYR",
27
26
  "VHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHKYH",
28
27
  ],
29
- output_formats=[MSAFormat.CHAI],
28
+ output_formats=["chai"],
30
29
  name="CHAI Paired MSA Example",
30
+ folder=folder,
31
31
  )
32
32
 
33
- msa_workflow.wait_for_result().fetch_latest(in_place=True)
33
+ msa_result = msa_workflow.result()
34
34
 
35
- msa_workflow.download_msa_files(MSAFormat.CHAI, path=msa_directory)
35
+ msa_result.download_files("chai", path=msa_directory)
36
36
 
37
37
  tar_path = next(msa_directory.glob("*.tar.gz"))
38
38
  with tarfile.open(tar_path, "r") as tar_ref:
@@ -2,12 +2,11 @@ import tarfile
2
2
  from pathlib import Path
3
3
 
4
4
  # from chai_lab.chai1 import run_inference
5
- from stjames import MSAFormat
6
-
7
5
  import rowan
8
6
 
9
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
7
+ # Set your API key or use the ROWAN_API_KEY environment variable
10
8
  # rowan.api_key = "rowan-sk..."
9
+ folder = rowan.get_folder("examples")
11
10
 
12
11
  example_fasta = (
13
12
  ">protein|name=example-protein\n"
@@ -23,13 +22,14 @@ msa_workflow = rowan.submit_msa_workflow(
23
22
  initial_protein_sequences=[
24
23
  "HPETLVKVKDAEDQLGARVGYIELDLNSGKILESFRPEERFPMMSTFKVLLCGAVLSRIDAGQEQLGRRIHYSQNDLVEYSPVTEKHLTDGMTVRELCSAAITMSDNTAANLLLTTIGGPKELTAFLHNMGDHVTRLDRWEPELNEAIPNDERDTTMPVAMATTLRKLLTGELLTLASRQQLIDWMEADKVAGPLLRSALPAGWFIADKSGAGERGSRGIIAALGPDGKPSRIVVIYTTGSQATMDERNRQIAEIGASLIKHW"
25
24
  ],
26
- output_formats=[MSAFormat.CHAI],
25
+ output_formats=["chai"],
27
26
  name="CHAI MSA Example",
27
+ folder=folder,
28
28
  )
29
29
 
30
- msa_workflow.wait_for_result().fetch_latest(in_place=True)
30
+ msa_result = msa_workflow.result()
31
31
 
32
- msa_workflow.download_msa_files(MSAFormat.CHAI, path=msa_directory)
32
+ msa_result.download_files("chai", path=msa_directory)
33
33
 
34
34
  tar_path = next(msa_directory.glob("*.tar.gz"))
35
35
  with tarfile.open(tar_path, "r") as tar_ref:
@@ -0,0 +1,37 @@
1
+ import rowan
2
+
3
+ # Set your API key or use the ROWAN_API_KEY environment variable
4
+ # rowan.api_key = "rowan-sk..."
5
+ folder = rowan.get_folder("examples/cofolding-screen")
6
+
7
+ HARTREE_TO_KCALMOL = 627.5096
8
+
9
+ ligands = [
10
+ "CCC(C)(C)NC1=NCC2(CCC(=O)C2C)N1",
11
+ "CCC(C)CN=C1NCC2(CCCOC2)CN1",
12
+ "CC(C)CCNC1=NCC2CC(COC2=N)O1",
13
+ "CCC(CC)NC1=NCC2CC(CO)CC12",
14
+ "CCC(C)CN=C1NC=C2CCC(O)CC2=N1",
15
+ ]
16
+
17
+ workflows = []
18
+ results = {}
19
+
20
+ for ligand in ligands:
21
+ workflow = rowan.submit_protein_cofolding_workflow(
22
+ initial_protein_sequences=[
23
+ "MENFQKVEKIGEGTYGVVYKARNKLTGEVVALKKIRLDTETEGVPSTAIREISLLKELNHPNIVKLLDVIHTENKLYLVFEFLHQDLKKFMDASALTGIPLPLIKSYLFQLLQGLAFCHSHRVLHRDLKPQNLLINTEGAIKLADFGLARAFGVPVRTYTHEVVTLWYRAPEILLGCKYYSTAVDIWSLGCIFAEMVTRRALFPGDSEIDQLFRIFRTLGTPDEVVWPGVTSMPDYKPSFPKWARQDFSKVVPPLDEDGRSLLSQMLHYDPNKRISAKAALAHPFFQDVTKPVPHLRL"
24
+ ],
25
+ initial_smiles_list=[ligand],
26
+ ligand_binding_affinity_index=0,
27
+ name=f"Cofolding {ligand}",
28
+ folder=folder,
29
+ )
30
+ workflows.append(workflow)
31
+
32
+ workflow_results = [(w, w.result()) for w in workflows]
33
+
34
+ for workflow, result in workflow_results:
35
+ results[workflow.name] = result.affinity_score.probability_binary
36
+
37
+ print(results)
@@ -1,12 +1,11 @@
1
1
  import tarfile
2
2
  from pathlib import Path
3
3
 
4
- from stjames import MSAFormat
5
-
6
4
  import rowan
7
5
 
8
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
6
+ # Set your API key or use the ROWAN_API_KEY environment variable
9
7
  # rowan.api_key = "rowan-sk..."
8
+ folder = rowan.get_folder("examples")
10
9
 
11
10
  msa_directory = Path("msa_directory")
12
11
 
@@ -15,13 +14,14 @@ msa_workflow = rowan.submit_msa_workflow(
15
14
  "VLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSHGSAQVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKLRVDPVNFKLLSHCLLVTLAAHLPAEFTPAVHASLDKFLASVSTVLTSKYR",
16
15
  "VHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHKYH",
17
16
  ],
18
- output_formats=[MSAFormat.COLABFOLD],
17
+ output_formats=["colabfold"],
19
18
  name="Colabfold Paired MSA Example",
19
+ folder=folder,
20
20
  )
21
21
 
22
- msa_workflow.wait_for_result().fetch_latest(in_place=True)
22
+ msa_result = msa_workflow.result()
23
23
 
24
- msa_workflow.download_msa_files(MSAFormat.COLABFOLD, path=msa_directory)
24
+ msa_result.download_files("colabfold", path=msa_directory)
25
25
 
26
26
  tar_path = next(msa_directory.glob("*.tar.gz"))
27
27
  with tarfile.open(tar_path, "r") as tar_ref:
@@ -1,12 +1,11 @@
1
1
  import tarfile
2
2
  from pathlib import Path
3
3
 
4
- from stjames import MSAFormat
5
-
6
4
  import rowan
7
5
 
8
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
6
+ # Set your API key or use the ROWAN_API_KEY environment variable
9
7
  # rowan.api_key = "rowan-sk..."
8
+ folder = rowan.get_folder("examples")
10
9
 
11
10
  msa_directory = Path("msa_directory")
12
11
 
@@ -14,13 +13,14 @@ msa_workflow = rowan.submit_msa_workflow(
14
13
  initial_protein_sequences=[
15
14
  "HPETLVKVKDAEDQLGARVGYIELDLNSGKILESFRPEERFPMMSTFKVLLCGAVLSRIDAGQEQLGRRIHYSQNDLVEYSPVTEKHLTDGMTVRELCSAAITMSDNTAANLLLTTIGGPKELTAFLHNMGDHVTRLDRWEPELNEAIPNDERDTTMPVAMATTLRKLLTGELLTLASRQQLIDWMEADKVAGPLLRSALPAGWFIADKSGAGERGSRGIIAALGPDGKPSRIVVIYTTGSQATMDERNRQIAEIGASLIKHW"
16
15
  ],
17
- output_formats=[MSAFormat.COLABFOLD],
16
+ output_formats=["colabfold"],
18
17
  name="Colabfold MSA Example",
18
+ folder=folder,
19
19
  )
20
20
 
21
- msa_workflow.wait_for_result().fetch_latest(in_place=True)
21
+ msa_result = msa_workflow.result()
22
22
 
23
- msa_workflow.download_msa_files(MSAFormat.COLABFOLD, path=msa_directory)
23
+ msa_result.download_files("colabfold", path=msa_directory)
24
24
 
25
25
  tar_path = next(msa_directory.glob("*.tar.gz"))
26
26
  with tarfile.open(tar_path, "r") as tar_ref:
@@ -3,21 +3,20 @@ from stjames import Molecule
3
3
 
4
4
  import rowan
5
5
 
6
- # Set ROWAN_API_KEY environment variable to your API key or set rowan.api_key directly
6
+ # Set your API key or use the ROWAN_API_KEY environment variable
7
7
  # rowan.api_key = "rowan-sk..."
8
-
9
- conformer_dependent_redox_folder = rowan.create_folder(name="Conformer dependent redox workflows")
8
+ folder = rowan.get_folder("examples/conformer-dependent-redox")
10
9
 
11
10
  workflow = rowan.submit_conformer_search_workflow(
12
11
  initial_molecule=Molecule.from_smiles("CC(C)Cc1ccc(C(=O)c2ccc(O)cc2)cc1"),
13
- folder_uuid=conformer_dependent_redox_folder.uuid,
12
+ folder=folder,
14
13
  )
15
14
  print(f"View workflow privately at: https://labs.rowansci.com/workflow/{workflow.uuid}")
16
- workflow.wait_for_result().fetch_latest(in_place=True)
15
+ csearch_result = workflow.result()
17
16
 
18
17
  redox_potential_workflows = []
19
18
 
20
- for conformer in workflow.data["conformer_uuids"][:10]:
19
+ for conformer in csearch_result.conformer_uuids[:10]:
21
20
  uuid = conformer[0]
22
21
  molecule = rowan.retrieve_calculation_molecules(uuid)[0]
23
22
  stjames_molecule = stjames.Molecule.model_validate(molecule)
@@ -26,13 +25,10 @@ for conformer in workflow.data["conformer_uuids"][:10]:
26
25
  stjames_molecule,
27
26
  reduction=True,
28
27
  oxidization=True,
29
- folder_uuid=conformer_dependent_redox_folder.uuid,
28
+ folder=folder,
30
29
  )
31
30
  )
32
31
 
33
- for workflow in redox_potential_workflows:
34
- workflow.wait_for_workflow()
35
- workflow.fetch_latest(in_place=True)
36
-
32
+ redox_results = [w.result() for w in redox_potential_workflows]
37
33
 
38
- print([workflow.data["redox_potential"] for workflow in redox_potential_workflows])
34
+ print([(r.oxidation_potential, r.reduction_potential) for r in redox_results])