Skip to content

Commit b732560

Browse files
committed
Add legacy protocol to compare result with SSSP 1.0
1 parent e1ffc23 commit b732560

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

src/aiida_sssp_workflow/protocol/convergence.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,42 @@ fine:
6969
scale_count: 7
7070
scale_increment: 0.02
7171

72+
legacy:
73+
name: legacy
74+
description: The legacy protocol from old SSSP 1.x
75+
76+
base: # base parameters is inherit by other process
77+
occupations: smearing
78+
degauss: 0.02 # balanced protocol of qe -> gabriel
79+
smearing: cold
80+
conv_thr_per_atom: 1.0e-8
81+
kpoints_distance: 0.4 # balanced protocol of qe -> gabriel
82+
mixing_beta: 0.4
83+
84+
cohesive_energy:
85+
atom_smearing: gaussian
86+
vacuum_length: 12.0
87+
88+
phonon_frequencies:
89+
qpoints_list:
90+
- [0.5, 0.5, 0.5]
91+
epsilon: false
92+
tr2_ph: 1.0e-12
93+
diagonalization: cg
94+
95+
pressure:
96+
scale_count: 7
97+
scale_increment: 0.02
98+
99+
bands:
100+
init_nbands_factor: 3.0
101+
fermi_shift: 10.0
102+
103+
eos:
104+
scale_count: 7
105+
scale_increment: 0.02
106+
107+
72108
test:
73109
name: test-only
74110
description: Protocol to run test of workflow.

src/aiida_sssp_workflow/workflows/convergence/phonon_frequencies.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,14 @@ def compute_xy(
187187
ys_relative_diff = []
188188
ys_omega_max = []
189189
ys_relative_max_diff = []
190+
ys_absolute_max_diff = []
190191
for node_point in report.convergence_list:
191192
if node_point.exit_status != 0:
192193
# TODO: log to a warning file for where the node is not finished_okay
193194
continue
194195

195196
x = node_point.wavefunction_cutoff
197+
196198
xs.append(x)
197199

198200
node = orm.load_node(node_point.uuid)
@@ -207,7 +209,6 @@ def compute_xy(
207209
relative_diff = np.sqrt(np.mean((diffs / weights) ** 2))
208210

209211
omega_max = np.amax(y_p)
210-
absolute_diff = np.mean(diffs)
211212
absolute_max_diff = np.amax(diffs)
212213
relative_max_diff = np.amax(np.abs(diffs / weights))
213214

@@ -230,12 +231,14 @@ def compute_xy(
230231
ys_relative_diff.append(relative_diff)
231232
ys_omega_max.append(omega_max)
232233
ys_relative_max_diff.append(relative_max_diff)
234+
ys_absolute_max_diff.append(absolute_max_diff)
233235

234236
return {
235237
"xs": xs,
236238
"ys": ys_relative_diff,
237239
"ys_relative_diff": ys_relative_diff,
238240
"ys_omega_max": ys_omega_max,
241+
"ys_absolute_max_diff": ys_absolute_max_diff,
239242
"ys_relative_max_diff": ys_relative_max_diff,
240243
"metadata": {
241244
"unit_default": "%",

0 commit comments

Comments
 (0)