Skip to content

Commit 478569c

Browse files
authored
Merge pull request #230 from pmrv/ed2s
Drop dict_to_string
2 parents 736f3c4 + 2c89e50 commit 478569c

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

calphy/composition_transformation.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,6 @@ def __init__(self, calc):
134134
self.mappingdict = None
135135
self.prepare_mappings()
136136

137-
def dict_to_string(self, inputdict):
138-
strlst = []
139-
for key, val in inputdict.items():
140-
strlst.append(str(key))
141-
strlst.append(str(val))
142-
return "".join(strlst)
143-
144137
@property
145138
def entropy_contribution(self):
146139
"""

calphy/input.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,7 @@ def _validate_all(self) -> "Input":
760760
)
761761
if not (natoms1 == natoms2):
762762
raise ValueError(
763-
f"Input and output number of atoms are not conserved! Input {self.dict_to_string(self.input_chemical_composition)}, output {self.dict_to_string(self.output_chemical_composition)}, total atoms in structure {structure.natoms}"
764-
)
763+
f"Input and output number of atoms are not conserved! Input {self.composition_scaling._input_chemical_composition}, output {self.composition_scaling.output_chemical_composition}, total atoms in structure {len(structure)}")
765764
return self
766765

767766
def fix_paths(self, potlist):

0 commit comments

Comments
 (0)