Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Jun 6, 2022
2 parents 4c3556c + d5863f4 commit ca202a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ jobs:
pip install -e .[tests]
- name: Test
run: pytest
run: |
pytest
pytest tests/test_shakenbreak.py --mpl # test output plots
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 ca202a5

Please sign in to comment.