|
33 | 33 | "id": "51105b005c535ca"
|
34 | 34 | },
|
35 | 35 | {
|
36 |
| - "metadata": {}, |
| 36 | + "metadata": { |
| 37 | + "ExecuteTime": { |
| 38 | + "end_time": "2025-06-30T17:49:35.443494Z", |
| 39 | + "start_time": "2025-06-30T17:49:35.381267Z" |
| 40 | + } |
| 41 | + }, |
37 | 42 | "cell_type": "code",
|
38 | 43 | "source": [
|
39 | 44 | "from mat3ra.api import ApiClient\n",
|
40 | 45 | "# Log in to get the API token\n",
|
41 | 46 | "auth_config = await ApiClient().login()"
|
42 | 47 | ],
|
43 | 48 | "id": "23626cb27f6e7206",
|
44 |
| - "outputs": [], |
45 |
| - "execution_count": null |
| 49 | + "outputs": [ |
| 50 | + { |
| 51 | + "ename": "ModuleNotFoundError", |
| 52 | + "evalue": "No module named 'mat3ra.api'", |
| 53 | + "output_type": "error", |
| 54 | + "traceback": [ |
| 55 | + "\u001B[0;31m---------------------------------------------------------------------------\u001B[0m", |
| 56 | + "\u001B[0;31mModuleNotFoundError\u001B[0m Traceback (most recent call last)", |
| 57 | + "Cell \u001B[0;32mIn[2], line 1\u001B[0m\n\u001B[0;32m----> 1\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01mmat3ra\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mapi\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m ApiClient\n\u001B[1;32m 2\u001B[0m \u001B[38;5;66;03m# Log in to get the API token\u001B[39;00m\n\u001B[1;32m 3\u001B[0m auth_config \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mawait\u001B[39;00m ApiClient()\u001B[38;5;241m.\u001B[39mlogin()\n", |
| 58 | + "\u001B[0;31mModuleNotFoundError\u001B[0m: No module named 'mat3ra.api'" |
| 59 | + ] |
| 60 | + } |
| 61 | + ], |
| 62 | + "execution_count": 2 |
46 | 63 | },
|
47 | 64 | {
|
48 | 65 | "metadata": {},
|
|
96 | 113 | {
|
97 | 114 | "metadata": {},
|
98 | 115 | "cell_type": "markdown",
|
99 |
| - "source": "## 5. Create workflow", |
| 116 | + "source": "## 5. Get workflow and adjust its parameters", |
100 | 117 | "id": "9bdd00f870caaeeb"
|
101 | 118 | },
|
102 | 119 | {
|
|
105 | 122 | "outputs": [],
|
106 | 123 | "execution_count": null,
|
107 | 124 | "source": [
|
108 |
| - "from mat3ra.wode.workflow.vasp.band_structure import create_band_structure_workflow\n", |
| 125 | + "from mat3ra.wode.workflow.vasp.band_structure import BandStructureWorkflow\n", |
| 126 | + "from mat3ra.wode.pseudopotentials import PseudopotentialEnum\n", |
109 | 127 | "\n",
|
110 |
| - "band_gap_workflow = create_band_structure_workflow(\n", |
111 |
| - " material=material,\n", |
112 |
| - " kpoints=kpoints,\n", |
113 |
| - " cutoff=cutoff,\n", |
114 |
| - " smearing=smearing,\n", |
115 |
| - " number_of_bands=number_of_bands\n", |
116 |
| - ")" |
| 128 | + "workflow = BandStructureWorkflow()\n", |
| 129 | + "workflow.set_kpoints(kpoints)\n", |
| 130 | + "workflow.set_pseudopotential(PseudopotentialEnum.PAW_HSE) # elements will be set automatically based on the material" |
117 | 131 | ],
|
118 | 132 | "id": "68d43f6c797f2fc4"
|
119 | 133 | },
|
|
129 | 143 | "outputs": [],
|
130 | 144 | "execution_count": null,
|
131 | 145 | "source": [
|
132 |
| - "from mat3ra.wode.compute import ComputeConfiguration, QueueTypes\n", |
| 146 | + "from mat3ra.wode.compute import ComputeConfiguration, QueueEnum\n", |
133 | 147 | "compute_config = ComputeConfiguration(\n",
|
134 |
| - " queue = QueueTypes.OR8,\n", |
| 148 | + " queue = QueueEnum.OR8,\n", |
135 | 149 | " nodes = 1,\n",
|
136 | 150 | " cores = 8,\n",
|
137 | 151 | ")"
|
|
150 | 164 | "outputs": [],
|
151 | 165 | "execution_count": null,
|
152 | 166 | "source": [
|
153 |
| - "from mat3ra.wode.job import JobConfiguration, create_job\n", |
154 |
| - "job_config = JobConfiguration(workflow=band_gap_workflow, material=material, compute = compute_config)\n", |
155 |
| - "job = create_job(job_config, auth_config=auth_config)\n", |
| 167 | + "from mat3ra.wode.job import create_job\n", |
| 168 | + "job = create_job(workflow=workflow, material=material, compute = compute_config, auth_config=auth_config)\n", |
156 | 169 | "job.run()\n",
|
157 | 170 | "job.wait_for_complete()\n",
|
158 | 171 | "# job.check_status()\n",
|
|
0 commit comments