Method for predicting anti-hiv virus activity based on subtree weight topology index

By using subtree weight topology indicators and machine learning algorithms to identify compound structures, the problem of insufficient accuracy in predicting anti-HIV activity in existing methods has been solved, achieving high-accuracy prediction results and providing a new metric for new drug development.

CN117238396BActive Publication Date: 2025-11-18PINGDINGSHAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311149830.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-06
Publication Date
2025-11-18
Estimated Expiration
2043-09-06

AI Technical Summary

Technical Problem

Existing methods for predicting HIV activity mainly rely on distance-based topological indices and do not fully utilize structural topological indices, resulting in insufficient prediction accuracy.

Method used

We employ a subtree weight topology index combined with classic supervised learning algorithms for machine learning. By constructing a row and column transformation rule for subtree weight information without loss based on an n-order generalized adjacency matrix, we can identify the tree, single-loop graph, and double-loop graph structures of compounds and make predictions using Wiener, Harary, and Schultz indices.

Benefits of technology

It achieves highly accurate prediction of anti-HIV virus activity, with single indicator accuracy reaching 90.95%–94.71% and multiple indicator accuracy reaching 93.99%–99.67%, providing a new metric for new drug development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117238396B_ABST
    Figure CN117238396B_ABST
Patent Text Reader

Abstract

The application provides a method for predicting anti-HIV virus activity based on a sub-tree weight topology index, comprising the following steps: labeling atoms of a compound as vertex weights by using corresponding chemical symbols, and labeling bond valence numbers between the atoms as edge weights, then mapping the vertex weights and the edge weights to an n-order generalized adjacency matrix; constructing a sub-tree weight information lossless row transformation rule based on the n-order generalized adjacency matrix, identifying a tree, a unicyclic graph structure and a bicyclic graph structure of a graph G of the compound, and calculating a sub-tree weight index of the graph G; and constructing a model by using a machine learning classic supervised learning algorithm, and predicting anti-HIV virus activity of the compound. The prediction accuracy of a single index, i.e. the sub-tree weight index, is 90.95% to 94.71%, the index has good feature distinguishing ability, and can provide a new measurement for new drug research and development.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of anti-HIV activity prediction, and particularly to a method for predicting anti-HIV virus activity based on sub-tree weight topological indexes. BACKGROUND

[0002] A topological index of a graph is a mapping f that maps a set of graphs to a set of real numbers. The index is equivalent to a numerical descriptor defined on the graph, which is usually a graph invariant, that is, the values of the topological index of two graphs are equal in the sense of isomorphism. Topological indexes can reflect many structural properties of graphs. In recent years, many scholars at home and abroad have used topological indexes to predict anti-HIV activity. In 2001, Gupta et al. proposed the eccentric adjacency index, which was used to predict anti-HIV activity with an accuracy of more than 90%. In 2009, Dureja et al. fused the Wiener index, molecular connectivity index, and enhanced eccentric connectivity topological chemical index to predict the anti-HIV activity of dimethylaminopyridin-2-one, with a prediction accuracy of 81%-85%. In 2017, Tian et al. used a stacked autoencoder to predict anti-HIV activity, and experiments showed that this method has very good performance compared with artificial neural networks (ANN) and support vector machines (SVM).

[0003] As a topological index based on structure and counting, the sub-tree number index (the number of all non-empty sub-trees of a graph) and the BC sub-tree number index (the number of sub-trees with an even distance between any two leaves) can be used to analyze the local reliability of mixed networks (the performance of maintaining connectivity when nodes or edges of the network are attacked), RNA and protein structure prediction and gene discovery, and the prediction of physical and chemical properties of compounds. In addition, studies have shown that the sub-tree number index is closely related to the Wiener index, the Randi'c index, and the Harary index, and the latter three indexes are closely related to the boiling point, chromatographic retention time, heat of formation, surface area, and water solubility of compounds.

[0004] Most of the current anti-HIV activity prediction methods use distance-based topological indexes, such as the Wiener index and the eccentric rate connectivity index. There is no research on using structure-based topological indexes to predict anti-HIV activity. SUMMARY

[0005] The present application proposes a method for predicting anti-HIV virus activity based on sub-tree weight topological indexes. The prediction accuracy of a single index sub-tree weight index is 90.95%-94.71%, and the prediction accuracy of multiple indexes involving the sub-tree weight index is 93.99%-99.67%. The index has good feature discrimination ability and can provide a new measure for new drug research and development.

[0006] The technical solution of this invention is implemented as follows: a method for predicting anti-HIV virus activity based on subtree weight topology index, comprising the following steps:

[0007] (1) Mark the atoms of the compound with the corresponding chemical symbols as vertex weights, and mark the bond valences between atoms as edge weights. Then map the vertex weights and edge weights to an n-order generalized adjacency matrix, n>1.

[0008] (2) Construct a row and column transformation rule for subtree weight information without loss based on the n-order generalized adjacency matrix, identify tree, single-loop graph structure and double-loop graph structure of the compound graph G, and calculate the subtree weight index of graph G.

[0009] (3) A model was built using classic supervised learning algorithms in machine learning to predict the anti-HIV activity of the compound.

[0010] Furthermore, in step (3), at least one of the Wiener index, Harary index and Schultz index is combined with the subtree weight index, and a model is constructed using a classic supervised learning algorithm to predict the anti-HIV activity of the compound.

[0011] Furthermore, in step (2), when the structure of graph G is a tree, tree T:=G, and the calculation method of the subtree weight index of the tree is as follows:

[0012] Step 3.1: Initialize the subtree weight index of tree T to SW:=0;

[0013] Step 3.2: For any main diagonal element a of the n-order generalized adjacency matrix A(T) i,i If the elements in the i-th row and i-th column are excluding a i,i There is only one element a after that i,j or a k,i If a is greater than 0, then a i,i a is a leaf vertex j,j or a k,k For the parent vertex, update a using formula (4). j,j The value of a j,j =a j,j (1+a i,i a i,j ) or a k,k =a k,k (1+a i,i a k,i ), j≠i≠k, 0≤j<n, 0≤i<n, 0≤k<n, formula (4) is as follows:

[0014] V(T′)=V(T)\{u}, E(T′)=E(T)\{e}, and

[0015]

[0016] Where, for any v s ∈V(T′), g′(e)=g(e)(e∈E(T′)), V(T) is the vertex set of tree T, E(T) is the edge set of tree T, T=(V(T),E(T); f,g) is a weighted tree with n (n>1) vertices, e=(u,v) is the corresponding dangling edge, weighted tree T′=(V(T′),E(T′); f′,g′), u,v are the vertices of tree T, V(T)\{u} is the vertex set after removing vertex u, E(T)\{e} is the edge set after removing edge e, f is the vertex generating function, g is the edge generating function;

[0017] Step 3.3: Update the subtree weight index SW using formula (5): SW + a i,i And delete the i-th row and i-th column of matrix A(G), as shown in formula (5):

[0018]

[0019] Where F(G;f,g) is the subtree weight index of graph G;

[0020] Step 3.4: Repeat steps 3.2 and 3.3 until matrix A(T) no longer changes. If matrix A(T) is a first-order matrix, then graph G is a tree, and the subtree weight index SW is updated to SW + a. 0,0 This will give you the subtree weight index of the tree;

[0021] If the order of matrix A(T) is greater than 2, then graph G is not a tree. If the degree of the remaining diagonal elements is 2, then graph G is a single-loop graph structure.

[0022] Furthermore, in step (2), the calculation method for the subtree weight index of the single-circle graph is as follows:

[0023] Step 4.1: Assume a simple-cycle graph edge set of (v1, v2), (v2, v3), ..., (v... n-1 ,v n ),(v n v1) respectively correspond to the element a in matrix A(G) 0,1 a 1,2 , ···, a n-2,n-1 a 0,n-1 Construct a sequential array CA = [0, 1, ..., n-1] based on the adjacency relationships of the vertices of the single-loop graph in the matrix, where the values ​​are the position indices of the diagonal elements;

[0024] Step 4.2: Based on the array from Step 4.1, it can be seen that it does not contain edges (vn Subtree weight index of tree structure (v1)

[0025]

[0026] Step 4.3: Similarly, based on the array from Step 4.1, we know that it does not contain edge (v1, v2) but contains edge (v... n The subtree weight index of the tree structure of v1), i.e.

[0027] Step 4.4: Repeat step 4.3 to calculate the values ​​of (v2, v3) which do not contain edges (v2, v3) but contain edges (v3, v4, v5). n The subtree weight index of the tree structure (v1, v2), ..., calculate the weight index of the subtrees without edges (v1, v2). n-1 ,v n ), but contains edges (v) n ,v1),(v1,v2),...,(v n-2 ,v n-1 The subtree weight index of the tree structure is obtained by combining step 4.2 and formula (6), and then the subtree weight index of the single-loop graph based on the generalized adjacency matrix is ​​obtained. Formula (6) is as follows:

[0028]

[0029] Among them, F(U n ; f, g) is the subtree weight index of a single-cycle graph, F(U n \(v1,v2); f,g) is the subtree weight index of a single-cycle graph that does not contain the edge (v1,v2), F(U n \(v j ,v j+1 );f,g;(v i ,v i+1 )) is a monocyclic graph without edges (v j ,v j+1 But containing edges (v) i ,v i+1 The subtree weight index.

[0030] Furthermore, in step (2), when graph G is not a tree structure, the three types of bicyclic graph structures can be identified based on the degree of the diagonal elements in the generalized adjacency matrix, as follows:

[0031] For a generalized adjacency matrix A(G), there exists a main diagonal element a i,i The elements in its i-th row and i-th column, excluding a i,i There are four elements greater than 0, and the remaining elements on the main diagonal are 'a'. j,j If j ≠ i, then the elements in the j-th row and j-th column excluding a... j,jIf there are two elements greater than 0, then this matrix corresponds to the double-loop graph structure BG1.

[0032] For a generalized adjacency matrix A(G), there exist two diagonal elements a. i,i The elements in its i-th row and i-th column, excluding a i,i There are three elements greater than 0, and the remaining elements on the main diagonal are 'a'. j,j If j ≠ i, then the elements in the j-th row and j-th column excluding a... j,j If there are two elements greater than 0, then this matrix corresponds to either a double-loop graph structure BG2 or BG3. Update a. i,i Set two of the three adjacent elements greater than 0 to 0, let A:=A, call the method to calculate the subtree weight index of the tree, and let the returned result be an r-order matrix A. If r=1, it is a double-loop graph structure BG3; if r>1, it is a double-loop graph structure BG2.

[0033] Furthermore, the subtree weight index of the bicyclic graph BG1 with no common edges is calculated as follows:

[0034] Step 6.1: Find the vertex v with degree 4. s Starting from index s in the matrix, construct an array of vertex adjacency relationships for the monocyclic graph based on the monocyclic graph structure recognition algorithm.

[0035] Step 6.2: Using the array from Step 6.1, combined with the subtree weight calculation algorithm for a single-loop graph without a given edge from Step 4.2, and the subtree weight calculation algorithm for a single-loop graph with a given path from Step 4.3, the single-loop graph can be obtained. or excluding vertex v s Subtree weights and the subtree containing vertex v s Subtree weights;

[0036] Step 6.3: If step 6.2 yields a single-loop diagram. excluding vertex v s Subtree weights and the subtree containing vertex v s The subtree weights are then used to obtain the weights of the other single-loop graph based on the values ​​of the array in step 6.1. The generalized adjacency matrix is ​​obtained by repeating steps 6.1 and 6.2 to obtain the single-cycle graph. excluding vertex v s Subtree weight index and the subtree containing vertex v s Subtree weight index;

[0037] If step 6.2 yields a single-loop diagram excluding vertex v s Subtree weights and the subtree containing vertex v sThe subtree weights are then used to obtain the weights of the other single-loop graph based on the values ​​of the array in step 6.1. The generalized adjacency matrix is ​​obtained by repeating steps 6.1 and 6.2 to obtain the single-cycle graph. excluding vertex v s Subtree weight index and the subtree containing vertex v s Subtree weight index;

[0038] Step 6.4: Combining steps 6.2 and 6.3, according to formula (7), the subtree weight index of the bicyclic graph BG1 without common edges is obtained, and formula (7) is as follows:

[0039]

[0040] Where F(BG1;f,g) is the subtree weight index of the double-loop graph BG1, F(BG1\v s f, g) is a bicyclic graph BG1 without vertices v s Subtree weight index For one of the single-loop graphs after the tree vertices have shrunk onto the loop, f c (v s ) shrinks the tree to vertex v s Vertex generation function, A single-loop diagram within a double-loop diagram. The vertex v s The subtree weight index.

[0041] Furthermore, the subtree weight index of the bicyclic graph BG2 with no common edges is calculated as follows:

[0042] Step 7.1: Construct an adjacency array for the vertex of a single-cycle graph, and find two vertices v with a degree of 3. s ,w t Given the positions x and β in the matrix, construct a vertex adjacency array for the monocyclic graph starting from x. If x is found again, the array is successfully constructed; otherwise, it fails. Alternatively, construct a vertex adjacency array starting from β. If β is found again, the array is successfully constructed; otherwise, it fails. If the array construction fails, disconnect two vertices v with degree 3 based on the values ​​in this array. s w t For the connected edges, start again from x or β to build a vertex adjacency array for the single-cycle graph;

[0043] Step 7.2: Based on the array from Step 7.1, this single-loop diagram can be obtained. Excluding vertex v s or w t Subtree weights and the subtree containing vertex v s or w t By calculating the subtree weights, we obtain another single-loop graph. Excluding vertex v s or w t The subtree weights; or this single-loop graph can be obtained. Excluding vertex v s or w t The subtree weight, including vertex v s or w t The subtree weights, and another single-loop graph. Excluding vertex v s or w t Subtree weights;

[0044] Step 7.3: If Including vertex v s ,calculate Including vertex v s The subtree weights are first established by building the BG. 2,2 Given a vertex adjacency array, we can calculate... Including vertex w t Subtree weights, update vertex w t The subtree weight, disconnected from w t The edges on two connected loops make vertex w t Able to shrink to vertex v s ,get Including vertex v s The subtree weight index; similarly, if Including vertex v s ,calculate Including vertex v s Subtree weights;

[0045] like Including vertex w t ,calculate Including vertex w t The subtree weights are first established by building the BG. 2,2 Given a vertex adjacency array, we can calculate... Including vertex v s Subtree weights, update vertex v s The subtree weight, disconnected from v s The edges on two connected loops make vertex v s Able to shrink to vertex w t ,get Including vertex w t The subtree weight index; similarly, if Including vertex w t ,calculate Including vertex w t Subtree weights;

[0046] Step 7.4: Combining steps 7.2 and 7.3 with formula (8), the subtree weight index of the bicyclic graph BG2 without common edges is obtained, and formula (8) is as follows:

[0047]

[0048] Where F(BG2; f, g) is the subtree weight index of the double-loop graph BG2, F(BG2 / v s f, g) is a bicyclic graph BG2 without vertices v s Subtree weight index For one of the single-loop graphs after the tree vertices have shrunk onto the loop, f c (v s ) shrinks the tree to vertex v s Vertex generation function, A single-loop graph within a double-loop graph containing vertex v s The subtree weight index.

[0049] Furthermore, the calculation method for the subtree weight index of a bicyclic graph BG3 with a common edge is as follows:

[0050] Step 8.1: Construct an adjacency relation array for the vertex of the monocyclic graph, and find two vertices v0 and v1 with a degree of 3. m Given the positions x and β in the matrix, start from x to create a vertex adjacency array for a single-cycle graph. If β is found, the array is successfully created. Alternatively, start from β to create a vertex adjacency array for a single-cycle graph. If x is found, the array is successfully created.

[0051] Step 2: Based on the array from Step 8.1, calculate the weight indices for the subtrees without edges (v0, v1), with edges (v0, v1), without edges (v1, v2), ..., until the weight indices for the subtrees with edges (v0, v1), (v1, v2), ..., (v...) are calculated. m-1 ,v m The subtree weight index of the bicyclic graph BG3 with a common edge is obtained by combining the subtree weight index of the bicyclic graph BG3 with the formula (9), where 1≤m<n. The formula (9) is as follows:

[0052]

[0053] Where F(BG3;f,g) is the subtree weight index of the bicyclic graph BG3, and F(BG3\(v0,v1);f,g) is the subtree weight index of the bicyclic graph BG3 excluding the edge (v0,v1). For the bicyclic graph BG3 containing edges (v i ,v i+1 The subtree weight index, For a bicyclic graph BG3 without edges (v j ,vj+1 ), but contains edges (v) i ,v i+1 The subtree weight index.

[0054] The beneficial effects of this invention are:

[0055] The subtree weight index of this invention is the product of the weights of all vertices and edges of the subtree. It achieves efficient calculation of this index by constructing a row and column transformation rule for subtree weight information without loss based on a generalized adjacency matrix. Simultaneously, it combines the Wiener index, Harary index, and Schultz index, and utilizes classic supervised learning algorithms (Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Decision Tree algorithm) to build a model to predict the anti-HIV activity of compound molecules. The subtree weight index exhibits good feature discrimination ability and accuracy (90.95%–99.67%), thus making it an effective new metric for drug development. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 For weighted single-loop graph U n And a weighted bicyclic graph BG3 with a common edge, (a) a weighted monocyclic graph U n (b) Weighted bicyclic graph BG3 with a common edge;

[0058] Figure 2 Let BG1 and BG2 be weighted bicyclic graphs without common edges. (a) Weighted bicyclic graph BG1 without common edges, (b) Weighted bicyclic graph BG2 without common edges.

[0059] Figure 3 The calculation process of the subtree weight index of tree T;

[0060] Figure 4 The calculation process for the subtree weight index of compounds in a single-loop graph structure;

[0061] Figure 5 The calculation process for BG2, a bicyclic graph structure with no common edges;

[0062] Figure 6 The distribution of the training set data with respect to the three indicators is shown in (a)-(d), which represent the distribution of the 410 compounds in the training set.

[0063] Figure 7 The distribution of the test set data with respect to the three indicators is shown in (a)-(d), which represent the distribution of the 1250 compounds in the test set.

[0064] Figure 8 The model prediction accuracy for different numbers of indicators: (a) model prediction accuracy for a single indicator, (b) model prediction accuracy for two indicators, and (c) model prediction accuracy for three or four indicators.

[0065] Figure 9 The prediction accuracy of SVM algorithms with different kernel functions;

[0066] Figure 10 The prediction accuracy of KNN algorithms with different K-nearest neighbor numbers;

[0067] Figure 11 The prediction accuracy of decision tree algorithms with different feature partitioning criteria. Detailed Implementation

[0068] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0069] For ease of explanation, we will first define the Wiener metric, Harary metric, and Schultz metric:

[0070] Wiener Metrics:

[0071]

[0072] Harary Indicator:

[0073]

[0074] Schultz Indicator:

[0075]

[0076] In the above metrics, d(u,v) is the distance between vertex pairs u and v in graph G; du and dv are the degrees of vertices u and v in graph G, respectively.

[0077] Let G = (V(G), E(G); f, g) be a weighted graph with n vertices and m edges, and the vertex set V(G) = {v1, v2, ..., v...} n}, edge set E(G) = {e1,e2,...,e mLet f be the vertex generating function, g be the edge generating function, and all non-empty acyclic subtrees in graph G be called subtrees of G. Let G\X be the graph of G after deleting the set X, S(G) be the set of subtrees of G, and S(G;v) be the set of subtrees of G containing vertex v. t ,v m )) is the edge (v) of G. t ,v m S(G\v) is the set of subtrees of G that do not contain vertex v. t ,v m )) is an edgeless (v) of G t ,v m The set of subtrees of ), S(G\(v1,v2); (v t ,v m Let G be a region that does not contain the edge (v1, v2) but contains the edge (v2, v3). t ,v m The set of subtrees of ).

[0078] For any subtree T∈S(G) of G, the weight of subtree T is defined as:

[0079]

[0080] Next, the subtree weight indices of graph G are defined as follows:

[0081]

[0082]

[0083]

[0084]

[0085]

[0086]

[0087] These are G, G containing vertex v, and G containing edge (v), respectively. t ,v m ), and G without vertices v, G without edges (v t ,v m G is a region that does not contain the edge (v1, v2) but contains the edge (v). t ,v m The subtree weight index.

[0088] Clearly, when the vertex weight f(v) = y = 1 (v ∈ V(G)) and the edge weight g(e) = z = 1 (z ∈ E(G)), the subtree weight index of graph G is equal to the number of subtrees of graph G.

[0089] Let T = (V(T), E(T); f, g) be a weighted tree with n (n>1) vertices, u be a leaf of T and e = (u, v) be the corresponding dangling edge. Construct the weighted tree T′ = (V(T′), E(T′); f′, g′) as follows: V(T′) = V(T)\{u}, E(T′) = E(T)\{e}, and

[0090]

[0091] For any v s ∈V(T′), g′(e)=g(e)(e∈E(T′)).

[0092] Lemma 1 From the above symbols, we can obtain

[0093]

[0094] A single-cycle graph is a connected graph where the number of vertices equals the number of edges. Let U n =(V(U) n ),E(U n f,g)(n≥3) is as follows Figure 1 (a) shows a weighted single-cycle graph, where f and g are its vertex and edge weight functions, respectively, and T i (i = 1, 2, ..., n) represents the sequence of elements containing v after removing all edges from its cycle. i A tree (with its root node defined as v) i ), stipulates v n+i =v i By using U n The subtree can be partitioned in the following n ways: a subtree that does not contain the edge (v1, v2), a subtree that contains the edge set (v1, v2), ..., (v... j-1 ,v j ), but does not contain edges (v) j ,v j+1 The subtree of (j = 2, ..., n). The following lemma can be obtained:

[0095] Lemma 2

[0096]

[0097] A bicyclic graph is a connected graph with the number of edges equal to the number of vertices plus one. Let BG = (V(BG), E(BG); f, g) be a weighted bicyclic graph. It is easy to see that it has three types, which we will label as BG. i =(V(BG) i ),E(BG i );f,g)(i=1,2,3)(see Figure 1 (b), Figure 2 ).

[0098] Let be the bicyclic graph after the vertices of tree \(T\) are contracted onto the cycle, and be the weighted unicyclic graph of s containing vertex \(v\). Denote as the weighted unicyclic graph of s containing vertex \(v\). Denote as the weighted unicyclic graph of s containing vertex \(v\). Denote as the weighted unicyclic graph of s containing vertex \(v\). From the above notations, the following lemma can be obtained.

[0099] Lemma 3

[0100] [[ID=3�]]

[0101]

[0102]

[0103] Definition 1 (Generalized Adjacency Matrix of Graph) Let undirected simple graph \(G=(V(G),E(G))\), \(V(G)=\{v_1,v_2,\cdots,v n \}\), \(E(G)=\{e_1,e_2,\cdots,e m \}\). Let \(a i,i \) be the weight of vertex \(v_i\), and let \(a i,j \((i < j)\) be the edge weight of the edge adjacent from \(v i \) to \(v j \). At the same time, let \(a i,j = 0\ (i>j)\). The matrix \((a i j )<q n×n is called the generalized adjacency matrix of \(G\), denoted as \(A(G)\).

[0104] Calculation of Subtree Weight Index of Tree Based on Generalized Adjacency Matrix

[0105] From Formula 4 and Formula 5 of Lemma 1, it can be seen that when calculating the subtree weight, the weight information of leaf vertices can be transmitted to the father vertices without loss in an iterative manner. Therefore, the calculation process of the subtree weight index of the tree based on the generalized adjacency matrix can be deduced as follows:

[0106] Step 3.1: Initialize the subtree weight index of tree \(T\) as \(SW := 0\);

[0107] Step 3.2: For any main diagonal element \(a i,iIf the elements in the i-th row and i-th column are excluding a i,i There is only one element a after that i,j or a k,i If a is greater than 0, then a i,i a is a leaf vertex j,j or a k,k For the parent vertex, update a using formula (4). j,j The value of a j,j =a j,j (1+a i,i a i,j ) or a k,k =a k,k (1+a i,i a k,i ), j≠i≠k, 0≤j<n, 0≤i<n, 0≤k<n;

[0108] Step 3.3: Update the subtree weight index SW using formula (5): SW + a i,i And delete the i-th row and i-th column of matrix A(T), as shown in Algorithm Process 1 for steps 3.2-3.3;

[0109] Step 3.4: Repeat steps 2 and 3 until matrix A(T) is a first-order matrix, then update the subtree weight index SW:=SW+a 0,0 Then we can obtain the subtree weight index of tree T. Steps 3.1-3.4 are shown in Algorithm 1.

[0110]

[0111]

[0112] Figure 3 As a simple example of Algorithm 1, the main diagonal element a of matrix A is obtained through process 1. 0,0 If a is a leaf vertex, then a 1,1 =a 1,1 +a 1,1 a 0,0 a 0,1 =2 + 2 × 3 × 1 = 8, Subtree weight index SW = 0 + a 0,0 =3, delete a 0,0 Find the row and column of the matrix to obtain a new 2×2 matrix A, and then obtain a through process 1. 0,0 If a is a leaf vertex, then a 1,1 =a 1,1 +a 1,1 a 0,0 a 0,1 =1 + 1 × 8 × 2 = 17, Subtree Weight Index SW = 3 + a 0,0 =3+8=11, delete 'a' 0,0By determining the row and column of the subtree, we obtain a new 1×1 matrix A. Then, through steps 9-12 of Algorithm 1, we obtain the total subtree weight index SW = 11 + a. 0,0 =11+17=28.

[0113]

[0114] Subtree weight index calculation for a single-cycle graph based on a generalized adjacency matrix

[0115] If Algorithm 1 is called on an n (n>1) order generalized adjacency matrix A, and the algorithm enters steps 13-15, it means that the graph is not a tree. If the degree of the remaining diagonal elements is 2, it is easy to know that it is a single-loop graph structure. Algorithm 2 for determining whether a compound is a single-loop graph structure is given below.

[0116]

[0117] Based on formula (6) of Lemma 2 for calculating the weight index of a subtree without edge (v1,v2) and the weight index of a subtree with edge (v1,v2), the subtree weight index of a single-cycle graph is obtained. Therefore, a method for calculating the subtree weight index of a single-cycle graph based on the generalized adjacency matrix can be derived:

[0118] Step 4.1: Assume a simple cycle graph edge set of (v1, v2), (v2, v3), ..., (v... n-1 ,v n ),(v n v1 and v2 respectively correspond to elements a in matrix A. 0,1 ,a 1,2 ,···,a n-2,n-1 ,a 0,n-1 The sequential array CA = [0, 1, ..., n-1] is constructed based on the adjacency relationship of the vertices of the single-cycle graph in the matrix. The values ​​here are the position indices of the diagonal elements. The algorithm is shown in process 2.

[0119] Step 4.2: Based on the array from Step 4.1, it can be seen that it does not contain edges (v n Subtree weight index of tree structure (v1) The specific algorithm is shown in process 3;

[0120] Step 4.3: Similarly, based on the array from Step 4.1, we know that it does not contain edge (v1, v2) but contains edge (v... n The subtree weight index of the tree structure of v1), i.e. The specific algorithm is shown in process 4;

[0121] Step 4.4: Repeat step 4.3 to calculate the values ​​of (v2, v3) without edge (v2, v3) but containing edge (v3). nThe subtree weight index of the tree structure (v1, v2), ..., calculate the weight index of the subtrees without edges (v1, v2). n-1 ,v n ), but contains edges (v) n ,v1),(v1,v2),...,(v n-2 ,v n-1 The subtree weight index of the tree structure is obtained by combining it with step 4.2 to obtain the subtree weight index of the single-cycle graph based on the generalized adjacency matrix, as shown in Algorithm 3.

[0122]

[0123]

[0124]

[0125]

[0126]

[0127] Figure 4 For a simple example of using Algorithm 3 to calculate the subtree weight index of a single-cycle graph, leaf vertex a is removed from the matrix. i,i After the i-th row and i-th column, construct an array of adjacency relationships of vertices on the cycle, decomposing matrix A into Ai. 1 A 2 A 3 A 4 Among them, A 1 Let a be a matrix that does not contain the edge (D,H). 0,2 =0; A 2 Let a be a matrix that does not contain the edge (D,E). 0,1 =0; A 3 Let a be a matrix that does not contain the edge (E,I). 1,3 =0; A 4 Let a be a matrix that does not contain the edge (H,I). 2,3 =0.

[0128] A will be used respectively 1 A 2 A 3 A 4 Find the subtree weight indices for the subtrees that do not contain edge (D,H), do not contain edge (D,E) but contain edge (D,H), (D,E), and do not contain edge (H,I) but contain edge (D,H), (D,E), and (E,I).

[0129] From process 3, A can be calculated. 1 The subtree weight index SW, with an initial value of 0, a 1,1 =a1,1 +a 1,1 a 0,0 a 0,1 =44+44×12×1=572, SW=SW+a 0,0 =12; a 3,3 =a 3,3 +a 3,3 a 1,1 a 1,3 =2+2×572×2=2290, SW=SW+a 1,1 =12+572=584, a 2,2 =a 2,2 +a 2,2 a 3,3 a 2,3 =4+4×2290×2=18324, SW=SW+a 3,3 +a 2,2 =584+2290+18324=21198.

[0130] From process 4, A can be calculated. 2 A 3 A 4 The subtree weight index, where A is calculated. 2 The subtree weight index SW, with an initial value of 0, a 3,3 =a 3,3 +a 3,3 a 1,1 a 1,3 =2 + 2 × 44 × 2 = 178, a 2,2 =a 2,2 +a 2,2 a 3,3 a 2,3 =4 + 4 × 178 × 2 = 1428, the subtree weight index CSW containing edge (D,H) but not edge (D,E) is a 0,0 a 2,2 a 0,2 =12×1428×1=17136, SW=SW+CSW=0+17136=17136.

[0131] Calculate A 3 The subtree weight index SW, with an initial value of 0, a 2,2 =a 2,2 +a 2,2 a 3,3 a 2,3 =4 + 4 × 2 × 2 = 20, the subtree weight index CSW of the subtree containing edges (D, H) but not (E, I) is a. 2,2 a 0,0 a 0,2 a 1,1 a0,1 =20×12×1×44×1=10560, SW=SW+CSW=0+10560=10560.

[0132] Calculate A 4 The subtree weight index SW, with an initial value of 0, is the subtree weight index CSW = a for subtrees that do not contain the edge (H,I) but contain the edges (D,H), (D,E), and (E,I). 2,2 a 0,0 a 0,2 a 1,1 a 0,1 a 3,3 a 1,3 =4×12×1×44×1×2×2=8448, SW=SW+CSW=0+8448=8448.

[0133] It is easy to see that the sum of the subtree weights contributed by leaf vertices A, B, C, F, G, and J is 17. Combined with matrix A... 1 A 2 A 3 A 4 The subtree weight index can be obtained Figure 4 The subtree weight index of the single-circle graph is 17+21198+17136+10560+8448=57359.

[0134] Subtree weight index calculation based on the bicyclic graph structure of the generalized adjacency matrix

[0135] When the compound structure diagram is not a tree, the three types of bicyclic graph structures can be identified based on the degree of the diagonal elements in the generalized adjacency matrix, as follows:

[0136] For a generalized adjacency matrix A(G), there exists a main diagonal element a i,i The elements in its i-th row and i-th column, excluding a i,i There are four elements greater than 0, and the remaining elements on the main diagonal are 'a'. j,j (j≠i), its j-th row and j-th column elements excluding a j,j If there are two elements greater than 0, then this matrix corresponds to... Figure 2 (a) The double-loop graph structure BG1.

[0137] For a generalized adjacency matrix A(G), there exist two main diagonal elements a. i,i The elements in its i-th row and i-th column, excluding a i,i There are three elements greater than 0, and the remaining elements on the main diagonal are 'a'. j,j (j≠i), its j-th row and j-th column elements excluding a j,j If there are two elements greater than 0, then this matrix corresponds to... Figure 2 (b) The double-loop diagram structure BG2 orFigure 1 (b) The double-loop graph structure BG3 updates a i,i Set two of the three adjacent elements greater than 0 to 0, let A := A, call Algorithm 1, and let the returned result be an r-order matrix A. If r = 1, then it is... Figure 1 (b) The double-loop graph structure BG3, if r>1, is... Figure 2 (b) The double-loop graph structure BG2.

[0138] The specific identification of the double-circle graph structure is shown in Algorithm 4.

[0139]

[0140]

[0141] According to the calculation, v without vertices s Subtree weight index and calculation of vertices v s Formulas (7) and (8) of Lemma 3 yield the subtree weight indices for two types of bicyclic graphs BG1 and BG2 without common edges. After identifying the three bicyclic graph structures and updating the generalized adjacency matrix A and the subtree weight index SW, the subtree weight index of the bicyclic graph BG1 without common edges is calculated as follows:

[0142] Step 6.1: Find the vertex v with degree 4. s Starting from index s in the matrix, construct an array of vertex adjacency relationships for the single-cycle graph according to process 2. For example, assume v3 is a vertex v s Double circle diagram (Left single-loop diagram of the double-loop diagram after all tree vertices have shrunk to the loop) If the edge set is (v1,v3), (v3,v5), (v5,v7), (v7,v1), then the array to be constructed is [4,6,0,2] (or [0,6,4,2]), which is the right single-loop graph. If the edge set is (v2,v3), (v3,v4), (v4,v6), (v6,v2), then the array to be constructed is [1,5,3,2] (or [3,5,1,2]).

[0143] Step 6.2: Using the array from Step 6.1, combined with the subtree weight calculation process 3 for a single-loop graph that does not contain a given edge, and the subtree weight calculation process 4 for a single-loop graph that contains a given path, the single-loop graph can be obtained. (or ) without vertices v s Subtree weights and the subtree containing vertex v s Subtree weights;

[0144] Step 6.3: If step 6.2 yields a single-loop diagram. excluding vertices v s Subtree weights and the number of vertices v s The subtree weights are then used to obtain the weights of the other single-loop graph based on the values ​​of the array in step 6.1. The generalized adjacency matrix is ​​obtained by repeating steps 6.1 and 6.2 to obtain the single-cycle graph. excluding vertex v s Subtree weight index and the subtree containing vertex v s Subtree weight index;

[0145] If step 6.2 yields a single-loop diagram excluding vertex v s Subtree weights and the subtree containing vertex v s The subtree weights are then used to obtain the weights of the other single-loop graph based on the values ​​of the array in step 6.1. The generalized adjacency matrix is ​​obtained by repeating steps 6.1 and 6.2 to obtain the single-cycle graph. excluding vertices v s Subtree weight index and the subtree containing vertex v s Subtree weight index;

[0146] Step 6.4: Combining steps 6.2 and 6.3, obtain the subtree weight index of the bicyclic graph BG1 with no common edges.

[0147] The steps are shown in Algorithm 5.

[0148]

[0149] Similarly, calculating the subtree weight indices of the bicyclic graph BG2 with no common edges and the bicyclic graph BG3 with common edges also requires establishing a vertex adjacency relation array. Combining the subtree weight calculation formula (8) for the bicyclic graph BG2 with no common edges in Lemma 3, the subtree weight calculation formula (9) for the bicyclic graph BG3 with common edges, and algorithm processes 3 and 4, the subtree weight indices of BG2 and BG3 can be obtained. The process is similar to that for calculating the bicyclic graph BG1. The specific method is as follows:

[0150] The subtree weight index of a bicyclic graph BG2 with no common edges is calculated as follows:

[0151] Step 7.1: Construct an adjacency array for the vertex of a single-cycle graph, and find two vertices v with a degree of 3. s ,w t Given the positions x and β in the matrix, construct a vertex adjacency array for the monocyclic graph starting from x. If x is found again, the array is successfully constructed; otherwise, it fails. Alternatively, construct a vertex adjacency array starting from β. If β is found again, the array is successfully constructed; otherwise, it fails. If the array construction fails, disconnect two vertices v with degree 3 based on the values ​​in this array. s,w t For the connected edges, start again from x or β to build a vertex adjacency array for the single-cycle graph;

[0152] Step 7.2: Based on the array from Step 7.1, this single-loop diagram can be obtained. Excluding vertex v s or w t Subtree weights and the subtree containing vertex v s or w t By calculating the subtree weights, we obtain another single-loop graph. Excluding vertex v s or w t The subtree weights; or this single-loop graph can be obtained. Excluding vertex v s or w t Subtree weights and the subtree containing vertex v s or w t By calculating the subtree weights, we obtain another single-loop graph. Excluding vertex v s or w t Subtree weights;

[0153] Step 7.3: If Including vertex v s ,calculate Including vertex v s The subtree weights are first established by building the BG. 2,2 Given a vertex adjacency array, we can calculate... Including vertex w t Subtree weights, update vertex w t The subtree weight, disconnected from w t The edges on two connected loops make vertex w t Able to shrink to vertex v s ,get Including vertex v s The subtree weight index; similarly, if Including vertex v s ,calculate Including vertex v s Subtree weights;

[0154] like Including vertex w t ,calculate Including vertex w t The subtree weights are first established by building the BG. 2,2 Given a vertex adjacency array, we can calculate... Including vertex v s Subtree weights, update vertex v s The subtree weight, disconnected from v sThe edges on two connected loops make vertex v s Able to shrink to vertex w t ,get Including vertex w t The subtree weight index; similarly, if Including vertex w t ,calculate Including vertex w t Subtree weights;

[0155] Step 7.4: Combining steps 7.2 and 7.3 with formula (8), the subtree weight index of the bicyclic graph BG2 without common edges is obtained, and formula (8) is as follows:

[0156]

[0157] Where F(BG2; f, g) is the subtree weight index of the double-loop graph BG2, F(BG2 / v s f, g) is a bicyclic graph BG2 without vertices v s Subtree weight index For one of the single-loop graphs after the tree vertices have shrunk onto the loop, f c (v s ) shrinks the tree to vertex v s Vertex generation function, A single-loop graph within a double-loop graph containing vertex v s The subtree weight index.

[0158] The method for calculating the subtree weight index of a bicyclic graph BG3 with a common edge is as follows:

[0159] Step 8.1: Construct an adjacency relation array for the vertex of the monocyclic graph, and find two vertices v0 and v1 with a degree of 3. m Given the positions x and β in the matrix, start from x to create a vertex adjacency array for a single-cycle graph. If β is found, the array is successfully created. Alternatively, start from β to create a vertex adjacency array for a single-cycle graph. If x is found, the array is successfully created.

[0160] Step 2: Based on the array from Step 8.1, calculate the weight indices for the subtrees without edges (v0, v1), with edges (v0, v1), without edges (v1, v2), ..., until the weight indices for the subtrees with edges (v0, v1), (v1, v2), ..., (v1, v1) are calculated. m-1 ,v m The subtree weight index of the bicyclic graph BG3 with a common edge is obtained by combining the subtree weight index of the bicyclic graph BG3 with the formula (9), where 1≤m<n. The formula (9) is as follows:

[0161]

[0162] Where F(BG3;f,g) is the subtree weight index of the bicyclic graph BG3, and F(BG3\(v0,v1);f,g) is the subtree weight index of the bicyclic graph BG3 excluding the edge (v0,v1). For the bicyclic graph BG3 containing edges (v i ,v i+1 The subtree weight index, For a bicyclic graph BG3 without edges (v j ,v j+1 ), but contains edges (v) i ,v i+1 The subtree weight index.

[0163] Taking BG2, a bicyclic graph with no common edges, as an example, such as Figure 5 As shown, during the structure recognition process, the value of the vertex with a degree of 1 on the main diagonal is found in the matrix. After accumulating the subtree weight SW = 9 and deleting the corresponding row and column, matrix A is obtained. Based on matrix A and BG2, the arrays [6,9,5,2] and [0,1,8,7,4] representing the adjacency relationships of the vertices in the two single-cycle graphs are calculated in step 7.1. Then, matrix A is decomposed into A 1 A 2 A 3 A 4 .

[0164] Where A 1 The elements on the main diagonal correspond to vertices H, I, and L in the graph. Find the weight index of the subtree D (excluding vertices) in the left-hand single-loop graph. 2 The main diagonal elements correspond to vertices D, H, I, and L in the graph. Calculate the weight index of the subtree containing vertex D in the left-hand single-loop graph. 3 Given that the main diagonal elements correspond to vertices B, C, E, F, J, and K in the graph, calculate the weight index of the subtree excluding vertex D in the right-hand single-loop graph; A 4 Given that the main diagonal elements correspond to vertices B, C, F, J, and K in the graph, calculate the weight index of the subtree containing vertex F in the right-hand single-loop graph.

[0165] According to process 3, A can be calculated. 1 The subtree weights, with an initial value of 0, a 2,2 =a 2,2 +a 2,2 a 0,0 a 0,2 =1 + 1 × 7 × 2 = 15, SW = SW + a 0,0 =7, a 2,2 =a 2,2 +a 2,2 a 1,1 a 1,2 =15+15×2×1=45, SW=SW+A 1,1 +A2,2 =54.

[0166] Calculate A 2 The weight of the subtree containing vertex D, with an initial value of 0, a 3,3 =a 3,3 +a 1,1 a 3,3 a 1,3 =1 + 7 × 1 × 2 = 15, a 2,2 =a 2,2 +a 2,2 a 3,3 a 2,3 =2 + 2 × 15 × 1 = 32, a 0,0 =a 0,0 +a 0,0 a 2,2 a 0,2 =1+1×32×2=65, SW=SW+A 0,0 =65, recovery matrix A 2 The initial value of a 2,2 =a 2,2 +a 2,2 a 3,3 a 2,3 =2 + 2 × 1 × 1 = 4, a 0,0 =a 0,0 +a 0, 0a 2,2 a 0,2 =1 + 1 × 4 × 2 = 9, CSW = a 0,0 ×a 1,1 ×a 0,1 =9×7×1=63, SW=SW+CSW=65+63=128, recovery matrix A 2 The initial value of a 0,0 =a 0,0 +a 0,0 a 2,2 a 0,2 =1 + 1 × 2 × 2 = 5, CSW = a 0,0 ×a 1,1 ×a 3,3 ×a 0,1 ×a 1,3 =5×7×1×1×2=70, SW=SW+CSW=128+70=198, recovery matrix A 2 The initial value, CSW = a 0,0 ×a 1,1 ×a 3,3 ×a 2,2 ×a 0,1 ×a 1,3 ×a 2,3=1×7×1×2×1×2×1=28, SW=CSW+SW=28+198=226.

[0167] According to Algorithm 3, A can be calculated. 3 The subtree weights, with an initial value of 0, a 3,3 =a 3,3 +a 2,2 a 3,3 a 2,3 =1 + 6 × 1 × 1 = 7, SW = SW + a 2,2 =6, update the weight of point F to 7, and delete a. 2,2 The row and column of the given position result in a single-loop diagram matrix, the calculation process of which is the same as... Figure 4 Similarly, so omitted here, we get A. 3 The total subtree weight is 5431.

[0168] Calculate A 4 The weight of the subtree containing vertex F, initialized to 0, is calculated in the same way as the weight of A. 2 The weights of the subtree containing vertex D are similar, so the process is omitted, and we can obtain A. 4 The weight of the subtree containing vertex F is 735. Shrinking from vertex F to vertex D, we obtain the weight SW = 4417 of the subtree containing vertex D in the right-hand single-loop graph. Combining this with the total weight contributed by leaf vertices A, G, and M (9), and matrix A... 1 A 3 The subtree weight index, A 2 The weights of the subtrees containing vertex D and the weights of the subtrees containing vertex D in the single-loop graph on the right are used to obtain the total subtree weight index as 9 + 54 + 5431 + 226 × 4417 ÷ 1 = 1003736.

[0169] Predicting anti-HIV activity

[0170] The atoms of the compound are labeled with their corresponding chemical symbols as vertex weights, and the bond valences between atoms are labeled as edge weights. Then, the vertex weights and edge weights are mapped to an n-order generalized adjacency matrix, where n>1.

[0171] The dataset for this experiment comes from IAM-Graph DB. The data is written to GXL files in the form of labels. By parsing the GXL files, the values ​​of vertex labels (vertex weights) and edge labels (edge ​​weights) are read to construct an n-order generalized adjacency matrix. The Wiener, Harary, and Schultz indices are calculated using Dijkstra's algorithm. Each of the 1660 compounds in this experiment has a label "active" or "inactive," indicating whether it is an active or inactive compound. The training set contains 410 compounds, and the test set contains 1250. We normalized the data for these four indices. The distribution of all compounds with respect to the three indices is as follows: Figure 6 As shown in Figure 7.

[0172] The experiment used classic machine learning supervised learning algorithms, including Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Decision Tree. The prediction accuracy of the models corresponding to different combinations of the number of indicators is shown below. Figure 8 As shown, the prediction accuracy of a model built on a single indicator is as follows: Figure 8 As shown in (a), it is easy to see that the SVM algorithm based on the Schultz index has the highest accuracy of 99.67%; the SVM algorithm based on the subtree weight index has the lowest accuracy of 91.03%. Overall, the SVM algorithm has higher accuracy than the KNN algorithm and the decision tree algorithm, while the decision tree algorithm has lower accuracy than the SVM algorithm and the KNN algorithm.

[0173] The prediction accuracy of the model built with the two indicators is as follows: Figure 8 As shown in (b), it was observed that the SVM algorithm based on Wiener and Harary indices and the KNN algorithm based on Harary and Schultz indices had the highest accuracy of 99.59%; the decision tree algorithm based on subtree weights and Harary indices had the lowest accuracy of 94.79%. Overall, the accuracy was improved to some extent when the subtree weight index was combined with other indices. It is not difficult to find that the SVM algorithm based on subtree weights and Schultz indices had the highest accuracy of 99.51%.

[0174] The predictive accuracy of models built with three and four indicators is as follows: Figure 8 As shown in (c), the SVM algorithm based on Wiener, Harary, and Schultz metrics has the highest accuracy of 99.65%; the decision tree algorithm based on subtree weights, Wiener, and Harary metrics has the lowest accuracy of 96.42%. Compared with feature vectors constructed with a single or two metrics, the lowest accuracy of three and four metrics is higher.

[0175] The model prediction accuracy of SVM algorithms with different kernel functions is as follows: Figure 9 As shown, the Gaussian kernel function generally has higher model prediction accuracy than the polynomial kernel function. The SVM algorithm with the polynomial kernel function has the lowest model prediction accuracy of 90.95% for one metric (subtree weight metric).

[0176] The prediction accuracy of KNN algorithms with different K-nearest neighbor numbers is as follows: Figure 10 As shown, it can be seen that under feature vectors constructed with one or two indicators, the model with K nearest neighbors number 20 generally has higher prediction accuracy than the model with K nearest neighbors number 10; under feature vectors constructed with three or four indicators, the model with K nearest neighbors number 10 generally has higher prediction accuracy than the model with K nearest neighbors number 20; the model with subtree weights of one indicator has the lowest prediction accuracy, at 94.71%.

[0177] The prediction accuracy of decision tree algorithms with different feature splitting criteria is as follows: Figure 11 As shown, the feature vector composed of three indicators (subtree weight indicator, Wiener indicator, and Harary indicator) has the largest difference in prediction accuracy among different feature segmentation standards, with a difference in accuracy of 1.79%. The accuracy of using the Schultz indicator is higher than that of not using the Schultz indicator.

[0178] By labeling the atoms of a compound with their corresponding chemical symbols as vertex weights and the bond valences between atoms as edge weights, the vertex and edge weights are mapped to a generalized adjacency matrix. Further, corresponding row and column transformations and algorithms are constructed to identify tree and single / double loop structures and calculate the subtree weight index of the corresponding compound molecular graph. Finally, a model is built using a classic supervised learning algorithm to predict the accuracy of anti-HIV viral activity. The prediction accuracy of a single subtree weight index is 90.95%–94.71%, and the prediction accuracy of multiple indices involving subtree weights is 93.99%–99.67%. Therefore, this index has good feature discrimination ability and can provide a new metric for new drug development.

Claims

1. A method for predicting anti-HIV activity based on subtree weight topology index, characterized in that, Includes the following steps: (1) Mark the atoms of the compound with the corresponding chemical symbols as vertex weights, and mark the bond valences between atoms as edge weights. Then map the vertex weights and edge weights to an n-order generalized adjacency matrix, n>1. (2) Construct a row and column transformation rule for subtree weight information without loss based on the n-order generalized adjacency matrix, identify tree, single-loop graph structure and double-loop graph structure of the compound graph G, and calculate the subtree weight index of graph G. (3) A model is built using classic supervised learning algorithms in machine learning to predict the anti-HIV activity of the compound; In step (2), when the structure of graph G is a tree, tree T:=G, and the calculation method of the subtree weight index of the tree is as follows: Step 3.1: Initialize the subtree weight index of tree T to SW:= 0; Step 3.2: For any main diagonal element a of the n-order generalized adjacency matrix A(T) i,i If the elements in the i-th row and i-th column are excluding a i,i There is only one element a after that i,j or a k,i If a is greater than 0, then a i,i a is a leaf vertex j,j or a k,k For the parent vertex, update a using formula (4). j,j The value of a j,j =a j,j (1+a i,i a i,j ) or a k,k =a k,k (1+a i,i a k,i ), , , , Formula (4) is as follows: , ,and (4) Among them, for any , V(T) is the vertex set of tree T, E(T) is the edge set of tree T, and T = (V(T), E(T); f, g) is a weighted tree with n (n>1) vertices, and e = (u, v) is the corresponding dangling edge. Let u and v be vertices of tree T, V(T)\{u} be the vertex set after removing vertex u, and E(T)\{e} be the edge set after removing edge e. For vertex generation functions, For edge generating functions; Step 3.3: Update the subtree weight index SW:= SW + a using formula (5). i,i And delete the i-th row and i-th column of matrix A(T), as shown in formula (5): (5) in, Let G be the subtree weight index; Step 3.4: Repeat steps 3.2 and 3.3 until matrix A(T) no longer changes. If matrix A(T) is a first-order matrix, then graph G is a tree, and the subtree weight index SW is updated to SW + a. 0,0 This will give you the subtree weight index of the tree; If the order of matrix A(T) is greater than 2, then graph G is not a tree. If the degree of the remaining diagonal elements is 2, then graph G is a single-loop graph structure. In step (2), when graph G is not a tree structure, the three types of bicyclic graph structures can be identified based on the degree of the diagonal elements in the generalized adjacency matrix, as follows: For a generalized adjacency matrix A(G), there exists a main diagonal element a i,i The elements in its i-th row and i-th column, excluding a i,i There are four elements greater than 0, and the remaining elements are on the main diagonal. The elements in its j-th row and j-th column, excluding a j,j If there are two elements greater than 0, then this matrix corresponds to the double-loop graph structure BG1. For a generalized adjacency matrix A(G), there exist two diagonal elements a. i,i The elements in its i-th row and i-th column, excluding a i,i There are three elements greater than 0, and the rest are on the main diagonal. The elements in its j-th row and j-th column, excluding a j,j If there are two elements greater than 0, then this matrix corresponds to either a double-loop graph structure BG2 or BG3. Update a. i,i Set two of the three adjacent elements greater than 0 to 0, let A := A, call the method to calculate the subtree weight index of the tree, and let the returned result be an r-order matrix A. If r = 1, it is a double-loop graph structure BG3; if r > 1, it is a double-loop graph structure BG2.

2. The method for predicting anti-HIV virus activity based on subtree weight topology index according to claim 1, characterized in that, In step (3), at least one of the Wiener index, Harary index and Schultz index is combined with the subtree weight index, and a model is constructed using a classic supervised learning algorithm to predict the anti-HIV activity of the compound.

3. The method for predicting anti-HIV virus activity based on subtree weight topology index according to claim 1, characterized in that, In step (2), the calculation method for the subtree weight index of the single-circle graph is as follows: Step 4.1: Assume a simple-cycle graph edge set of (v1, v2), (v2, v3), ..., (v... n−1 , v n ), (v n v1) respectively correspond to the element a in matrix A(G). 0,1 a 1,2 , · · ·, a n−2,n−1 a 0,n−1 Construct a sequential array CA = [0, 1, ..., n − 1] based on the adjacency relationships of the vertices of the single-cycle graph in the matrix, where the values ​​are the position indices of the diagonal elements; Step 4.2: Based on the array from Step 4.1, it can be seen that it does not contain edges (v n Subtree weight index of tree structure v1) ; Step 4.3: Similarly, based on the array from Step 4.1, we know that it does not contain edge (v1, v2) but does contain edge (v... n The subtree weight index of the tree structure of v1), i.e. ; Step 4.4: Repeat step 4.3 to calculate the values ​​of (v2, v3) which do not contain edges (v2, v3) but contain edges (v3, v4). n The subtree weights of the tree structure (v1, v2), ..., calculate the weights of the subtrees without edges (v1, v2). n−1 , v n ), but contains edges (v) n , v1), (v1,v2), ..., (v n−2 , v n−1 The subtree weight index of the tree structure is obtained by combining step 4.2 and formula (6), and then the subtree weight index of the single-loop graph based on the generalized adjacency matrix is ​​obtained. Formula (6) is as follows: (6), in, The subtree weight index for a single-circle graph. For a single-cycle graph, the subtree weight index does not include the edge (v1, v2). A monocyclic graph without edges (v j , v j+1 But containing edges (v) i ,v i+1 The subtree weight index.

4. The method for predicting anti-HIV virus activity based on subtree weight topology index according to claim 1, characterized in that, The subtree weight index of a bicyclic graph BG1 with no common edges is calculated as follows: Step 6.1: Find the vertex v with degree 4. s Starting from index s in the matrix, construct an array of vertex adjacency relationships for the monocyclic graph based on the monocyclic graph structure recognition algorithm. Step 6.2: Using the array from Step 6.1, combined with the subtree weight calculation algorithm for a single-loop graph without a given edge from Step 4.2, and the subtree weight calculation algorithm for a single-loop graph with a given path from Step 4.3, the single-loop graph can be obtained. or excluding vertices v s Subtree weights and the number of vertices v s Subtree weights; Step 6.3: If step 6.2 yields a single-loop diagram. excluding vertices v s Subtree weights and the number of vertices v s The subtree weights are then used to obtain the weights of the other single-loop graph based on the values ​​of the array in step 6.

1. Given the generalized adjacency matrix, repeat steps 6.1 and 6.2 to obtain the single-cycle graph. without vertices Subtree weight index and containing vertices Subtree weight index; If step 6.2 yields a single-loop diagram excluding vertices v s Subtree weights and the number of vertices v s The subtree weights are then used to obtain the weights of the other single-loop graph based on the values ​​of the array in step 6.

1. The generalized adjacency matrix is ​​obtained by repeating steps 6.1 and 6.2 to obtain the single-cycle graph. without vertices Subtree weight index and containing vertices Subtree weight index; Step 6.4: Combining steps 6.2 and 6.3, according to formula (7), the subtree weight index of the bicyclic graph BG1 without common edges is obtained, and formula (7) is as follows: (7), in, The subtree weight index for the double-loop graph BG1. For a bicyclic graph BG1 without vertices v s Subtree weight index This is one of the single-loop graphs after the tree vertices have shrunk onto the loop. Shrink the tree to vertex v s Vertex generation function, A single-loop diagram within a double-loop diagram. The vertex v s The subtree weight index.

5. The method for predicting anti-HIV activity based on subtree weight topology index according to claim 1 or 4, characterized in that, The subtree weight index of a bicyclic graph BG2 with no common edges is calculated as follows: Step 7.1: Construct an adjacency array for the vertex of the monocyclic graph and find two vertices with a degree of 3. , Position index in the matrix ,β,from To start, construct an adjacency array of the vertices of a single-cycle graph. If the vertex is found again... If β is found, the array creation is successful; otherwise, the array creation fails. Alternatively, a vertex adjacency array of the single-cycle graph can be created starting from β. If β is found again, the array creation is successful; otherwise, the array creation fails. If array creation fails, the array creation fails; if array creation fails, disconnect the two vertices with a degree of 3 based on the values ​​of this array. , Connected edges, again from Alternatively, start with β to construct a vertex adjacency array for a single-cycle graph; Step 7.2: Based on the array from Step 7.1, this single-loop diagram can be obtained. No vertices or Subtree weights, including vertices or The subtree weights, and another single-loop graph. No vertices or The subtree weights; or this single-loop graph can be obtained. No vertices or Subtree weights, including vertices or The subtree weights, and another single-loop graph. No vertices or Subtree weights; Step 7.3: If Including vertices ,calculate Including vertices The subtree weights are first established. Given a vertex adjacency array, we can calculate... Including vertices Subtree weights, update vertices The weight of the subtree, disconnected from The edges on two connected circles make the vertex Able to shrink to the vertex , get Including vertices The subtree weight index; similarly, if Including vertices ,calculate Including vertices Subtree weights; like Including vertices ,calculate Including vertices The subtree weights are first established. Given a vertex adjacency array, we can calculate... Including vertices Subtree weights, update vertices The weight of the subtree, disconnected from The edges on two connected loops make the vertex Able to shrink to the vertex , get Including vertices The subtree weight index; similarly, if Including vertices ,calculate Including vertices Subtree weights; Step 7.4: Combining steps 7.2 and 7.3 with formula (8), we obtain a bicyclic graph with no common edges. The subtree weight index is given by formula (8) as follows: (8), in, The subtree weight index for the double-loop graph BG2. For a bicyclic graph BG2 without vertices v s Subtree weight index This is one of the single-loop graphs after the tree vertices have shrunk onto the loop. Shrink the tree to vertex v s Vertex generation function, A single-loop diagram within a double-loop diagram. Including vertex v s The subtree weight index.

6. The method for predicting anti-HIV virus activity based on subtree weight topology index according to claim 1 or 4, characterized in that, The method for calculating the subtree weight index of a bicyclic graph BG3 with a common edge is as follows: Step 8.1: Construct an adjacency array for the vertex of the monocyclic graph and find two vertices with a degree of 3. , Position index in the matrix ,β, from To create a single-cycle graph vertex adjacency array, start from β and find β; otherwise, the array is successfully created. If so, the array has been successfully created; Step 2: Calculate the results for arrays without edges based on the arrays from Step 8.

1. Subtree weight index, including edges excluding edges The subtree weight index, ..., until the calculation contains The subtree weight index, combined with formula (9), finally yields the subtree weight index of the bicyclic graph BG3 with a common edge. Formula (9) is as follows: (9), in, This refers to the subtree weight index of the double-loop graph BG3. BG3 is a bicyclic graph without edges. Subtree weight index BG3 is a bicyclic graph containing edges. Subtree weight index BG3 is a bicyclic graph without edges. But including the edge The subtree weight index.