Merge branch 'rc'

This commit is contained in:
Atsushi Togo 2016-11-25 22:23:49 +09:00
commit 6ef61cc551
1 changed files with 12 additions and 2 deletions

View File

@ -240,8 +240,18 @@ def parse_disp_yaml(filename="disp.yaml", return_cell=False):
if return_cell:
lattice = dataset['lattice']
positions = [x['position'] for x in dataset['atoms']]
symbols = [x['symbol'] for x in dataset['atoms']]
if 'points' in dataset:
data_key = 'points'
pos_key = 'coordinates'
elif 'atoms' in dataset:
data_key = 'atoms'
pos_key = 'position'
else:
data_key = None
pos_key = None
positions = [x[pos_key] for x in dataset[data_key]]
symbols = [x['symbol'] for x in dataset[data_key]]
cell = Atoms(cell=lattice,
scaled_positions=positions,
symbols=symbols,