Polynomial Invariant of Molecular Circuit Topology

The topological framework of circuit topology has recently been introduced to complement knot theory and to help in understanding the physics of molecular folding. Naturally evolved linear molecular chains, such as proteins and nucleic acids, often fold into 3D conformations with critical chain entanglements and local or global structural symmetries stabilised by formation contacts between different parts of the chain. Circuit topology captures the arrangements of intra-chain contacts within a given folded linear chain and allows for the classification and comparison of chains. Contacts keep chain segments in physical proximity and can be either mechanically hard attachments or soft entanglements that constrain a physical chain. Contrary to knot theory, which offers many established knot invariants, circuit invariants are just being developed. Here, we present polynomial invariants that are both efficient and sufficiently powerful to deal with any combination of soft and hard contacts. A computer implementation and table of chains with up to three contacts is also provided.


Introduction
Linear polymers are an important subset of macromolecules with critical roles in living organisms and are used in engineering applications [1]. A linear polymer is a molecular chain made of units, so called monomers. By changing the chemical properties of these monomers, one can make polymers with different physicochemical properties. This fundamental concept in chemistry has led to emergence of many synthetic polymers with various applications in medicine and industry. Living organisms however generate a wide range of linear polymers using a limited set of monomer chemistries. This is because biomolecular chains, such as proteins and nucleic acids, typically fold into 3D conformations which give the molecules new properties. Proteins can form various folded structures at various scales and with different symmetries by forming intra-chain contacts; proteins may also form knots and slipknots [2,3,1]. Inspired by biology, chemists have only recently started synthesizing folded molecular chains [4]. Molecular engineering typically uses a bottom-up approach which involves synthesizing basic fold units and then connecting them to generate complexity. Generating complex folded linear chains requires advancements in our synthetic methodology as well as suitable conceptual mathematical framework for characterization and comparison of topological complexity. The latter inspired the development of molecular circuit topology, a framework that categorizes the arrangement of contacts in a folded linear chain [5,6].
Circuit topology is inspired by physics of polymers and recognises that contacts restrain dynamics of a chain and keep segments in close proximity [7]. Topological arrangement of the contacts is closely related to kinetics of their formation [7,8]. Furthermore, chain entanglement may also restrain a physical chain and effectively stabilise certain folds. Let us consider a folded linear chain. To describe a folded chain in space there are roughly two aspects to address: First, intra-chain contacts or bonds that turn the chain into a special type of graph. Second, the chain sits in three dimensional space in a certain way, allowing it to form knots and tangles. Both the bonding and the tangling can constrain the chain. The first type, we call hard contacts (or H-contacts), while the second type we will describe in terms of soft contacts (or S-contacts). Circuit topology uses a uniform language to categorise the arrangement of hard and soft contacts.
In this article, we propose a precise mathematical model for folded chains called H-tangle diagrams. Tangles are a commonly used bottom-up approach to knot theory [9] and in this work we extend this approach to include hard contacts. An example of a H-tangle appears in Figure 1. H-tangles take into account both hard contacts (shown in black) and soft contacts where the chain constrains itself by a clasp. We describe an algorithm to assign to each H-tangle diagram D a certain polynomial called L 1(D). For example L 1 applied to the example in Figure 1 is The polynomial L 1 is a topological invariant of the folded chain in the sense that if H-tangle diagrams D and D represent the same folded chain, then L 1(D) = L 1(D ). In [10,11] other invariants of folded chains were proposed. The difference is that L 1 is easier to compute in practice while still being sufficiently powerful to distinguish many different configurations. A computer implementation of our algorithm appears in the Appendix A. Even though folded chains can take many forms, we can always bring them in a form such as that in Figure 1 called a generalized circuit topology diagram [11]. The chain runs horizontally from left to right, except for making a detour to make a soft or hard contact with another piece of the chain in a controlled way. In the case of knots a similar form appears in [12]. In the Appendix A we list all circuit diagrams with at most three contacts together with their corresponding value of L 1. There do exist several circuit topology diagrams for the same folded chain but in combination with our invariant this provides a first step towards classification of folded chains of low complexity.
The plan of the paper is to first describe some basic notions in circuit topology using hard contacts only. Historically, circuit topology was first introduced to classify such circuits. Next we review the knot theory techniques that are fundamental to handling soft contacts, this time ignoring hard contacts. We set up the Alexander polynomial invariant for knots and tangles in the form of Γ calculus. To include hard contacts in our tangle language we develop a theory of H-tangles that is similar to that of singular knots. The invariant L 1 is then introduced as a suitable extension of Γ calculus to H-tangles. Finally we present a special class of H-tangle diagrams especially suited for discussion of circuit topology and tabulate L 1 on those.

Circuit Topology
Perhaps the most fundamental aspect of a folded chain is the way it bonds to itself. In this section, we focus on this aspect only, ignoring for now how it sits in space. In other words we study the folded chain as an abstract directed graph, see for example the chain F in Figure 2. To describe such chains in general we enumerate the spots where the chain bonds to itself in order of appearance as one walks along the chain. Assuming each spot bonds with precisely one other spot there must be an even number of such spots that we can number 1, 2, . . . , 2n. In the example F, we chose n = 5 as there are five bonds. Each bond is described by the pair of integers {i, j} indicating the two locations involved. We often refer to such bonds as hard contacts when we want to emphasize the distinction with the knotting behaviour described in later sections.
Any folded chain is then described precisely by a partition of the integers 1, . . . 2n into n disjoint pairs. For example we describe F by .
In listing such examples our convention is to order the list of pairs lexicographically and refer to any bond by the spot where it first appears as one walks along the chain. In the mathematical literature such structures appear under the name chord diagrams [13].
At this point, we should emphasize that, contrary to the picture shown, the description F is completely abstract. In the picture the bond {1, 4} appears to pass in front of bond {2, 7} but this is not part of our mathematical description of the graph. So far the space around the graph has not been taken into account so there is no notion of behind or in front. Modelling and describing how abstract folded chains interact with ambient space is the subject of the next sections as it is considerably more difficult.
The starting point of circuit topology is to summarise the properties of folded chains in terms of these pairwise relationships of contacts. A pair of contacts can interact in precisely three ways that are shown in  For more complicated chains, such as F, we can record the relationship between each pair of contacts, ignoring the rest of the contacts. For F, we can describe the results in a table like the one given below. The order of first appearance along the chain together with the pairwise information is sufficient to reconstruct the whole chord diagram.
The matrix of partial relationships is more concise and was shown to be a good way to describe the behaviour of folded chains in practice [5,6].
Later in the paper, Section 7, we will use the above notation to introduce generalized circuit topology diagrams where each pair comes with a subscript 0, 1 or −1. If the subscript is 0 then the contact is hard as above, while the ±1 indicate a soft contact in the form of a left or right handed clasp. For example the diagram that appears in Figure 1 The circuit topology description of folded chains can thus be generalised to also include knotting and tangling effects, see [11]. We will see that any knotted folded chain can be described by a similar set of pairs of integers partitioning 1, 2 . . . 2n together with an index to specify the nature of the contact: hard or soft.

Knots and Tangles
Even when a chain does not bond to itself it can still be entangled, and provided we keep the endpoints fixed, such entanglement can constrain the chain as much as hard contacts would. There is a large literature on knot theory that deals with this special case and in the next two sections we briefly review some aspects that are necessary for our purposes. The reader is warned that we use slightly non-standard versions of the usual definitions. We start with an example and a definition of tangle diagrams.

Definition 1.
A tangle diagram is a finite directed graph whose edges are a disjoint union of oriented open paths called strands. Each strand carries a distinct label. Strands are allowed to meet only in special vertices called crossings that look like like one of the models shown in Figure 4. For a tangle diagram D, we often list the labels of its strands as a subscript. For example the diagram Di,j shown in Figure 5 has two strands named i and j. In drawing pictures the labels are sometimes suppressed.
The simplest tangle diagram is perhaps the crossing-less strand with label i, denoted by 1i. Next the positive crossing X t,b with t labeling the strand that is on top and b marking the strand that is at the bottom. Likewise the negative crossing with top strand t and bottom strand b is denoted X −1 t,b , see Figure 4. Any more complicated tangle diagram can be assembled from the above examples using the fundamental operations on diagrams shown in Figure 6: disjoint union and strand merging. This provides a convenient notation for tangle diagrams allowing us to compute and discuss them recursively.  First we denote by DE the disjoint union of diagrams D and E. Second, denote by D/ /m e,s r the diagram obtained from D by merging the end of strand e with the start of strand s, labelling the resulting strand r. By merging two strands we mean connecting them without introducing new crossings. D is also assumed to have strands labelled e, s and no strand labelled r. Mergings may not always be defined but when the ends are close together merging them does make sense.
For example the two strand tangle diagram Di,j shown in Figure 5 is denoted by The special case where a tangle diagram has a single strand is called a knot diagram, see, for example, Figure 7. Often the ends of a knot diagram are required to be connected to form a loop but we prefer to leave them open. A pair of tangle diagrams is said to be equivalent if they can be made equal by repeatedly making local replacements as shown in Figure 8. These replacements are commonly known as Reidemeister moves. The theorem of Reidemeister [14] asserts that tangle diagrams represent the same knot if and only if they are equivalent in the above sense. There are many more variants of the moves shown in the figure but these can all be realized as combinations of the ones shown [15].
Finally we introduce a short-hand notation to avoid long formulas For example the diagram for the trefoil knot Ti shown in Figure 7 can be described as Ti = X1,4X5,2X3,6/ /m 1,2,3,4,5,6 i .
(3) Figure 8: The Reidemeister moves. Two tangles that locally differ as in one of the pictures are considered to be equivalent.

Gamma-Calculus and the Alexander Polynomial
The fundamental difficulty of studying knots in terms of their diagrams is that there are many diagrams that represent the same knot. This is made precise in terms of the Reidemeister moves introduced in the previous section, see Figure 8. To obtain information about the knot using a diagram we need to compute a quantity that does not change when a Reidemeister move is applied. Such quantities are known as knot invariants.
In this section, we introduce one of the most useful knot invariants, called the Alexander polynomial. There are many ways to describe and compute the Alexander polynomial. Here we choose a recursive definition in terms of tangle diagrams that fits well with our notation for tangle diagrams. It is known as Γ calculus developed by Bar-Natan, see [16,17] and [18] (Section 9) for more context. Definition 2 (Γ-calculus). For a tangle diagram D whose strands are labelled by set L define Γ(D) = (ω, A) where A = i,j∈L Aijricj and for each i, j ∈ L the coefficients Aij and ω are rational functions in t.
rs,ce →r k ,c k (4) Here, ∂r e A means the partial derivative of A with respect to the variable re and the notation re, cs → 0 means we should set both re and cs to 0 and rs to r k and ce to c k . To see how this works in practice let us compute Γ(Di,j) where Dij is the tangle shown in Figure 5. It is efficient to start with the two-crossing tangle Kv,j = X1,4X2,3/ /m 1,3 j / /m 2,4 v and then build Dij by attaching the third crossing to K as follows (see also Figure 9) To compute Γ(Kv,j) we first compute Γ(X1,4X2,3) = using parts (2) and (4) of Definition 2. Then part (3) with e, s = 1, 3 tells us we should compute Applying part (3) once more with e, s = 2, 4 we find B24 = (1 − t) 2 and (∂r 2 B)( Now we are in a position to compute Γ(Dij) in just three more steps, taking disjoint union with X −1 6,0 and merging twice: Finally, merging for the last time, the determined reader will find Γ(Dij) = While instructive to do by hand once, these calculations tend to get a little tedious, so we recommend the reader to make use of a computer algebra package to do the calculations. See the Appendix A for a description of the algorithm in Mathematica. As the computations are conceptually very simple (only five lines of code!) it should be easy to implement the same algorithm in any other suitable language.
We summarize the main properties of the Γ calculus in the following: Theorem 1 (Γ is a tangle invariant generalizing Alexander [18]). Up to multiplication by a factor ±t k in the ω-part, Γ is an invariant of tangles. For tangles Ki with one strand (i.e., knots) we have Γ(Ki) = (∆K (t), rici), where ∆K is the Alexander polynomial of knot K.
To understand how the factors ±t k arise we note that the Alexander polynomial of knots has the same ambiguity. For Γ these factors arise because Γ does not give the same value on both sides of a Reidemeister 1 move. For example Γ(1i) = (1, rici) while Γ(X12/ /m 12 i ) = (t, rici), see Figure 10. The other Reidemeister moves can likewise be written algebraically and it can be checked that Γ yields the same result on both sides of each of the tangle equations representing Reidemeister 2 and 3. For example, Reidemeister 3 is written as: and it is easy to check (by computer) that indeed,

H-Tangle Diagrams
After warming up with knots we are now ready to introduce the topological framework for discussing folded chains: H-tangles. These are an extension of the tangles from the previous sections where the strands may now bond to each other, forming what we call hard contacts or H-contacts. The local structure of a H-contact is shown in Figure 11 (Left). Definition 3. A H-tangle diagram is the same as a tangle diagram except that one more type of vertex is allowed called a H-contact, see Figure 11 (Left). Each H-contact carries a label. Our notation for the Hvertex is H v u,d where u is the strand pointing upwards in the picture and d is the other strand. The superscript v denotes the label of the vertex.
One convenient way of labelling the H-contacts on a chain is by their first occurrence along the strand. When the H-contacts are not explicitly labeled, this labeling is assumed. An example of a H-tangle with one strand already appeared in Figure 1 in the introduction. Another example with one strand and two hard contacts appear in Figure 12.
The notion of H-tangle diagrams is very similar to that of singular knots and tangles [19] but not exactly the same. The difference is in how the strands pass through the vertex as is seen by comparing Figure 11  Left (H-vertex) and Middle (singular vertex). We also note that more complicated vertices can be modelled similarly to the proposed H-vertex, see for example, Figure 11 Right, but we will leave that for future work.
Most of the theory for the usual tangle diagrams as developed in the previous sections is still valid. For example, H-tangle diagrams can be assembled from the basic ones using disjoint union and merging. These operations are defined in precisely the same way as in the tangle case.
For example, coming back to our discussion of circuit topology the basic configurations S, P, X from The example E in Figure 12 is likewise expressed as: The most important part of our model of H-tangles is the type of Reidemeister move we allow. We model the hard contact H v u,d as a rigid square and so the only way it is allowed to interact with other strands is for strands to pass over or under the vertex. Two vertices are assumed to never be precisely on top of each other, just like crossings in a usual tangle diagram are not supposed to coincide. More formally, we say two H-tangle diagrams are equivalent if they can be made equal by repeatedly making local replacements as shown in Figure 13. We name these the Reidemeister 4 moves.
Since the H-contacts are assumed to be rigid we should remember to always bring the H-contacts in the correct position with one up and one down, rotating in the counter-clockwise direction. Contacts with other orientations can be modelled using a H-contact by adding crossings as shown in Figure 14.  We can also flip it over using either of the two pictures on the right.
It may not be immediately clear that the two pictures on the right of Figure 14 represent the same Htangle. This is demonstrated in the next Figure 15. The first step uses Reidemeisters 1-3 while the second uses Reidemeister 4 to pass the horizontal strands under the H-contact. The next equality is obtained by sliding the H-contact along the loop and the final step is like the first.
It should be noted that many variations on the notion of H-tangle introduced here are possible by adding more Reidemeister moves for the H-contact to satisfy. Each additional Reidemeister move would make the vertex more flexible. For example one could assume Hij = Hji which would give a theory equivalent to that of singular tangles. Indeed, this assumption would correspond to the fifth move for singular knots, see Ω5a on p. 3 of [19]. Another natural symmetry one could require is that the left-hand diagram of Figure 14  should be equivalent to that where the crossing is opposite. Since it is conceptually simplest we prefer to not assume any Reidemeister moves beyond the 4-th. In principle it is not difficult to adjust the theory by including an additional Reidemeister move but we leave this for future work.

The Double Gamma Invariant of H-Tangles
In this section, we aim to extend Γ-calculus to H-tangles. We first try the most direct approach and show its limitations. Next we propose a more powerful version of Γ called L that is more suitable for working with H-tangles.
The key idea of Γ calculus is to assign a pair (ω, A) to any tangle where A has as many r-variables as the number strands in the tangle. Since Γ(Hij) involves two strands, we assign to it a value of the form: for some functions p0, p1, p2, p3, p4 of t and a that are yet to be determined.
To ensure that Γ takes the same value on equivalent H-tangle diagrams, it suffices to choose the value Γ(H a ij ) so that the Reidemeister 4 equations are satisfied. The Reidemeister 4 moves appeared in Figure 13, here we wrote them algebraically and applied Γ to both sides: Since we can explicitly compute both sides using Γ calculus, it is left to the reader to solve these equations for p0, . . . p4 and verify (By computer would be most convenient!) that they are equivalent to p2 = 1 − p1, p3 = 1 − p1, p4 = p1.
As a consequence we can compute what a single H-vertex connected to itself, see Figure 16 (Left) evaluates to: Γ(H a 1,2 / /m 12 i ) = (p0p1, rici). This is problematic because it follows that for any diagram Yj Γ takes the same value on the two configurations in the middle and right of Figure 16. In particular this implies that Γ cannot distinguish the two H-tangles S, P representing two of the basic pair configurations in circuit topology (see

5.
L where µ was defined in Definition 2.
As the rules for L are very similar to those of Γ-calculus, we do not work out any examples step by step but instead refer the reader to the computer code in the Appendix A. For example for the H-tangle E from Figure 12 the value of L is: .
The problematic H-tangle B discussed at the start of this section that Γ fails to handle properly also has a non-trivial L value: The second part of L (D) = (ω, A) is often quite lengthly so we often just list the ω-part and use the notation L 1(D) = ω. In fact this notation was already used in the introduction where L 1 of the H-tangle from Figure 1 was listed. As expected L 1 also distinguishes the three basic pair interactions S, P, X of circuit topology. Labelling the H-contacts in order of appearance as one walks the chain we find As with the usual Γ calculus, there is a minor ambiguity in L 1 due to fact that it is not invariant under Reidemeister 1.
L 1 should always be taken up to multiplication by a factor ±t k . Actually the situation with Reidemeister 1 is a bit more serious this time and to make L an invariant we should always use 0-framed H-tangle diagrams. We say an H-tangle diagram is 0-framed if after cutting out the H-vertices, all the remaining pieces of strand have writhe 0. Recall that the writhe of a strand is the sum of the signs of all the crossings of the strand with itself. This is not a serious restriction as any diagram can be modified to have writhe 0 by inserting curls where necessary using the Reidemeister 1 move.

Theorem 2 (
L is an invariant of H-tangles). If two 0-framed H-tangle diagrams D, E are equivalent then L (D) = L (E) (up to a factor ±t k in the L 1 parts). If K is a knot diagram, then L 1(K ) = ∆K (t 2 ), that is, the Alexander polynomial of the knot at t 2 .
Proof. Like ordinary Γ calculus, the proof of invariance under the Reidemeister moves can be carried out by computer. One simply has to verify that both sides of all Reidemeister moves yield the same result after applying L . We already sketched above that in the case of Reidemeister 1, one needs to correct for the framing and an ambiguity of a factor ±t k will arise in the ω part.
When no H-contacts are present it can be verified that L is just Γ applied to the double of a knot. By the double, we mean that a parallel strand is added next to the existing strand. It is well-known that the Alexander polynomial of the doubled knot is the Alexander polynomial of the original taken at t 2 , see for example Chapter 8 of [14].

The invariant
L is new but as we said it is closely related to Γ-calculus, not just for knots. To obtain the rules for L calculus we applied Γ calculus to the H-tangle in which each strand was doubled. The value for the H-contact is however not of this type but rather found by the method of undetermined coefficients, imposing all the necessary Reidemeister moves. Imposing the Reidemeister moves does not determine all coefficients so the remaining ones were chosen in a way to at least distinguish the basic examples listed in the tables but not involve too many additional variables.

Generalized Ciruit Topology
So far, we have have modelled folded chains using H-tangles that have a single strand and we developed a topological invariant L of these objects. In circuit topology a chain is described by its contacts. The hard contacts are obvious in a H-tangle but the concept of soft contacts is less clear. In [11] four types of soft contacts were proposed as the four simplest ways a single strand can knot itself, see Figure 17. These coincide with all the possible knots one can tie in which the projection has only four crossings.
In this work, we approach the notion of soft contact from a tangle point of view. This means that we temporarily allow ourselves to think of the chain as being composed of several strands. This simplifies matters because two strands can interlock non-trivially already with only two crossings. The simplest way two strands can interlock is the clasp, shown in Figure 18. Like the crossing there is a positive and a negative version of the clasp. In what follows we will refer to either of them as a (soft) clasp contact.
The clasp contacts are universal in the sense that attaching a clasp next to a crossing causes the crossing to change sign, see Figure 19. This means any other soft contact or really any tangle must be expressible  using clasps only. For example the four model configurations of soft contacts from [11], Figure 17, correspond precisely to the non-trivial combinations of two clasps. In Figure 20, we sketch more precisely how the first of the four soft contacts may explicitly be converted to the standard clasp diagram form of Defintion 5 given below. The three others can be done in precisely the same way. Even when restricting soft contacts to just be clasps the number of ways to combine clasps to get the same tangle is enormous making it hard to discern any clear structure from them directly. To talk about circuit topology more concretely we prefer a more rigid type of diagrams where the contacts interact in a very simple way. We call such diagrams generalized circuit topology diagrams (gCT diagrams). In the case of tangles, such diagrams appeared in [12] under the name descending clasp diagrams. We basically write the chain as a horizontal line that is interrupted by arcs representing contacts.  Figure 21. Whenever a < c < b < d the lines corresponding to pairs {a, b} and {c, d} will cross the {a, b} contact is assumed to be in front. No other crossings appear.
Examples of gCT diagrams already appeared in Figures 1 and 2. The notation for these diagrams is respectively. Also the soft contacts from Figure 17 were factored into two claps using the reasoning in Figure 20 and in the gCT notation we thus find: To get a sense of what gCT diagrams look like in general we show a randomly chosen gCT diagrams with 20 contacts in Figure 22. In gCT notation it is   As a justification for restricting to gCT diagrams, we claim that planar H-tangle diagrams can be represented this way. By planar we mean that viewed as a decorated graph whose vertices are crossings and H-vertices it can be drawn in the plane. All H-tangle diagrams that are actual projections of threedimensional chains are planar. Planar in the sense of the underlying graph, it can of course have crossings. Usually the planarity condition is part of the definition of a tangle diagram, however since it is not needed for L we preferred to work a little more generally.

Theorem 3 ([12]). Any planar H-tangle diagram with a single strand is equivalent to a gCT diagram.
This theorem is due to [12] although their argument is given for usual tangles they make it clear the same technique works for singular knots and also H-tangles. A first hint of why it works is that inserting a clasp contact near a crossing changes the sign of that crossing as shown in Figure 19. This implies that we can freely change the crossings of our H-tangle diagram at the cost of inserting clasp contacts. This way all the complicated knots and tangles can be 'factored' into simple clasp contacts. The hard contacts will remain and the clasp contacts may interlace in complicated ways but by changing some more crossings we can simplify further until a gCT diagram remains. An illustration of this argument in a very simple case already appeared in Figure 20. A precise argument using the pure braid group would take us too far afield and for that and more we refer to [12].
While convenient and interesting to study, the reader is warned that such diagrams are not necessarily unique. In fact in [12] a complete set of moves relating equivalent gCT diagrams is suggested in the knot case and we suspect this too holds in the H-tangle setting. Like the Reidemeister moves themselves these moves are sufficiently complicated that it is still essential to compute knot invariants such as L for distinguishing gCT diagrams.
Many natural operations in both circuit topology and tangle theory can easily be handled in terms of gCT diagrams. To give one simple example, the H-H interactions studied in [10] can be described precisely as follows. Suppose we have two hard contacts that are interacting by a soft (clasp) contact as Figure 23 Left. Assuming the two contacts are in series we can just slide the soft (clasp) contact off the arcs and turn it into an additional arc in the gCT diagram, shown on the right of the figure. This means inserting soft (clasp) contacts like this can be done entirely on the level of gCT diagrams. We end this section by listing all 27 gCT diagrams with at most two contacts, see Figure 24. For each diagram we also list its gCT notation. The hard contacts of a gCT diagram are always labelled in order of first appearance as one travels along the strand. For the i-th hard contact we used the variable hi in our expression for L 1. Except for the pair of mirror image trefoil knots {{1, 3}1, {2, 4}1} and {{1, 3}−1, {2, 4}−1} diagrams with the same value of L 1 are in fact equivalent. It is well known that the Alexander polynomial does not distinguish mirror images of knots. The ambiguity in multiplication by a power of t has been used to make sure the lowest power of t is always t 0 .
The first eight diagrams in the table are all gCT diagrams on which L 1 takes the value 1. Using Reidemeister moves or perhaps with the help of a rope the reader should be able to verify that each of them is in fact equivalent to the standard unknot diagram: a straight line with no contacts. Of the diagrams that come after we now know for sure that they are not equivalent to the unknot as L 1 takes a value different from 1.
In the Appendix A a similar table for all gCT diagrams with three contacts is given. These tables show that L 1 is able to distinguish a lot of relevant cases. A table for all gCT diagrams with four contacts is also feasible but more and more equivalent gCT diagrams will appear and additional restrictions should be enforced to obtain a useful table.

Conclusions and Further Directions
Generalized circuit topology studies folded linear molecular chains, taking into account both the way the chain bonds to itself (to form hard contacts) and the way it tangles in space (to form soft contacts or clasps). In this study, we provided a theoretical basis for the language of circuit topology. For such chains and their corresponding topological circuits, we furthermore introduced a new topological invariant L that summarizes much of the essential topological features into a single polynomial. A simple computer implementation of the computation of the invariant was given in the Appendix A as well as a complete table of the values of the invariant on all generalized circuit topology diagrams with at most three contacts.
In future work it may be of interest to consider additional topological features such as rigid beads (vertices of valency two) and vertices of higher valency. The alpha helices and beta sheets found in proteins would be an example of an application. Any such object may be modelled by some version of Γ-calculus. The general technique is always to first specify the appropriate Reidemeister moves, to describe how our objects are supposed to move and interact. Next we propose some general form with undetermined coefficients for our new objects. Applying Γ to both sides of the Reidemeister moves yields algebraic equations for the coefficients that may be used to determine them. Γ calculus is by no means the only knot invariant that could be extended to molecular chains. The techniques used here are appropriate for a wide class of knot invariants known as universal knot invariants [20]. Roughly speaking there is an invariant for any ribbon algebra and the basic idea is to place special algebra elements on the strands of the knot near each crossing and then multiply. The Γ-calculus is an example of such invariants for a particular algebra [21,17] but depending on the task at hand other algebras may be more convenient. For example if one would need a higher resolution than the one given by L one good option is to choose the polynomial time knot polynomials of [21]. So far these invariants have been introduced for tangles only but following the ideas of the present paper an extension to H-tangles seems possible. Unlike the more well known strong invariants, such as the Jones polynomial, Khovanov and Floer homology, the polynomial time knot polynomials are still relatively efficient to compute, allowing for real world applications. In future work we plan investigate such invariants for molecular chains.
We have established a good way of distinguishing and manipulating folded linear molecular chains but many exciting challenges remain. Especially relevant for applications seems to be the design of a workable notion of relative topological distance between two given chains. This allows for mapping the topological evolution of biomolecular folds and the development of useful reaction coordinates for monitoring molecular folding reactions.

A Implementation and Table
In this appendix we present implementations of Γ and L in Mathematica [22]. We also give a few examples of how the code is used in practice. Finally a further table of gCT diagrams is provided. All the code can be downloaded from the second author's website : www.rolandvdv.nl/gCT (accessed September 2021) Figure 24: All 27 generalized circuit topology diagrams with two contacts, with their notation and value of L

1.
A.1 Implementation for Γ Γ calculus is simple enough for the complete implementation to fit five lines of Mathematica code as shown below. The code remains quite close to the mathematics. A minor deviation is that pairs (ω, A) are represented as Γ[ω, A]. The first line of code implements disjoint union. The second line makes sure ω is always in its simplest form and A should be written as a quadratic in r, c with coefficients that are functions of t. The remaining lines determine the merging and the value on the crossings. For simplicity we write Xij instead of Γ(Xij) and X −1 is written more compactly asX. The effect of merging strands i, j is written as µ i,j→k .
Γt -t 2 + t 3 , c 1 r 1  Figure 26: Two examples of how to run the Γ program.

A.2 Mathematica Implementation for L
The implementation of L is very similar to that of Γ and builds on top of it. The key difference is that this time we require all strand labels to be positive in the sense that for each label i the label −i is supposed to be distinct and not yet occupied.
Pairs   Γ[1, t c -a r -a + (1 -t) c -b r -a + (t -h t) c -b r a + h c b r a + (1 -t) c -a r -b +   c a r -b + (-t + h t) c -b r -b + (1 -h)  To illustrate that the proof of invariance of L is indeed automatic we provide the code to check an instance of Reidemeister 3 and 4. The other equations can (and should) be checked similarly by computer.