From 96a278cdd3f6578946b51613d4a8ad3f92d69e87 Mon Sep 17 00:00:00 2001 From: zjgemi Date: Wed, 11 Oct 2023 18:22:28 +0800 Subject: [PATCH] avoid formula causing file name too long Signed-off-by: zjgemi --- dpdata/system.py | 2 ++ 1 file changed, 2 insertions(+) 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 ] )