Provides tools for interacting with AiiDA Groups.
aiida.tools.groups.
GroupPath
Bases: object
object
A class to provide label delimited access to groups.
See tests for usage examples.
__contains__
Return whether a child exists for this key.
__dict__
__eq__
Compare equality of path and Group subclass to another GroupPath object.
Group
__ge__
Return a >= b. Computed by @total_ordering from (not a < b).
__getitem__
Return a child GroupPath, with a new path formed by appending path to the current path.
path
__gt__
Return a > b. Computed by @total_ordering from (not a < b) and (a != b).
__hash__
__init__
Instantiate the class.
path – The initial path of the group.
cls – The subclass of Group to operate on.
warn_invalid_child – Issue a warning, when iterating children, if a child path is invalid.
__iter__
Iterate through all (direct) children of this path.
__le__
Return a <= b. Computed by @total_ordering from (a < b) or (a == b).
__len__
Return the number of children for this path.
__lt__
Compare less-than operator of path and Group subclass to another GroupPath object.
__module__
__repr__
Represent the instantiated class.
__truediv__
__weakref__
list of weak references to the object (if defined)
_validate_path
Validate the supplied path.
browse
Return a GroupAttr instance, for attribute access to children.
GroupAttr
children
cls
Return the cls used to query for and instantiate a Group with.
delete_group
Delete the concrete group associated with this path.
GroupNotFoundError, GroupNotUniqueError
delimiter
Return the delimiter used to split path into components.
get_group
Return the concrete group associated with this path.
get_or_create_group
Return the concrete group associated with this path or, create it, if it does not already exist.
group_ids
Return all the UUID associated with this GroupPath.
and empty list, if no group associated with this label, or can be multiple if cls was None
This is an efficient method for checking existence, which does not require the (slow) loading of the ORM entity.
is_virtual
Return whether there is one or more concrete groups associated with this path.
key
Return the final component of the the path.
parent
Return the parent path.
Return the path string.
path_list
Return a list of the path components.
walk
Recursively iterate through all children of this path.
walk_nodes
Recursively iterate through all nodes of this path and its children.
filters – filters to apply to the node query
node_class – return only nodes of a certain class (or list of classes)
batch_size (int) – The size of the batches to ask the backend to batch results in subcollections. You can optimize the speed of the query by tuning this parameter. Be aware though that is only safe if no commit will take place during this transaction.
InvalidPath
Bases: Exception
Exception
An exception to indicate that a path is not valid.
GroupNotFoundError
An exception raised when a path does not have an associated group.
Initialize self. See help(type(self)) for accurate signature.
GroupNotUniqueError
An exception raised when a path has multiple associated groups.
NoGroupsInPathError
Provides functionality for managing large numbers of AiiDA Groups, via label delimitation.
aiida.tools.groups.paths.