-
Notifications
You must be signed in to change notification settings - Fork 0
/
doing-global-optimization-with-minima-hopping-algorithm-with-cp2k.html
479 lines (426 loc) · 59.7 KB
/
doing-global-optimization-with-minima-hopping-algorithm-with-cp2k.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
<!DOCTYPE html>
<html lang="en" prefix="og: http://ogp.me/ns# fb: https://www.facebook.com/2008/fbml">
<head>
<title>doing global optimization with minima hopping algorithm with cp2k - Yi Yao's Homepage</title>
<!-- Using the latest rendering mode for IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="./doing-global-optimization-with-minima-hopping-algorithm-with-cp2k.html">
<meta name="author" content="Yi Yao" />
<meta name="keywords" content="molecular dynamics" />
<meta name="description" content="using cp2k doing MINHOP global optimization method" />
<meta property="og:site_name" content="Yi Yao's Homepage" />
<meta property="og:type" content="article"/>
<meta property="og:title" content="doing global optimization with minima hopping algorithm with cp2k"/>
<meta property="og:url" content="./doing-global-optimization-with-minima-hopping-algorithm-with-cp2k.html"/>
<meta property="og:description" content="using cp2k doing MINHOP global optimization method"/>
<meta property="article:published_time" content="2014-12-20" />
<meta property="article:section" content="molecular dynamics" />
<meta property="article:tag" content="molecular dynamics" />
<meta property="article:author" content="Yi Yao" />
<!-- Bootstrap -->
<link rel="stylesheet" href="./themestatic/css/bootstrap.min.css" type="text/css"/>
<link href="./themestatic/css/font-awesome.min.css" rel="stylesheet">
<link href="./themestatic/css/pygments/native.css" rel="stylesheet">
<link rel="stylesheet" href="./themestatic/css/style.css" type="text/css"/>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="./" class="navbar-brand">
Yi Yao's Homepage </a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">About Me</a></li>
<li><a href="research.html">Research</a></li>
<li><a href="categories.html">Research Blogs</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
</div> <!-- /.navbar -->
<!-- Banner -->
<!-- End Banner -->
<!-- Content Container -->
<div class="container">
<div class="row">
<div class="col-lg-12">
<section id="content">
<article>
<header class="page-header">
<h1>
<a href="./doing-global-optimization-with-minima-hopping-algorithm-with-cp2k.html"
rel="bookmark"
title="Permalink to doing global optimization with minima hopping algorithm with cp2k">
doing global optimization with minima hopping algorithm with cp2k
</a>
</h1>
</header>
<div class="entry-content">
<div class="panel">
<div class="panel-body">
<footer class="post-info">
<span class="label label-default">Date</span>
<span class="published">
<i class="fa fa-calendar"></i><time datetime="2014-12-20T23:26:00+01:00"> Sat 20 December 2014</time>
</span>
<span class="label label-default">Tags</span>
<a href="./tag/molecular-dynamics.html">molecular dynamics</a>
</footer><!-- /.post-info --> </div>
</div>
<p><a href="http://scitation.aip.org/content/aip/journal/jcp/120/21/10.1063/1.1724816">Minima hopping</a> is an effecient global minimization method. It is implemented in cp2k code. I have tested it on LJ38 clusters and found it performed very well. It is easy to using all the force methods in cp2k, and also easy to using multiple cores and easy to restart.</p>
<p>I copied and modified the input file in cp2k test examples.</p>
<div class="highlight"><pre><span></span><code><span class="o">&</span><span class="k">GLOBAL</span><span class="w"></span>
<span class="w"> </span><span class="n">PROJECT_NAME</span><span class="w"> </span><span class="n">LJ38_minhop_1</span><span class="w"></span>
<span class="w"> </span><span class="n">PROGRAM_NAME</span><span class="w"> </span><span class="n">SWARM</span><span class="w"></span>
<span class="w"> </span><span class="n">RUN_TYPE</span><span class="w"> </span><span class="k">NONE</span><span class="w"></span>
<span class="w"> </span><span class="n">SEED</span><span class="w"> </span><span class="mi">42</span><span class="w"></span>
<span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="k">GLOBAL</span><span class="w"></span>
<span class="o">&</span><span class="n">SWARM</span><span class="w"></span>
<span class="w"> </span><span class="n">BEHAVIOR</span><span class="w"> </span><span class="n">GLOBAL_OPT</span><span class="w"></span>
<span class="w"> </span><span class="n">NUMBER_OF_WORKERS</span><span class="w"> </span><span class="mi">11</span><span class="w"></span>
<span class="w"> </span><span class="n">MAX_ITER</span><span class="w"> </span><span class="mi">50000</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">GLOBAL_OPT</span><span class="w"></span>
<span class="w"> </span><span class="n">#E_TARGET</span><span class="w"> </span><span class="o">-</span><span class="mf">0.028421532</span><span class="w"></span>
<span class="w"> </span><span class="n">#E_TARGET</span><span class="w"> </span><span class="o">-</span><span class="mf">0.397492331</span><span class="w"></span>
<span class="w"> </span><span class="n">E_TARGET</span><span class="w"> </span><span class="o">-</span><span class="mf">0.173928427</span><span class="w"></span>
<span class="w"> </span><span class="k">METHOD</span><span class="w"> </span><span class="n">MINIMA_HOPPING</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">HISTORY</span><span class="w"></span>
<span class="w"> </span><span class="n">ENERGY_PRECISION</span><span class="w"> </span><span class="mf">1.0e-5</span><span class="w"></span>
<span class="w"> </span><span class="n">FINGERPRINT_PRECISION</span><span class="w"> </span><span class="mf">1.0e-2</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">HISTORY</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">GLOBAL_OPT</span><span class="w"></span>
<span class="w"> </span><span class="n">#REPLAY_COMMUNICATION_LOG</span><span class="w"> </span><span class="n">LJ38_minhop_1_old</span><span class="p">.</span><span class="n">comlog</span><span class="w"></span>
<span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">SWARM</span><span class="w"></span>
<span class="o">&</span><span class="n">MOTION</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">PRINT</span><span class="w"> </span><span class="err">!</span><span class="w"> </span><span class="n">IO</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="n">expensive</span><span class="p">,</span><span class="w"> </span><span class="n">turning</span><span class="w"> </span><span class="n">everything</span><span class="w"> </span><span class="k">off</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">RESTART</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">RESTART</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">RESTART_HISTORY</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">RESTART_HISTORY</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">TRAJECTORY</span><span class="w"></span>
<span class="w"> </span><span class="err">!</span><span class="n">ADD_LAST</span><span class="w"> </span><span class="nc">NUMERIC</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">EACH</span><span class="w"></span>
<span class="w"> </span><span class="n">GEO_OPT</span><span class="w"> </span><span class="o">-</span><span class="mi">1</span><span class="w"></span>
<span class="w"> </span><span class="n">MD</span><span class="w"> </span><span class="o">-</span><span class="mi">1</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="k">EACH</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">TRAJECTORY</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="k">PRINT</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">MD</span><span class="w"></span>
<span class="w"> </span><span class="n">ENSEMBLE</span><span class="w"> </span><span class="n">NVE</span><span class="w"></span>
<span class="w"> </span><span class="n">STEPS</span><span class="w"> </span><span class="mi">1000</span><span class="w"></span>
<span class="w"> </span><span class="n">TIMESTEP</span><span class="w"> </span><span class="mf">0.5</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">VELOCITY_SOFTENING</span><span class="w"></span>
<span class="w"> </span><span class="n">STEPS</span><span class="w"> </span><span class="mi">20</span><span class="w"></span>
<span class="w"> </span><span class="n">ALPHA</span><span class="w"> </span><span class="mf">1.0</span><span class="w"></span>
<span class="w"> </span><span class="n">DELTA</span><span class="w"> </span><span class="mf">0.01</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">VELOCITY_SOFTENING</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">PRINT</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">ENERGY</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">ENERGY</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">CENTER_OF_MASS</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">CENTER_OF_MASS</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">COEFFICIENTS</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">COEFFICIENTS</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">PROGRAM_RUN_INFO</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">PROGRAM_RUN_INFO</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">ROTATIONAL_INFO</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">ROTATIONAL_INFO</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">SHELL_ENERGY</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">SHELL_ENERGY</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">TEMP_KIND</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">TEMP_KIND</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">TEMP_SHELL_KIND</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">TEMP_SHELL_KIND</span><span class="w"></span>
<span class="w"> </span><span class="n">FORCE_LAST</span><span class="w"> </span><span class="p">.</span><span class="k">TRUE</span><span class="p">.</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="k">PRINT</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">MD</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">GEO_OPT</span><span class="w"></span>
<span class="w"> </span><span class="n">OPTIMIZER</span><span class="w"> </span><span class="n">CG</span><span class="w"></span>
<span class="w"> </span><span class="n">MAX_ITER</span><span class="w"> </span><span class="mi">300</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">CG</span><span class="w"></span>
<span class="w"> </span><span class="n">MAX_STEEP_STEPS</span><span class="w"> </span><span class="mi">3</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">LINE_SEARCH</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">GOLD</span><span class="w"></span>
<span class="w"> </span><span class="n">INITIAL_STEP</span><span class="w"> </span><span class="mf">1.0e-2</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">GOLD</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">LINE_SEARCH</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">CG</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">BFGS</span><span class="w"></span>
<span class="w"> </span><span class="n">TRUST_RADIUS</span><span class="w"> </span><span class="o">[</span><span class="n">angstrom</span><span class="o">]</span><span class="w"> </span><span class="mf">0.1</span><span class="w"></span>
<span class="w"> </span><span class="n">USE_RAT_FUN_OPT</span><span class="w"> </span><span class="err">!</span><span class="w"> </span><span class="n">otherwise</span><span class="w"> </span><span class="n">LJ</span><span class="w"> </span><span class="n">particle</span><span class="w"> </span><span class="n">sth</span><span class="p">.</span><span class="w"> </span><span class="k">get</span><span class="w"> </span><span class="n">too</span><span class="w"> </span><span class="k">close</span><span class="p">.</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">RESTART</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">RESTART</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">BFGS</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">PRINT</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">PROGRAM_RUN_INFO</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">PROGRAM_RUN_INFO</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="k">PRINT</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">GEO_OPT</span><span class="w"></span>
<span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">MOTION</span><span class="w"></span>
<span class="o">&</span><span class="n">FORCE_EVAL</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">PRINT</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">DISTRIBUTION</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">DISTRIBUTION</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">DISTRIBUTION1D</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">DISTRIBUTION1D</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">DISTRIBUTION2D</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">DISTRIBUTION2D</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">FORCES</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">FORCES</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">GRID_INFORMATION</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">GRID_INFORMATION</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">PROGRAM_RUN_INFO</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">PROGRAM_RUN_INFO</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">STRESS_TENSOR</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">STRESS_TENSOR</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">TOTAL_NUMBERS</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">TOTAL_NUMBERS</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="k">PRINT</span><span class="w"></span>
<span class="w"> </span><span class="k">METHOD</span><span class="w"> </span><span class="n">FIST</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">MM</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">FORCEFIELD</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">SPLINE</span><span class="w"></span>
<span class="w"> </span><span class="n">R0_NB</span><span class="w"> </span><span class="mf">1.0E-10</span><span class="w"> </span><span class="err">!</span><span class="w"> </span><span class="n">solely</span><span class="w"> </span><span class="n">MAX_SPLINE</span><span class="w"> </span><span class="n">shall</span><span class="w"> </span><span class="n">control</span><span class="w"> </span><span class="n">spline</span><span class="w"> </span><span class="k">range</span><span class="w"></span>
<span class="w"> </span><span class="n">EMAX_SPLINE</span><span class="w"> </span><span class="o">[</span><span class="n">hartree</span><span class="o">]</span><span class="w"> </span><span class="mi">1000</span><span class="w"></span>
<span class="w"> </span><span class="n">EMAX_ACCURACY</span><span class="w"> </span><span class="o">[</span><span class="n">hartree</span><span class="o">]</span><span class="w"> </span><span class="mi">1000</span><span class="w"> </span><span class="err">!</span><span class="w"> </span><span class="n">yields</span><span class="w"> </span><span class="n">r_min</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">0.66</span><span class="w"> </span><span class="n">bohr</span><span class="w"></span>
<span class="w"> </span><span class="n">EPS_SPLINE</span><span class="w"> </span><span class="o">[</span><span class="n">hartree</span><span class="o">]</span><span class="w"> </span><span class="mf">1.0E-10</span><span class="w"> </span><span class="err">!</span><span class="w"> </span><span class="n">yields</span><span class="w"> </span><span class="mi">1698</span><span class="w"> </span><span class="n">spline</span><span class="w"> </span><span class="n">points</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">SPLINE</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">NONBONDED</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">LENNARD</span><span class="o">-</span><span class="n">JONES</span><span class="w"></span>
<span class="w"> </span><span class="n">atoms</span><span class="w"> </span><span class="n">X</span><span class="w"> </span><span class="n">X</span><span class="w"></span>
<span class="w"> </span><span class="n">EPSILON</span><span class="w"> </span><span class="o">[</span><span class="n">hartree</span><span class="o">]</span><span class="w"> </span><span class="mf">0.001</span><span class="w"></span>
<span class="w"> </span><span class="n">SIGMA</span><span class="w"> </span><span class="mf">1.0</span><span class="w"></span>
<span class="w"> </span><span class="n">RCUT</span><span class="w"> </span><span class="mf">25.0</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">LENNARD</span><span class="o">-</span><span class="n">JONES</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">NONBONDED</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">CHARGE</span><span class="w"></span>
<span class="w"> </span><span class="n">ATOM</span><span class="w"> </span><span class="n">X</span><span class="w"></span>
<span class="w"> </span><span class="n">CHARGE</span><span class="w"> </span><span class="mf">0.0</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">CHARGE</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">FORCEFIELD</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">NEIGHBOR_LISTS</span><span class="w"></span>
<span class="w"> </span><span class="n">GEO_CHECK</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">NEIGHBOR_LISTS</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">POISSON</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">EWALD</span><span class="w"></span>
<span class="w"> </span><span class="n">EWALD_TYPE</span><span class="w"> </span><span class="k">none</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">EWALD</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">POISSON</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">PRINT</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">DERIVATIVES</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">DERIVATIVES</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">DIPOLE</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">DIPOLE</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">EWALD_INFO</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">EWALD_INFO</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">FF_INFO</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">FF_INFO</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">FF_PARAMETER_FILE</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">FF_PARAMETER_FILE</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">ITER_INFO</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">ITER_INFO</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">NEIGHBOR_LISTS</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">NEIGHBOR_LISTS</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">PROGRAM_BANNER</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">PROGRAM_BANNER</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">PROGRAM_RUN_INFO</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">PROGRAM_RUN_INFO</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">SUBCELL</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">SUBCELL</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="k">PRINT</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">MM</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">SUBSYS</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">CELL</span><span class="w"></span>
<span class="w"> </span><span class="n">ABC</span><span class="w"> </span><span class="o">[</span><span class="n">angstrom</span><span class="o">]</span><span class="w"> </span><span class="mf">50.0</span><span class="w"> </span><span class="mf">50.0</span><span class="w"> </span><span class="mf">50.0</span><span class="w"></span>
<span class="w"> </span><span class="err">!</span><span class="n">PERIODIC</span><span class="w"> </span><span class="k">NONE</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">CELL</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">COORD</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.9299001112</span><span class="w"> </span><span class="mf">19.950169551</span><span class="w"> </span><span class="mf">19.8322640143</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.9729085751</span><span class="w"> </span><span class="mf">19.9093309127</span><span class="w"> </span><span class="mf">21.9394380813</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.8941562054</span><span class="w"> </span><span class="mf">19.8941284049</span><span class="w"> </span><span class="mf">24.0569837799</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.9695852658</span><span class="w"> </span><span class="mf">20.05096174</span><span class="w"> </span><span class="mf">26.0067040618</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.8674946895</span><span class="w"> </span><span class="mf">21.8602000252</span><span class="w"> </span><span class="mf">20.1915984374</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.8880139948</span><span class="w"> </span><span class="mf">21.9536267685</span><span class="w"> </span><span class="mf">22.0485106395</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">20.0129749414</span><span class="w"> </span><span class="mf">21.8625405898</span><span class="w"> </span><span class="mf">23.9870979205</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">20.082926774</span><span class="w"> </span><span class="mf">22.0788992596</span><span class="w"> </span><span class="mf">25.8572713695</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">20.1546207624</span><span class="w"> </span><span class="mf">24.0025491948</span><span class="w"> </span><span class="mf">19.8547537874</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.8031230442</span><span class="w"> </span><span class="mf">24.0436048709</span><span class="w"> </span><span class="mf">21.9106314379</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.9463916441</span><span class="w"> </span><span class="mf">24.1839491879</span><span class="w"> </span><span class="mf">23.8834113495</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.8704727285</span><span class="w"> </span><span class="mf">24.16644628</span><span class="w"> </span><span class="mf">25.8358148517</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.9838019218</span><span class="w"> </span><span class="mf">25.9057999191</span><span class="w"> </span><span class="mf">20.0560911995</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">20.1292145367</span><span class="w"> </span><span class="mf">26.1581490664</span><span class="w"> </span><span class="mf">22.0943715423</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.9781889658</span><span class="w"> </span><span class="mf">26.083599068</span><span class="w"> </span><span class="mf">24.0336864536</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">19.8883959013</span><span class="w"> </span><span class="mf">25.8200957812</span><span class="w"> </span><span class="mf">26.0366653688</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.8201260724</span><span class="w"> </span><span class="mf">20.1242010293</span><span class="w"> </span><span class="mf">19.8205288067</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.8505910349</span><span class="w"> </span><span class="mf">19.9947362491</span><span class="w"> </span><span class="mf">21.8404146774</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.8550273956</span><span class="w"> </span><span class="mf">19.9254871471</span><span class="w"> </span><span class="mf">24.1073006016</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.8959492318</span><span class="w"> </span><span class="mf">19.9013788938</span><span class="w"> </span><span class="mf">25.8664416645</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">22.1302099673</span><span class="w"> </span><span class="mf">21.9272265398</span><span class="w"> </span><span class="mf">19.9252007031</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.9102230055</span><span class="w"> </span><span class="mf">22.1149858217</span><span class="w"> </span><span class="mf">21.9240625018</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">22.199987559</span><span class="w"> </span><span class="mf">22.1591700852</span><span class="w"> </span><span class="mf">23.8318003313</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.9003367373</span><span class="w"> </span><span class="mf">22.1293676776</span><span class="w"> </span><span class="mf">25.9205476882</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.88906222</span><span class="w"> </span><span class="mf">23.8016798271</span><span class="w"> </span><span class="mf">19.8361992897</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.8178764403</span><span class="w"> </span><span class="mf">23.959817666</span><span class="w"> </span><span class="mf">22.139335581</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">22.0455507021</span><span class="w"> </span><span class="mf">24.1606968111</span><span class="w"> </span><span class="mf">23.9829670521</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.9423108666</span><span class="w"> </span><span class="mf">23.979777561</span><span class="w"> </span><span class="mf">26.0915224226</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.8720398156</span><span class="w"> </span><span class="mf">26.0920668527</span><span class="w"> </span><span class="mf">19.9883875322</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">22.1930798224</span><span class="w"> </span><span class="mf">25.9151320315</span><span class="w"> </span><span class="mf">22.018793157</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">21.8088496409</span><span class="w"> </span><span class="mf">26.0005309843</span><span class="w"> </span><span class="mf">23.9521645719</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">22.1819324474</span><span class="w"> </span><span class="mf">26.1518318479</span><span class="w"> </span><span class="mf">25.9325533822</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">23.9252010921</span><span class="w"> </span><span class="mf">20.0182542645</span><span class="w"> </span><span class="mf">19.8463786663</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">24.0939325405</span><span class="w"> </span><span class="mf">20.1666761084</span><span class="w"> </span><span class="mf">22.0954054271</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">23.9434446885</span><span class="w"> </span><span class="mf">20.0072638668</span><span class="w"> </span><span class="mf">24.1136432412</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">24.1239486847</span><span class="w"> </span><span class="mf">20.1448454527</span><span class="w"> </span><span class="mf">25.9584634081</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">23.8406670306</span><span class="w"> </span><span class="mf">22.148328277</span><span class="w"> </span><span class="mf">20.1143768668</span><span class="w"></span>
<span class="n">X</span><span class="w"> </span><span class="mf">24.1302214528</span><span class="w"> </span><span class="mf">21.9474940966</span><span class="w"> </span><span class="mf">22.0937869524</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">COORD</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">TOPOLOGY</span><span class="w"></span>
<span class="w"> </span><span class="n">CONNECTIVITY</span><span class="w"> </span><span class="k">OFF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">TOPOLOGY</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">KIND</span><span class="w"> </span><span class="n">X</span><span class="w"></span>
<span class="w"> </span><span class="k">ELEMENT</span><span class="w"> </span><span class="n">H</span><span class="w"></span>
<span class="w"> </span><span class="n">MASS</span><span class="w"> </span><span class="mf">1.0</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">KIND</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">SUBSYS</span><span class="w"></span>
<span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">FORCE_EVAL</span><span class="w"></span>
</code></pre></div>
<p>Here number of processors has to be NUMBER_OF_WORKERS * n + 1, n is any interger number.
So here is the running script for killdevil.</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span>
<span class="normal">6</span>
<span class="normal">7</span>
<span class="normal">8</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><code><span class="ch">#!/bin/bash -l</span>
<span class="c1">#BSUB -n 12</span>
<span class="c1">#BSUB -e err.%J</span>
<span class="c1">#BSUB -o out.%J</span>
module load cp2k
/usr/mpi/intel/mvapich2-1.7/bin/mpiexec -np <span class="m">12</span> cp2k.popt -i LJ38_minhop_1.inp -o LJ38_minhop_1.out
</code></pre></div>
</td></tr></table>
<p>If would like to restart a calculation I need to mv the comlog file, and uncomment REPLAY_COMMUNICATION_LOG command in the input file.</p>
<div class="highlight"><pre><span></span><code>mv LJ38_minhop_1.comlog LJ38_minhop_1_old.comlog
</code></pre></div>
<p>Here is the scripts for plotting the local minimum and global minimum versus timesteps.</p>
<p>make_figure.sh</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><code><span class="ch">#!/bin/bash -l</span>
module load gnuplot
bash grep_energys.sh
gnuplot plot.gplt
</code></pre></div>
</td></tr></table>
<p>grep_energys.sh</p>
<div class="highlight"><pre><span></span><code>grep " GLBOPT| Reported potential energy" LJ38_minhop_1.out | awk '{print $6 }' > 1
grep "GLBOPT| Lowest reported potential energy" LJ38_minhop_1.out | awk '{print $7 }' > 2
</code></pre></div>
<p>plot.gplt</p>
<div class="highlight"><pre><span></span><code><span class="s s-Atom">#set</span> <span class="s s-Atom">terminal</span> <span class="s s-Atom">postscript</span>
<span class="s s-Atom">#set</span> <span class="s s-Atom">output</span> <span class="s2">"test.ps"</span>
<span class="s s-Atom">set</span> <span class="s s-Atom">terminal</span> <span class="s s-Atom">png</span>
<span class="s s-Atom">set</span> <span class="s s-Atom">output</span> <span class="s2">"test.png"</span>
<span class="s s-Atom">set</span> <span class="s s-Atom">yrange</span> <span class="p">[</span><span class="o">-</span><span class="mf">0.175</span><span class="p">:-</span><span class="mf">0.160</span><span class="p">]</span>
<span class="s s-Atom">set</span> <span class="s s-Atom">trange</span> <span class="p">[</span><span class="mi">0</span><span class="s s-Atom">:</span><span class="mi">50000</span><span class="p">]</span>
<span class="s s-Atom">set</span> <span class="s s-Atom">xrange</span> <span class="p">[</span><span class="mi">0</span><span class="s s-Atom">:</span><span class="mi">10000</span><span class="p">]</span>
<span class="s s-Atom">set</span> <span class="s s-Atom">parametric</span>
<span class="s s-Atom">const=-</span><span class="mf">0.173928427</span>
<span class="s s-Atom">p</span> <span class="s2">"1"</span> <span class="s s-Atom">u</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">"2"</span> <span class="s s-Atom">u</span> <span class="mi">1</span> <span class="s s-Atom">w</span> <span class="s s-Atom">l</span> <span class="s s-Atom">lw</span> <span class="mi">2</span><span class="p">,</span> <span class="s s-Atom">t</span><span class="p">,</span> <span class="s s-Atom">const</span> <span class="s s-Atom">w</span> <span class="s s-Atom">l</span> <span class="s s-Atom">lw</span> <span class="mi">2</span>
</code></pre></div>
<p>And I post the output plot here.
<img alt="Alt Text" src="./images/cp2k_lj38_minhop.png"></p>
<p>To get the minimal energy structures out, I wrote a script. The script will output the structures with the order from low energy to high energy.</p>
<div class="highlight"><pre><span></span><code><span class="n">f</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">file</span><span class="p">(</span><span class="ss">"LJ38_minhop_1.comlog"</span><span class="p">)</span><span class="w"></span>
<span class="k">read</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">False</span><span class="w"></span>
<span class="n">Epot_positions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">[]</span><span class="w"></span>
<span class="n">Epot_position</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">[]</span><span class="w"></span>
<span class="k">while</span><span class="w"> </span><span class="k">True</span><span class="err">:</span><span class="w"></span>
<span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">.</span><span class="n">readline</span><span class="p">()</span><span class="w"></span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="nf">len</span><span class="p">(</span><span class="n">line</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="err">:</span><span class="w"></span>
<span class="w"> </span><span class="k">break</span><span class="w"></span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="ss">"Epot"</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="nl">line</span><span class="p">:</span><span class="w"></span>
<span class="w"> </span><span class="k">read</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">True</span><span class="w"></span>
<span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">.</span><span class="n">readline</span><span class="p">()</span><span class="w"></span>
<span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">.</span><span class="n">readline</span><span class="p">()</span><span class="w"></span>
<span class="w"> </span><span class="n">words</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">line</span><span class="p">.</span><span class="n">split</span><span class="p">()</span><span class="w"></span>
<span class="w"> </span><span class="n">Epot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">float</span><span class="p">(</span><span class="n">words</span><span class="o">[</span><span class="n">1</span><span class="o">]</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="n">Epot_position</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">Epot</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="ss">"size"</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="ow">and</span><span class="w"> </span><span class="k">read</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="k">True</span><span class="err">:</span><span class="w"></span>
<span class="w"> </span><span class="k">read</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">False</span><span class="w"></span>
<span class="w"> </span><span class="n">words</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">line</span><span class="p">.</span><span class="n">split</span><span class="p">()</span><span class="w"></span>
<span class="w"> </span><span class="n">natoms</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">int</span><span class="p">(</span><span class="n">words</span><span class="o">[</span><span class="n">1</span><span class="o">]</span><span class="p">)</span><span class="o">/</span><span class="mi">3</span><span class="w"></span>
<span class="w"> </span><span class="n">positions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">[]</span><span class="w"></span>
<span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="k">range</span><span class="p">(</span><span class="n">natoms</span><span class="p">)</span><span class="err">:</span><span class="w"></span>
<span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">.</span><span class="n">readline</span><span class="p">()</span><span class="w"></span>
<span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">float</span><span class="p">(</span><span class="n">line</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mf">1.889725989</span><span class="w"></span>
<span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">.</span><span class="n">readline</span><span class="p">()</span><span class="w"></span>
<span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">float</span><span class="p">(</span><span class="n">line</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mf">1.889725989</span><span class="w"></span>
<span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">.</span><span class="n">readline</span><span class="p">()</span><span class="w"></span>
<span class="w"> </span><span class="n">z</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">float</span><span class="p">(</span><span class="n">line</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mf">1.889725989</span><span class="w"></span>
<span class="w"> </span><span class="k">position</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">[</span><span class="n">x,y,z</span><span class="o">]</span><span class="w"></span>
<span class="w"> </span><span class="n">positions</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="k">position</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="n">Epot_position</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">positions</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="n">Epot_positions</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">Epot_position</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="n">Epot_position</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">[]</span><span class="w"></span>
<span class="w"> </span><span class="n">#print</span><span class="w"> </span><span class="n">natoms</span><span class="w"></span>
<span class="w"> </span><span class="n">#print</span><span class="w"> </span><span class="ss">"Epot: "</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="n">Epot</span><span class="w"></span>
<span class="w"> </span><span class="n">#for</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="k">range</span><span class="p">(</span><span class="n">natoms</span><span class="p">)</span><span class="err">:</span><span class="w"></span>
<span class="w"> </span><span class="err">#</span><span class="w"> </span><span class="k">print</span><span class="w"> </span><span class="ss">"X"</span><span class="p">,</span><span class="w"> </span><span class="n">positions</span><span class="o">[</span><span class="n">i</span><span class="o">][</span><span class="n">0</span><span class="o">]</span><span class="p">,</span><span class="w"> </span><span class="n">positions</span><span class="o">[</span><span class="n">i</span><span class="o">][</span><span class="n">1</span><span class="o">]</span><span class="p">,</span><span class="w"> </span><span class="n">positions</span><span class="o">[</span><span class="n">i</span><span class="o">][</span><span class="n">2</span><span class="o">]</span><span class="w"></span>
<span class="n">Epot_positions_sorted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sorted</span><span class="p">(</span><span class="n">Epot_positions</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="k">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lambda</span><span class="w"> </span><span class="nl">Epot_position</span><span class="p">:</span><span class="w"> </span><span class="n">Epot_position</span><span class="o">[</span><span class="n">0</span><span class="o">]</span><span class="p">)</span><span class="w"></span>
<span class="n">Epot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Epot_positions_sorted</span><span class="o">[</span><span class="n">0</span><span class="o">][</span><span class="n">0</span><span class="o">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="w"></span>
<span class="k">for</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="k">range</span><span class="p">(</span><span class="nf">len</span><span class="p">(</span><span class="n">Epot_positions_sorted</span><span class="p">))</span><span class="err">:</span><span class="w"></span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="n">Epot_positions_sorted</span><span class="o">[</span><span class="n">j</span><span class="o">][</span><span class="n">0</span><span class="o">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">Epot</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mf">1e-5</span><span class="err">:</span><span class="w"></span>
<span class="w"> </span><span class="n">Epot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Epot_positions_sorted</span><span class="o">[</span><span class="n">j</span><span class="o">][</span><span class="n">0</span><span class="o">]</span><span class="w"></span>
<span class="w"> </span><span class="k">print</span><span class="w"> </span><span class="n">natoms</span><span class="w"></span>
<span class="w"> </span><span class="k">print</span><span class="w"> </span><span class="ss">"Epot: "</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="n">Epot_positions_sorted</span><span class="o">[</span><span class="n">j</span><span class="o">][</span><span class="n">0</span><span class="o">]</span><span class="w"></span>
<span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="k">range</span><span class="p">(</span><span class="n">natoms</span><span class="p">)</span><span class="err">:</span><span class="w"></span>
<span class="w"> </span><span class="n">positions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Epot_positions_sorted</span><span class="o">[</span><span class="n">j</span><span class="o">][</span><span class="n">1</span><span class="o">]</span><span class="w"></span>
<span class="w"> </span><span class="k">print</span><span class="w"> </span><span class="ss">"X"</span><span class="p">,</span><span class="n">positions</span><span class="o">[</span><span class="n">i</span><span class="o">][</span><span class="n">0</span><span class="o">]</span><span class="p">,</span><span class="w"> </span><span class="n">positions</span><span class="o">[</span><span class="n">i</span><span class="o">][</span><span class="n">1</span><span class="o">]</span><span class="p">,</span><span class="w"> </span><span class="n">positions</span><span class="o">[</span><span class="n">i</span><span class="o">][</span><span class="n">2</span><span class="o">]</span><span class="w"></span>
</code></pre></div>
<p>The two lowest energy structure are here with the energy of -0.173928415115, and -0.173252366954.
Here are the structures of them.</p>
<p><img alt="Alt Text" src="./images/cp2k_lj38_minhop_min2.png">
<img alt="Alt Text" src="./images/cp2k_lj38_minhop_min1.png"></p>
</div>
<!-- /.entry-content -->
</article>
</section>
</div>
</div>
</div>
<!-- End Content Container -->
<footer>
<div class="container">
<hr>
<div class="row">
<div class="col-xs-10">© 2021 Yi Yao
· Powered by <a href="https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3" target="_blank">pelican-bootstrap3</a>,
<a href="http://docs.getpelican.com/" target="_blank">Pelican</a>,
<a href="http://getbootstrap.com" target="_blank">Bootstrap</a> </div>
<div class="col-xs-2"><p class="pull-right"><i class="fa fa-arrow-up"></i> <a href="#">Back to top</a></p></div>
</div>
</div>
</footer>
<script src="./themestatic/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="./themestatic/js/bootstrap.min.js"></script>
<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
<script src="./themestatic/js/respond.min.js"></script>
</body>
</html>