Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion dpdata/qe/traj.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,16 @@ def to_system_data(input_name, prefix, begin = 0, step = 1) :
begin = begin,
step = step,
convert = length_convert)
assert(csteps == tmp_steps), "the step key between files are not consistent"
if csteps != tmp_steps:
csteps.append(None)
tmp_steps.append(None)
for int_id in range(len(csteps)):
if csteps[int_id] != tmp_steps[int_id]:
break
step_id = begin + int_id*step
raise RuntimeError(f"the step key between files are not consistent. "
f"The difference locates at step: {step_id}, "
f".pos is {csteps[int_id]}, .cel is {tmp_steps[int_id]}")
except FileNotFoundError :
data['cells'] = np.tile(cell, (data['coords'].shape[0], 1, 1))
return data, csteps
Expand Down