Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi Chen committed May 15, 2020
1 parent 74b7213 commit 47c5268
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions megnet/data/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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")
Expand Down

0 comments on commit 47c5268

Please sign in to comment.