Skip to content

Commit

Permalink
use OrderedDict
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Dec 25, 2023
1 parent d671e4d commit feb1a46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion atomistics/workflows/elastic/helper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from collections import OrderedDict

import numpy as np
import scipy.constants

Expand Down Expand Up @@ -29,7 +31,7 @@ def generate_structures_helper(
"epss": epss,
}

structure_dict = {}
structure_dict = OrderedDict()
if 0.0 in epss:
structure_dict[zero_strain_job_name] = structure.copy()

Expand Down
5 changes: 2 additions & 3 deletions atomistics/workflows/elastic/workflow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from collections import OrderedDict
import numpy as np

from atomistics.shared.output import OutputElastic
Expand Down Expand Up @@ -39,8 +38,8 @@ def __init__(
self.eps_range = eps_range
self.sqrt_eta = sqrt_eta
self.fit_order = fit_order
self._data = OrderedDict()
self._structure_dict = OrderedDict()
self._data = dict()
self._structure_dict = dict()
self.Lag_strain_list = []
self.epss = np.array([])
self.zero_strain_job_name = "s_e_0"
Expand Down

0 comments on commit feb1a46

Please sign in to comment.