Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6894fc

Browse files
committed
displace ethanol and structure jupyter
1 parent 097517a commit c6894fc

File tree

2 files changed

+80
-58
lines changed

2 files changed

+80
-58
lines changed

examples/ethanol.xyz

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
9
2-
3-
C -0.01917708 0.56528151 -0.01770717
4-
C -1.32254101 -0.25786302 0.02110478
5-
O 1.20740778 -0.24047001 0.05234389
6-
H 0.11291534 1.27230970 -0.83004524
7-
H 0.15881439 1.11662642 0.86968220
8-
H -1.08763483 -1.14951348 0.66303058
9-
H -2.29503737 0.28289532 0.19860290
10-
H -1.30572545 -0.56583718 -1.04026005
11-
H 1.22983760 -0.80042654 -0.73220070
2+
Energy: 4.5404112
3+
C 0.28455 0.77306 0.04413
4+
C -1.43338 -0.66454 0.47898
5+
O 1.43913 -0.01863 -0.00537
6+
H 0.29059 1.52268 -0.77945
7+
H 0.28064 1.33297 1.00319
8+
H -1.02799 -1.48376 1.10985
9+
H -2.35522 -0.26639 0.95249
10+
H -1.69003 -1.06899 -0.52305
11+
H 2.67545 0.80118 -0.04217

tutorial.ipynb

Lines changed: 70 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,9 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 15,
5+
"execution_count": 1,
66
"metadata": {},
7-
"outputs": [
8-
{
9-
"name": "stdout",
10-
"output_type": "stream",
11-
"text": [
12-
"The autoreload extension is already loaded. To reload it, use:\n",
13-
" %reload_ext autoreload\n"
14-
]
15-
}
16-
],
7+
"outputs": [],
178
"source": [
189
"%load_ext autoreload\n",
1910
"%autoreload 2\n",
@@ -22,7 +13,7 @@
2213
},
2314
{
2415
"cell_type": "code",
25-
"execution_count": 41,
16+
"execution_count": 2,
2617
"metadata": {},
2718
"outputs": [],
2819
"source": [
@@ -35,7 +26,7 @@
3526
},
3627
{
3728
"cell_type": "code",
38-
"execution_count": 42,
29+
"execution_count": 3,
3930
"metadata": {},
4031
"outputs": [],
4132
"source": [
@@ -45,7 +36,7 @@
4536
},
4637
{
4738
"cell_type": "code",
48-
"execution_count": 43,
39+
"execution_count": 4,
4940
"metadata": {},
5041
"outputs": [],
5142
"source": [
@@ -56,7 +47,7 @@
5647
},
5748
{
5849
"cell_type": "code",
59-
"execution_count": 44,
50+
"execution_count": 5,
6051
"metadata": {},
6152
"outputs": [],
6253
"source": [
@@ -73,7 +64,7 @@
7364
},
7465
{
7566
"cell_type": "code",
76-
"execution_count": 45,
67+
"execution_count": 6,
7768
"metadata": {},
7869
"outputs": [
7970
{
@@ -105,7 +96,7 @@
10596
"\n",
10697
" <Scene>\n",
10798
"\n",
108-
" <Transform translation=\"-0.02 0.57 -0.02\">\n",
99+
" <Transform translation=\"0.28 0.77 0.04\">\n",
109100
"\n",
110101
" <Shape>\n",
111102
"\n",
@@ -125,7 +116,7 @@
125116
"\n",
126117
" </Transform>\n",
127118
"\n",
128-
" <Transform translation=\"-1.32 -0.26 0.02\">\n",
119+
" <Transform translation=\"-1.43 -0.66 0.48\">\n",
129120
"\n",
130121
" <Shape>\n",
131122
"\n",
@@ -145,7 +136,7 @@
145136
"\n",
146137
" </Transform>\n",
147138
"\n",
148-
" <Transform translation=\"1.21 -0.24 0.05\">\n",
139+
" <Transform translation=\"1.44 -0.02 -0.01\">\n",
149140
"\n",
150141
" <Shape>\n",
151142
"\n",
@@ -165,7 +156,7 @@
165156
"\n",
166157
" </Transform>\n",
167158
"\n",
168-
" <Transform translation=\"0.11 1.27 -0.83\">\n",
159+
" <Transform translation=\"0.29 1.52 -0.78\">\n",
169160
"\n",
170161
" <Shape>\n",
171162
"\n",
@@ -185,7 +176,7 @@
185176
"\n",
186177
" </Transform>\n",
187178
"\n",
188-
" <Transform translation=\"0.16 1.12 0.87\">\n",
179+
" <Transform translation=\"0.28 1.33 1.00\">\n",
189180
"\n",
190181
" <Shape>\n",
191182
"\n",
@@ -205,7 +196,7 @@
205196
"\n",
206197
" </Transform>\n",
207198
"\n",
208-
" <Transform translation=\"-1.09 -1.15 0.66\">\n",
199+
" <Transform translation=\"-1.03 -1.48 1.11\">\n",
209200
"\n",
210201
" <Shape>\n",
211202
"\n",
@@ -225,7 +216,7 @@
225216
"\n",
226217
" </Transform>\n",
227218
"\n",
228-
" <Transform translation=\"-2.30 0.28 0.20\">\n",
219+
" <Transform translation=\"-2.36 -0.27 0.95\">\n",
229220
"\n",
230221
" <Shape>\n",
231222
"\n",
@@ -245,7 +236,7 @@
245236
"\n",
246237
" </Transform>\n",
247238
"\n",
248-
" <Transform translation=\"-1.31 -0.57 -1.04\">\n",
239+
" <Transform translation=\"-1.69 -1.07 -0.52\">\n",
249240
"\n",
250241
" <Shape>\n",
251242
"\n",
@@ -265,7 +256,7 @@
265256
"\n",
266257
" </Transform>\n",
267258
"\n",
268-
" <Transform translation=\"1.23 -0.80 -0.73\">\n",
259+
" <Transform translation=\"2.68 0.80 -0.04\">\n",
269260
"\n",
270261
" <Shape>\n",
271262
"\n",
@@ -298,7 +289,7 @@
298289
"<IPython.core.display.HTML object>"
299290
]
300291
},
301-
"execution_count": 45,
292+
"execution_count": 6,
302293
"metadata": {},
303294
"output_type": "execute_result"
304295
}
@@ -313,12 +304,14 @@
313304
"cell_type": "markdown",
314305
"metadata": {},
315306
"source": [
316-
"Doesn't seem very optimized, so let us optimize it"
307+
"## Optimization using OQML forces\n",
308+
"\n",
309+
"Doesn't seem very optimized, so let us optimize it. We do this by"
317310
]
318311
},
319312
{
320313
"cell_type": "code",
321-
"execution_count": 46,
314+
"execution_count": 7,
322315
"metadata": {},
323316
"outputs": [],
324317
"source": [
@@ -327,7 +320,7 @@
327320
},
328321
{
329322
"cell_type": "code",
330-
"execution_count": 47,
323+
"execution_count": 8,
331324
"metadata": {},
332325
"outputs": [],
333326
"source": [
@@ -336,20 +329,49 @@
336329
},
337330
{
338331
"cell_type": "code",
339-
"execution_count": 48,
332+
"execution_count": 9,
340333
"metadata": {},
341334
"outputs": [
342335
{
343336
"name": "stdout",
344337
"output_type": "stream",
345338
"text": [
346339
" Step Time Energy fmax\n",
347-
"BFGS: 0 21:07:41 -34.423529 2.0469\n",
348-
"BFGS: 1 21:07:41 -34.638227 1.3120\n",
349-
"BFGS: 2 21:07:41 -34.820155 0.8899\n",
350-
"BFGS: 3 21:07:41 -34.879206 0.5760\n",
351-
"BFGS: 4 21:07:41 -34.898182 0.5022\n",
352-
"BFGS: 5 21:07:41 -34.918828 0.4900\n"
340+
"BFGS: 0 22:37:46 -30.748595 2.9513\n",
341+
"BFGS: 1 22:37:46 -31.014309 2.8324\n",
342+
"BFGS: 2 22:37:46 -31.262773 3.6434\n",
343+
"BFGS: 3 22:37:46 -31.505507 4.8465\n",
344+
"BFGS: 4 22:37:46 -31.743424 6.6610\n",
345+
"BFGS: 5 22:37:46 -31.971456 8.1748\n",
346+
"BFGS: 6 22:37:46 -32.184914 9.2098\n",
347+
"BFGS: 7 22:37:46 -32.382798 9.6392\n",
348+
"BFGS: 8 22:37:47 -32.569092 9.3728\n",
349+
"BFGS: 9 22:37:47 -32.734802 8.4763\n",
350+
"BFGS: 10 22:37:47 -32.891674 7.8435\n",
351+
"BFGS: 11 22:37:47 -33.054999 7.0145\n",
352+
"BFGS: 12 22:37:47 -33.227541 5.9866\n",
353+
"BFGS: 13 22:37:47 -33.403943 4.8442\n",
354+
"BFGS: 14 22:37:47 -33.575563 3.6585\n",
355+
"BFGS: 15 22:37:47 -33.719203 2.6356\n",
356+
"BFGS: 16 22:37:47 -33.842170 1.7739\n",
357+
"BFGS: 17 22:37:47 -33.948032 1.0753\n",
358+
"BFGS: 18 22:37:47 -34.039315 0.7158\n",
359+
"BFGS: 19 22:37:47 -34.119271 0.7409\n",
360+
"BFGS: 20 22:37:47 -34.191398 0.7695\n",
361+
"BFGS: 21 22:37:47 -34.258895 0.8952\n",
362+
"BFGS: 22 22:37:47 -34.320404 1.0367\n",
363+
"BFGS: 23 22:37:47 -34.372717 1.4497\n",
364+
"BFGS: 24 22:37:47 -34.437527 1.9175\n",
365+
"BFGS: 25 22:37:47 -34.526138 1.6620\n",
366+
"BFGS: 26 22:37:47 -34.577242 1.1807\n",
367+
"BFGS: 27 22:37:47 -34.600738 0.9882\n",
368+
"BFGS: 28 22:37:47 -34.626664 0.8059\n",
369+
"BFGS: 29 22:37:47 -34.640207 0.6961\n",
370+
"BFGS: 30 22:37:47 -34.649518 0.6129\n",
371+
"BFGS: 31 22:37:47 -34.657426 0.6886\n",
372+
"BFGS: 32 22:37:47 -34.671682 0.7980\n",
373+
"BFGS: 33 22:37:47 -34.687578 0.5759\n",
374+
"BFGS: 34 22:37:47 -34.698413 0.4056\n"
353375
]
354376
},
355377
{
@@ -358,7 +380,7 @@
358380
"True"
359381
]
360382
},
361-
"execution_count": 48,
383+
"execution_count": 9,
362384
"metadata": {},
363385
"output_type": "execute_result"
364386
}
@@ -370,7 +392,7 @@
370392
},
371393
{
372394
"cell_type": "code",
373-
"execution_count": 49,
395+
"execution_count": 10,
374396
"metadata": {},
375397
"outputs": [
376398
{
@@ -402,7 +424,7 @@
402424
"\n",
403425
" <Scene>\n",
404426
"\n",
405-
" <Transform translation=\"0.03 0.58 0.02\">\n",
427+
" <Transform translation=\"0.13 0.46 0.27\">\n",
406428
"\n",
407429
" <Shape>\n",
408430
"\n",
@@ -422,7 +444,7 @@
422444
"\n",
423445
" </Transform>\n",
424446
"\n",
425-
" <Transform translation=\"-1.25 -0.25 -0.04\">\n",
447+
" <Transform translation=\"-1.06 -0.47 0.38\">\n",
426448
"\n",
427449
" <Shape>\n",
428450
"\n",
@@ -442,7 +464,7 @@
442464
"\n",
443465
" </Transform>\n",
444466
"\n",
445-
" <Transform translation=\"1.18 -0.26 0.05\">\n",
467+
" <Transform translation=\"1.46 -0.03 0.13\">\n",
446468
"\n",
447469
" <Shape>\n",
448470
"\n",
@@ -462,7 +484,7 @@
462484
"\n",
463485
" </Transform>\n",
464486
"\n",
465-
" <Transform translation=\"0.06 1.27 -0.84\">\n",
487+
" <Transform translation=\"-0.09 1.06 -0.61\">\n",
466488
"\n",
467489
" <Shape>\n",
468490
"\n",
@@ -482,7 +504,7 @@
482504
"\n",
483505
" </Transform>\n",
484506
"\n",
485-
" <Transform translation=\"0.11 1.16 0.94\">\n",
507+
" <Transform translation=\"0.07 1.11 1.16\">\n",
486508
"\n",
487509
" <Shape>\n",
488510
"\n",
@@ -502,7 +524,7 @@
502524
"\n",
503525
" </Transform>\n",
504526
"\n",
505-
" <Transform translation=\"-1.16 -1.10 0.65\">\n",
527+
" <Transform translation=\"-0.82 -1.28 1.06\">\n",
506528
"\n",
507529
" <Shape>\n",
508530
"\n",
@@ -522,7 +544,7 @@
522544
"\n",
523545
" </Transform>\n",
524546
"\n",
525-
" <Transform translation=\"-2.17 0.28 0.22\">\n",
547+
" <Transform translation=\"-1.83 0.19 0.79\">\n",
526548
"\n",
527549
" <Shape>\n",
528550
"\n",
@@ -542,7 +564,7 @@
542564
"\n",
543565
" </Transform>\n",
544566
"\n",
545-
" <Transform translation=\"-1.40 -0.64 -1.05\">\n",
567+
" <Transform translation=\"-1.29 -0.81 -0.62\">\n",
546568
"\n",
547569
" <Shape>\n",
548570
"\n",
@@ -562,7 +584,7 @@
562584
"\n",
563585
" </Transform>\n",
564586
"\n",
565-
" <Transform translation=\"1.27 -0.80 -0.75\">\n",
587+
" <Transform translation=\"1.89 0.70 -0.32\">\n",
566588
"\n",
567589
" <Shape>\n",
568590
"\n",
@@ -595,7 +617,7 @@
595617
"<IPython.core.display.HTML object>"
596618
]
597619
},
598-
"execution_count": 49,
620+
"execution_count": 10,
599621
"metadata": {},
600622
"output_type": "execute_result"
601623
}

0 commit comments

Comments
 (0)