Skip to content

Commit

Permalink
Docs: Correct example snippet for creating a pseudo family (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
Minotakm authored Oct 29, 2024
1 parent bcc0129 commit 6d5afb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ A pseudopotential family can be constructed manually, by first constructing the
from aiida import plugins
UpfData = plugins.DataFactory('pseudo.upf')
PseudoPotentialFamily = plugins.GroupFactory('pseudo')
PseudoPotentialFamily = plugins.GroupFactory('pseudo.family')
pseudos = []
for filepath in ['Ga.upf', 'As.upf']:
with open(filepath, 'rb') as stream:
pseudo = UpfData(stream)
pseudos.append(pseudo)
pseudos.append(pseudo.store())
family = PseudoPotentialFamily(label='pseudos/upf').store()
family.append(pseudos)
family.add_nodes(pseudos)
Note that as with any :py:class:`~aiida.orm.Group`, it has to be stored before nodes can be added.
If you have a folder on disk that contains various pseudopotentials for different elements, there is an even easier way to create the family automatically:
Expand Down

0 comments on commit 6d5afb6

Please sign in to comment.