add_pbc_to_rag

compute.add_pbc_to_rag(rag, pbc_groups)

Add a pbc_group attribute to each RAG node from the PBC groups.

It takes a RAG and a list of PBC groups, and adds a ‘pbc_group’ attribute to each node in the RAG

Parameters

Name Type Description Default
rag the region adjacency graph required
pbc_groups a list of lists of labels that are in the same periodic boundary condition group required

Returns

Name Type Description
A rag with the pbc_group attribute added to each node.