rowan-python 2.1.2__py3-none-any.whl → 2.1.4__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.
- rowan/workflow.py +116 -89
- {rowan_python-2.1.2.dist-info → rowan_python-2.1.4.dist-info}/METADATA +1 -1
- {rowan_python-2.1.2.dist-info → rowan_python-2.1.4.dist-info}/RECORD +5 -5
- {rowan_python-2.1.2.dist-info → rowan_python-2.1.4.dist-info}/WHEEL +0 -0
- {rowan_python-2.1.2.dist-info → rowan_python-2.1.4.dist-info}/licenses/LICENSE +0 -0
rowan/workflow.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import time
|
|
2
2
|
from datetime import datetime
|
|
3
|
-
from typing import Any, Self, TypeAlias
|
|
3
|
+
from typing import Any, Literal, Self, TypeAlias
|
|
4
4
|
|
|
5
5
|
import stjames
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
@@ -387,20 +387,21 @@ def submit_basic_calculation_workflow(
|
|
|
387
387
|
if isinstance(method, str):
|
|
388
388
|
method = stjames.Method(method)
|
|
389
389
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
390
|
+
workflow = stjames.BasicCalculationWorkflow(
|
|
391
|
+
initial_molecule=initial_molecule,
|
|
392
|
+
settings=stjames.Settings(
|
|
393
|
+
method=method,
|
|
394
|
+
tasks=tasks,
|
|
395
|
+
mode=mode,
|
|
396
|
+
),
|
|
397
|
+
engine=engine,
|
|
398
|
+
)
|
|
398
399
|
|
|
399
400
|
data = {
|
|
400
401
|
"name": name,
|
|
401
402
|
"folder_uuid": folder_uuid,
|
|
402
403
|
"workflow_type": "basic_calculation",
|
|
403
|
-
"workflow_data":
|
|
404
|
+
"workflow_data": workflow.model_dump(),
|
|
404
405
|
"initial_molecule": initial_molecule,
|
|
405
406
|
"max_credits": max_credits,
|
|
406
407
|
}
|
|
@@ -466,19 +467,20 @@ def submit_conformer_search_workflow(
|
|
|
466
467
|
optimization_settings=[opt_settings],
|
|
467
468
|
)
|
|
468
469
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
"
|
|
474
|
-
|
|
475
|
-
|
|
470
|
+
workflow = stjames.ConformerSearchWorkflow(
|
|
471
|
+
initial_molecule=initial_molecule,
|
|
472
|
+
multistage_opt_settings=msos,
|
|
473
|
+
conf_gen_mode=conf_gen_mode,
|
|
474
|
+
mso_mode="manual",
|
|
475
|
+
solvent=solvent,
|
|
476
|
+
transition_state=transition_state,
|
|
477
|
+
)
|
|
476
478
|
|
|
477
479
|
data = {
|
|
478
480
|
"name": name,
|
|
479
481
|
"folder_uuid": folder_uuid,
|
|
480
482
|
"workflow_type": "conformer_search",
|
|
481
|
-
"workflow_data":
|
|
483
|
+
"workflow_data": workflow.model_dump(),
|
|
482
484
|
"initial_molecule": initial_molecule,
|
|
483
485
|
"max_credits": max_credits,
|
|
484
486
|
}
|
|
@@ -491,6 +493,7 @@ def submit_conformer_search_workflow(
|
|
|
491
493
|
|
|
492
494
|
def submit_solubility_workflow(
|
|
493
495
|
initial_smiles: str,
|
|
496
|
+
solubility_method: Literal["fastsolv", "kingfisher", "esol"] = "fastsolv",
|
|
494
497
|
solvents: list[str] | None = None,
|
|
495
498
|
temperatures: list[float] | None = None,
|
|
496
499
|
name: str = "Solubility Workflow",
|
|
@@ -500,6 +503,7 @@ def submit_solubility_workflow(
|
|
|
500
503
|
"""
|
|
501
504
|
Submits a solubility workflow to the API.
|
|
502
505
|
|
|
506
|
+
:param solubility_method: The name of the desired model for solubility prediction.
|
|
503
507
|
:param initial_smiles: The smiles of the molecule to calculate the solubility of.
|
|
504
508
|
:param solvents: The list of solvents to use for the calculation.
|
|
505
509
|
:param temperatures: The list of temperatures to use for the calculation.
|
|
@@ -516,13 +520,18 @@ def submit_solubility_workflow(
|
|
|
516
520
|
if not temperatures:
|
|
517
521
|
temperatures = [273.15, 298.15, 323.15, 348.15, 373.15]
|
|
518
522
|
|
|
519
|
-
|
|
523
|
+
workflow = stjames.SolubilityWorkflow(
|
|
524
|
+
initial_smiles=initial_smiles,
|
|
525
|
+
solubility_method=solubility_method,
|
|
526
|
+
solvents=solvents,
|
|
527
|
+
temperatures=temperatures,
|
|
528
|
+
)
|
|
520
529
|
|
|
521
530
|
data = {
|
|
522
531
|
"name": name,
|
|
523
532
|
"folder_uuid": folder_uuid,
|
|
524
533
|
"workflow_type": "solubility",
|
|
525
|
-
"workflow_data":
|
|
534
|
+
"workflow_data": workflow.model_dump(),
|
|
526
535
|
"initial_smiles": initial_smiles,
|
|
527
536
|
"max_credits": max_credits,
|
|
528
537
|
}
|
|
@@ -567,18 +576,19 @@ def submit_pka_workflow(
|
|
|
567
576
|
protonate_elements = protonate_elements or [7]
|
|
568
577
|
deprotonate_elements = deprotonate_elements or [7, 8, 16]
|
|
569
578
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
579
|
+
workflow = stjames.pKaWorkflow(
|
|
580
|
+
initial_molecule=initial_molecule,
|
|
581
|
+
pka_range=pka_range,
|
|
582
|
+
deprotonate_elements=deprotonate_elements,
|
|
583
|
+
protonate_elements=protonate_elements,
|
|
584
|
+
mode=mode,
|
|
585
|
+
)
|
|
576
586
|
|
|
577
587
|
data = {
|
|
578
588
|
"name": name,
|
|
579
589
|
"folder_uuid": folder_uuid,
|
|
580
590
|
"workflow_type": "pka",
|
|
581
|
-
"workflow_data":
|
|
591
|
+
"workflow_data": workflow.model_dump(),
|
|
582
592
|
"initial_molecule": initial_molecule,
|
|
583
593
|
"max_credits": max_credits,
|
|
584
594
|
}
|
|
@@ -618,17 +628,18 @@ def submit_redox_potential_workflow(
|
|
|
618
628
|
elif isinstance(initial_molecule, RdkitMol):
|
|
619
629
|
initial_molecule = StJamesMolecule.from_rdkit(initial_molecule, cid=0)
|
|
620
630
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
631
|
+
workflow = stjames.RedoxPotentialWorkflow(
|
|
632
|
+
initial_molecule=initial_molecule,
|
|
633
|
+
oxidation=oxidization,
|
|
634
|
+
reduction=reduction,
|
|
635
|
+
mode=mode,
|
|
636
|
+
)
|
|
626
637
|
|
|
627
638
|
data = {
|
|
628
639
|
"name": name,
|
|
629
640
|
"folder_uuid": folder_uuid,
|
|
630
641
|
"workflow_type": "redox_potential",
|
|
631
|
-
"workflow_data":
|
|
642
|
+
"workflow_data": workflow.model_dump(),
|
|
632
643
|
"initial_molecule": initial_molecule,
|
|
633
644
|
"max_credits": max_credits,
|
|
634
645
|
}
|
|
@@ -669,6 +680,12 @@ def submit_fukui_workflow(
|
|
|
669
680
|
optimization_settings = stjames.Settings(method=optimization_method)
|
|
670
681
|
fukui_settings = stjames.Settings(method=fukui_method, solvent_settings=solvent_settings)
|
|
671
682
|
|
|
683
|
+
stjames.FukuiIndexWorkflow(
|
|
684
|
+
initial_molecule=initial_molecule,
|
|
685
|
+
optimization_settings=optimization_settings,
|
|
686
|
+
fukui_settings=fukui_settings,
|
|
687
|
+
)
|
|
688
|
+
|
|
672
689
|
workflow_data = {
|
|
673
690
|
"opt_settings": optimization_settings.model_dump(),
|
|
674
691
|
"opt_engine": stjames.Method(optimization_method).default_engine(),
|
|
@@ -716,15 +733,16 @@ def submit_tautomer_search_workflow(
|
|
|
716
733
|
elif isinstance(initial_molecule, RdkitMol):
|
|
717
734
|
initial_molecule = StJamesMolecule.from_rdkit(initial_molecule, cid=0)
|
|
718
735
|
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
736
|
+
workflow = stjames.TautomerWorkflow(
|
|
737
|
+
initial_molecule=initial_molecule,
|
|
738
|
+
mode=mode,
|
|
739
|
+
)
|
|
722
740
|
|
|
723
741
|
data = {
|
|
724
742
|
"name": name,
|
|
725
743
|
"folder_uuid": folder_uuid,
|
|
726
744
|
"workflow_type": "tautomers",
|
|
727
|
-
"workflow_data":
|
|
745
|
+
"workflow_data": workflow.model_dump(),
|
|
728
746
|
"initial_molecule": initial_molecule,
|
|
729
747
|
"max_credits": max_credits,
|
|
730
748
|
}
|
|
@@ -805,24 +823,27 @@ def submit_scan_workflow(
|
|
|
805
823
|
if isinstance(calculation_method, str):
|
|
806
824
|
calculation_method = stjames.Method(calculation_method)
|
|
807
825
|
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
"
|
|
811
|
-
|
|
812
|
-
"
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
826
|
+
calc_settings = stjames.Settings(
|
|
827
|
+
method=calculation_method,
|
|
828
|
+
tasks=["optimize"],
|
|
829
|
+
corrections=[],
|
|
830
|
+
mode="auto",
|
|
831
|
+
opt_settings={"constraints": []},
|
|
832
|
+
)
|
|
833
|
+
|
|
834
|
+
workflow = stjames.ScanWorkflow(
|
|
835
|
+
initial_molecule=initial_molecule,
|
|
836
|
+
scan_settings=scan_settings,
|
|
837
|
+
calc_settings=calc_settings,
|
|
838
|
+
calc_engine=calculation_engine,
|
|
839
|
+
wavefront_propagation=wavefront_propagation,
|
|
840
|
+
)
|
|
820
841
|
|
|
821
842
|
data = {
|
|
822
843
|
"name": name,
|
|
823
844
|
"folder_uuid": folder_uuid,
|
|
824
845
|
"workflow_type": "scan",
|
|
825
|
-
"workflow_data":
|
|
846
|
+
"workflow_data": workflow.model_dump(),
|
|
826
847
|
"initial_molecule": initial_molecule,
|
|
827
848
|
"max_credits": max_credits,
|
|
828
849
|
}
|
|
@@ -839,6 +860,7 @@ def submit_macropka_workflow(
|
|
|
839
860
|
max_pH: int = 14,
|
|
840
861
|
min_charge: int = -2,
|
|
841
862
|
max_charge: int = 2,
|
|
863
|
+
compute_aqueous_solubility: bool = False,
|
|
842
864
|
compute_solvation_energy: bool = True,
|
|
843
865
|
name: str = "Macropka Workflow",
|
|
844
866
|
folder_uuid: str | None = None,
|
|
@@ -852,6 +874,7 @@ def submit_macropka_workflow(
|
|
|
852
874
|
:param max_pH: The maximum pH to use in the macropka workflow.
|
|
853
875
|
:param min_charge: The minimum charge to use in the macropka workflow.
|
|
854
876
|
:param max_charge: The maximum charge to use in the macropka workflow.
|
|
877
|
+
:param compute_aqueous_solubility: Whether to compute the aqueous solubility for each pH.
|
|
855
878
|
:param compute_solvation_energy: Whether to compute the solvation energy.
|
|
856
879
|
:param name: The name of the workflow.
|
|
857
880
|
:param folder_uuid: The UUID of the folder to store the workflow in.
|
|
@@ -860,19 +883,21 @@ def submit_macropka_workflow(
|
|
|
860
883
|
:raises requests.HTTPError: if the request to the API fails.
|
|
861
884
|
"""
|
|
862
885
|
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
886
|
+
workflow = stjames.MacropKaWorkflow(
|
|
887
|
+
initial_smiles=initial_smiles,
|
|
888
|
+
min_pH=min_pH,
|
|
889
|
+
max_pH=max_pH,
|
|
890
|
+
min_charge=min_charge,
|
|
891
|
+
max_charge=max_charge,
|
|
892
|
+
compute_solvation_energy=compute_solvation_energy,
|
|
893
|
+
compute_aqueous_solubility=compute_aqueous_solubility,
|
|
894
|
+
)
|
|
870
895
|
|
|
871
896
|
data = {
|
|
872
897
|
"name": name,
|
|
873
898
|
"folder_uuid": folder_uuid,
|
|
874
899
|
"workflow_type": "macropka",
|
|
875
|
-
"workflow_data":
|
|
900
|
+
"workflow_data": workflow.model_dump(),
|
|
876
901
|
"initial_smiles": initial_smiles,
|
|
877
902
|
"max_credits": max_credits,
|
|
878
903
|
}
|
|
@@ -920,25 +945,25 @@ def submit_irc_workflow(
|
|
|
920
945
|
if isinstance(method, str):
|
|
921
946
|
method = stjames.Method(method)
|
|
922
947
|
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
948
|
+
workflow = stjames.IRCWorkflow(
|
|
949
|
+
initial_molecule=initial_molecule,
|
|
950
|
+
settings=stjames.Settings(
|
|
951
|
+
method=method,
|
|
952
|
+
tasks=[],
|
|
953
|
+
corrections=[],
|
|
954
|
+
mode="auto",
|
|
955
|
+
),
|
|
956
|
+
engine=engine,
|
|
957
|
+
preopt=preopt,
|
|
958
|
+
step_size=step_size,
|
|
959
|
+
max_irc_steps=max_irc_steps,
|
|
960
|
+
mode="manual",
|
|
961
|
+
)
|
|
937
962
|
data = {
|
|
938
963
|
"name": name,
|
|
939
964
|
"folder_uuid": folder_uuid,
|
|
940
965
|
"workflow_type": "irc",
|
|
941
|
-
"workflow_data":
|
|
966
|
+
"workflow_data": workflow.model_dump(),
|
|
942
967
|
"initial_molecule": initial_molecule,
|
|
943
968
|
"max_credits": max_credits,
|
|
944
969
|
}
|
|
@@ -975,19 +1000,20 @@ def submit_protein_cofolding_workflow(
|
|
|
975
1000
|
:return: A Workflow object representing the submitted workflow.
|
|
976
1001
|
:raises requests.HTTPError: if the request to the API fails.
|
|
977
1002
|
""" # noqa: E501
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1003
|
+
|
|
1004
|
+
workflow = stjames.ProteinCofoldingWorkflow(
|
|
1005
|
+
use_msa_server=use_msa_server,
|
|
1006
|
+
use_potentials=use_potentials,
|
|
1007
|
+
model=model,
|
|
1008
|
+
ligand_binding_affinity_index=ligand_binding_affinity_index,
|
|
1009
|
+
initial_smiles_list=initial_smiles_list,
|
|
1010
|
+
initial_protein_sequences=initial_protein_sequences,
|
|
1011
|
+
)
|
|
986
1012
|
data = {
|
|
987
1013
|
"name": name,
|
|
988
1014
|
"folder_uuid": folder_uuid,
|
|
989
1015
|
"workflow_type": "protein_cofolding",
|
|
990
|
-
"workflow_data":
|
|
1016
|
+
"workflow_data": workflow.model_dump(),
|
|
991
1017
|
"max_credits": max_credits,
|
|
992
1018
|
}
|
|
993
1019
|
|
|
@@ -1029,18 +1055,19 @@ def submit_docking_workflow(
|
|
|
1029
1055
|
if isinstance(protein, Protein):
|
|
1030
1056
|
protein = protein.uuid
|
|
1031
1057
|
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1058
|
+
workflow = stjames.DockingWorkflow(
|
|
1059
|
+
initial_molecule=initial_molecule,
|
|
1060
|
+
target_uuid=protein,
|
|
1061
|
+
pocket=pocket,
|
|
1062
|
+
do_csearch=do_csearch,
|
|
1063
|
+
do_optimization=do_optimization,
|
|
1064
|
+
)
|
|
1038
1065
|
|
|
1039
1066
|
data = {
|
|
1040
1067
|
"name": name,
|
|
1041
1068
|
"folder_uuid": folder_uuid,
|
|
1042
1069
|
"workflow_type": "docking",
|
|
1043
|
-
"workflow_data":
|
|
1070
|
+
"workflow_data": workflow.model_dump(),
|
|
1044
1071
|
"initial_molecule": initial_molecule,
|
|
1045
1072
|
"max_credits": max_credits,
|
|
1046
1073
|
}
|
|
@@ -6,10 +6,10 @@ rowan/protein.py,sha256=bMemvLZua_pnTrYOxHFZ4jFlRH9KgpYvtjj5M2__28k,8026
|
|
|
6
6
|
rowan/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
rowan/user.py,sha256=Dl--NPUPATKCs2VmILsW8HnLiunG0Lxr0n6mKuHm21U,3891
|
|
8
8
|
rowan/utils.py,sha256=907lV0fEP6BnjOWyisd3Uh8Mk5JuQMOX9QEjGi_mdew,3314
|
|
9
|
-
rowan/workflow.py,sha256=
|
|
9
|
+
rowan/workflow.py,sha256=uFgI-yTSHW6JY5KulpnGPdM3Xrl0UGYtne9OnDIkzz8,40729
|
|
10
10
|
rowan/rowan_rdkit/__init__.py,sha256=EATX2VRzywzKxqkpCUMTf7RNQLkWsfi5VcCNDW6EIiw,503
|
|
11
11
|
rowan/rowan_rdkit/chem_utils.py,sha256=i7-EmAcmvHYtc9NiZblLY_k2DoQKofAZo5KT2qtkUCI,34775
|
|
12
|
-
rowan_python-2.1.
|
|
13
|
-
rowan_python-2.1.
|
|
14
|
-
rowan_python-2.1.
|
|
15
|
-
rowan_python-2.1.
|
|
12
|
+
rowan_python-2.1.4.dist-info/METADATA,sha256=PJ8hu2ynkYFAQ1hpyKwE0nlKfmtQcAWCQf61NOIkoPU,1598
|
|
13
|
+
rowan_python-2.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
14
|
+
rowan_python-2.1.4.dist-info/licenses/LICENSE,sha256=i05z7xEhyrg6f8j0lR3XYjShnF-MJGFQ-DnpsZ8yiVI,1084
|
|
15
|
+
rowan_python-2.1.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|