diff --git a/dpdata/system.py b/dpdata/system.py index 8af8e4a59..044c61851 100644 --- a/dpdata/system.py +++ b/dpdata/system.py @@ -543,6 +543,7 @@ def formula(self): for symbol, numb in zip( self.data["atom_names"], self.data["atom_numbs"] ) + if numb > 0 ] ) @@ -558,6 +559,7 @@ def uniq_formula(self): for symbol, numb in sorted( zip(self.data["atom_names"], self.data["atom_numbs"]) ) + if numb > 0 ] )