From 7aea226f102bc7acb9df5daa9e73a0d21516e638 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sun, 3 May 2020 04:50:12 -0400 Subject: [PATCH] fix bug of to_ase_structure in #98 --- dpdata/system.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dpdata/system.py b/dpdata/system.py index e861328ff..167c29b47 100644 --- a/dpdata/system.py +++ b/dpdata/system.py @@ -510,9 +510,7 @@ def to_ase_structure(self): raise ImportError('No module ase.Atoms') for system in self.to_list(): - species=[] - for name,numb in zip(system.data['atom_names'],system.data['atom_numbs']): - species.extend([name]*numb) + species=[system.data['atom_names'][tt] for tt in system.data['atom_types']] structure=Atoms(symbols=species,positions=system.data['coords'][0],pbc=True,cell=system.data['cells'][0]) structures.append(structure) return structures