how to get the group name of the node

9 views
Skip to first unread message

Witty Yonng

unread,
Oct 24, 2022, 3:39:23 AM10/24/22
to aiidausers
Hi all,


If I have the node, how to get the group name it belongs to?


Best,
Witty

Zhu, Bonan

unread,
Oct 24, 2022, 5:27:00 AM10/24/22
to aiida...@googlegroups.com

Hi Witty,

 

Not sure if there are other shortcuts, but you can do this with QueryBuilder:

QueryBuilder().append(Node, filters={'id': node.}).append(Group, with_node=Node).all()

 

 

Best wishes,

Bonan Zhu

 

From: aiida...@googlegroups.com <aiida...@googlegroups.com> On Behalf Of Witty Yonng
Sent: 24 October 2022 08:39
To: aiidausers <aiida...@googlegroups.com>
Subject: [aiidausers] how to get the group name of the node

 

Caution: External sender

 

--
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/7b21d3dd-2e7a-4d35-b104-57b52cbc40f2n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages