Functions

Topology

Loading network

network.load_net(name_file, format='text', verbose=True)
Parameters:
  • name_file (str) – Name of input file with network
  • format (str) – Format of input file: ‘text’ or ‘native’
Verbose :

Prints out general information of the network loaded.

Returns:

None

Prints out:

general information if verbose=True.

Loading labels

network.load_labels(name_file, format='text')
Parameters:
  • name_file (str) – Name of input file with network
  • format (str) – Format of input file: ‘text’ or ‘water’
Returns:

None

Prints out:

None

Adding node

network.add_node(label=None, weight=0, iout=False)
Parameters:
  • label (str or int.) – Label of new node.
  • weight (float) – Weight of new node.
  • iout (bool) – Returning index of new node in network.
Returns:

Index of new node if iout=True.

Prints out:

None

Info

network.info(update=True, verbose=True)
Parameters:
  • update (bool) – Computing and updating general variables as network.weight, network.num_nodes, network.k ...
  • verbose (bool) – Prints out general information.
Returns:

None

Prints out:

General information of the network if verbose.

Merging network

network.merge_net(net=None, traj=None, verbose=True)
Parameters:
  • net (network class.) – network to be merged or included.
  • traj – None.
  • verbose (bool) – Prints out general information.
Prints out:

General information of the network if verbose.

Extracting network

network.extract_net(nodes=None, verbose=True)
Parameters:
  • nodes (list[int]) – List of nodes with which a new network is built.
  • verbose (bool) – Prints out general information.
Returns:

network class.

Prints out:

General information of the new network if verbose.

Writting network

network.write_net(name_file=None, format='text', pymol=False, with_index=True, with_cluster=False)
Parameters:
  • name_file (str) – Name of new file.
  • format (str) – Format of output file: ‘text’ or ‘native’.
  • pymol (bool) – True if the file will be read by pymol.
  • with_index (bool) – The network will be written with node indexes if True.
  • with_cluster (bool) – The hnodes will be written with a cluster indentification.

Writting labels

network.write_labels(name_file=None, format='text')
Parameters:
  • name_file (str) – Name of new file
  • format (str) – Format of output file: ‘text’

Clustering

MCL

Gradient Clusters

Table Of Contents

Previous topic

Networks

Next topic

Tutorials