Skip to content

Commit 570a6d7

Browse files
committed
Spotting the infamous bug
The `self.init()` wasn't called, and it was messing up the minimization.
1 parent 8d145da commit 570a6d7

6 files changed

Lines changed: 214 additions & 4734 deletions

File tree

Examples/sscha_and_aiida/clean_runs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ rm *.dat
1111
rm *.pdf
1212
rm otf_run*
1313
rm input_tmp.in
14+
rm log*
Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 3,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"import numpy as np\n",
10+
"import matplotlib.pyplot as plt\n",
11+
"\n",
12+
"\n",
13+
"plt.rcParams.update({\n",
14+
" 'text.usetex': False,\n",
15+
" # 'text.latex.preamble': r'\\usepackage{sansmath} \\sansmath',\n",
16+
" 'pdf.fonttype':42,\n",
17+
" 'font.family':'sans-serif',\n",
18+
" 'font.sans-serif':'Arial',\n",
19+
" 'font.size':14,\n",
20+
" 'mathtext.fontset': 'stixsans',\n",
21+
"})"
22+
]
23+
},
24+
{
25+
"cell_type": "code",
26+
"execution_count": 5,
27+
"metadata": {},
28+
"outputs": [],
29+
"source": [
30+
"e1 = np.load('./ensembles_P0_T0/energies_pop1.npy')\n",
31+
"e1_ref = np.load('./ensembles_P0_T0_flare/energies_pop1.npy')"
32+
]
33+
},
34+
{
35+
"cell_type": "code",
36+
"execution_count": 8,
37+
"metadata": {},
38+
"outputs": [
39+
{
40+
"data": {
41+
"text/plain": [
42+
"array([1.43868396e-05, 1.43867750e-05, 1.43880794e-05, 1.43880354e-05,\n",
43+
" 1.43876365e-05, 1.43876491e-05, 1.43881572e-05, 1.43880628e-05,\n",
44+
" 1.43881299e-05, 1.43880515e-05, 1.43883702e-05, 1.43884091e-05,\n",
45+
" 1.43877871e-05, 1.43878373e-05, 1.43874900e-05, 1.43878636e-05,\n",
46+
" 1.43875186e-05, 1.43875482e-05, 1.43883338e-05, 1.43881900e-05,\n",
47+
" 1.43863038e-05, 1.43861772e-05, 1.43872463e-05, 1.43872393e-05,\n",
48+
" 1.43875951e-05, 1.43876925e-05, 1.43882204e-05, 1.43884404e-05,\n",
49+
" 1.43877097e-05, 1.43877564e-05, 1.43874619e-05, 1.43873153e-05,\n",
50+
" 1.43875307e-05, 1.43875338e-05, 1.43885549e-05, 1.43885293e-05,\n",
51+
" 1.43879409e-05, 1.43879718e-05, 1.43876421e-05, 1.43876900e-05,\n",
52+
" 1.43871590e-05, 1.43871877e-05, 1.43885125e-05, 1.43885110e-05,\n",
53+
" 1.43882812e-05, 1.43883588e-05, 1.43880605e-05, 1.43880690e-05,\n",
54+
" 1.43875240e-05, 1.43878062e-05])"
55+
]
56+
},
57+
"execution_count": 8,
58+
"metadata": {},
59+
"output_type": "execute_result"
60+
}
61+
],
62+
"source": [
63+
"e1-e1_ref"
64+
]
65+
},
66+
{
67+
"cell_type": "code",
68+
"execution_count": 14,
69+
"metadata": {},
70+
"outputs": [
71+
{
72+
"data": {
73+
"text/plain": [
74+
"0.0"
75+
]
76+
},
77+
"execution_count": 14,
78+
"metadata": {},
79+
"output_type": "execute_result"
80+
}
81+
],
82+
"source": [
83+
"np.abs(e1-e1_ref).max()"
84+
]
85+
},
86+
{
87+
"cell_type": "code",
88+
"execution_count": 15,
89+
"metadata": {},
90+
"outputs": [],
91+
"source": [
92+
"e1 = np.load('./ensembles_P0_T0/xats_pop1.npy')\n",
93+
"e1_ref = np.load('./ensembles_P0_T0_flare/xats_pop1.npy')"
94+
]
95+
},
96+
{
97+
"cell_type": "code",
98+
"execution_count": 16,
99+
"metadata": {},
100+
"outputs": [
101+
{
102+
"data": {
103+
"text/plain": [
104+
"0.0"
105+
]
106+
},
107+
"execution_count": 16,
108+
"metadata": {},
109+
"output_type": "execute_result"
110+
}
111+
],
112+
"source": [
113+
"np.abs(e1-e1_ref).max()"
114+
]
115+
},
116+
{
117+
"cell_type": "code",
118+
"execution_count": 17,
119+
"metadata": {},
120+
"outputs": [],
121+
"source": [
122+
"f1 = np.load('./ensembles_P0_T0/forces_pop1.npy')\n",
123+
"f1_ref = np.load('./ensembles_P0_T0_flare/forces_pop1.npy')"
124+
]
125+
},
126+
{
127+
"cell_type": "code",
128+
"execution_count": 18,
129+
"metadata": {},
130+
"outputs": [
131+
{
132+
"data": {
133+
"text/plain": [
134+
"1.1266246074947972e-08"
135+
]
136+
},
137+
"execution_count": 18,
138+
"metadata": {},
139+
"output_type": "execute_result"
140+
}
141+
],
142+
"source": [
143+
"np.abs(f1-f1_ref).max()"
144+
]
145+
},
146+
{
147+
"cell_type": "code",
148+
"execution_count": 19,
149+
"metadata": {},
150+
"outputs": [],
151+
"source": [
152+
"f1 = np.load('./ensembles_P0_T0/stresses_pop1.npy')\n",
153+
"f1_ref = np.load('./ensembles_P0_T0_flare/stresses_pop1.npy')"
154+
]
155+
},
156+
{
157+
"cell_type": "code",
158+
"execution_count": 20,
159+
"metadata": {},
160+
"outputs": [
161+
{
162+
"data": {
163+
"text/plain": [
164+
"1.0972052829011716e-11"
165+
]
166+
},
167+
"execution_count": 20,
168+
"metadata": {},
169+
"output_type": "execute_result"
170+
}
171+
],
172+
"source": [
173+
"np.abs(f1-f1_ref).max()"
174+
]
175+
},
176+
{
177+
"cell_type": "code",
178+
"execution_count": null,
179+
"metadata": {},
180+
"outputs": [],
181+
"source": []
182+
}
183+
],
184+
"metadata": {
185+
"kernelspec": {
186+
"display_name": "Python 3.9.16 ('aiida-sscha')",
187+
"language": "python",
188+
"name": "python3"
189+
},
190+
"language_info": {
191+
"codemirror_mode": {
192+
"name": "ipython",
193+
"version": 3
194+
},
195+
"file_extension": ".py",
196+
"mimetype": "text/x-python",
197+
"name": "python",
198+
"nbconvert_exporter": "python",
199+
"pygments_lexer": "ipython3",
200+
"version": "3.9.16"
201+
},
202+
"orig_nbformat": 4,
203+
"vscode": {
204+
"interpreter": {
205+
"hash": "dbf713cbd6c5cb781e360dd03dc580f1c4e0f3272ba8f8d2e6f58f9ae4ed7519"
206+
}
207+
}
208+
},
209+
"nbformat": 4,
210+
"nbformat_minor": 2
211+
}

0 commit comments

Comments
 (0)