From 47c526834ddd78e7a9bdece7093970fb33a7afd0 Mon Sep 17 00:00:00 2001 From: Chi Chen Date: Fri, 15 May 2020 16:08:38 -0700 Subject: [PATCH] fix lint --- megnet/data/graph.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/megnet/data/graph.py b/megnet/data/graph.py index 2f56129f3..3b84b2f90 100644 --- a/megnet/data/graph.py +++ b/megnet/data/graph.py @@ -84,8 +84,8 @@ def convert(self, structure: Structure, state_attributes: List = None) -> Dict: structure: (pymatgen structure) (dictionary) """ - state_attributes = state_attributes or getattr(structure, 'state', None) or np.array([[0.0, 0.0]], - dtype='float32') + state_attributes = state_attributes or getattr(structure, 'state', None) or \ + np.array([[0.0, 0.0]], dtype='float32') index1 = [] index2 = [] bonds = [] @@ -96,7 +96,6 @@ def convert(self, structure: Structure, state_attributes: List = None) -> Dict: for neighbor in neighbors: index2.append(neighbor['site_index']) bonds.append(neighbor['weight']) - atoms = self.get_atom_features(structure) if np.size(np.unique(index1)) < len(atoms): raise RuntimeError("Isolated atoms found in the structure")