Skip to content

Commit

Permalink
Fix substituting_specie assignment for substitutions
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase authored Apr 25, 2022
1 parent 63bb75f commit c5e5b7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion defect_finder/BDM.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ def calc_number_electrons(
substituting_specie = str(defect_dict['site_specie'])
site_specie = 'Vac' # Consider an interstitial as the interstitial atom substituting a vacant position

elif defect_dict['defect_type'] in ['antisite', 'substitution']:
elif defect_dict['defect_type'] == 'antisite':
site_specie = str(defect_dict['site_specie'])
substituting_specie = defect_dict['substituting_specie']

elif defect_dict['defect_type'] == 'substitution':
site_specie = str(defect_dict['site_specie'])
substituting_specie = defect_dict['substitution_specie']

num_electrons = - ( oxidation_states[substituting_specie] - oxidation_states[site_specie] )
# print( f"Number of missing/extra electrons of defect {defect['name']}: ", num_electrons )
Expand Down

0 comments on commit c5e5b7e

Please sign in to comment.