RuNNerFit.ipynb 12.7 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyiron import Project"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "pr = Project(\"runner_fit\")"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
23
24
25
26
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
Jan Janssen's avatar
Jan Janssen committed
27
    "pr_fit = Project(\"../../datasets\")\n",
Marvin Poul's avatar
Marvin Poul committed
28
29
30
31
32
33
34
    "if len(pr_fit.job_table()) == 0:\n",
    "    pr_fit.unpack(\"Cu_training_archive\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>status</th>\n",
       "      <th>chemicalformula</th>\n",
       "      <th>job</th>\n",
       "      <th>subjob</th>\n",
       "      <th>projectpath</th>\n",
       "      <th>project</th>\n",
       "      <th>timestart</th>\n",
       "      <th>timestop</th>\n",
       "      <th>totalcputime</th>\n",
       "      <th>computer</th>\n",
       "      <th>hamilton</th>\n",
       "      <th>hamversion</th>\n",
       "      <th>parentid</th>\n",
       "      <th>masterid</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
Marvin Poul's avatar
Marvin Poul committed
77
78
       "      <th>1</th>\n",
       "      <td>13791972</td>\n",
79
80
81
82
83
       "      <td>finished</td>\n",
       "      <td>None</td>\n",
       "      <td>df1_A1_A2_A3_EV_elast_phon</td>\n",
       "      <td>/df1_A1_A2_A3_EV_elast_phon</td>\n",
       "      <td>/cmmc/u/</td>\n",
Marvin Poul's avatar
Marvin Poul committed
84
85
       "      <td>zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/import_database/Cu_database/</td>\n",
       "      <td>2021-02-08 10:33:52.341472</td>\n",
86
87
88
89
90
91
92
93
94
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>zora@cmti001#1</td>\n",
       "      <td>TrainingContainer</td>\n",
       "      <td>0.4</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
Marvin Poul's avatar
Marvin Poul committed
95
96
       "      <th>0</th>\n",
       "      <td>13791973</td>\n",
97
98
99
100
101
       "      <td>finished</td>\n",
       "      <td>None</td>\n",
       "      <td>df3_10k</td>\n",
       "      <td>/df3_10k</td>\n",
       "      <td>/cmmc/u/</td>\n",
Marvin Poul's avatar
Marvin Poul committed
102
103
       "      <td>zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/import_database/Cu_database/</td>\n",
       "      <td>2021-02-08 10:33:53.993230</td>\n",
104
105
106
107
108
109
110
111
112
113
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>zora@cmti001#1</td>\n",
       "      <td>TrainingContainer</td>\n",
       "      <td>0.4</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
Marvin Poul's avatar
Marvin Poul committed
114
       "      <td>13791974</td>\n",
115
116
117
118
119
       "      <td>finished</td>\n",
       "      <td>None</td>\n",
       "      <td>df2_1k</td>\n",
       "      <td>/df2_1k</td>\n",
       "      <td>/cmmc/u/</td>\n",
Marvin Poul's avatar
Marvin Poul committed
120
121
       "      <td>zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/import_database/Cu_database/</td>\n",
       "      <td>2021-02-08 10:33:54.435308</td>\n",
122
123
124
125
126
127
128
129
130
131
132
133
134
135
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>zora@cmti001#1</td>\n",
       "      <td>TrainingContainer</td>\n",
       "      <td>0.4</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         id    status chemicalformula                         job  \\\n",
Marvin Poul's avatar
Marvin Poul committed
136
137
138
       "1  13791972  finished            None  df1_A1_A2_A3_EV_elast_phon   \n",
       "0  13791973  finished            None                     df3_10k   \n",
       "2  13791974  finished            None                      df2_1k   \n",
139
140
       "\n",
       "                        subjob projectpath  \\\n",
Marvin Poul's avatar
Marvin Poul committed
141
142
       "1  /df1_A1_A2_A3_EV_elast_phon    /cmmc/u/   \n",
       "0                     /df3_10k    /cmmc/u/   \n",
143
144
       "2                      /df2_1k    /cmmc/u/   \n",
       "\n",
Marvin Poul's avatar
Marvin Poul committed
145
146
147
148
       "                                                                                                project  \\\n",
       "1  zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/import_database/Cu_database/   \n",
       "0  zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/import_database/Cu_database/   \n",
       "2  zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/import_database/Cu_database/   \n",
149
150
       "\n",
       "                   timestart timestop totalcputime        computer  \\\n",
Marvin Poul's avatar
Marvin Poul committed
151
152
153
       "1 2021-02-08 10:33:52.341472     None         None  zora@cmti001#1   \n",
       "0 2021-02-08 10:33:53.993230     None         None  zora@cmti001#1   \n",
       "2 2021-02-08 10:33:54.435308     None         None  zora@cmti001#1   \n",
154
155
156
       "\n",
       "            hamilton hamversion parentid masterid  \n",
       "1  TrainingContainer        0.4     None     None  \n",
Marvin Poul's avatar
Marvin Poul committed
157
158
       "0  TrainingContainer        0.4     None     None  \n",
       "2  TrainingContainer        0.4     None     None  "
159
160
      ]
     },
Marvin Poul's avatar
Marvin Poul committed
161
     "execution_count": 14,
162
163
164
165
166
167
168
169
170
171
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pr_fit.job_table()"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
172
   "execution_count": 15,
173
174
175
176
177
178
179
180
   "metadata": {},
   "outputs": [],
   "source": [
    "import pyiron_contrib"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
181
   "execution_count": 16,
182
183
184
185
186
187
188
189
   "metadata": {},
   "outputs": [],
   "source": [
    "j = pr.create.job.RunnerFit('fit', delete_existing_job=True)"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
190
   "execution_count": 17,
191
192
193
194
195
196
   "metadata": {},
   "outputs": [],
   "source": [
    "j.add_job_to_fitting(pr_fit.load('df1_A1_A2_A3_EV_elast_phon'))"
   ]
  },
Marvin Poul's avatar
Marvin Poul committed
197
198
199
  {
   "cell_type": "code",
   "execution_count": 19,
200
201
202
203
204
205
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
Marvin Poul's avatar
Marvin Poul committed
206
      "The job fit was saved and received the ID: 13791989\n"
207
208
209
210
211
212
213
214
215
     ]
    }
   ],
   "source": [
    "j.run()"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
216
   "execution_count": 20,
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Name</th>\n",
       "      <th>Filename</th>\n",
       "      <th>Model</th>\n",
       "      <th>Species</th>\n",
       "      <th>Config</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>RuNNer-Cu</td>\n",
Marvin Poul's avatar
Marvin Poul committed
251
       "      <td>[/cmmc/u/zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/runner_fit/fit_hdf5/fit/input.nn, /cmmc/u/zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/r...</td>\n",
252
253
254
255
256
257
258
259
260
261
262
263
264
       "      <td>RuNNer</td>\n",
       "      <td>[Cu]</td>\n",
       "      <td>[pair_style nnp dir \"./\" showew no showewsum 0 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254 emap \"1:Cu\"\\n, pair_coeff * * 12\\n]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        Name  \\\n",
       "0  RuNNer-Cu   \n",
       "\n",
       "                                                                                                                                                                                                  Filename  \\\n",
Marvin Poul's avatar
Marvin Poul committed
265
       "0  [/cmmc/u/zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/runner_fit/fit_hdf5/fit/input.nn, /cmmc/u/zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/r...   \n",
266
267
268
269
270
271
272
273
       "\n",
       "    Model Species  \\\n",
       "0  RuNNer    [Cu]   \n",
       "\n",
       "                                                                                                                                                Config  \n",
       "0  [pair_style nnp dir \"./\" showew no showewsum 0 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254 emap \"1:Cu\"\\n, pair_coeff * * 12\\n]  "
      ]
     },
Marvin Poul's avatar
Marvin Poul committed
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "j.lammps_potential"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>status</th>\n",
       "      <th>chemicalformula</th>\n",
       "      <th>job</th>\n",
       "      <th>subjob</th>\n",
       "      <th>projectpath</th>\n",
       "      <th>project</th>\n",
       "      <th>timestart</th>\n",
       "      <th>timestop</th>\n",
       "      <th>totalcputime</th>\n",
       "      <th>computer</th>\n",
       "      <th>hamilton</th>\n",
       "      <th>hamversion</th>\n",
       "      <th>parentid</th>\n",
       "      <th>masterid</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>13791989</td>\n",
       "      <td>finished</td>\n",
       "      <td>None</td>\n",
       "      <td>fit</td>\n",
       "      <td>/fit</td>\n",
       "      <td>/cmmc/u/</td>\n",
       "      <td>zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/runner_fit/</td>\n",
       "      <td>2021-03-04 19:20:48.233697</td>\n",
       "      <td>2021-03-04 19:21:07.665989</td>\n",
       "      <td>19.0</td>\n",
       "      <td>zora@cmti001#1</td>\n",
       "      <td>RunnerFit</td>\n",
       "      <td>0.4</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         id    status chemicalformula  job subjob projectpath  \\\n",
       "0  13791989  finished            None  fit   /fit    /cmmc/u/   \n",
       "\n",
       "                                                                               project  \\\n",
       "0  zora/pyiron/projects/PotentialWorkshop/pyiron_potentialfit/day_2/runner/runner_fit/   \n",
       "\n",
       "                   timestart                   timestop  totalcputime  \\\n",
       "0 2021-03-04 19:20:48.233697 2021-03-04 19:21:07.665989          19.0   \n",
       "\n",
       "         computer   hamilton hamversion parentid masterid  \n",
       "0  zora@cmti001#1  RunnerFit        0.4     None     None  "
      ]
     },
     "execution_count": 21,
364
365
366
367
368
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
Marvin Poul's avatar
Marvin Poul committed
369
    "pr.job_table()"
370
371
372
373
374
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
Marvin Poul's avatar
Marvin Poul committed
375
   "display_name": "Python 3",
376
   "language": "python",
Marvin Poul's avatar
Marvin Poul committed
377
   "name": "python3"
378
379
380
381
382
383
384
385
386
387
388
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
Marvin Poul's avatar
Marvin Poul committed
389
390
391
392
393
394
395
396
   "version": "3.9.1"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {},
    "version_major": 2,
    "version_minor": 0
   }
397
398
399
400
401
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}