rowan-python 2.0.3__tar.gz → 2.1.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.
- {rowan_python-2.0.3 → rowan_python-2.1.0}/LICENSE +1 -1
- {rowan_python-2.0.3 → rowan_python-2.1.0}/PKG-INFO +1 -1
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/conformers.py +1 -1
- rowan_python-2.1.0/examples/data/workflow_example.json +177 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/docking_screen.py +3 -1
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/irc.py +1 -1
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/macropka.py +1 -1
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/optimization.py +1 -1
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/pka.py +1 -1
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/protein_cofolding.py +1 -1
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/scan.py +1 -1
- {rowan_python-2.0.3 → rowan_python-2.1.0}/pixi.lock +13 -12
- {rowan_python-2.0.3 → rowan_python-2.1.0}/pyproject.toml +1 -1
- {rowan_python-2.0.3 → rowan_python-2.1.0}/rowan/__init__.py +1 -0
- rowan_python-2.1.0/rowan/project.py +136 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/rowan/protein.py +7 -2
- rowan_python-2.0.3/examples/data/workflow_example.json +0 -190
- {rowan_python-2.0.3 → rowan_python-2.1.0}/.envrc +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/.github/workflows/python-publish.yml +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/.github/workflows/test.yml +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/.gitignore +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/.pre-commit-config.yaml +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/README.md +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/docs/images/deciduous-tree-favicon.png +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/docs/index.md +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/docs/rowan_rdkit.md +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/docs/stylesheets/colors.css +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/PROTAC_solubility.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/basic_calculation_from_json.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/basic_calculation_with_constraint.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/basic_calculation_with_solvent.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/bde.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/cofolding_screen.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/conformer_dependent_redox.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/multistage_opt.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/examples/phenol_pka.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/mkdocs.yml +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/rowan/constants.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/rowan/folder.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/rowan/py.typed +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/rowan/rowan_rdkit/__init__.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/rowan/rowan_rdkit/chem_utils.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/rowan/user.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/rowan/utils.py +0 -0
- {rowan_python-2.0.3 → rowan_python-2.1.0}/rowan/workflow.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Rowan
|
|
3
|
+
Copyright (c) Rowan Scientific Corporation
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mode": "auto",
|
|
3
|
+
"engine": "omol25",
|
|
4
|
+
"messages": [],
|
|
5
|
+
"settings": {
|
|
6
|
+
"mode": "rapid",
|
|
7
|
+
"tasks": [
|
|
8
|
+
"optimize"
|
|
9
|
+
],
|
|
10
|
+
"method": "omol25_conserving_s",
|
|
11
|
+
"basis_set": null,
|
|
12
|
+
"corrections": [],
|
|
13
|
+
"opt_settings": {
|
|
14
|
+
"max_steps": 250,
|
|
15
|
+
"constraints": [],
|
|
16
|
+
"optimize_cell": false,
|
|
17
|
+
"energy_threshold": 0.00005,
|
|
18
|
+
"transition_state": false,
|
|
19
|
+
"recalc_hess_every": 0,
|
|
20
|
+
"max_gradient_threshold": 0.005,
|
|
21
|
+
"rms_gradient_threshold": 0.0035
|
|
22
|
+
},
|
|
23
|
+
"scf_settings": {
|
|
24
|
+
"soscf": "upon_failure",
|
|
25
|
+
"max_iters": 250
|
|
26
|
+
},
|
|
27
|
+
"level_of_theory": "omol25_conserving_s",
|
|
28
|
+
"compute_settings": {
|
|
29
|
+
"compute_type_used": null,
|
|
30
|
+
"requested_compute_type": "cpu"
|
|
31
|
+
},
|
|
32
|
+
"solvent_settings": null,
|
|
33
|
+
"thermochem_settings": {
|
|
34
|
+
"temperature": 298,
|
|
35
|
+
"concentration": 0.0408740470708,
|
|
36
|
+
"scaling_factor": 1,
|
|
37
|
+
"cutoff_frequency": 100
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"initial_molecule": {
|
|
41
|
+
"cell": null,
|
|
42
|
+
"atoms": [
|
|
43
|
+
{
|
|
44
|
+
"position": [
|
|
45
|
+
-1.57521701,
|
|
46
|
+
0.46946663,
|
|
47
|
+
0.02709079
|
|
48
|
+
],
|
|
49
|
+
"atomic_number": 6
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"position": [
|
|
53
|
+
-0.55694222,
|
|
54
|
+
-0.3145698,
|
|
55
|
+
-0.78629029
|
|
56
|
+
],
|
|
57
|
+
"atomic_number": 6
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"position": [
|
|
61
|
+
0.64857101,
|
|
62
|
+
-0.77828652,
|
|
63
|
+
0.03187563
|
|
64
|
+
],
|
|
65
|
+
"atomic_number": 6
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"position": [
|
|
69
|
+
1.50511158,
|
|
70
|
+
0.36668167,
|
|
71
|
+
0.55011421
|
|
72
|
+
],
|
|
73
|
+
"atomic_number": 6
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"position": [
|
|
77
|
+
-1.16251671,
|
|
78
|
+
1.42010117,
|
|
79
|
+
0.37728614
|
|
80
|
+
],
|
|
81
|
+
"atomic_number": 1
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"position": [
|
|
85
|
+
-1.90971756,
|
|
86
|
+
-0.10479157,
|
|
87
|
+
0.89680558
|
|
88
|
+
],
|
|
89
|
+
"atomic_number": 1
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"position": [
|
|
93
|
+
-2.45269203,
|
|
94
|
+
0.69552118,
|
|
95
|
+
-0.58729768
|
|
96
|
+
],
|
|
97
|
+
"atomic_number": 1
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"position": [
|
|
101
|
+
-0.22095177,
|
|
102
|
+
0.29430816,
|
|
103
|
+
-1.63370132
|
|
104
|
+
],
|
|
105
|
+
"atomic_number": 1
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"position": [
|
|
109
|
+
-1.05225015,
|
|
110
|
+
-1.19769669,
|
|
111
|
+
-1.20718455
|
|
112
|
+
],
|
|
113
|
+
"atomic_number": 1
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"position": [
|
|
117
|
+
0.31306273,
|
|
118
|
+
-1.39292336,
|
|
119
|
+
0.87531072
|
|
120
|
+
],
|
|
121
|
+
"atomic_number": 1
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"position": [
|
|
125
|
+
1.27184498,
|
|
126
|
+
-1.42141593,
|
|
127
|
+
-0.6008237
|
|
128
|
+
],
|
|
129
|
+
"atomic_number": 1
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"position": [
|
|
133
|
+
2.3966558,
|
|
134
|
+
-0.02720645,
|
|
135
|
+
1.04864872
|
|
136
|
+
],
|
|
137
|
+
"atomic_number": 1
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"position": [
|
|
141
|
+
0.96154654,
|
|
142
|
+
0.97685605,
|
|
143
|
+
1.27736127
|
|
144
|
+
],
|
|
145
|
+
"atomic_number": 1
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"position": [
|
|
149
|
+
1.83349502,
|
|
150
|
+
1.01395547,
|
|
151
|
+
-0.26919568
|
|
152
|
+
],
|
|
153
|
+
"atomic_number": 1
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"charge": 0,
|
|
157
|
+
"dipole": null,
|
|
158
|
+
"energy": null,
|
|
159
|
+
"smiles": "CCCC",
|
|
160
|
+
"stress": null,
|
|
161
|
+
"elapsed": null,
|
|
162
|
+
"gradient": null,
|
|
163
|
+
"velocities": null,
|
|
164
|
+
"multiplicity": 1,
|
|
165
|
+
"homo_lumo_gap": null,
|
|
166
|
+
"scf_completed": null,
|
|
167
|
+
"scf_iterations": null,
|
|
168
|
+
"mulliken_charges": null,
|
|
169
|
+
"calculation_index": null,
|
|
170
|
+
"vibrational_modes": null,
|
|
171
|
+
"zero_point_energy": null,
|
|
172
|
+
"thermal_energy_corr": null,
|
|
173
|
+
"thermal_enthalpy_corr": null,
|
|
174
|
+
"mulliken_spin_densities": null,
|
|
175
|
+
"thermal_free_energy_corr": null
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -116,7 +116,9 @@ results = {}
|
|
|
116
116
|
docking_result_folder = rowan.create_folder(name="Docking results")
|
|
117
117
|
|
|
118
118
|
|
|
119
|
-
protein = rowan.create_protein_from_pdb_id(
|
|
119
|
+
protein = rowan.create_protein_from_pdb_id(
|
|
120
|
+
"CDK2", "1HCK", project_uuid=rowan.default_project().uuid
|
|
121
|
+
)
|
|
120
122
|
|
|
121
123
|
protein.sanitize()
|
|
122
124
|
time.sleep(60)
|
|
@@ -137,7 +137,7 @@ environments:
|
|
|
137
137
|
- pypi: https://files.pythonhosted.org/packages/7b/8f/c4d9bafc34ad7ad5d8dc16dd1347ee0e507a52c3adb6bfa8887e1c6a26ba/executing-2.2.0-py2.py3-none-any.whl
|
|
138
138
|
- pypi: https://files.pythonhosted.org/packages/4d/36/2a115987e2d8c300a974597416d9de88f2444426de9571f4b59b2cca3acc/filelock-3.18.0-py3-none-any.whl
|
|
139
139
|
- pypi: https://files.pythonhosted.org/packages/f7/ec/67fbef5d497f86283db54c22eec6f6140243aae73265799baaaa19cd17fb/ghp_import-2.1.0-py3-none-any.whl
|
|
140
|
-
- pypi: https://files.pythonhosted.org/packages/
|
|
140
|
+
- pypi: https://files.pythonhosted.org/packages/d7/4b/d1048082a7c9af83c0a426880a7bbebb517b3646a6e57f43315421c672b6/griffe-1.12.0-py3-none-any.whl
|
|
141
141
|
- pypi: https://files.pythonhosted.org/packages/7b/03/699f059a54b7873a11bf53389236c06640bf47be590aa87a521d7c4bb044/griffe_pydantic-1.1.6-py3-none-any.whl
|
|
142
142
|
- pypi: https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl
|
|
143
143
|
- pypi: https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl
|
|
@@ -200,7 +200,7 @@ environments:
|
|
|
200
200
|
- pypi: https://files.pythonhosted.org/packages/b5/00/d631e67a838026495268c2f6884f3711a15a9a2a96cd244fdaea53b823fb/typing_extensions-4.14.1-py3-none-any.whl
|
|
201
201
|
- pypi: https://files.pythonhosted.org/packages/17/69/cd203477f944c353c31bade965f880aa1061fd6bf05ded0726ca845b6ff7/typing_inspection-0.4.1-py3-none-any.whl
|
|
202
202
|
- pypi: https://files.pythonhosted.org/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl
|
|
203
|
-
- pypi: https://files.pythonhosted.org/packages/
|
|
203
|
+
- pypi: https://files.pythonhosted.org/packages/76/06/04c8e804f813cf972e3262f3f8584c232de64f0cde9f703b46cf53a45090/virtualenv-20.34.0-py3-none-any.whl
|
|
204
204
|
- pypi: https://files.pythonhosted.org/packages/b5/e8/dbf020b4d98251a9860752a094d09a65e1b436ad181faf929983f697048f/watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl
|
|
205
205
|
- pypi: https://files.pythonhosted.org/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl
|
|
206
206
|
- pypi: ./
|
|
@@ -237,7 +237,7 @@ environments:
|
|
|
237
237
|
- pypi: https://files.pythonhosted.org/packages/7b/8f/c4d9bafc34ad7ad5d8dc16dd1347ee0e507a52c3adb6bfa8887e1c6a26ba/executing-2.2.0-py2.py3-none-any.whl
|
|
238
238
|
- pypi: https://files.pythonhosted.org/packages/4d/36/2a115987e2d8c300a974597416d9de88f2444426de9571f4b59b2cca3acc/filelock-3.18.0-py3-none-any.whl
|
|
239
239
|
- pypi: https://files.pythonhosted.org/packages/f7/ec/67fbef5d497f86283db54c22eec6f6140243aae73265799baaaa19cd17fb/ghp_import-2.1.0-py3-none-any.whl
|
|
240
|
-
- pypi: https://files.pythonhosted.org/packages/
|
|
240
|
+
- pypi: https://files.pythonhosted.org/packages/d7/4b/d1048082a7c9af83c0a426880a7bbebb517b3646a6e57f43315421c672b6/griffe-1.12.0-py3-none-any.whl
|
|
241
241
|
- pypi: https://files.pythonhosted.org/packages/7b/03/699f059a54b7873a11bf53389236c06640bf47be590aa87a521d7c4bb044/griffe_pydantic-1.1.6-py3-none-any.whl
|
|
242
242
|
- pypi: https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl
|
|
243
243
|
- pypi: https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl
|
|
@@ -300,7 +300,7 @@ environments:
|
|
|
300
300
|
- pypi: https://files.pythonhosted.org/packages/b5/00/d631e67a838026495268c2f6884f3711a15a9a2a96cd244fdaea53b823fb/typing_extensions-4.14.1-py3-none-any.whl
|
|
301
301
|
- pypi: https://files.pythonhosted.org/packages/17/69/cd203477f944c353c31bade965f880aa1061fd6bf05ded0726ca845b6ff7/typing_inspection-0.4.1-py3-none-any.whl
|
|
302
302
|
- pypi: https://files.pythonhosted.org/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl
|
|
303
|
-
- pypi: https://files.pythonhosted.org/packages/
|
|
303
|
+
- pypi: https://files.pythonhosted.org/packages/76/06/04c8e804f813cf972e3262f3f8584c232de64f0cde9f703b46cf53a45090/virtualenv-20.34.0-py3-none-any.whl
|
|
304
304
|
- pypi: https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl
|
|
305
305
|
- pypi: https://files.pythonhosted.org/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl
|
|
306
306
|
- pypi: ./
|
|
@@ -504,10 +504,10 @@ packages:
|
|
|
504
504
|
- markdown ; extra == 'dev'
|
|
505
505
|
- flake8 ; extra == 'dev'
|
|
506
506
|
- wheel ; extra == 'dev'
|
|
507
|
-
- pypi: https://files.pythonhosted.org/packages/
|
|
507
|
+
- pypi: https://files.pythonhosted.org/packages/d7/4b/d1048082a7c9af83c0a426880a7bbebb517b3646a6e57f43315421c672b6/griffe-1.12.0-py3-none-any.whl
|
|
508
508
|
name: griffe
|
|
509
|
-
version: 1.
|
|
510
|
-
sha256:
|
|
509
|
+
version: 1.12.0
|
|
510
|
+
sha256: 634cf7bf93ab7d12003f3704043e8e530637fc3d40c67a2a052e57d2fcde173a
|
|
511
511
|
requires_dist:
|
|
512
512
|
- colorama>=0.4
|
|
513
513
|
requires_python: '>=3.9'
|
|
@@ -1494,8 +1494,8 @@ packages:
|
|
|
1494
1494
|
requires_python: '>=3.8'
|
|
1495
1495
|
- pypi: ./
|
|
1496
1496
|
name: rowan-python
|
|
1497
|
-
version: 2.0
|
|
1498
|
-
sha256:
|
|
1497
|
+
version: 2.1.0
|
|
1498
|
+
sha256: c8838a78320174b0b9f997ab09b77e7c3b08a6f64e39f1aaad16c22921535ee6
|
|
1499
1499
|
requires_dist:
|
|
1500
1500
|
- httpx
|
|
1501
1501
|
- stjames>=0.0.83
|
|
@@ -1673,15 +1673,16 @@ packages:
|
|
|
1673
1673
|
- pysocks>=1.5.6,!=1.5.7,<2.0 ; extra == 'socks'
|
|
1674
1674
|
- zstandard>=0.18.0 ; extra == 'zstd'
|
|
1675
1675
|
requires_python: '>=3.9'
|
|
1676
|
-
- pypi: https://files.pythonhosted.org/packages/
|
|
1676
|
+
- pypi: https://files.pythonhosted.org/packages/76/06/04c8e804f813cf972e3262f3f8584c232de64f0cde9f703b46cf53a45090/virtualenv-20.34.0-py3-none-any.whl
|
|
1677
1677
|
name: virtualenv
|
|
1678
|
-
version: 20.
|
|
1679
|
-
sha256:
|
|
1678
|
+
version: 20.34.0
|
|
1679
|
+
sha256: 341f5afa7eee943e4984a9207c025feedd768baff6753cd660c857ceb3e36026
|
|
1680
1680
|
requires_dist:
|
|
1681
1681
|
- distlib>=0.3.7,<1
|
|
1682
1682
|
- filelock>=3.12.2,<4
|
|
1683
1683
|
- importlib-metadata>=6.6 ; python_full_version < '3.8'
|
|
1684
1684
|
- platformdirs>=3.9.1,<5
|
|
1685
|
+
- typing-extensions>=4.13.2 ; python_full_version < '3.11'
|
|
1685
1686
|
- furo>=2023.7.26 ; extra == 'docs'
|
|
1686
1687
|
- proselint>=0.13 ; extra == 'docs'
|
|
1687
1688
|
- sphinx>=7.1.2,!=7.3 ; extra == 'docs'
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import Any, Self
|
|
3
|
+
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
|
|
6
|
+
from .utils import api_client
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Project(BaseModel):
|
|
10
|
+
"""
|
|
11
|
+
A class representing a project in the Rowan API.
|
|
12
|
+
|
|
13
|
+
:ivar uuid: The UUID of the project.
|
|
14
|
+
:ivar name: The name of the project.
|
|
15
|
+
:ivar created_at: The date and time the project was created.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
uuid: str
|
|
19
|
+
name: str | None = None
|
|
20
|
+
created_at: datetime | None = None
|
|
21
|
+
|
|
22
|
+
def __repr__(self) -> str:
|
|
23
|
+
return f"<Project name='{self.name}' created_at='{self.created_at}' uuid='{self.uuid}'>"
|
|
24
|
+
|
|
25
|
+
def update(
|
|
26
|
+
self,
|
|
27
|
+
name: str | None = None,
|
|
28
|
+
) -> Self:
|
|
29
|
+
"""
|
|
30
|
+
Update a project.
|
|
31
|
+
|
|
32
|
+
:param name: The new name of the project.
|
|
33
|
+
|
|
34
|
+
:return: The updated project object.
|
|
35
|
+
"""
|
|
36
|
+
payload = {
|
|
37
|
+
"name": name if name is not None else self.name,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
with api_client() as client:
|
|
41
|
+
response = client.post(f"/project/{self.uuid}", json=payload)
|
|
42
|
+
response.raise_for_status()
|
|
43
|
+
updated_data = response.json()
|
|
44
|
+
|
|
45
|
+
self.name = updated_data.get("name")
|
|
46
|
+
return self
|
|
47
|
+
|
|
48
|
+
def delete(self) -> None:
|
|
49
|
+
"""
|
|
50
|
+
Delete the project.
|
|
51
|
+
|
|
52
|
+
This is a destructive action, it will delete all the folders and
|
|
53
|
+
workflows that are inside this project.
|
|
54
|
+
|
|
55
|
+
:raises requests.HTTPError: if the request to the API fails.
|
|
56
|
+
"""
|
|
57
|
+
with api_client() as client:
|
|
58
|
+
response = client.delete(f"/project/{self.uuid}")
|
|
59
|
+
response.raise_for_status()
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def retrieve_project(uuid: str) -> Project:
|
|
63
|
+
"""
|
|
64
|
+
Retrieves a project from the API by UUID. Project UUID can be found in the project's URL.
|
|
65
|
+
|
|
66
|
+
:param uuid: The UUID of the project to retrieve.
|
|
67
|
+
:return: A Project object representing the retrieved project.
|
|
68
|
+
:raises HTTPError: If the API request fails.
|
|
69
|
+
"""
|
|
70
|
+
with api_client() as client:
|
|
71
|
+
response = client.get(f"/project/{uuid}")
|
|
72
|
+
response.raise_for_status()
|
|
73
|
+
return Project(**response.json())
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def list_projects(
|
|
77
|
+
name_contains: str | None = None,
|
|
78
|
+
page: int = 0,
|
|
79
|
+
size: int = 10,
|
|
80
|
+
) -> list[Project]:
|
|
81
|
+
"""
|
|
82
|
+
Retrieve a list of projects based on the specified criteria.
|
|
83
|
+
|
|
84
|
+
:param name_contains: Substring to search for in project names.
|
|
85
|
+
:param page: Pagination parameter to specify the page number.
|
|
86
|
+
:param size: Pagination parameter to specify the number of items per page.
|
|
87
|
+
:return: A list of Folder objects that match the search criteria.
|
|
88
|
+
:raises requests.HTTPError: if the request to the API fails.
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
params: dict[str, Any] = {
|
|
92
|
+
"page": page,
|
|
93
|
+
"size": size,
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if name_contains is not None:
|
|
97
|
+
params["name_contains"] = name_contains
|
|
98
|
+
|
|
99
|
+
with api_client() as client:
|
|
100
|
+
response = client.get("/project", params=params)
|
|
101
|
+
response.raise_for_status()
|
|
102
|
+
items = response.json()
|
|
103
|
+
|
|
104
|
+
return [Project(**item) for item in items]
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def create_project(
|
|
108
|
+
name: str,
|
|
109
|
+
) -> Project:
|
|
110
|
+
"""
|
|
111
|
+
Create a new project.
|
|
112
|
+
|
|
113
|
+
:param name: The name of the project.
|
|
114
|
+
:return: The newly created project.
|
|
115
|
+
"""
|
|
116
|
+
data = {
|
|
117
|
+
"name": name,
|
|
118
|
+
}
|
|
119
|
+
with api_client() as client:
|
|
120
|
+
response = client.post("/project", json=data)
|
|
121
|
+
response.raise_for_status()
|
|
122
|
+
project_data = response.json()
|
|
123
|
+
return Project(**project_data)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def default_project() -> Project:
|
|
127
|
+
"""
|
|
128
|
+
Retrieves the default project from the API.
|
|
129
|
+
|
|
130
|
+
:return: A Project object representing the default project.
|
|
131
|
+
:raises HTTPError: If the API request fails.
|
|
132
|
+
"""
|
|
133
|
+
with api_client() as client:
|
|
134
|
+
response = client.get("/user/me/default_project")
|
|
135
|
+
response.raise_for_status()
|
|
136
|
+
return Project(**response.json())
|
|
@@ -189,12 +189,13 @@ def upload_protein(name: str, file_path: Path) -> Protein:
|
|
|
189
189
|
return Protein(**final_response.json())
|
|
190
190
|
|
|
191
191
|
|
|
192
|
-
def create_protein_from_pdb_id(name: str, code: str) -> Protein:
|
|
192
|
+
def create_protein_from_pdb_id(name: str, code: str, project_uuid: str) -> Protein:
|
|
193
193
|
"""
|
|
194
194
|
Creates a protein from a PDB ID.
|
|
195
195
|
|
|
196
196
|
:param name: The name of the protein to create
|
|
197
197
|
:param code: The PDB ID of the protein to create
|
|
198
|
+
:param project_uuid: The UUID of the project to create the protein in
|
|
198
199
|
:return: A Protein object representing the created protein
|
|
199
200
|
:raises requests.HTTPError: if the request to the API fails
|
|
200
201
|
"""
|
|
@@ -207,7 +208,11 @@ def create_protein_from_pdb_id(name: str, code: str) -> Protein:
|
|
|
207
208
|
protein_data = conversion_response.json()
|
|
208
209
|
|
|
209
210
|
# Step 2: Use the converted data to create the final protein object.
|
|
210
|
-
creation_payload = {
|
|
211
|
+
creation_payload = {
|
|
212
|
+
"name": name,
|
|
213
|
+
"protein_data": protein_data,
|
|
214
|
+
"project_uuid": project_uuid,
|
|
215
|
+
}
|
|
211
216
|
final_response = client.post("/protein", json=creation_payload)
|
|
212
217
|
final_response.raise_for_status()
|
|
213
218
|
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"mode": "auto",
|
|
3
|
-
"engine": "xtb",
|
|
4
|
-
"messages": [],
|
|
5
|
-
"settings": {
|
|
6
|
-
"mode": "rapid",
|
|
7
|
-
"tasks": [
|
|
8
|
-
"optimize"
|
|
9
|
-
],
|
|
10
|
-
"method": "gfn2_xtb",
|
|
11
|
-
"basis_set": null,
|
|
12
|
-
"corrections": [],
|
|
13
|
-
"opt_settings": {
|
|
14
|
-
"max_steps": 250,
|
|
15
|
-
"constraints": [
|
|
16
|
-
{
|
|
17
|
-
"atoms": [
|
|
18
|
-
4,
|
|
19
|
-
3,
|
|
20
|
-
2,
|
|
21
|
-
1
|
|
22
|
-
],
|
|
23
|
-
"value": 0,
|
|
24
|
-
"constraint_type": "dihedral"
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"optimize_cell": false,
|
|
28
|
-
"energy_threshold": 0.00005,
|
|
29
|
-
"transition_state": false,
|
|
30
|
-
"recalc_hess_every": 0,
|
|
31
|
-
"max_gradient_threshold": 0.005,
|
|
32
|
-
"rms_gradient_threshold": 0.0035
|
|
33
|
-
},
|
|
34
|
-
"scf_settings": {
|
|
35
|
-
"soscf": false,
|
|
36
|
-
"max_iters": 250
|
|
37
|
-
},
|
|
38
|
-
"level_of_theory": "gfn2_xtb",
|
|
39
|
-
"compute_settings": {
|
|
40
|
-
"compute_type_used": null,
|
|
41
|
-
"requested_compute_type": "cpu"
|
|
42
|
-
},
|
|
43
|
-
"solvent_settings": null,
|
|
44
|
-
"thermochem_settings": {
|
|
45
|
-
"temperature": 298,
|
|
46
|
-
"concentration": 0.0408740470708,
|
|
47
|
-
"scaling_factor": 1,
|
|
48
|
-
"cutoff_frequency": 100
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"calculation_uuid": "54027970-5efb-42df-8125-c8984d8ca7eb",
|
|
52
|
-
"initial_molecule": {
|
|
53
|
-
"cell": null,
|
|
54
|
-
"atoms": [
|
|
55
|
-
{
|
|
56
|
-
"position": [
|
|
57
|
-
-1.57731622,
|
|
58
|
-
0.46259034,
|
|
59
|
-
0.02288227
|
|
60
|
-
],
|
|
61
|
-
"atomic_number": 6
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"position": [
|
|
65
|
-
-0.55246934,
|
|
66
|
-
-0.31349805,
|
|
67
|
-
-0.78986664
|
|
68
|
-
],
|
|
69
|
-
"atomic_number": 6
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"position": [
|
|
73
|
-
0.65178196,
|
|
74
|
-
-0.77563238,
|
|
75
|
-
0.03104792
|
|
76
|
-
],
|
|
77
|
-
"atomic_number": 6
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"position": [
|
|
81
|
-
1.5013315,
|
|
82
|
-
0.37070813,
|
|
83
|
-
0.55769072
|
|
84
|
-
],
|
|
85
|
-
"atomic_number": 6
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"position": [
|
|
89
|
-
-1.17009891,
|
|
90
|
-
1.41344062,
|
|
91
|
-
0.37886292
|
|
92
|
-
],
|
|
93
|
-
"atomic_number": 1
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"position": [
|
|
97
|
-
-1.91277475,
|
|
98
|
-
-0.11690438,
|
|
99
|
-
0.88874548
|
|
100
|
-
],
|
|
101
|
-
"atomic_number": 1
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"position": [
|
|
105
|
-
-2.45332233,
|
|
106
|
-
0.68757176,
|
|
107
|
-
-0.59399069
|
|
108
|
-
],
|
|
109
|
-
"atomic_number": 1
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"position": [
|
|
113
|
-
-0.21575239,
|
|
114
|
-
0.30052639,
|
|
115
|
-
-1.63326648
|
|
116
|
-
],
|
|
117
|
-
"atomic_number": 1
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"position": [
|
|
121
|
-
-1.04230601,
|
|
122
|
-
-1.19688302,
|
|
123
|
-
-1.21658189
|
|
124
|
-
],
|
|
125
|
-
"atomic_number": 1
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"position": [
|
|
129
|
-
0.31558706,
|
|
130
|
-
-1.39539838,
|
|
131
|
-
0.87044712
|
|
132
|
-
],
|
|
133
|
-
"atomic_number": 1
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"position": [
|
|
137
|
-
1.28031633,
|
|
138
|
-
-1.41330121,
|
|
139
|
-
-0.60197473
|
|
140
|
-
],
|
|
141
|
-
"atomic_number": 1
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"position": [
|
|
145
|
-
2.39258685,
|
|
146
|
-
-0.02154188,
|
|
147
|
-
1.05803044
|
|
148
|
-
],
|
|
149
|
-
"atomic_number": 1
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"position": [
|
|
153
|
-
0.95227634,
|
|
154
|
-
0.97534316,
|
|
155
|
-
1.28543953
|
|
156
|
-
],
|
|
157
|
-
"atomic_number": 1
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"position": [
|
|
161
|
-
1.83015992,
|
|
162
|
-
1.0229789,
|
|
163
|
-
-0.25746596
|
|
164
|
-
],
|
|
165
|
-
"atomic_number": 1
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
"charge": 0,
|
|
169
|
-
"dipole": null,
|
|
170
|
-
"energy": null,
|
|
171
|
-
"smiles": "CCCC",
|
|
172
|
-
"stress": null,
|
|
173
|
-
"elapsed": null,
|
|
174
|
-
"gradient": null,
|
|
175
|
-
"velocities": null,
|
|
176
|
-
"multiplicity": 1,
|
|
177
|
-
"homo_lumo_gap": null,
|
|
178
|
-
"scf_completed": null,
|
|
179
|
-
"scf_iterations": null,
|
|
180
|
-
"mulliken_charges": null,
|
|
181
|
-
"calculation_index": null,
|
|
182
|
-
"vibrational_modes": null,
|
|
183
|
-
"zero_point_energy": null,
|
|
184
|
-
"thermal_energy_corr": null,
|
|
185
|
-
"thermal_enthalpy_corr": null,
|
|
186
|
-
"mulliken_spin_densities": null,
|
|
187
|
-
"thermal_free_energy_corr": null
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|