Closed albgar closed 5 years ago
I have added an agnostic "get_pseudos_from_structure" in aiida_siesta.data.common, and used it in the base workflow. This solves one of the problems. No more logic is needed in workflows, as long as the plugin is able to deal with any kind of pseudo.
Pending: create a similarly agnostic "upload_family" function that can take mixed psf and psml pseudos. This should be easy: generalize the query to find existing pseudos with the same md5 hash, and use other methods according to the file extension. Perhaps add a new 'family type_string' of the sort "Siesta-pseudo.family"
A preliminary question: Is the Psml support finally in the official release of Siesta or is it still an "ad-hoc" version? What is the behaviour of Siesta in the case we want to use psml? Do we need to set a keyword in the input file to enable it? Is a .psml file prioritized over a .psf file in case I put both in the running folder?
I definitely support the idea of having a more general SiestaPseudoData class as many functionality are common. You mentioned "get_pseudos_from_structure" and "upload_family", but it would be nice to have also a general "get_or_create" that automatically recognize if the file we pass is .psml or .psf. However I wouldn't use the file extension as a discriminant between the two. At the moment (if I'm not wrong) one can pass files with any name to be stored as pseudos. It's the plugin that takes care of copying the file with the correct name {species}.psf I'm sure we can use something else to understand if we are passing a .psml or a .psf.
I have now merged the psml extension, leaving the two separate classes PsfData and PsmlData. As I explain in the docs and the commit message, PsmlData can in principle be used by more codes, so the option of defining some "SiestaPSData" class is not wholly adequate.
@albgar I think we can close this one
I have created the experimental 'psml-data' branch to add support for PSML files.
The example shows that this is still unsatisfactory.