Junction-Producing Algorithm Connecting Carbon Nanotube to Carbon Nanocone to Obtain Funnel-Like Nanostructure: Nanochimney Generator

This study aims to provide a computational algorithm which contributes to the understanding and implementation of carbon nanochimneys. The structure resembles a tube ending with an inverted funnel, with a connection region that uses non-hexagonal rings as defects in order to match the boundaries of the two linked nanostructures. They are important for applications such as thermal transport, gas storage, or separation. The algorithm is written in Python 3.7 and provides a .pdb file with the coordinates of all the atoms included in the system. The parameters that can be specified are the carbon nanotube dimensions, for either armchair or zigzag conformations, five levels of disclination for the carbon nanocone along with the base diameter of the latter.

Ge and Sattler [9]. This structure is chemically stable and has superior electrical conductivity. CNC has shown promising potential for applications such as hydrogen storage, sensors, and electronic devices.
In terms of experimental investigations, CNCh currently lacks activity concerning its synthetization. The closest fabricated carbon nanostructure is the PG, which has been synthesized in various ways with various degrees of success and controlled replication. Because there are no experimental trials offering proof of the way the junction between CNT and CNC assembles, this study proposed a theoretical model for realizing the connection between the two carbon allotropes.
Studying CNCh is a novel and promising field. In contrast to PG, there has been no reported successful fabrication of such nanostructures in the laboratory. Consequently, in silico experiments are expected to provide the adequate environment for investigations related to CNCh. However, computationally generating such molecular models may prove difficult, even more so when referring to large numbers. More specifically, the complexity arises at the junction zone in-between the two carbon allotropes, where connections have to be made between the carbon atoms based on justified rules. This study proposes a rationale for the pairing of different carbon atoms, resulting in bonds that maintain the sp 2 network. In short, this algorithm connects a CNT to a CNC given they are compatible through having the same number of dangling bonds. In the case of large structures, or a large number of smaller ones, it would be very tedious to either count or connect each carbon atom at the edge of each carbon allotrope that is a dangling bond. Therefore, providing an algorithm that can automatically follow the procedure can help computational research start larger investigations, which are also less prone to errors in generating accurate models.
Currently, there are no automated algorithms that can generate CNCh. Furthermore, there are no similar computational or discrete mathematical algorithms that connect carbon nanotubes to carbon nanocones. The most popular junction type approached by studies and algorithms is the one between two CNT with different diameters. Melchor and Dobado have created CoNTub [10], an algorithm which accurately generates junctions based on models such as Dunlap's knee. CoNTub was further extended to a 2.0 version that allows the creation of a simultaneous joining of three CNT [11]. Furthermore, there are software programs able to create a large variety of carbon nanostructures, however none address the construction and implementation of CNCh. Additionally, there are codes available that generate PG, such as the one produced by Zhang, Ren, Ye, and Dong [12], which directly connects the graphene sheet to a CNT, with the drawback of creating a sharp junction. The automated algorithms are usually based on complex or simpler mathematical models that describe the junctions from a theoretical perspective. In contrast, there are few studies examining the junction specific to CNCh. Baowan, Cox, and Hill [13] have analyzed a related structure from a continuous mathematics viewpoint by joining one end of the CNT to the base of the CNC. However, the provided results do not address the practical constraints of the nanostructures, such as atom positions, bond lengths or bonds count. Conclusively, the algorithm presented in this paper is currently the only automated algorithm generating CNCh. Presently, the literature contributes little mathematical study on the subject. This algorithm allows for a systematic generation of CNCh composed out of an armchair or a zigzag CNT and a CNC. The dimensions of the components are only restricted by a lower limit (i.e., (4,4) or (8,0) carbon nanotubes with length higher or equal to 1 nm) and the created models are exported to a .pdb file. As such, the output is easily usable by many software packages. Automatic generation of the nanostructure is done in a timely manner and requires few Python libraries. This algorithm provides a stepping stone for the study of CNCh and offers a precise description of the junction between a CNT and a CNC.
Furthermore, this algorithm can enhance the studying of CNCh and can be employed for generating a less sudden transition between the graphene sheet and the CNT. This implies that large differences between the diameters of the latter two could potentially be applied. Given a confirmed compatibility, the CNC can provide five different levels of steepness and a desired base diameter. Consequently, a tunnel ending in a funnel-like structure is obtained. The proposed junction between the two carbon allotropes is based on either hexagonal or non-hexagonal rings, such as: squares, pentagons, heptagons, octagons, nonagons and decagons. The code is free and open-source and has been written in Python 3.7. It provides a .pdb file with the coordinates of all the atoms included in the system. The parameters that can be controlled are CNT's chirality indices and length, the level of steepness of the CNC and its base diameter.

Materials and Methods
The algorithm aims to automatically generate CNCh structures including an armchair or zigzag CNT and a compatible CNC, all of customized parameters (i.e., chirality indices of the former, disclination level of the latter) that can be further optimized and studied with computational methods. The code written in Python 3.7 for this algorithm can be found in the Supplementary Materials. The complete process can be split into three different stages, namely: the input stage, the components generation stage, and the junction generation phase. Figure 1 displays each of the aforementioned steps, while the algorithm as a whole follows the steps described in the flowchart exhibited in Figure 2.
Coatings 2020, 10, x FOR PEER REVIEW 3 of 16 Coatings 2020, 10, x; doi: FOR PEER REVIEW www.mdpi.com/journal/coatings been written in Python 3.7. It provides a .pdb file with the coordinates of all the atoms included in the system. The parameters that can be controlled are CNT's chirality indices and length, the level of steepness of the CNC and its base diameter.

Materials and Methods
The algorithm aims to automatically generate CNCh structures including an armchair or zigzag CNT and a compatible CNC, all of customized parameters (i.e., chirality indices of the former, disclination level of the latter) that can be further optimized and studied with computational methods. The code written in Python 3.7 for this algorithm can be found in the Supplementary Materials. The complete process can be split into three different stages, namely: the input stage, the components generation stage, and the junction generation phase. Figure 1 displays each of the aforementioned steps, while the algorithm as a whole follows the steps described in the flowchart exhibited in Figure 2.    Firstly, as it can be seen in Figure 2, the algorithm starts with the description of the desired carbon allotropes in the input stage. Given their valid compatibility, they are computationally generated following certain protocols in the components generation stage. In the last stage, the models are aligned on top of each other. Special cases may arise due to significant height differences between the dangling bonds at the top of the CNC. The algorithm then follows a proposed rationale for designing auxiliary structures that would help reduce the created additional distances between certain carbon atoms, however in extreme cases of large height differences the junction may be rendered fruitless. The output file is built at the very end, when all atoms in the junction have been generated.

Input Stage
The algorithm relies on several input parameters. First of all, it is necessary to provide the chirality indices and the length in nm of the CNT. The allowed conformations of the latter are either armchair with (n,n) chirality indices or zigzag with (n,0) chirality indices. Subsequently, the values for the base diameter in Å and disclination level (1 to 5) value of the CNC are required. Subsequently, the algorithm verifies the compatibility of the CNC for creating the CNCh by checking that an equal number of dangling bonds is possible for both nanostructures. Once all the input values are specified, the algorithm proceeds to the next stage of the protocol.

Components Generation Phase
Each component is generated individually and is later built into the system. The initial element is a virtual graphene sheet (VGS) that is used for the creation of all the other structures.

Virtual Graphene Sheet
The VGS is generated based on the approach used by Rupasinghe, Mufthas, and Perera [14] in which each row of atoms is built line by line. More precisely, depending on the introduced input values, the dimensions in Angstrom of the virtual graphene sheet, with H for its height and W for its width, are calculated so that a square sheet is obtained with a virtually sufficient size to accommodate both the construction of a CNT and the generation of a CNC. Firstly, as it can be seen in Figure 2, the algorithm starts with the description of the desired carbon allotropes in the input stage. Given their valid compatibility, they are computationally generated following certain protocols in the components generation stage. In the last stage, the models are aligned on top of each other. Special cases may arise due to significant height differences between the dangling bonds at the top of the CNC. The algorithm then follows a proposed rationale for designing auxiliary structures that would help reduce the created additional distances between certain carbon atoms, however in extreme cases of large height differences the junction may be rendered fruitless. The output file is built at the very end, when all atoms in the junction have been generated.

Input Stage
The algorithm relies on several input parameters. First of all, it is necessary to provide the chirality indices and the length in nm of the CNT. The allowed conformations of the latter are either armchair with (n,n) chirality indices or zigzag with (n,0) chirality indices. Subsequently, the values for the base diameter in Å and disclination level (1 to 5) value of the CNC are required. Subsequently, the algorithm verifies the compatibility of the CNC for creating the CNCh by checking that an equal number of dangling bonds is possible for both nanostructures. Once all the input values are specified, the algorithm proceeds to the next stage of the protocol.

Components Generation Phase
Each component is generated individually and is later built into the system. The initial element is a virtual graphene sheet (VGS) that is used for the creation of all the other structures.

Virtual Graphene Sheet
The VGS is generated based on the approach used by Rupasinghe, Mufthas, and Perera [14] in which each row of atoms is built line by line. More precisely, depending on the introduced input values, the dimensions in Angstrom of the virtual graphene sheet, with H for its height and W for its width, are calculated so that a square sheet is obtained with a virtually sufficient size to accommodate both the construction of a CNT and the generation of a CNC.
Based on a hexagonal ring's bond lengths and angles, the number of rows and columns denoted by a certain maximum number of rings on each direction is determined independently in accordance with the calculated graphene dimensions. The VGS conformation is set to "zigzag", without affecting the outcome of the algorithm. These numbers are calculated as follows: (1) where N r−column is the number of rings on columns, N r−row is the number of rings on rows, the ceiling square brackets refer to the result of the fraction rounded up to the nearest integer, H and W are the height and width dimensions in Å of the VGS, 2.46 is the distance between two vertical adjacent unconnected atoms in Å, and 2.84 is the distance between two horizontal adjacent unconnected atoms in Å. Furthermore, the process of creating the sheet uses only positive coordinates (x,y) and proceeds by considering the very first line of atoms at the bottom of the to-be-created sheet. This first line of atoms was considered an even line, while the next one was referred to as odd. Splitting lines this way may seem counterintuitive, however this does not restrict the algorithm in any way, as it was purely for convenience given that the first index in a Python array is 0. In an analogous manner, the building of the graphene sheet can start with a line called odd line and end with an even line, or any other pair of descriptors. Figure 3 describes the construction process of the VGS. Based on a hexagonal ring's bond lengths and angles, the number of rows and columns denoted by a certain maximum number of rings on each direction is determined independently in accordance with the calculated graphene dimensions. The VGS conformation is set to "zigzag", without affecting the outcome of the algorithm. These numbers are calculated as follows: (1) where Nr−column is the number of rings on columns, Nr−row is the number of rings on rows, the ceiling square brackets refer to the result of the fraction rounded up to the nearest integer, H and W are the height and width dimensions in Å of the VGS, 2.46 is the distance between two vertical adjacent unconnected atoms in Å, and 2.84 is the distance between two horizontal adjacent unconnected atoms in Å. Furthermore, the process of creating the sheet uses only positive coordinates (x,y) and proceeds by considering the very first line of atoms at the bottom of the to-be-created sheet. This first line of atoms was considered an even line, while the next one was referred to as odd. Splitting lines this way may seem counterintuitive, however this does not restrict the algorithm in any way, as it was purely for convenience given that the first index in a Python array is 0. In an analogous manner, the building of the graphene sheet can start with a line called odd line and end with an even line, or any other pair of descriptors. Figure 3 describes the construction process of the VGS. In Figure 4 there are 3 rows and 5 columns, which in turn implies that there are 5 hexagonal rings per row and 3 per column. The bottom line covers the very first chain of atoms of the VGS. Each atom is placed individually, until the maximum number of atoms is reached. The latter is calculated for each line, depending on the line's position: bottom, middle, or top. For the former, the number of atoms is found as follows: where Na is the number of atoms, the floor square brackets refer to the result of the fraction rounded down to the nearest integer, and Nr−row is the number of rings on rows. In Figure 4 there are 3 rows and 5 columns, which in turn implies that there are 5 hexagonal rings per row and 3 per column. The bottom line covers the very first chain of atoms of the VGS. Each atom is placed individually, until the maximum number of atoms is reached. The latter is calculated for each line, depending on the line's position: bottom, middle, or top. For the former, the number of atoms is found as follows: where N a is the number of atoms, the floor square brackets refer to the result of the fraction rounded down to the nearest integer, and N r−row is the number of rings on rows.  Furthermore, for the lines of atoms that are neither first nor last, the formula to determine the maximum number of atoms is: where Na is the number of atoms, and Nr−row is the number of rings on rows. Lastly, the maximum number of atoms for the top line of atoms is calculated as: where Na is the number of atoms, the floor square brackets refer to the result of the fraction rounded down to the nearest integer, and Nr−row is the number of rings on rows. This process is complete once the last atom's coordinates have been recorded.

Virtual Graphene Nanoribbon
The virtual graphene nanoribbon (VGN) represents the preparatory step before the actual creation of the CNT. More specifically, a rectangle is drawn across the VGS and all the atoms bounded by the newly formed shape are further transformed into CNT coordinates. This process starts by representing the input value of the chirality vector ( ⃗ ), based on the following formula: where ⃗ is the chirality vector of the CNT, ⃗ and ⃗ are the atom vectors on the VGS, and n and m are the chirality vectors of the CNT. Vectors ⃗ and ⃗ are specific to graphene and can be seen in Figure 4. Vector ⃗ is rotated by 60° from vector ⃗. An armchair CNT would have a flat chirality vector, while a zigzag one would have an ascending chirality vector, as displayed in Figure 4. Vector ⃗ is perpendicular to the latter and extends as far as the input length of the CNT.
Without restricting the outcome of the algorithm, for convenience in case of a zigzag CNT, the starting point of the vectors was chosen such that the leftmost ending point of the T vector would remain within positive coordinates.

Carbon Nanotube
The CNT was generated following the approach of Rupasinghe et al. [14]. All the carbon atoms bounded by the VGN are considered and have their coordinates transformed. Therefore, all atoms with coordinates (x,y) such that: with β, γ ∈ 0,1 Furthermore, for the lines of atoms that are neither first nor last, the formula to determine the maximum number of atoms is: where N a is the number of atoms, and N r−row is the number of rings on rows. Lastly, the maximum number of atoms for the top line of atoms is calculated as: where N a is the number of atoms, the floor square brackets refer to the result of the fraction rounded down to the nearest integer, and N r−row is the number of rings on rows. This process is complete once the last atom's coordinates have been recorded.

Virtual Graphene Nanoribbon
The virtual graphene nanoribbon (VGN) represents the preparatory step before the actual creation of the CNT. More specifically, a rectangle is drawn across the VGS and all the atoms bounded by the newly formed shape are further transformed into CNT coordinates. This process starts by representing the input value of the chirality vector ( − − → Ch ), based on the following formula: where − − → Ch is the chirality vector of the CNT, Without restricting the outcome of the algorithm, for convenience in case of a zigzag CNT, the starting point of the vectors was chosen such that the leftmost ending point of the T vector would remain within positive coordinates.

Carbon Nanotube
The CNT was generated following the approach of Rupasinghe et al. [14]. All the carbon atoms bounded by the VGN are considered and have their coordinates transformed. Therefore, all atoms with coordinates (x,y) such that: with β, γ ∈ [0, 1] where x and y are the coordinates of the atoms on the VGN, − − → Ch is the chirality vector of the CNT, → T is the perpendicular vector to − − → Ch , and β and γ are mathematical coefficient between 0 and 1. Are attributed the following 3D (x,y,z) coordinates: where x CNT , y CNT and z CNT are the coordinates of the CNT, r CNT is the radius of the CNT, This creates a CNT with a diameter of: where d CNT is the diameter of the CNT, and n and m are the chirality indices of the CNT.

Virtual Graphene Disk
The virtual graphene disk (VGD) initially starts with the same VGS previously created. The process implies an annotation or indexing of certain atoms, rather than generating a new shape. The center of a central hexagonal ring on the VGS is first selected, and then the indexing procedure takes place as follows: • The atoms of the central hexagonal ring are each annotated with 1, representing their belonging to the first loop of connected atoms. • Subsequently, one step back is taken each time and the loop of sideways connected atoms is annotated with the next number.

•
This process is continued until the required index number is reached. Figure 5 shows the annotation of the circular loops on the VGS, resembling a VGD. The required index number is based on the following considerations. The number of dangling bonds for the CNT, which are carbon atoms connected to less than three other atoms, is equal to: where db CNT is the number of dangling bonds of the CNT, and n and m are the chirality indices of the CNT. In order for the two carbon allotropes to be compatible, it is best for the number of dangling bonds at the top of the CNC to be equal to the one of the CNT. From Figure 5 it can be easily seen that the green colored atoms, which are actually the dangling bonds, can be written according to the index number and the level of disclination: where db CNC is the number of dangling bonds of the CNC, dL CNC is the disclination level of the CNC, and index is the coefficient calculated as the index of the last loop of sideways connected atoms on the VGD. Therefore, the required index number is found in accordance with the previous formula. Following this procedure, only certain CNC are compatible with given CNT.

Carbon Nanocone
The CNC can be easily built according to indexed circular loops. More precisely, all the atoms belonging to a smaller index than the required index number are deleted. Furthermore, all atoms belonging to a larger index than the calculated one corresponding to the value of the input of the maximum base diameter. The remaining atoms have their coordinates transformed into 3D (x,y,z) coordinates according to the method presented by Ansari, Momen, Rouhi, and Ajori [15]: where xCNT, yCNT and zCNT are the CNC coordinates, k is the distance from the center of VGD to the

Carbon Nanocone
The CNC can be easily built according to indexed circular loops. More precisely, all the atoms belonging to a smaller index than the required index number are deleted. Furthermore, all atoms belonging to a larger index than the calculated one corresponding to the value of the input of the maximum base diameter. The remaining atoms have their coordinates transformed into 3D (x,y,z) coordinates according to the method presented by Ansari, Momen, Rouhi, and Ajori [15]: where x CNT , y CNT and z CNT are the CNC coordinates, k is the distance from the center of VGD to the atom on the VGD, ϕ is the disclination angle of the CNC, and α is the angle formed by the atom on the VGD with the center point of the VGD.

Junction Generation Stage
The junction zone between a CNT and a CNC firstly requires the same number of dangling bonds. As aforementioned, only some CNC are compatible for the connection. This is verified by the algorithm according to the introduced input parameters. Furthermore, the two structures are rotated in the (x,y) plane so that an alignment is reached, while maintaining the same center. The configuration is chosen so that one dangling bond of the CNT is aligned with a dangling bond of the CNC by having the same angle as measured from the center. Once the pair of dangling bonds is chosen, all the atoms of the CNC are rotated in the (x,y) plane with the following formula: where New x and New y are the new (x,y) coordinates, x and y are the old (x,y) coordinates, and θ is the angle of rotation. Afterwards, the zone of connection varies, but is always equivalent to a junction between either an armchair CNT and a zigzag CNT, an armchair CNT and another armchair CNT or a zigzag CNT and another zigzag CNT. For the junction zone equivalent to one between an armchair and a zigzag CNT, the chosen geometry is the one found by Chico et al. [16], which forms adjacent heptagons to pentagons and hexagons. Figure 6 shows all the possible junction zones.
Coatings 2020, 10, x FOR PEER REVIEW 9 of 16 in the (x,y) plane so that an alignment is reached, while maintaining the same center. The configuration is chosen so that one dangling bond of the CNT is aligned with a dangling bond of the CNC by having the same angle as measured from the center. Once the pair of dangling bonds is chosen, all the atoms of the CNC are rotated in the (x,y) plane with the following formula: where New x and New y are the new (x,y) coordinates, x and y are the old (x,y) coordinates, and θ is the angle of rotation. Afterwards, the zone of connection varies, but is always equivalent to a junction between either an armchair CNT and a zigzag CNT, an armchair CNT and another armchair CNT or a zigzag CNT and another zigzag CNT. For the junction zone equivalent to one between an armchair and a zigzag CNT, the chosen geometry is the one found by Chico et al. [16], which forms adjacent heptagons to pentagons and hexagons. Figure 6 shows all the possible junction zones. However, once both the CNT and the CNC are available, there are cases in which the zcoordinates of dangling bonds of the CNC vary significantly. Given the fact that the z-coordinates of all dangling bonds of the CNT are identical, this means that the bond lengths with the atoms present in the junction may also vary by a wide margin. This is addressed by building auxiliary structures downwards from the CNT. In the case of an armchair CNT, the auxiliary structures are built by creating new hexagonal rings. Two non-adjacent dangling bonds are selected, and a new hexagonal ring is constructed together with the atoms above them by placing two atoms below the latter at the corresponding height. The newly placed atoms become the dangling bonds instead of the ones from which the ring was created. In the case of a zigzag CNT, the auxiliary structures are built using a step by step process. First of all, the dangling bonds are added two atoms below them so that a pentagon However, once both the CNT and the CNC are available, there are cases in which the z-coordinates of dangling bonds of the CNC vary significantly. Given the fact that the z-coordinates of all dangling bonds of the CNT are identical, this means that the bond lengths with the atoms present in the junction may also vary by a wide margin. This is addressed by building auxiliary structures downwards from the CNT. In the case of an armchair CNT, the auxiliary structures are built by creating new hexagonal rings. Two non-adjacent dangling bonds are selected, and a new hexagonal ring is constructed together with the atoms above them by placing two atoms below the latter at the corresponding height. The newly placed atoms become the dangling bonds instead of the ones from which the ring was created. In the case of a zigzag CNT, the auxiliary structures are built using a step by step process. First of all, the dangling bonds are added two atoms below them so that a pentagon ring is formed. If another adjacent dangling bond requires an auxiliary structure, then another adjacent pentagon ring is formed with one previously placed atom part of the first pentagon. In such a case, depending on the actual position with respect to the CNC, the first or second pentagon is transformed into a hexagon ring by adding another atom below the newly added two. A special case appears where in the zone of connection, the CNC resembles an armchair CNT. Specifically, given its initial auxiliary pentagon, the ring is then transformed into a heptagon or zigzag-conformation hexagon. At all times the number of dangling bonds must be kept constant, and therefore this may imply additional adjacent auxiliary pentagons being built. Figure 7 shows all the possible structures, along with the rings they would produce as part of the junction. imply additional adjacent auxiliary pentagons being built. Figure 7 shows all the possible structures, along with the rings they would produce as part of the junction. All these auxiliary structures may affect the distances between atoms, however the number of dangling bonds stay the same.
For the junction creation phase, new rings are obtained as previously shown in Figure 6. Additionally, when adding auxiliary structures, the rings formed may include those present in Figure  7. All the presented rings are possible to be formed, however they are less likely to form given they are of an order that is far away from the hexagon. As such, the nonagon and decagon rings are unlikely to form.

Results and Discussion
The algorithm has obtained CNCh nanostructures that are geometrically viable and maintain an overall sp 2 carbon atoms network. The major aspect addressed in this work refers to the junction created in-between the CNT and CNC. This can become increasingly complex, solely due to the configuration of the generated CNC. More specifically, considering that in a spatial coordinate system of the type (x,y,z or height), all the carbon atoms at the edge of the CNT are at the same level or height, this is not true for all the carbon atoms at the edges of the CNC. The top edge of the latter resulted from the cut of sideways indexed loops of atoms. Due to the method through which the CNC is generated, as explained in Sections 2.2.4 and 2.2.5, the elimination of any 60° sector on the VGD in the aforementioned way would lead to a distorted disk. Assuming the latter can be viewed as a graphene lattice, this would inevitably cause a global distortion in the graphene lattice. In turn, this All these auxiliary structures may affect the distances between atoms, however the number of dangling bonds stay the same.
For the junction creation phase, new rings are obtained as previously shown in Figure 6. Additionally, when adding auxiliary structures, the rings formed may include those present in Figure 7. All the presented rings are possible to be formed, however they are less likely to form given they are of an order that is far away from the hexagon. As such, the nonagon and decagon rings are unlikely to form.

Results and Discussion
The algorithm has obtained CNCh nanostructures that are geometrically viable and maintain an overall sp 2 carbon atoms network. The major aspect addressed in this work refers to the junction created in-between the CNT and CNC. This can become increasingly complex, solely due to the configuration of the generated CNC. More specifically, considering that in a spatial coordinate system of the type (x,y,z or height), all the carbon atoms at the edge of the CNT are at the same level or height, this is not true for all the carbon atoms at the edges of the CNC. The top edge of the latter resulted from the cut of sideways indexed loops of atoms. Due to the method through which the CNC is generated, as explained in Sections 2.2.4 and 2.2.5, the elimination of any 60 • sector on the VGD in the aforementioned way would lead to a distorted disk. Assuming the latter can be viewed as a graphene lattice, this would inevitably cause a global distortion in the graphene lattice. In turn, this brings about distinctive shapes for the top of the CNC, along with variations in the height levels of each of its top dangling bonds. Such differences in height levels may impose significantly different distances between dangling bonds of the different carbon allotropes. This situation may be solved through the construction of auxiliary structures, with the pattern of such depending on the conformation of the CNT. The obtained nanostructures can then be employed through various computational methods, such as density functional theory or molecular dynamics, for further optimization. Figure 8 shows two such unoptimized structures obtained with the algorithm, namely a (4,4) and an (8,0) CNT, each with a CNC of disclination level 4. Considering the number of dangling bonds of a (4,4) or (8,0) CNT, such a structure is compatible for connection with three types of CNC as depicted in Table 1: The junction of the armchair CNT (4,4) with the CNC of 240° disclination angle includes the following: 4 heptagonal rings and 2 pentagonal rings among other hexagonal rings. The junction of the zigzag CNT (8,0) with the same CNC includes 4 heptagonal rings and 2 pentagonal rings. Both structures are geometrically viable, however require energetic optimization for further study. Table  2 lists the rings formed in the junction for each given option and CNT. Table 2. Rings formed in the junction between the carbon nanotube and the carbon nanocone.

Compatible Options
Carbon Nanocone Details Carbon Nanotube (4,4) Carbon Nanotube (8,0) Considering the number of dangling bonds of a (4,4) or (8,0) CNT, such a structure is compatible for connection with three types of CNC as depicted in Table 1: The junction of the armchair CNT (4,4) with the CNC of 240 • disclination angle includes the following: 4 heptagonal rings and 2 pentagonal rings among other hexagonal rings. The junction of the zigzag CNT (8,0) with the same CNC includes 4 heptagonal rings and 2 pentagonal rings.
Both structures are geometrically viable, however require energetic optimization for further study. Table 2 lists the rings formed in the junction for each given option and CNT. Table 2. Rings formed in the junction between the carbon nanotube and the carbon nanocone.

Compatible Options Carbon Nanocone Details
Option The shown CNCh each have auxiliary structures in order to reach viable geometric configurations. Table 5 lists the formed rings for all the compatible options. Table 5. Rings formed in the junction between carbon nanotube and the carbon nanocone.

Compatible Options Carbon Nanocone Details
Option The shown CNCh each have auxiliary structures in order to reach viable geometric configurations. Table 5 lists the formed rings for all the compatible options. Table 5. Rings formed in the junction between carbon nanotube and the carbon nanocone.

Compatible Options
Carbon Nanocone Details Carbon Nanotube (9,9) Carbon Nanotube (18,0) The results are in accordance with the topological characteristics as presented by Gupta and Saxena [17]. As expected, the CNCh is topologically equivalent to a CNT open at both ends, having a genus of 1 and an Euler's number of 0. In contrast, it is not equivalent to a CNC, graphene nanodisk or graphene sheet, which all have a genus of 0 and an Euler's number of 2, as the CNC used in the creation of the CNCh and the resulting CNCh itself is open at both ends. This proves that the built CNCh are geometrically viable.

Conclusions
CNCh are structures that exhibit great potential regarding heat conductance. Additionally, the CNC is a more promising connector in junctions present in PG. The algorithm developed in this study generates the CNCh based on input regarding the desired CNT and compatible CNC. The junction between the two depends on the CNT conformation, which currently is allowed to be either armchair or zigzag. As such, new atoms may be placed in the connection zone, creating either non-hexagonal rings or hexagonal rings. Otherwise, bonds may be formed directly between the dangling bonds of the two structures. Depending on the size of the CNC, there may exist rather large differences in height of the dangling bonds, which are addressed by creating hexagonal auxiliary structures in armchair CNT and square, pentagonal, hexagonal, heptagonal, octagonal, nonagonal or decagonal auxiliary structures in zigzag CNT. Overall, the non-hexagonal rings are limited to squares, pentagons, heptagons, octagons, nonagons and decagons, the most common being the second and third shapes. The geometric constructions are shown to respect Euler's theorem in a sp 2 bonded carbon atom network and therefore the generated CNCh are considered to be geometrically viable. Given these generated computational models, it is possible to conduct further computational investigations as part of larger studies concerning the behavior and connection patterns of CNCh.