-
Notifications
You must be signed in to change notification settings - Fork 11
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
Grid and matrices output #124
Comments
By the way, I could do it myself, I would just need to know whether it makes sense and some pointers maybe on things to take into account for the implementation. |
Hi Pol. |
Hi, thanks Emanuele! The point is that I don't think that there is any advantage on keeping it as a file, since matrix and grid files that come as outputs from SIESTA calculations are basically arrays of floats. Storing them in the database as arrays instead of files should be much better for any task that you can imagine, no? The |
Ok, then. Just make sure that the amount of data in the database is not too big. |
So The database will inevitably get large if you store the matrices. I don't mean to make it a compulsory output, just an optional thing. If you need the matrices of course you have to pay this price. The other alternative is to store the matrices in directories, which also occupies a lot of space. I was thinking of Aiida for this task to have everything in a compact database, which then is much easier to copy and move around (instead of having to zip a directory with thousands of runs). Or are there problems inherently related to the size of the database? |
AiiDA stores data in two places, a PostgreSQL database and a disk-objectstore repository. |
I'm starting to understand how things work. I see that the aiida_siesta_plugin/aiida_siesta/calculations/siesta.py Lines 700 to 720 in 76d0425
So I should add a line to retreive the DM, right? From My question is: If the files have already been stored to the repository as outputs of the By the way I realized that some things in the parser are already implemented in |
Heya just a quick note, it's better to store in in the repository, i.e. as a binary object, which will get loaded by the data node. Since, postgresql it's not efficient at storing such objects. |
Thanks! I already saw that I would actually then just store the file without parsing if it wasn't because it's a fortran unformatted binary file. |
Yes
Correct
I do not remember if the 'retrieved' files are also stored in the repository, I would say no, but maybe I'm wrong. In any case the point to parse the data is to create the
It might be that that parser came before the sisl existence. Feel free to open a PR with simplifications if you feel it is useful AND you are sure that sisl is the direction where Siesta is going (did you convinced at least few more people to embrace sisl? 😄 ) |
You can just store the file I believe, using |
True haha
It is not so easy because these files are read from fortran. And fortran needs to read from a file system (you must provide a path). I have not found in the internet any example of interaction between a python |
Ok, so two points to understand for me:
|
|
Since AiiDA v2.5.0 it is now possible to get a path to files stored in the repository, see https://aiida.readthedocs.io/projects/aiida-core/en/stable/reference/_changelog.html#repository-interface-improvements . Would this maybe help your use case @pfebrer ? I have not yet installed this version and tried it myself so I don't know what kind of filepath you get and if it can be parsed by the Fortran parsers from sisl. |
Hmm yeah it looks like it could work, I don't have the time to try now though 😅 |
I would like to create an Aiida database where the most important thing are the sparse matrices of each SIESTA calculation. I guess for now these are kept as files, but this makes it more difficult to interact with them. I would like that they were integrated as calculation outputs.
With
sisl
, it is very easy to convert those files into python data. I have seen that there is no built-in data type for sparse matrices in aiida, and also I have found no plugin that includes one (?). So I guess we would have to create a data type. Mimicking thesisl
sparse matrices would be the most convenient I would say.The grids can also be read from sisl and I guess those could be stored as
ArrayData
?The text was updated successfully, but these errors were encountered: