-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Atoms without orbitals? #449
Comments
I think it is a really good idea, however it will introduce some corner case problems:
If one takes an atom that has 0 orbitals then |
I was worried about the same thing. However, I would say that it would be more logical that a |
Partially, since lots of code is relying on Geometry close calls. I am also worried about the documentation issue, i.e. which routines uses atoms with orbitals and which are using all atoms. I would intuitively always expect a geometry to behave the same, but that is not what will happen if Hamiltonian removes them (it also requires additional boiler plate code). What I like about using class objects is that it is very clear how they interact with each other. And in this case it will change the behaviour of Geometry in certain situations. My experience tells me that some may find this intuitive, but new users will not have this intuition... As such I am probably more in favour of not allowing this, because it will break backwards compatibility. Many are using |
Yeah, I understand that there is an issue with backwards compatibility. But to me the current layout is not ideal. I have been playing with setting up some some multi-orbital TB models and then one ends up with loops like this: for ia in geom:
io = geom.a2o(ia, all=True)
for ja in geom.close(ia, R=(...)):
jo = geom.a2o(ja, all=True)
for j in ja:
H[io, jo] = ... It starts to look a little ugly and to me it would be nicer (and, and actually, more intuitive I think) to have something like: for io in H:
for jo in H.close(io, R=(...)):
H[io, jo] = ... It would just boil down to changing the meaning of |
I agree, this is why I generally recommend one to create a The problem of the I agree your suggestion would make sense, but it would require a stateful for row, col in H: I don't think the above should be changed since that would be very different from other sparse matrix handlers. So while one can fix the |
OK, I see. Another approach then could then be to allow |
Hmm.. Ok, what about allowing 0 orbitals, and when creating |
Sounds interesting. Indeed I think it would be intuitive to allow for 0 orbitals. But I do not see how that would help to tackle the situation where one would like to work with a physical geometry and some effective Hamiltonian for a subset of the atoms. |
I think there wouldn't be too much of a problem, I am just very worried that the 0-orbital atom will cause havoc in the SparseGeometry classes. The workflow for 0-orbital geometries would be:
Not pretty, but I think this will not break anything... |
What if such a geometry passed to |
I have done this with the Also, a class should do one thing, and it should be clear to the end user. I think this is crossing the "do one thing" without providing much aid for the end user. I really try to make things simple in sisl, and I think this is a borderline case where things are being needlessly more complicated without gain (especially for the It is not that I don't understand how it can aid in these plotting functionalities, but... I would still think that having a separate geometry that gets plotted as a subsequent step is not too much of a deal compared to the internal restructure and unsureness of how a |
I would also like this feature for QM/MM setups :) Perhaps a first step could be to allow atoms to have 0 orbitals but raise an error when trying to create a For |
Hmm... How should a default geometry be created? Currently a base of 1 orbital per atom is the default. Lets get #665 in first (restructuring). I have just returned from vacation. So I should be more available now. |
Probably keeping the current default is the only sane option :) |
I think you should start here @pfebrer , just die when creating matrices with 0-orbital atoms. :) |
Is there something to discuss really? Or should I just try and see what happens? One option would be to put all 0-orbital atoms at the end or at the beggining, but I don't think it is a good option. Another option would be to keep a mask with |
Lets raise an error first on sparse matrices, then see what needs fixing. |
I am trying to build a geometry for which I would like to have zero orbitals associated to certain atoms. Can it be done?
As far as I can see, I get at least one orbital associated to an atom:
Motivation: Think of a GNR structure with H-atoms at the edges (it could be a geometry obtained from DFT). Now, if we could simply set zero orbitals for the H and one orbital for C, we would readily arrive at the effective model for the pi-electrions only, without having to remove any physical atoms from the geometry.
The text was updated successfully, but these errors were encountered: