Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
This fixes the NoneType issues with Species.shannon_radius and Species.ionic_radius
  • Loading branch information
AntObi authored Oct 29, 2019
1 parent 9df0f02 commit 60e11b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smact/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,15 @@ def __init__(self,symbol,oxidation,coordination=4):

if shannon_data:
for dataset in shannon_data:
if dataset['charge'] == oxidation and dataset['coordination'] == coordination:
if dataset['charge'] == oxidation and str(coordination) == dataset['coordination'].split('_')[0]:
self.shannon_radius = dataset['crystal_radius'];

# Get ionic radius
self.ionic_radius = None;

if shannon_data:
for dataset in shannon_data:
if dataset['charge'] == oxidation and dataset['coordination'] == coordination:
if dataset['charge'] == oxidation and str(coordination) == dataset['coordination'].split('_')[0]:
self.ionic_radius = dataset['ionic_radius'];

# Get SSE_2015 (revised) for the oxidation state.
Expand Down

0 comments on commit 60e11b2

Please sign in to comment.