RuNNerMD.ipynb 3.25 KB
Newer Older
Marvin Poul's avatar
Marvin Poul committed
1
2
3
4
{
 "cells": [
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
5
6
   "execution_count": 2,
   "id": "suffering-touch",
Marvin Poul's avatar
Marvin Poul committed
7
8
9
10
11
12
13
14
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyiron import Project"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
15
16
   "execution_count": 3,
   "id": "geological-bankruptcy",
Marvin Poul's avatar
Marvin Poul committed
17
18
19
20
21
22
23
24
   "metadata": {},
   "outputs": [],
   "source": [
    "pr = Project('md_run')"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
25
26
   "execution_count": 4,
   "id": "prompt-evaluation",
Marvin Poul's avatar
Marvin Poul committed
27
28
29
30
31
32
33
34
   "metadata": {},
   "outputs": [],
   "source": [
    "j = pr.create.job.Lammps(\"md\", delete_existing_job=True)"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
35
36
   "execution_count": 5,
   "id": "governing-consortium",
Marvin Poul's avatar
Marvin Poul committed
37
38
39
   "metadata": {},
   "outputs": [],
   "source": [
Jan Janssen's avatar
Jan Janssen committed
40
    "j.potential = Project('../day_2/02-runner/runner_fit').load('fit').lammps_potential"
Marvin Poul's avatar
Marvin Poul committed
41
42
43
44
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
45
46
   "execution_count": 6,
   "id": "authentic-moscow",
Marvin Poul's avatar
Marvin Poul committed
47
48
49
50
51
52
53
54
   "metadata": {},
   "outputs": [],
   "source": [
    "j.structure = pr.create.structure.ase_bulk('Cu', cubic=True).repeat(3)"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
55
56
   "execution_count": 7,
   "id": "tamil-witch",
Marvin Poul's avatar
Marvin Poul committed
57
58
59
60
   "metadata": {},
   "outputs": [
    {
     "data": {
61
      "application/vnd.jupyter.widget-view+json": {
Marvin Poul's avatar
Marvin Poul committed
62
63
64
65
66
67
68
69
70
71
72
73
74
       "model_id": "af0fa5be14e94b06ba4ea70a958f5368",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": []
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "543d34f0039747ddb1f27d54f817c71e",
75
76
77
       "version_major": 2,
       "version_minor": 0
      },
Marvin Poul's avatar
Marvin Poul committed
78
      "text/plain": [
79
       "NGLWidget()"
Marvin Poul's avatar
Marvin Poul committed
80
81
82
      ]
     },
     "metadata": {},
83
     "output_type": "display_data"
Marvin Poul's avatar
Marvin Poul committed
84
85
86
    }
   ],
   "source": [
87
    "j.structure.plot3d()"
Marvin Poul's avatar
Marvin Poul committed
88
89
90
91
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
92
93
   "execution_count": 8,
   "id": "fatty-asbestos",
Marvin Poul's avatar
Marvin Poul committed
94
95
96
97
98
99
100
101
   "metadata": {},
   "outputs": [],
   "source": [
    "j.calc_md(n_ionic_steps=1000, temperature=500)"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
102
103
   "execution_count": 9,
   "id": "under-shirt",
Marvin Poul's avatar
Marvin Poul committed
104
105
106
107
108
109
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
Marvin Poul's avatar
Marvin Poul committed
110
111
112
      "The job md was saved and received the ID: 13792062\n",
      "CPU times: user 370 ms, sys: 58 ms, total: 428 ms\n",
      "Wall time: 53 s\n"
Marvin Poul's avatar
Marvin Poul committed
113
114
115
116
     ]
    }
   ],
   "source": [
117
    "%%time \n",
Marvin Poul's avatar
Marvin Poul committed
118
119
120
121
122
    "j.run()"
   ]
  },
  {
   "cell_type": "code",
Marvin Poul's avatar
Marvin Poul committed
123
124
   "execution_count": 10,
   "id": "liked-thomson",
Marvin Poul's avatar
Marvin Poul committed
125
126
127
128
129
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
Marvin Poul's avatar
Marvin Poul committed
130
       "model_id": "50d669a6ac55448699b1518b9be8d9dd",
Marvin Poul's avatar
Marvin Poul committed
131
132
133
134
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
135
       "NGLWidget(max_frame=10)"
Marvin Poul's avatar
Marvin Poul committed
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
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "j.animate_structure()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}