num_pores#

CubicTemplate.num_pores(labels='all', mode='or')#

Returns the number of pores of the specified labels

Parameters:
  • labels (list of strings) – The pore labels that should be included in the count. If not supplied, all pores are counted.

  • labels – Label of pores to be returned

  • mode (str, optional) –

    Specifies how the count should be performed. The options are:

    mode

    meaning

    ’or’

    Returns the labels that are assigned to any of the given locations. Also accepts ‘union’ and ‘any’

    ’and’

    Labels that are present on all the given locations. also accepts ‘intersection’ and ‘all’

    ’xor’

    Labels that are present on only one of the given locations.Also accepts ‘exclusive_or’

    ’nor’

    Labels that are not present on any of the given locations. Also accepts ‘not’ and ‘none’

    ’nand’

    Labels that are present on all but one of the given locations

    ’xnor’

    Labels that are present on more than one of the given locations.

Returns:

Np – Number of pores with the specified labels

Return type:

int

See also

num_throats, count

Notes

Technically, ‘nand’ and ‘xnor’ should also count pores with none of the labels, however, to make the count more useful these are not included.