From 6d5afb63b89b8aa885debd9ecb85d4a5886af5af Mon Sep 17 00:00:00 2001 From: Michail Minotakis Date: Tue, 29 Oct 2024 10:08:06 +0100 Subject: [PATCH] Docs: Correct example snippet for creating a pseudo family (#173) --- docs/source/design.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/design.rst b/docs/source/design.rst index f3a26df..65712e2 100644 --- a/docs/source/design.rst +++ b/docs/source/design.rst @@ -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: