Skip to content
Back to top
View this page

# `aiida.tools`

## Package Contents

### Classes

`CalculationTools` |
`Graph` |
`GroupPath` |
`Orbital` |
`RealhydrogenOrbital` |

### Functions

`default_link_styles` |
`default_node_styles` |
`default_node_sublabels` |
`delete_group_nodes` |
`delete_nodes` |
`get_explicit_kpoints_path` |
`get_kpoints_path` |
`pstate_node_styles` |
`spglib_tuple_to_structure` |
`structure_to_spglib_tuple` |

### Data

`DELETE_LOGGER` |

### API

class aiida.tools.CalculationTools(node)

  Initialization

aiida.tools.DELETE_LOGGER = None

class aiida.tools.Graph(engine=None, graph_attr=None, global_node_style=None, global_edge_style=None, include_sublabels=True, link_style_fn=None, node_style_fn=None, node_sublabel_fn=None, node_id_type='pk', backend: Optional[aiida.orm.implementation.StorageBackend] = None)

  Initialization

  property backend: aiida.orm.implementation.StorageBackend
  property graphviz
  property nodes
  property edges
  _load_node(node)
  static _default_link_types(link_types)
  add_node(node, style_override=None, overwrite=False)
  add_edge(in_node, out_node, link_pair=None, style=None, overwrite=False)
  static _convert_link_types(link_types)
  add_incoming(node, link_types=(), annotate_links=None, return_pks=True)
  add_outgoing(node, link_types=(), annotate_links=None, return_pks=True)
  recurse_descendants(origin, depth=None, link_types=(), annotate_links=False, origin_style=MappingProxyType(_OVERRIDE_STYLES_DICT['origin_node']), include_process_inputs=False, highlight_classes=None)
  recurse_ancestors(origin, depth=None, link_types=(), annotate_links=False, origin_style=MappingProxyType(_OVERRIDE_STYLES_DICT['origin_node']), include_process_outputs=False, highlight_classes=None)
  add_origin_to_targets(origin, target_cls, target_filters=None, include_target_inputs=False, include_target_outputs=False, origin_style=(), annotate_links=False)
  add_origins_to_targets(origin_cls, target_cls, origin_filters=None, target_filters=None, include_target_inputs=False, include_target_outputs=False, origin_style=(), annotate_links=False)

exception aiida.tools.GroupNotFoundError(grouppath)

  Bases: `Exception`

  Initialization

exception aiida.tools.GroupNotUniqueError(grouppath)

  Bases: `Exception`

  Initialization

class aiida.tools.GroupPath(path: str = '', cls: aiida.orm.groups.GroupMeta = orm.Group, warn_invalid_child: bool = True)

  Initialization

  _validate_path(path)
  __repr__() → str
  __eq__(other: Any) → bool
  __lt__(other: Any) → bool
  property path: str
  property path_list: List[str]
  property key: Optional[str]
  property delimiter: str
  property cls: aiida.orm.groups.GroupMeta
  property parent: Optional[aiida.tools.groups.paths.GroupPath]
  __truediv__(path: str) → aiida.tools.groups.paths.GroupPath
  __getitem__(path: str) → aiida.tools.groups.paths.GroupPath
  get_group() → Optional[aiida.tools.groups.paths.GroupPath]
  property group_ids: List[int]
  property is_virtual: bool
  get_or_create_group() → Tuple[aiida.orm.Group, bool]
  delete_group()
  property children: Iterator[aiida.tools.groups.paths.GroupPath]
  __iter__() → Iterator[aiida.tools.groups.paths.GroupPath]
  __len__() → int
  __contains__(key: str) → bool
  walk(return_virtual: bool = True) → Iterator[aiida.tools.groups.paths.GroupPath]
  walk_nodes(filters: Optional[dict] = None, node_class: Optional[aiida.orm.Node] = None, query_batch: Optional[int] = None) → Iterator[aiida.tools.groups.paths.WalkNodeResult]
  property browse

exception aiida.tools.InvalidPath

  Bases: `Exception`

  Initialization

exception aiida.tools.NoGroupsInPathError(grouppath)

  Bases: `Exception`

  Initialization

class aiida.tools.Orbital(**kwargs)

  Initialization

  _base_fields_required = (('position',),)
  _base_fields_optional = None
  __repr__()
  __str__() → str
  _validate_keys(input_dict)
  set_orbital_dict(init_dict)
  get_orbital_dict()

class aiida.tools.RealhydrogenOrbital

  Bases: `aiida.tools.data.orbital.orbital.Orbital`

  _base_fields_required = None
  _base_fields_optional = None
  __str__()
  _validate_keys(input_dict)
  classmethod get_name_from_quantum_numbers(angular_momentum, magnetic_number=None)
  classmethod get_quantum_numbers_from_name(name)

aiida.tools.default_link_styles(link_pair: aiida.orm.utils.links.LinkPair, add_label: bool, add_type: bool) → dict

aiida.tools.default_node_styles(node)

aiida.tools.default_node_sublabels(node)

aiida.tools.delete_group_nodes(pks: Iterable[int], dry_run: Union[bool, Callable[[Set[int]], bool]] = True, backend=None, **traversal_rules: bool) → Tuple[Set[int], bool]

aiida.tools.delete_nodes(pks: Iterable[int], dry_run: Union[bool, Callable[[Set[int]], bool]] = True, backend=None, **traversal_rules: bool) → Tuple[Set[int], bool]

aiida.tools.get_explicit_kpoints_path(structure, method='seekpath', **kwargs)

aiida.tools.get_kpoints_path(structure, method='seekpath', **kwargs)

aiida.tools.pstate_node_styles(node)

aiida.tools.spglib_tuple_to_structure(structure_tuple, kind_info=None, kinds=None)

aiida.tools.structure_to_spglib_tuple(structure)