Skip to content

Commit

Permalink
fix out_dir_name
Browse files Browse the repository at this point in the history
elements and super_cell should be read
  • Loading branch information
HuangJiameng committed Aug 31, 2022
1 parent 26c11a6 commit ae36f72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dpgen/data/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def replace (file_name, pattern, subst) :
global_dirname_04 = '02.md'

def out_dir_name(jdata) :
elements = jdata['elements']
super_cell = jdata['super_cell']
from_poscar = jdata.get('from_poscar', False)

if from_poscar:
Expand All @@ -87,8 +89,6 @@ def out_dir_name(jdata) :
return poscar_name + '.' + cell_str
else :
cell_type = jdata['cell_type']
elements = jdata['elements']
super_cell = jdata['super_cell']
ele_str = ""
for ii in elements:
ele_str = ele_str + ii.lower()
Expand Down

0 comments on commit ae36f72

Please sign in to comment.