#### DisNet Class DisNet is the fundamental data structure used in PyDiS to represent the dislocation network. The following is a sketch of the DisNet data structure, using the initial condition of the [Frank-Read source](../../tutorials/frank_read_src/frank_read_src_by_python.md) simulation as an example. DisNet represents the dislocation network as an undirected graph, meaning that if node A is connected to node B, then node B is also connected to node A. However, each edge carries a Burgers vector (as an attribute) that depends on from which node we refer to the edge (see below). ```{figure} DisNet_data_struct.png :alt: Data structure of DisNet :width: 640px ``` In this example, the DisNet represents a (prismatic) dislocation loop with 5 nodes and 5 edges (called segments). In DisNet, each node is uniquely specified by a ```Tag```, which is a tuple of two integers, ```(domainID, index)```, following the convention of ParaDiS. (In this example, the ```domainID``` of all nodes is zero.) The Tags of the 5 nodes are: (0,0), (0,1), (0,2), (0,3), (0,4). Each node also carries attributes: ```R``` (3D vector for its position) and ```constraint``` (integer, 0 for unconstraint, 7 for fixed). The tags and attributes for every node are represented by the yellow boxes in the figure above. Each segment in DisNet is specified by a tuple of tags specifying the nodes it connects with. For example, segment ((0,0), (0,1)) represents the segment connecting nodes (0,0) and (0,1). Since DisNet is an undirected graph, ((0,1), (0,0)) would refer to the same segment. Each segment has its attributes: ```burg_vec``` (3D vector for Burgers vector) and ```plane_normal``` (3D vector for glide plane normal). Importantly, the sign of the Burgers vector of a segment depends on the order of the nodes we use to refer to the segment. For example, the Burger vector of the above segment going from node (0,0) is (1,0,0). The Burgers vector of the same segment going from node (0,1) is (-1,0,0). (The Python function to retrieve its Burgers vector of a segment is burg_vec_from(self, from_tag), where ```from_tag``` specifies the node we are going from.) The tag pairs and attributes for every segment are represented by the green boxes in the figure above. Section [Explore Dislocation Network](../../tutorials/frank_read_src/frank_read_src_by_python.md#explore-dislocation-network) provides an example of how to interact with a DisNet object in Python.