Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix logic error in NEB vacancy supercell generation #246

Merged
merged 3 commits into from
Aug 17, 2021

Conversation

jacksund
Copy link
Contributor

This pull request address the bug in #245 where the incorrect supercell is generated with vac_mode=True

@shyuep
Copy link
Contributor

shyuep commented Jul 31, 2021

Thanks. Can you add a simple unittest pls?

@coveralls
Copy link

coveralls commented Jul 31, 2021

Pull Request Test Coverage Report for Build 1139703774

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 79.941%

Totals Coverage Status
Change from base Build 1076204842: 0.09%
Covered Lines: 1614
Relevant Lines: 2019

💛 - Coveralls

@jacksund
Copy link
Contributor Author

jacksund commented Aug 1, 2021

Sure thing. Looks like I need to run black formatting too.

Before you accept my changes, I wanted to point out that this changes how some supercell structures are generated when vac_mode=False. In reality, I think there are actually three modes that should be considered when making supercells:

  1. vac_mode=True: where all diffusing species are kept in the supercell structure except for 1 (so a single vacancy)
  2. vac_mode=False (v1): where all diffusing species are removed in the supercell structure except for 1 (so a single diffusion ion plus the host lattice). This is the current implementation of your package.
  3. vac_mode=False (v2): where all symmetrically equivalent sites of the diffusing atom are removed (so sites of the same species that are not part of the diffusing pathway are still kept). This is the logic that this pull request currently implements.

The difference between 2 and 3 won't be seen in the majority of structures, but it may be important for lower-symmetry ones.

@shyuep
Copy link
Contributor

shyuep commented Aug 17, 2021

There are still some linting errors.

@jacksund
Copy link
Contributor Author

jacksund commented Aug 17, 2021

@shyuep for future reference, what commands do you use to run all linting locally? I'm only familiar with black and don't typically use pylint. Is it just something like pylint --rcfile=pylintrc in the base directory?

@shyuep
Copy link
Contributor

shyuep commented Aug 17, 2021

@shyuep shyuep merged commit c624dca into materialsvirtuallab:master Aug 17, 2021
@jacksund
Copy link
Contributor Author

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants