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

Accessing matrices #4

Open
pfebrer opened this issue Feb 7, 2024 · 3 comments
Open

Accessing matrices #4

pfebrer opened this issue Feb 7, 2024 · 3 comments

Comments

@pfebrer
Copy link

pfebrer commented Feb 7, 2024

Hi @jonaslb, I guess this project is stale now (?).

I thought that using something like this might be useful for one of my projects and I had some doubts. The major one is: Just as you get the fermy energy, do you think it is possible to get the sparse matrices? And do you think it is possible to modify the matrix arrays inplace from python (or maybe through some middleware fortran/C routine)?

@jonaslb
Copy link
Owner

jonaslb commented Feb 8, 2024

Hi! I'm very happy that you have interest in this :) With 3 years since the last commit, I guess I can't say that it's not stale. But - I have thought many times about going back and updating it, perhaps also as a means to keep a little bit of contact with comp. physics even though I've moved on professionally from physics now. So your expression of interest might be the motivation i needed to reinvest some time here ;)

As for your question about the matrices, then yes, I think a similar approach as with the fermi energy will work. I originally thought about doing it also for the Hamiltonian and overlap matrices (instead of reading them from files with sisl), but it was just easier to go the sisl route (and I guess one would want to work with them as sisl objects too, anyway). There might be some details to be figured out regarding sharing of the memory for the matrices, i.e. I guess we would want to expose them as numpy "views", not copies, which I think should be possible, I just don't know immediately how to do it.

@pfebrer
Copy link
Author

pfebrer commented Feb 8, 2024

Cool! :)

My use case is to transfer a matrix from sisl to SIESTA while SIESTA is running. Right now I'm doing it through disk with a .DM file. So getting an array view would be completely awesome hehe.

I think if there is some more functionality to interact directly with variables and there is a package for it available in pypi and conda this would be a very useful project!

@pfebrer
Copy link
Author

pfebrer commented Feb 8, 2024

By the way, I don't know if you know but the building method of SIESTA changed completely. Now it is compiled with CMake, which is much easier, but I don't know which/if changes would be required here.

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

No branches or pull requests

2 participants