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

Not wrapper: excluding site indices and sublattices #97

Merged
merged 2 commits into from
Sep 22, 2020
Merged

Conversation

pablosanjose
Copy link
Owner

We need a way to specify excluded site indices and sublattices in selectors. Here we introduce a not wrapper that allows such a thing. For example, to create a random potential in all sites but the first

hamiltonian(lat, onsite(r -> randn(), indices = not(1)))

This can become quite complex, and includes hoppings, with things like

parametric(h, @onsite!(o -> o + randn(); sublats = not(:A)), @hopping!(t -> 2t; indices = (not(1:3) =>4:6, not(4 => 5))))

This can become a way to create vacancies in a system. For that, however, we need to support full siteselectors in unitcell, combined with the not functionality here to encode vacancy site indices. This latter functionality is currently not available, since unitcell only supports a region keyword.

@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2020

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 62.07%. Comparing base (6f8d633) to head (de4ee8b).
Report is 1169 commits behind head on master.

Files with missing lines Patch % Lines
src/model.jl 73.33% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
- Coverage   62.12%   62.07%   -0.06%     
==========================================
  Files          16       16              
  Lines        2627     2634       +7     
==========================================
+ Hits         1632     1635       +3     
- Misses        995      999       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pablosanjose pablosanjose merged commit 2587888 into master Sep 22, 2020
@pablosanjose pablosanjose changed the title Not wrapper Not wrapper: excluding site indices and sublattices Sep 22, 2020
@pablosanjose pablosanjose deleted the vacancies branch September 22, 2020 14:23
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.

2 participants