rowan-python 2.1.2__py3-none-any.whl → 2.1.3__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 CHANGED
@@ -387,20 +387,21 @@ def submit_basic_calculation_workflow(
387
387
  if isinstance(method, str):
388
388
  method = stjames.Method(method)
389
389
 
390
- workflow_data = {
391
- "settings": {
392
- "method": method.name,
393
- "tasks": tasks,
394
- "mode": mode,
395
- },
396
- "engine": engine,
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": 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
- workflow_data = {
470
- "multistage_opt_settings": msos.model_dump(),
471
- "conf_gen_mode": conf_gen_mode,
472
- "mso_mode": "manual",
473
- "solvent": solvent,
474
- "transition_state": transition_state,
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": workflow_data,
483
+ "workflow_data": workflow.model_dump(),
482
484
  "initial_molecule": initial_molecule,
483
485
  "max_credits": max_credits,
484
486
  }
@@ -516,13 +518,17 @@ def submit_solubility_workflow(
516
518
  if not temperatures:
517
519
  temperatures = [273.15, 298.15, 323.15, 348.15, 373.15]
518
520
 
519
- workflow_data = {"solvents": solvents, "temperatures": temperatures}
521
+ workflow = stjames.SolubilityWorkflow(
522
+ initial_smiles=initial_smiles,
523
+ solvents=solvents,
524
+ temperatures=temperatures,
525
+ )
520
526
 
521
527
  data = {
522
528
  "name": name,
523
529
  "folder_uuid": folder_uuid,
524
530
  "workflow_type": "solubility",
525
- "workflow_data": workflow_data,
531
+ "workflow_data": workflow.model_dump(),
526
532
  "initial_smiles": initial_smiles,
527
533
  "max_credits": max_credits,
528
534
  }
@@ -567,18 +573,19 @@ def submit_pka_workflow(
567
573
  protonate_elements = protonate_elements or [7]
568
574
  deprotonate_elements = deprotonate_elements or [7, 8, 16]
569
575
 
570
- workflow_data = {
571
- "pka_range": pka_range,
572
- "deprotonate_elements": deprotonate_elements,
573
- "protonate_elements": protonate_elements,
574
- "mode": mode,
575
- }
576
+ workflow = stjames.pKaWorkflow(
577
+ initial_molecule=initial_molecule,
578
+ pka_range=pka_range,
579
+ deprotonate_elements=deprotonate_elements,
580
+ protonate_elements=protonate_elements,
581
+ mode=mode,
582
+ )
576
583
 
577
584
  data = {
578
585
  "name": name,
579
586
  "folder_uuid": folder_uuid,
580
587
  "workflow_type": "pka",
581
- "workflow_data": workflow_data,
588
+ "workflow_data": workflow.model_dump(),
582
589
  "initial_molecule": initial_molecule,
583
590
  "max_credits": max_credits,
584
591
  }
@@ -618,17 +625,18 @@ def submit_redox_potential_workflow(
618
625
  elif isinstance(initial_molecule, RdkitMol):
619
626
  initial_molecule = StJamesMolecule.from_rdkit(initial_molecule, cid=0)
620
627
 
621
- workflow_data = {
622
- "oxidation": oxidization,
623
- "reduction": reduction,
624
- "mode": mode,
625
- }
628
+ workflow = stjames.RedoxPotentialWorkflow(
629
+ initial_molecule=initial_molecule,
630
+ oxidation=oxidization,
631
+ reduction=reduction,
632
+ mode=mode,
633
+ )
626
634
 
627
635
  data = {
628
636
  "name": name,
629
637
  "folder_uuid": folder_uuid,
630
638
  "workflow_type": "redox_potential",
631
- "workflow_data": workflow_data,
639
+ "workflow_data": workflow.model_dump(),
632
640
  "initial_molecule": initial_molecule,
633
641
  "max_credits": max_credits,
634
642
  }
@@ -669,6 +677,12 @@ def submit_fukui_workflow(
669
677
  optimization_settings = stjames.Settings(method=optimization_method)
670
678
  fukui_settings = stjames.Settings(method=fukui_method, solvent_settings=solvent_settings)
671
679
 
680
+ stjames.FukuiIndexWorkflow(
681
+ initial_molecule=initial_molecule,
682
+ optimization_settings=optimization_settings,
683
+ fukui_settings=fukui_settings,
684
+ )
685
+
672
686
  workflow_data = {
673
687
  "opt_settings": optimization_settings.model_dump(),
674
688
  "opt_engine": stjames.Method(optimization_method).default_engine(),
@@ -716,15 +730,16 @@ def submit_tautomer_search_workflow(
716
730
  elif isinstance(initial_molecule, RdkitMol):
717
731
  initial_molecule = StJamesMolecule.from_rdkit(initial_molecule, cid=0)
718
732
 
719
- workflow_data = {
720
- "mode": mode,
721
- }
733
+ workflow = stjames.TautomerWorkflow(
734
+ initial_molecule=initial_molecule,
735
+ mode=mode,
736
+ )
722
737
 
723
738
  data = {
724
739
  "name": name,
725
740
  "folder_uuid": folder_uuid,
726
741
  "workflow_type": "tautomers",
727
- "workflow_data": workflow_data,
742
+ "workflow_data": workflow.model_dump(),
728
743
  "initial_molecule": initial_molecule,
729
744
  "max_credits": max_credits,
730
745
  }
@@ -805,24 +820,27 @@ def submit_scan_workflow(
805
820
  if isinstance(calculation_method, str):
806
821
  calculation_method = stjames.Method(calculation_method)
807
822
 
808
- workflow_data = {
809
- "wavefront_propagation": wavefront_propagation,
810
- "scan_settings": scan_settings,
811
- "calc_engine": calculation_engine,
812
- "calc_settings": {
813
- "method": calculation_method.name,
814
- "corrections": [],
815
- "tasks": ["optimize"],
816
- "mode": "auto",
817
- "opt_settings": {"constraints": []},
818
- },
819
- }
823
+ calc_settings = stjames.Settings(
824
+ method=calculation_method,
825
+ tasks=["optimize"],
826
+ corrections=[],
827
+ mode="auto",
828
+ opt_settings={"constraints": []},
829
+ )
830
+
831
+ workflow = stjames.ScanWorkflow(
832
+ initial_molecule=initial_molecule,
833
+ scan_settings=scan_settings,
834
+ calc_settings=calc_settings,
835
+ calc_engine=calculation_engine,
836
+ wavefront_propagation=wavefront_propagation,
837
+ )
820
838
 
821
839
  data = {
822
840
  "name": name,
823
841
  "folder_uuid": folder_uuid,
824
842
  "workflow_type": "scan",
825
- "workflow_data": workflow_data,
843
+ "workflow_data": workflow.model_dump(),
826
844
  "initial_molecule": initial_molecule,
827
845
  "max_credits": max_credits,
828
846
  }
@@ -860,19 +878,20 @@ def submit_macropka_workflow(
860
878
  :raises requests.HTTPError: if the request to the API fails.
861
879
  """
862
880
 
863
- workflow_data = {
864
- "min_pH": min_pH,
865
- "max_pH": max_pH,
866
- "min_charge": min_charge,
867
- "max_charge": max_charge,
868
- "compute_solvation_energy": compute_solvation_energy,
869
- }
881
+ workflow = stjames.MacropKaWorkflow(
882
+ initial_smiles=initial_smiles,
883
+ min_pH=min_pH,
884
+ max_pH=max_pH,
885
+ min_charge=min_charge,
886
+ max_charge=max_charge,
887
+ compute_solvation_energy=compute_solvation_energy,
888
+ )
870
889
 
871
890
  data = {
872
891
  "name": name,
873
892
  "folder_uuid": folder_uuid,
874
893
  "workflow_type": "macropka",
875
- "workflow_data": workflow_data,
894
+ "workflow_data": workflow.model_dump(),
876
895
  "initial_smiles": initial_smiles,
877
896
  "max_credits": max_credits,
878
897
  }
@@ -920,25 +939,25 @@ def submit_irc_workflow(
920
939
  if isinstance(method, str):
921
940
  method = stjames.Method(method)
922
941
 
923
- workflow_data = {
924
- "settings": {
925
- "method": method.name,
926
- "tasks": [],
927
- "corrections": [],
928
- "mode": "auto",
929
- },
930
- "engine": engine,
931
- "preopt": preopt,
932
- "step_size": step_size,
933
- "max_irc_steps": max_irc_steps,
934
- "mode": "manual",
935
- }
936
-
942
+ workflow = stjames.IRCWorkflow(
943
+ initial_molecule=initial_molecule,
944
+ settings=stjames.Settings(
945
+ method=method,
946
+ tasks=[],
947
+ corrections=[],
948
+ mode="auto",
949
+ ),
950
+ engine=engine,
951
+ preopt=preopt,
952
+ step_size=step_size,
953
+ max_irc_steps=max_irc_steps,
954
+ mode="manual",
955
+ )
937
956
  data = {
938
957
  "name": name,
939
958
  "folder_uuid": folder_uuid,
940
959
  "workflow_type": "irc",
941
- "workflow_data": workflow_data,
960
+ "workflow_data": workflow.model_dump(),
942
961
  "initial_molecule": initial_molecule,
943
962
  "max_credits": max_credits,
944
963
  }
@@ -975,19 +994,20 @@ def submit_protein_cofolding_workflow(
975
994
  :return: A Workflow object representing the submitted workflow.
976
995
  :raises requests.HTTPError: if the request to the API fails.
977
996
  """ # noqa: E501
978
- workflow_data = {
979
- "use_msa_server": use_msa_server,
980
- "use_potentials": use_potentials,
981
- "model": model,
982
- "ligand_binding_affinity_index": ligand_binding_affinity_index,
983
- "initial_smiles_list": initial_smiles_list,
984
- "initial_protein_sequences": initial_protein_sequences,
985
- }
997
+
998
+ workflow = stjames.ProteinCofoldingWorkflow(
999
+ use_msa_server=use_msa_server,
1000
+ use_potentials=use_potentials,
1001
+ model=model,
1002
+ ligand_binding_affinity_index=ligand_binding_affinity_index,
1003
+ initial_smiles_list=initial_smiles_list,
1004
+ initial_protein_sequences=initial_protein_sequences,
1005
+ )
986
1006
  data = {
987
1007
  "name": name,
988
1008
  "folder_uuid": folder_uuid,
989
1009
  "workflow_type": "protein_cofolding",
990
- "workflow_data": workflow_data,
1010
+ "workflow_data": workflow.model_dump(),
991
1011
  "max_credits": max_credits,
992
1012
  }
993
1013
 
@@ -1029,18 +1049,19 @@ def submit_docking_workflow(
1029
1049
  if isinstance(protein, Protein):
1030
1050
  protein = protein.uuid
1031
1051
 
1032
- workflow_data = {
1033
- "target_uuid": protein,
1034
- "pocket": pocket,
1035
- "do_csearch": do_csearch,
1036
- "do_optimization": do_optimization,
1037
- }
1052
+ workflow = stjames.DockingWorkflow(
1053
+ initial_molecule=initial_molecule,
1054
+ target_uuid=protein,
1055
+ pocket=pocket,
1056
+ do_csearch=do_csearch,
1057
+ do_optimization=do_optimization,
1058
+ )
1038
1059
 
1039
1060
  data = {
1040
1061
  "name": name,
1041
1062
  "folder_uuid": folder_uuid,
1042
1063
  "workflow_type": "docking",
1043
- "workflow_data": workflow_data,
1064
+ "workflow_data": workflow.model_dump(),
1044
1065
  "initial_molecule": initial_molecule,
1045
1066
  "max_credits": max_credits,
1046
1067
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rowan-python
3
- Version: 2.1.2
3
+ Version: 2.1.3
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
@@ -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=LwU1iaweXseQENOHYAOQqvjNkwITZn82JHeSr4xZiTc,39505
9
+ rowan/workflow.py,sha256=SzdLu68Tldom6KTeDaPQCc9s7GWJTuOpXYvn-lejbMo,40306
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.2.dist-info/METADATA,sha256=Pj9WxcyKn2jjFIMsew0Ka7GWJ9X0CLElGIsT8agjEME,1598
13
- rowan_python-2.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
- rowan_python-2.1.2.dist-info/licenses/LICENSE,sha256=i05z7xEhyrg6f8j0lR3XYjShnF-MJGFQ-DnpsZ8yiVI,1084
15
- rowan_python-2.1.2.dist-info/RECORD,,
12
+ rowan_python-2.1.3.dist-info/METADATA,sha256=srhR5GteY8OKS4xX72YXxZqzOuoP6C76UsZi-E4ZIDs,1598
13
+ rowan_python-2.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
+ rowan_python-2.1.3.dist-info/licenses/LICENSE,sha256=i05z7xEhyrg6f8j0lR3XYjShnF-MJGFQ-DnpsZ8yiVI,1084
15
+ rowan_python-2.1.3.dist-info/RECORD,,