Comments (5)
Sounds like a good idea. It might, however, lead to some surprises if a user then tries to apply the && to a function not wrapped with a Region
. Something like
sqreg = RegionPresets.square(10)
ringreg = r -> 5 < norm(r) < 10
h |> unitcell(region = sqreg && ringreg)
EDIT: I hadn't realized that you propose to overload combine
, not &&
(which is actually not possible, it needs to be &
in any case). In that case (using combine
) there should be no surprise, indeed. But see post #121 (comment)
from quantica.jl.
Note also that we have boolean operators on superlattices. This should already work
sqreg = RegionPresets.square(10)
ringreg = r -> 5 < norm(r) < 10
unitcell(supercell(lat, region = sqreg) & supercell(lat, region = ringreg))
from quantica.jl.
In any case, I think we should do this, but not with combine
, but directly with &
, |
and xor
, in analogy to the supercell boolean operators, which gives more possibilities.
from quantica.jl.
Oh, I understand! It sounds perfect to me.
I wasn't aware of the possibility to perform boolean operations with superlattices.
I agree that the desired syntax should make use of &
, |
and xor
.
from quantica.jl.
I added !
to the list in #129. Note that the logic fallbacks in Julia give us Boolean expressions with arbitrary number of arguments for free.
from quantica.jl.
Related Issues (20)
- TagBot trigger issue HOT 2
- `lattice(s::LatticeSlice)` should probably return slice, not `parent(s)` HOT 2
- Register v1.0.1 HOT 11
- Implement spectrum adaptive KPM method
- Self-consistent mean fields HOT 5
- Taking blocks seriously HOT 5
- Multiorbital systems: replace `SMatrixView` with a `Union` over different `SMatrix` eltypes HOT 1
- Provide wrappers to matrices / vectors to indicate parent Hamiltonian an allow use of siteselector HOT 8
- Allow construction of Hamiltonian by providing Harmonics HOT 2
- Segfault (use-after-free?) due to interaction between FunctionWrappers and Julia 1.10 HOT 1
- GreenFunction of AbstractHamiltonian{Float32} fails
- Add support for (energy dependent) unbounded self-energies HOT 1
- Add support for `qplot(h::OpenHamiltonian)`
- Parametric models don't support parameters without default values HOT 1
- Schur leads with additional self-energies are broken
- Issue with boundary construction in `GS.Bands`
- `GS.Bands` and Divide by zero
- Taking Operators seriously HOT 2
- Make `inspector = true` the default
- Broken closure in GreenFunction HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quantica.jl.