Pseudopotentials

125 views
Skip to first unread message

Otto Kohulák

unread,
Sep 2, 2021, 7:57:39 AM9/2/21
to aiida...@googlegroups.com
Dear AiiDA community,

the standard way in which pseudopotentials are included is via "families" in aiida-pseudo package (at least how I understand it). I see currently supported families are SSSP and pseudo-dojo. As far as I know both families prepared for UPF planewave(-like) basis. I am writing a package for a code which uses a localized basis set, where the UPF format is not used.

I would like to have something like aiida-pseudo but for PPs like:


I was thinking to create a new Data node for these PPs and its own "fetcher". You see, with PP we also use propriate basis set to those PPs. Nonetheless before the calculation we alter this basis set based on some requirements. We do this very regulary. It  would be very easy and clear if we would have it as a Data node. One would be able to see it in the provenance.

The question I have is it a good idea to put in into aiida-pseudo or in separate package. Or do you have any other ideas? How is this handled in other packages? One unfortunate thing is the authors of above mentioned PP libs does not published license to those PP. Eventualy I will write them.

Best wishes,

Otto Kohulák also known as Oto Kohulák

P.S. Sorry from gramatical errors, my grammarly stopped working.


Marnik Bercx

unread,
Sep 2, 2021, 9:09:27 AM9/2/21
to aiida...@googlegroups.com
Hi Otto! 👋

Although it's true that `aiida-pseudo` provides extra support for families that we consider "established" (see this comment for some notes on this concept), you can also install non-established pseudo families from an archive or folder:


We also already support several pseudopotential formats, not just UPF:


But, it's of course possible that the format you want to is not yet supported. ^^ I'd suggest you open an issue on `aiida-pseudo` to add support for this format, and of course we would welcome your contribution to the repo! 

Regarding the alteration of the basis set based on the pseudo, maybe you can open a separate issue for this where we can discuss this in more detail? We can then decide whether this belongs in `aiida-pseudo` or perhaps in your plugin package.

Best,
Marnik

--
AiiDA is supported by the NCCR MARVEL (http://nccr-marvel.ch/), funded by the Swiss National Science Foundation, and by the European H2020 MaX Centre of Excellence (http://www.max-centre.eu/).
 
Before posting your first question, please see the posting guidelines at http://www.aiida.net/?page_id=356 .
---
You received this message because you are subscribed to the Google Groups "aiidausers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aiidausers+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aiidausers/CAK%3DGx5jX4g_O2k7pNN3D63--ka68jKD1pg-nznMPCU6gLgCjaw%40mail.gmail.com.

Sebastiaan Huber

unread,
Sep 2, 2021, 9:24:07 AM9/2/21
to aiida...@googlegroups.com
Dear Otto,


the standard way in which pseudopotentials are included is via "families" in aiida-pseudo package (at least how I understand it). I see currently supported families are SSSP and pseudo-dojo. As far as I know both families prepared for UPF planewave(-like) basis. I am writing a package for a code which uses a localized basis set, where the UPF format is not used.
The concept of pseudo potential families in AiiDA is purely a tool to make working with pseudos easier, but they are in no way required.
Many calculations require a pseudopotential file for each element in the structure, and traditionally, since often a PP is represented by a single file, each PP is passed as an individual node to an AiiDA process.
If we take the example of the `PwCalculation` plugin of `aiida-quantumespresso`, it expects `UpfData` nodes in the `pseudos` namespace for each element in the structure in the structure.
A `UpfData` can be created by passing the filepath of the pseudopotential to the constructor and so you can build the inputs, for example for SiGe, as follows:
inputs = {
    'pseudos': {
        'Si': UpfData('/path/to/Si.upf'),
        'Ge': UpfData('/path/to/Ge.upf'),
    },
    ....
}
The concept of a pseudopotential family is just something on top to make this process easier.
Not only does it prevent that you create the same `UpfData` everytime, but simply reuse it if it already exists in the database, it also makes it easy to retrieve them from the database.
A family is nothing more than an AiiDA `Group` that contains 1 pseudopotential node for each element.
This allows you to do something like:
pseudos = family.get_pseudos(('Si', 'Ge'))
which would return the dictionary as shown in the previous example.
In `aiida-pseudo` we have extended this concept by making the family even more powerful and also allow to provide recommended cutoffs (which is useful for plane-wave based codes like QE).
For example, it allows you to get the recommended cutoffs as:
family.get_recommended_cutoffs(('Si', 'Ge'))
In addition, as you noticed, we also added functionality that can automate the creation of certain families with all the PP nodes and the associated cutoffs for the SSSP and Pseudo-dojo.
This works well for these pseudo libraries because they have well-defined families with stable URLs to download the pseudopotential files and metadata.
However, this is not required to create individual pseudopotential nodes or even families.
I would refer you to the documentation [1] for more details on how to create your own custom families.



I would like to have something like aiida-pseudo but for PPs like:


I was thinking to create a new Data node for these PPs and its own "fetcher". You see, with PP we also use propriate basis set to those PPs. Nonetheless before the calculation we alter this basis set based on some requirements. We do this very regulary. It  would be very easy and clear if we would have it as a Data node. One would be able to see it in the provenance.
What calculations are you running?
Are you using a public plugin package, or did you write your own?
If the pseudopotential files are also represented by a single file, you may just use the `SinglefileData` data plugin that comes with `aiida-core`.
If your calculation plugin accepts this you don't need anything more specific, but of course if there is additional functionality that you want to add on the pseudo node, you can make your own plugin.
I have not worked with basis sets myself, but I know that they can be used with SIESTA and CP2K which both have well established plugins.
So maybe you look there to see how they deal with this.
There is also this open issue [2] on `aiida-pseudo` on this very question of maybe integrating support for basis sets.


The question I have is it a good idea to put in into aiida-pseudo or in separate package. Or do you have any other ideas? How is this handled in other packages? One unfortunate thing is the authors of above mentioned PP libs does not published license to those PP. Eventualy I will write them.
If the pseudopotential types you are interested in are widely used, we can definitely consider integrating this in `aiida-pseudo`.
Feel free to open an issue there with a more specific and detailed description of what types you want to use for what simulation software and we discuss it further there.


HTH,


SPH


[1] https://aiida-pseudo.readthedocs.io/en/latest/howto.html
[2] https://github.com/aiidateam/aiida-pseudo/issues/45

Otto Kohulák

unread,
Sep 2, 2021, 10:49:32 AM9/2/21
to aiida...@googlegroups.com
Dear Marnik and Sebastiaan,

thank you both for your elaborate answers. First of all, I would like to say I am writing aiida package containing plugin for our QMC code which should be published very soon. In our group we are mostly using PP from two PP libraries, the ones I've mention in last mail. My plugin already works, I am using it right now and the basis set and PP are handled through SinglefileData.

Now I would like to explain why I would like use them in similar way how the "families": because I consider them as a PP families. Similarly, as one can can get recomended cutoffs from the aiida families (which defines basis for PW codes), I have to download my basis set from the libs as well. These basis sets are usualy some Dunning basis. In the end I would like to have something like this:

pseudos = family.get_pseudos(('Si','Ge'))
basis = family.get_recomended_basis(('Si','Ge'), "aug-cc-pVTZ") # specifying elements and type of the basis set

After this would be made, one can run them through suggested workflows in order to adjust these basis to fit the particular purpose. Currently I do this outside aiida and it is a good source of errors. But always one has to start from the recommended ones from the PP library.

I know Siesta uses localized basis sets as well and also Dunning ones. And I am avare of existence of aiida-siesta package. Therefore I wanted to ask this question before I do something and not to code something what have already been written. I think it would be usefull to have special class for localized basis, most of the localized basis sets need only to store prefactor, orbital numbers and exponents. This should not be to hard to put it into Dict. I looked on aiida-siesta documentation they add basis information into StructureData. That is not a bad idea because contrary to PW basis localized one are mostly localized on atomic centers. But would not work in our code for several reasons. 

I agree with the open issue, it would be nice to have aiida-basis as well it could fetch basis from open databases like [1], It could return the same object for the basis as I am trying to have.

So my question is, if there is no data type for storage of the basis set (I could not find any in siesta package, but maybe I was just not looking enough), is it ok if I implement one for example into aiida.orm? Or somewhere else? It could be reuse in other packages. Or I should keep it inside my package? Or you have a better solution?

I hope I was clear enough

Thank you both again,

O.


št 2. 9. 2021 o 15:24 'Sebastiaan Huber' via aiidausers <aiida...@googlegroups.com> napísal(a):
--
AiiDA is supported by the NCCR MARVEL (http://nccr-marvel.ch/), funded by the Swiss National Science Foundation, and by the European H2020 MaX Centre of Excellence (http://www.max-centre.eu/).
 
Before posting your first question, please see the posting guidelines at http://www.aiida.net/?page_id=356 .
---
You received this message because you are subscribed to the Google Groups "aiidausers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aiidausers+...@googlegroups.com.

Bosoni Emanuele

unread,
Sep 2, 2021, 11:46:56 AM9/2/21
to aiida...@googlegroups.com
Dear all,
I jump into the discussion since I'm very much interested in it and I want to clarify few points regarding the aiida-siesta plugin.

First of all, I believe that the place to discuss these issues is really here: https://github.com/aiidateam/aiida-pseudo/issues/45, as Sebastiaan already mentioned. We also had few life discussions with Austin Zadoks (that opened the issue) and I believe he started to make some implementations on that. The issue is not as easy as it seems, the types of localized basis are several and many more are the code using them, each one accepting a different format. Moreover I'm not even sure the concept of "recommended_basis" (given a pseudo) is really transferable among systems (a basis could be good for a molecular system but not for a complex solid) and among codes. Anyway, bottom line, lets meet in the page of the issue! I would suggest you to report your features request and suggestions. I will also write something now to revive the discussion.

In aiida_siesta we have a simple dictionary where to include basis info in a SIESTA format, but also we have a `IonData` data type that stores the actual orbitals of the basis. So far it is not general (i.e. works only for Siesta), but this might be an idea to pursue: to store the actual orbitals and to have methods returning the info required by various codes. But again, discussions will be on the issue!

Saludos
Emanuele

Otto Kohulák

unread,
Sep 2, 2021, 6:18:19 PM9/2/21
to aiida...@googlegroups.com
Dear Emanuele,

I agree it is better to move this discussion into the issue, but I will reply to your comment on the "recommended basis because I think It is not a bad idea. The problem of the environment is real, and this is why I would like to group them into families. I know from their respective implementation papers how these PPs and basis sets were built and therefore I know on which system I can use them. The ones I am using employs a Dunning basis so they are pretty standard and the least what can an author of PP do is to cut unnecessary parts of basis due to PP. At last, I know there is no guarantee the basis sets will be transferable (and they are not), that's why we would like to alter the basis before we use it.

Best regards,

O.

št 2. 9. 2021 o 17:46 'Bosoni Emanuele' via aiidausers <aiida...@googlegroups.com> napísal(a):
Reply all
Reply to author
Forward
0 new messages