A method for judging similarity of organic molecules by resistance distance-kirchhoff iteration
By using the resistance distance-Kirchhoff iteration method, the molecular structure of organic compounds is transformed into a graph theory model. A weighted adjacency matrix is constructed and Kirchhoff iteration calculations are performed. This solves the problem that existing technologies cannot accurately distinguish organic molecules with different types of chemical bonds, and achieves efficient molecular similarity judgment. It is applicable to bioinformatics network analysis and drug development.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHWESTERN POLYTECHNICAL UNIV
- Filing Date
- 2026-03-04
- Publication Date
- 2026-05-29
AI Technical Summary
Existing molecular similarity assessment methods have computational limitations when dealing with complex topological structures. They cannot accurately distinguish organic molecules with the same atomic composition but different chemical bond types. Furthermore, traditional graph matching methods fail to quantify the specific types of chemical bonds, resulting in discrepancies between the calculated similarity results and the actual physical properties of the molecules.
The method of resistance distance-Kirchhoff iteration is used to transform the molecular structure of organic compounds into a graph theory model. A weighted adjacency matrix is constructed by simplifying the linear input of molecules, an extended adjacency matrix is constructed by introducing a symbolic parameter, and the resistance distance matrix sequence is calculated by Kirchhoff iteration to quantify the similarity distance between molecular graphs.
This method can accurately reflect the physicochemical properties of molecules, improve the ability to distinguish the topological differences of structurally isomorphic molecules, reduce computational complexity, and improve the efficiency of large-scale molecular data computation. It is suitable for bioinformatics network analysis, protein-protein interaction network comparison, and candidate molecule screening in drug development.
Smart Images

Figure CN122117118A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cheminformatics technology, specifically to a method for determining the similarity of organic molecules using resistance distance-Kirchhoff iteration. Background Technology
[0002] Similarity assessment of organic molecules is a fundamental computational task in cheminformatics. The physicochemical properties and biological activities of molecules are primarily determined by their internal topological structure; organic molecules with similar structures typically exhibit similar functional characteristics. This assessment technique is currently widely used in core business scenarios such as drug molecule library screening, protein-protein interaction network analysis, and gene regulatory network alignment. To achieve batch molecular structure alignment in computer systems, it is usually necessary to abstract chemical molecules into mathematical graph models that can be used for algebraic operations.
[0003] Current molecular similarity assessment methods in this field suffer from computational limitations when dealing with complex topological structures. Traditional techniques, such as the Tanimoto coefficient method based on molecular fingerprints, primarily rely on extracting molecular fragments and performing local statistical matching. This matching mechanism, during the process of disassembling the molecular structure, easily truncates long-range connections between atoms, leading to the loss of global topological information and ultimately causing the calculated similarity results to deviate from the actual physical properties of the molecules. Furthermore, most existing graph matching methods, when constructing molecular graphs, only abstract chemical bonds between atoms into simple binary relationships representing connected states. This approach fails to quantify and incorporate the specific types of chemical bonds (e.g., the strength characteristics of single and double bonds) into the model parameters, resulting in the algorithm's inability to accurately distinguish organic molecules with the same atomic composition but different chemical bond types.
[0004] To overcome the shortcomings of existing technologies in terms of lost topological information and insufficient characterization of connection weights, this field introduces the resistive distance theory from graph theory. This theory equates discrete molecular graphs to physical resistance networks, using equivalent resistance values to quantify the topological distance between nodes. Combined with the Kirchhoff iterative computation framework, by simulating current propagation and potential distribution within matrix space, subtle topological shifts within the node network can be captured. There is a need in the industry for an effective mechanism that integrates the resistive distance-Kirchhoff iterative framework with computational methods for organic molecular characteristics, thereby constructing a more accurate molecular similarity assessment system. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method for determining the similarity of organic molecules based on resistance distance-Kirchhoff iteration, which solves the problems mentioned in the background section.
[0006] This invention provides a method for determining the similarity of organic molecules based on resistive distance-Kirchhoff iteration, comprising the following steps:
[0007] The structural information of two organic molecules to be compared is obtained, and the structural information is transformed into a weighted adjacency matrix representing the organic molecule graph by simplifying the linear input norm of the molecules.
[0008] An extended adjacency matrix is constructed by replacing elements and expanding dimensions using preset sign parameters in conjunction with the weighted adjacency matrix, wherein the sign parameters are used for subsequent integral calculations.
[0009] By using the Kirchhoff iteration process, the graph structure corresponding to the extended adjacency matrix is treated as a passive resistance network, and the resistance distance matrix sequence of each organic molecule graph is calculated.
[0010] Based on the resistivity distance matrix sequence corresponding to the two organic molecular graphs obtained through iteration, the similarity distance between the two organic molecular graphs is calculated, and the degree of similarity between the two organic molecules is determined according to the similarity distance.
[0011] The structural information includes the types of atoms within the organic molecule and the types of chemical bonds between atoms. Transforming this structural information into a weighted adjacency matrix representing the organic molecule graph through simplified linear input canonicalization includes the following steps:
[0012] Parse the simplified linear input canonical string corresponding to the organic molecule to be compared, and extract the atom type and the chemical bond type;
[0013] Construct the organic molecule graph, with atoms as nodes and chemical bonds as edges, and number the nodes according to the order in which the atoms appear in the simplified molecule linear input standard string;
[0014] Weights are assigned based on the chemical bond type and its corresponding bond order or bond energy characteristics, and corresponding weight values are set for different chemical bond types.
[0015] An N×N symmetric matrix is constructed using the node numbers as row and column indices as the weighted adjacency matrix, where N is the total number of atoms.
[0016] The element values of the corresponding positions of two nodes connected by chemical bonds in the weighted adjacency matrix are assigned the weight values corresponding to the chemical bonds, the element values of the corresponding positions of nodes not connected by chemical bonds are assigned 0, and the element values on the main diagonal are assigned 0.
[0017] The process of constructing an extended adjacency matrix by using preset sign parameters in conjunction with the weighted adjacency matrix for element replacement and dimension expansion includes the following steps:
[0018] An expansion space of two rows and two columns is added to the weighted adjacency matrix;
[0019] Assign a fixed value of 1 to the non-diagonal elements in the newly added rows and columns;
[0020] Traverse the region containing the weighted adjacency matrix, retain the elements with values greater than 0, and replace all off-diagonal elements with values of 0 in the region with the symbol parameter.
[0021] Assign 0 to all diagonal elements of the expanded matrix while maintaining the matrix's symmetry to complete the construction of the expanded adjacency matrix.
[0022] The Kirchhoff iteration process includes the steps of constructing the conductance matrix and the degree matrix:
[0023] In the first iteration, the extended adjacency matrix is used as the adjacency matrix for the current round;
[0024] Initialize the conductance matrix. For the non-diagonal and non-zero element in the adjacency matrix of the current round, assign the element value of the corresponding position in the conductance matrix to the reciprocal of the non-diagonal and non-zero element, and assign 0 to the remaining positions in the conductance matrix.
[0025] Construct the degree matrix, and set the degree matrix as a diagonal matrix. The value of each element on the main diagonal of the degree matrix is set as the sum of all elements in the corresponding row of the conductance matrix.
[0026] The Kirchhoff iteration process also includes the steps of calculating the Laplace matrix and its pseudo-inverse matrix:
[0027] The degree matrix is subtracted from the conductance matrix element by element to obtain the Laplace matrix;
[0028] The Laplace matrix is inverted by using a matrix of all 1s of the same order as the Laplace matrix to obtain the pseudo-inverse matrix of the Laplace matrix.
[0029] The Kirchhoff iteration process also includes the extraction and updating of the resistance distance matrix:
[0030] Extract the intersection terms of the main diagonal and off-diagonal elements of the pseudo-inverse matrix, calculate the equivalent resistance distance between any two nodes in the organic molecular graph, and generate the symmetrical resistance distance matrix.
[0031] The resistance distance matrix is numerically amplified by a preset dimension scaling factor to generate a Kirchhoff matrix;
[0032] The Kirchhoff matrix is used as the adjacency matrix of the current iteration in the next iteration. The aforementioned iteration steps are repeated until the difference in the matrix norm of the Kirchhoff matrix output by two adjacent iterations is less than the preset convergence threshold, or the set maximum number of iterations is reached. Then, the iteration is stopped and the resistance distance matrix sequence is output.
[0033] Calculating the similarity distance between two organic molecular graphs includes the following steps:
[0034] Extract the elements at fixed positions in the Kirchhoff matrix corresponding to the two organic molecules to be compared after each iteration, and construct characteristic functions with respect to the symbol parameters respectively;
[0035] Within a preset integration interval, the square of the difference between the two characteristic functions is numerically integrated to obtain the integral value corresponding to each iteration.
[0036] The square root of the integral value is taken to obtain the distance component corresponding to each iteration;
[0037] The similarity distance is calculated based on the distance components corresponding to each iteration, including weighted averaging of the distance components of all completed iterations, and the calculated weighted average is used as the final similarity distance between the two organic molecular graphs.
[0038] The rule for determining the degree of similarity between two organic molecules based on the similarity distance is as follows:
[0039] If the similarity distance is 0, the two organic molecules involved in the comparison are determined to be the same molecules with the same topological structure.
[0040] If the similarity distance is greater than 0, it is determined that the two organic molecules have structural differences, and the value of the similarity distance is proportional to the degree of structural difference of the organic molecules.
[0041] The method provided by this invention can be applied to bioinformatics network analysis, protein-protein interaction network comparison, gene regulatory network similarity analysis, or candidate molecule screening in drug development.
[0042] The innovative principle of this invention lies in transforming the internal connectivity structure of organic molecules into a graph theory model, expressed through an algebraic matrix. During matrix construction, edge weights are directly assigned based on the specific type of chemical bond, preserving long-range connectivity within the molecules. Subsequently, by introducing continuous symbolic parameters to replace the original zero elements, parameterized connectivity is established between non-bonded atoms, thus transforming the molecular graph into a continuously differentiable algebraic function model. This process eliminates the dependence on node numbering order in discrete graph matching. Based on this, the molecular structure is equivalent to a physical resistance network, and Kirchhoff iteration is performed. The resistance distance matrix of each node is extracted by calculating the Laplace matrix and its pseudo-inverse. This iterative calculation method avoids the combinatorial explosion problem in traditional graph matching algorithms, transforming the comparison of topological structures into function integration operations over continuous intervals. This method relies on deterministic matrix algebraic operations to output numerical results, quantifying the topological differences between structurally heterogeneous molecules and ensuring the accuracy of isomorphism determination and the efficiency of large-scale molecular data computation.
[0043] This invention provides a method for determining the similarity of organic molecules based on resistive distance-Kirchhoff iteration. It has the following beneficial effects:
[0044] 1. This invention transforms the simplified linear input norm of molecules into a weighted adjacency matrix, and then introduces symbolic parameters to construct an extended model. This fully preserves the atomic types, chemical bond types, and global connectivity relationships of molecules, overcoming the shortcomings of traditional methods that easily lose long-range topological information of organic molecules. In actual implementation, this method not only eliminates the computational interference caused by the node arrangement order when determining isomorphism, but also improves the distinguishability of topological differences between structurally isomorphic molecules, enabling the similarity measurement results to accurately reflect the physicochemical properties of molecules.
[0045] 2. This invention uses Kirchhoff's iterative process to extract the resistance distance features of molecular graphs, transforming complex graph topological comparisons into continuous linear algebraic operations such as obtaining the generalized inverse from the Laplace matrix. Compared to traditional graph editing distance algorithms that use discrete matching, this scheme avoids the bottleneck of nondeterministic polynomial computation associated with graph isomorphism determination from the underlying logic. This improvement at the algorithm architecture level keeps the time complexity stably controlled at the polynomial level, optimizes computational efficiency, and makes it possible to perform batch similarity judgments on large-scale organic molecule datasets.
[0046] 3. This invention constructs a complete technical chain from algebraic theory and iterative computation to final similarity determination, providing a reliable foundation for engineering implementation. The deterministic algorithm model formed by this scheme can serve as a standardized technical tool, directly reducing the application threshold of complex molecular comparative analysis. Based on its reliable output results, this invention can be effectively extended to interdisciplinary fields such as protein interaction network comparison, candidate active molecule matching in drug development, and precursor structure screening in chemical synthesis, and has clear industrial application value. Attached Figure Description
[0047] Figure 1 This is a flowchart of the method steps of the present invention;
[0048] Figure 2 This is a schematic diagram of the molecular structures of n-pentane, isopentane, and neopentane;
[0049] Figure 3 This is a line graph showing the similarity distance between n-pentane and isopentane as a function of the number of iterations.
[0050] Figure 4 This is a line graph showing the similarity distance between n-pentane and neopentane as a function of the number of iterations.
[0051] Figure 5 This is a line graph showing the similarity distance between isopentane and neopentane as a function of the number of iterations.
[0052] Figure 6 A line graph showing the variation of the similarity distance between the forward and reverse labeled adjacency matrices of 1-pentene with the number of iterations;
[0053] Figure 7 This is a schematic diagram of the graph similarity distance evolution of three organic molecules in an embodiment of the present invention. Detailed Implementation
[0054] The technical solutions in 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.
[0055] Please see the appendix Figure 1 This invention provides a method for determining the similarity of organic molecules based on resistive distance-Kirchhoff iteration, comprising:
[0056] Obtain the structural information of two organic molecules to be compared. Transform this structural information into a weighted adjacency matrix by simplifying the linear input normalization of the molecules. The weighted adjacency matrix records the connections between atoms and chemical bonds in the molecules and their corresponding weights.
[0057] An extended adjacency matrix is constructed based on the weighted adjacency matrix described above. A sign parameter is introduced during the construction of the extended adjacency matrix. This symbol parameter is used for integration calculations in subsequent processes.
[0058] The resistivity distance matrix sequence for each molecular graph is calculated using a Kirchhoff iterative process. This process treats the molecular graph as a resistivity network, simulating the propagation of current within the network during the calculation.
[0059] The similarity distance between two molecular graphs is calculated based on the resistivity distance matrix sequence obtained through iteration. This step yields a quantitative measure of the similarity between organic molecules.
[0060] Before performing the above method, the input parameters required for the calculation must be determined. The input parameters include the organic molecules to be compared. and The weighted adjacency matrix obtained after transformation and .
[0061] Define the control conditions for the algorithm's operation. These control conditions include the maximum number of iterations and the convergence threshold. These two parameters are used to determine whether the iteration terminates during Kirchhoff iteration.
[0062] Define the integration parameters required for the algorithm's calculation. These parameters include the integration interval used to define the calculation range. and the number of integration sampling points used for numerical integration calculations. .
[0063] After matrix construction, iteration, and integration, the similarity distance between the two organic molecules is output. .
[0064] The system determines the degree of similarity between molecules based on the output similarity distance. If the similarity distance calculation result is 0, the two organic molecules being compared are determined to be the same molecule.
[0065] If the similarity distance is greater than 0, the molecules are considered to be different. The value of the similarity distance is directly proportional to the degree of difference between the organic molecules; the larger the value, the greater the difference between the two organic molecules.
[0066] In this embodiment, the structural information of two organic molecules to be compared is obtained and converted into a weighted adjacency matrix by simplifying the linear input normalization of the molecules. The technical principle of the conversion process provided in this embodiment is: to map the discrete chemical molecular structure equivalently to a weighted network in graph theory, using the nodes of the molecular graph to represent atoms and the edge weights to represent the chemical bond strength, thereby providing an accurate topological foundation for subsequent current simulation calculations using Kirchhoff's laws. The conversion process specifically includes the following sub-steps:
[0067] The simplified molecular linear input specification (SMILES) string corresponding to the organic molecules to be compared is obtained. String parsing is performed to extract the atom types within the organic molecules and identify the chemical bond types between atoms. As a preferred implementation, the simplified molecular linear input specification is chosen as the original input parameter because it can record the topological connections and chemical characteristics of atoms in a standard character sequence. Based on the conversion logic from the simplified molecular linear input specification string to the weighted adjacency matrix of the organic molecules, the computer device executing the method parses each atomic entity and its corresponding chemical bond connection relationship from the simplified molecular linear input specification string.
[0068] Based on the extracted atomic and chemical bond information, a molecular graph model is established. Atoms in the organic molecule are used as nodes in the molecular graph, and chemical bonds between atoms are used as edges. Mathematically, the generated molecular graph is abstracted as a graph theory network model, and the mathematical relationships of the graph theory network model are defined as follows:
[0069] ;
[0070] in, This represents the constructed molecular diagram model of an organic compound; This represents the set of all atomic nodes in the molecular diagram; This represents the set of weighted chemical bond-connected edges. The above definition maps complex chemical structures to mathematical objects capable of performing linear algebraic operations. The specific expanded form of the node set is:
[0071] ;
[0072] in, This represents the number of atoms contained in an organic molecule, and its value is a positive integer greater than 0. Represents the first in the molecular diagram Atom nodes, subscript The value range is from 1 to A series of positive integers.
[0073] To quantitatively characterize the connection strength within organic molecules and construct a matrix coordinate system, the molecular graph model is numbered and weighted. The computer executing the method strictly follows the order of atoms appearing in the simplified linear input string, sequentially numbering the atoms in the molecular graph and generating corresponding subscript indices. Simultaneously, edge weights are defined by bond type (bond order or bond form). The specific rules for assigning corresponding weights to different bond types are not limited to conventional integer assignments (e.g., defining a single bond weight as 1, a double bond weight as 2, and a triple bond weight as 3). For complex organic molecules, for other types of bonds such as aromatic and coordinate bonds, corresponding weight values can be set based on the structural characteristics of the target organic molecule, the bond order, or bond energy properties. For example, the weight of an aromatic bond can be set to 1.5 based on the fractional bond order in molecular orbital theory. By customizing the weight assignment rules, the weighted adjacency matrix can more realistically reflect the spatial structure and connection strength within organic molecules, adapting to the computational needs of different cheminformatics scenarios.
[0074] Based on the aforementioned numbering and weighting rules, the molecular graph is converted into a corresponding weighted adjacency matrix. Specifically, the molecular graph has no self-loops, meaning that atoms in the organic molecule do not bond to themselves; the molecular graph is an undirected graph, and the corresponding weighted adjacency matrix is a symmetric matrix, where the matrix elements represent the chemical bond weights between corresponding atomic pairs. In the constructed weighted adjacency matrix, for non-bonded atomic pairs, the corresponding element value is 0; for bonded atomic pairs, the corresponding element value is the weight of the corresponding chemical bond. This numbering and value assignment mechanism based on analytical sequences establishes a rigid mapping between atomic entities and matrix coordinates, eliminating computational ambiguities caused by differences in node arrangement during isomorphism determination from the computational root. This ensures that organic molecules with the same topological structure can generate a definite and unique weighted adjacency matrix after conversion, laying the foundation for the subsequent construction of extended adjacency matrices.
[0075] In this embodiment, after completing the transformation of organic molecules into the original weighted adjacency matrix... After the transformation, the operation is performed based on the original weighted adjacency matrix. Construct an extended adjacency matrix The steps are as follows. The technical principle of the extended adjacency matrix construction process provided in this embodiment is that: traditional molecular adjacency matrices can only represent the relationships between adjacent atoms connected by physical chemical bonds, resulting in the global structural information of non-bonded atoms within organic molecules being represented as zero values and ignored in the matrix. To solve this problem, by extending the matrix dimension and introducing symbolic parameters, parameterized associations are established between discrete nodes that were originally not directly connected, thereby mapping the static organic molecule structure into a continuous parametric model containing global topological information. The extended adjacency matrix construction process specifically includes the following steps:
[0076] Obtain the original weighted adjacency matrix Then initialize the matrix expansion space. Let the original weighted adjacency matrix generated in the previous steps be... The matrix dimension is ,in This represents the number of atoms contained in the current organic molecule. The computer device executing the method operates on the original weighted adjacency matrix. Based on the existing matrix, add two rows and two columns, and use the newly added rows and columns as the extended adjacency matrix. The first row, second row, first column, and second column of the array are then used. After the above spatial expansion operation, a new expanded adjacency matrix is formed. The order of the expanded matrix The mathematical expression is:
[0077] ;
[0078] Among them, here To expand the adjacency matrix The dimensional order, and and All values are positive integers greater than 0. The technical purpose of the extension operation is to introduce a unified external reference dimension to the original molecular graph model, providing a matrix space basis for subsequent parameterized operations.
[0079] For extended adjacency matrix The newly added rows and columns are filled with values. The computer device executing the method will expand the adjacency matrix. The non-diagonal elements in the first, second, first, and second rows and columns are all set to a fixed value of 1, while the diagonal elements in the newly added rows and columns are set to 0. Specifically, for the extended adjacency matrix... elements in , when the row index And column index At that time, assign a value Similarly, when column indexes... And row index At that time, assign a value The constantization assignment operation is mathematically equivalent to establishing a standardized connectivity between the newly added reference node and all atomic nodes inside the organic molecule, ensuring the overall connectivity of the matrix and preventing singularity problems during subsequent matrix inversion operations.
[0080] For extended adjacency matrix The parts corresponding to the original organic molecule structure are parameterized and replaced. For the extended adjacency matrix... Bank of China Index With column index For all values greater than 2, the computer device executing the method traverses the corresponding original weighted adjacency matrix. All elements at each position. Restore the original weighted adjacency matrix. Non-zero elements are retained, meaning the chemical bond weights between bonded atom pairs that were originally connected by chemical bonds remain unchanged. Simultaneously, the original weighted adjacency matrix is... All off-diagonal zero elements in the code are replaced with sign parameters. As a preferred implementation, a symbol parameter is introduced. The non-bonded atom pairs that were originally zero in the matrix are given controlled, parameterized virtual connections. This substitution operation allows the overall topological constraints of the organic molecule to be expressed in a differentiable way in the function space, avoiding the direct truncation of the relative positions of distant atoms.
[0081] Consistency constraints on the matrix structure properties are applied. After filling in the aforementioned values and parameters, the computer device executing the method applies these constraints to the entire extended adjacency matrix. Perform symmetry and diagonal element verification. On the one hand, maintain the extended adjacency matrix. The symmetry, that is, for all row indexes and column indexes (in ), satisfying the following mathematical relationship:
[0082] ;
[0083] On the other hand, setting an extended adjacency matrix All diagonal elements are 0, ensuring that the constructed graph model has no self-loops, i.e., for all row indices... (in ), satisfying the following mathematical relationship:
[0084] ;
[0085] in, Represents the extended adjacency matrix The Middle Line number Column elements; Represents the extended adjacency matrix The Middle Line number Column elements; Represents the extended adjacency matrix The elements on the main diagonal of the matrix. The above constraints strictly guarantee the extended adjacency matrix. It conforms to the algebraic characteristics of undirected simple graphs, providing complete mathematical support for subsequent extraction of topological indices or matrix transformations.
[0086] In this embodiment, after obtaining the extended adjacency matrix, the step of calculating the resistance distance matrix sequence for each organic molecule graph using the Kirchhoff iteration process is performed. Regarding the general technical principle of the Kirchhoff iteration process: the extended organic molecule graph is equivalent to a multi-node passive resistive network, and the elements in the adjacency matrix are considered as numerical mappings of branch conductance. By simulating the multi-path diffusion and conduction of current in the passive resistive network, the equivalent resistance between any two points in the passive resistive network is calculated. The equivalent resistance not only reflects the shortest physical connection between nodes but also integrates the parallel current splitting effect of all possible connected paths, thus enabling a more comprehensive capture of the global topological features of the organic molecules. Based on the above equivalent model, to deeply mine the topological differences between organic molecules in the parameterized space, the computer device executing the method updates the matrix state through multiple iterations, generating a resistance distance matrix sequence to characterize the changes in topological features with the iteration depth. The Kirchhoff iteration process specifically includes the following sub-steps:
[0087] Based on the adjacency matrix of the current round Constructing the conductance matrix Let the adjacency matrix of the current iteration be... The adjacency matrix of the current round The internal elements are denoted as In the first iteration, the adjacency matrix of the current round... This is the extended adjacency matrix constructed in the previous step. The computer device executing the method initializes a matrix with dimension 1. The zero matrix is used as the conductance matrix to be constructed. For the equivalent circuit, the closer the branch connections, the higher the conductivity. Therefore, for the adjacency matrix of the current round... Each element in the matrix needs to have its corresponding conductance value calculated through conditional judgment and reciprocal calculation. To ensure the completeness of the algorithm logic, especially to prevent overflow errors where the denominator approaches 0 in the matrix reciprocal calculation, the conductance matrix... The element calculations must follow strict boundary constraints. As a preferred implementation, the conductance matrix... elements in The computational logic satisfies the following mathematical relationship:
[0088] ;
[0089] ;
[0090] in, Represents the conductance matrix The Middle Line number Column elements; Represents the adjacency matrix of the current round The Middle Line number The element values of the column; and The value range is 1 to Positive integers. The physical meaning of a piecewise function is: in the equivalent circuit model, for pairs of nodes that are connected (i.e., ... The conductivity value of the corresponding element is directly assigned as its reciprocal; while for the node itself (i.e., ... ) or an open circuit state that was originally disconnected (i.e. ), conductance matrix The conductivity value of the corresponding element is directly and forcibly assigned to 0.
[0091] Based on the conductivity matrix Calculate the degree matrix The computer device executing the method initializes a dimension. The zero matrix is used as the degree matrix to be constructed. Degree matrix This is a diagonal matrix used to characterize the total conductivity connected to each node in a passive resistive network. (The degree matrix is not explicitly defined.) The main diagonal elements are used to calculate the corresponding conductance matrix. The sum of all elements in the same row; for off-diagonal elements, keep the sum to zero. The corresponding mathematical expression is as follows:
[0092] ;
[0093] ;
[0094] in, Degree matrix The Middle Line number Column elements; Represents the conductance matrix The Middle Line number The elements of the column.
[0095] Based on degree matrix and conductance matrix Calculate the Laplace matrix The computer device executing the method performs a matrix subtraction operation, subtracting the degree matrix... With conductance matrix By subtracting element by element, we obtain the Laplace matrix. The mathematical relationship is as follows:
[0096] ;
[0097] in, The calculated Laplace matrix; The degree matrix obtained from the above steps; The conductivity matrix obtained from the above steps is given.
[0098] Calculate the Laplace matrix pseudo-inverse matrix Because of the Laplace matrix corresponding to an undirected graph Essentially a positive semi-definite matrix, it possesses zero eigenvalues, exhibiting a singular state, and its inverse cannot be directly obtained using conventional methods. The computer equipment executing the method is based on the calculation principle of the Moore-Penrose generalized inverse, introducing a mean shift operation to solve for the Laplace matrix. pseudo-inverse matrix The specific calculation formula is as follows:
[0099] ;
[0100] in, Represents the Laplace matrix The pseudo-inverse matrix; The dimension is It is a matrix of all 1s, where all internal elements are 1s. To extend the dimension of the adjacency matrix; superscript The standard inversion operation for a matrix.
[0101] Based on pseudo-inverse matrix Calculate the resistance distance matrix The computer device executing the method initializes a dimension. The zero matrix is used as the resistance distance matrix to be constructed. By extracting the pseudo-inverse matrix Calculate the equivalent resistivity distance between any two nodes in the molecular graph of an organic compound by taking the intersection terms of the diagonal and off-diagonal elements. This involves considering the resistivity distance matrix. The specific mathematical expression for each element in the matrix is as follows:
[0102] ;
[0103] in, Represents the resistance distance matrix The Middle Line number Column elements; and They represent pseudo-inverse matrices respectively. The main diagonal element in; Represents the pseudo-inverse matrix The diagonal elements are not included. The resistance distance matrix is a symmetric matrix. And the diagonal elements are 0 ( ).
[0104] Based on resistance distance matrix Update the adjacency matrix for the current round. Used for the next iteration. The computer device executing the method modifies the resistance distance matrix using a dimension scaling factor. Numerical amplification is performed to obtain a new Kirchhoff matrix. The updated mathematical formula is:
[0105] ;
[0106] in, This represents the updated Kirchhoff matrix; To expand the order of the adjacency matrix; The resistance distance matrix is obtained by solving the above steps. After the update is completed, the resulting Kirchhoff matrix will be... As the adjacency matrix of the current round in the next iteration process Repeat the Kirchhoff iteration process. The iteration process is repeated until the preset number of iterations is reached or the convergence condition is met.
[0107] In this embodiment, after completing the Kirchhoff iteration process and obtaining the resistance distance matrix sequences corresponding to the two organic molecules to be compared, the computer device executing the method needs to convert the resistance distance matrix sequences into intuitive similarity distances to obtain a quantitative measure of the similarity between the organic molecules. The specific calculation process for calculating the similarity distance between two molecular graphs based on the resistance distance matrix sequences obtained through iteration includes the following sub-steps:
[0108] For each iteration In the integration interval The characteristic functions are calculated and extracted. The computer device executing the method extracts the characteristic functions of the two organic molecules to be compared on the [number]th [timeframe]. The Kirchhoff matrix corresponding to the next iteration The element in the 1st row and 2nd column (i.e. The value of ) is used to construct information about the symbolic parameter. function sum function .
[0109] Calculate the integral of the square of the difference between continuous functions over the parameter interval. The computer device executing the method is located over the parameter interval. Uniform sampling Points. In this embodiment, the parameter range lower limit Set to 1.0, maximum. Set to 2.0, number of sampling points The value is set to 10. The computer device executing the method performs numerical integration calculations using the trapezoidal rule, and the first... The integral value corresponding to the next iteration The formula is as follows:
[0110] ;
[0111] in, Indicates the first The integral value obtained from the next iteration; and These are the lower and upper limits of the set integration interval, respectively; For symbolic parameters.
[0112] The distance component for each iteration is calculated based on the square root of the integral described above. The computer device executing the method processes the integral value. Perform the square root operation for each iteration. Calculate the distance components The formula is as follows: in, Indicates the first The distance component of the next iteration; This is the integral value calculated in the previous steps. Distance component. It is always a non-negative real number. The larger the value, the greater the difference in the topological structure of the two organic molecules being compared.
[0113] The final molecular similarity distance is obtained by weighted averaging the distance components from all iterations. The computer device executing the method calculates the distance components from all completed iterations. Perform a weighted average to calculate the final molecular diagrams of the two organic compounds to be compared. and molecular diagram Graph similarity distance The calculation formula is: in, Represents the final composite graph similarity distance; Indicates the preset number of iterations; For the first The distance component corresponding to the next iteration. As a simpler preferred implementation, the computer device executing the method can use a two-iteration simplified evaluation. At this point, the simplified graph similarity distance... Calculated using the following formula:
[0114] ;
[0115] In this simplified formula, and Specifically refers to the Kirchhoff matrix of two organic molecules being compared after the second iteration. The corresponding extracted feature function.
[0116] Finally, the calculated graph similarity distance is a real number between 0 and positive infinity. If the graph similarity distance is equal to 0 (or close to 0), the two tested organic molecules are determined to be isomorphic, meaning their topological structures are completely identical. Conversely, if the graph similarity distance is significantly greater than 0, the larger the value, the greater the difference in molecular structure between the two tested organic molecules, and the lower their similarity. In this embodiment, the quantitative measure of organic molecule similarity calculated based on the aforementioned steps, and the organic molecule similarity judgment method based on resistance distance-Kirchhoff iteration, can be widely applied in the fields of bioinformatics network analysis and cheminformatics.
[0117] Please refer to the attached diagram, 2-Appendix. Figure 6 Specifically, this method covers the following typical application scenarios: predicting the functional similarity of corresponding proteins in vivo in protein-protein interaction network comparisons; identifying gene modules with synergistic effects or functional correlations in gene regulatory network similarity analysis; and matching candidate active molecules with similar topological structures and potential pharmacological activities in the candidate molecule screening stage of drug development. To verify the accuracy and physical significance of the judgment method, in this embodiment, three isomer organic molecules were selected for comparative analysis: n-pentane, isopentane, and neopentane. The computer device executing the method acquired the structural information of the above three organic molecules and converted it into corresponding weighted adjacency matrices, performing Kirchhoff iteration calculations under preset parameters. At the 20th iteration, the graph similarity distance between n-pentane and isopentane was calculated to be 6.8e-4; between n-pentane and neopentane was 2.0e-3; and between isopentane and neopentane was 1.3e-3.
[0118] Based on the relative magnitudes of the graph similarity distance values, a deep analysis is conducted at the level of differences in the topological structures of organic molecules: n-pentane and isopentane have the most similar carbon skeleton topologies, corresponding to the smallest graph similarity distance values; n-pentane (straight chain) and neopentane (tetrahedral) have extremely different carbon skeleton topologies, corresponding to the largest graph similarity distance values; the structural differences between isopentane and neopentane fall between the first two groups, and the distance values also conform to this intermediate state. Furthermore, the boiling points of n-pentane, isopentane, and neopentane are known to be 36.1℃, 27.8℃, and 9.5℃, respectively, and this difference in physical properties perfectly matches the relative magnitudes of the graph similarity distance values. In addition to isomer differentiation, the method also possesses rigorous graph isomorphism verification capabilities. Taking 1-pentene molecules as an example, the computer equipment executing the method sequentially labels the carbon chains from left to right to construct a forward-labeled adjacency matrix, and then sequentially labels them from right to left to construct a reverse-labeled adjacency matrix. The calculation results show that the graph similarity distance between the two sets of label adjacency matrices reaches the order of 10e-15. Considering the precision limit of floating-point arithmetic, this value can be considered as 0 in mathematical and engineering applications. This result fully demonstrates that the judgment method has extremely high accuracy and algorithm robustness in realizing isomorphic graph recognition and determining the absolute consistency of organic molecules.
[0119] Specific application examples:
[0120] Please see the appendix Figure 7 To assist examiners and those skilled in the art in understanding the abstract mathematical matrix transformation process, n-pentane and isopentane are used as the organic molecules to be compared. And provide specific execution examples.
[0121] Step 1: Obtain the simplified molecular linear input specification (SMILES) string for n-pentane as "CCCCC" and the SMILES string for isopentane as "CC(C)CC". Both contain 5 carbon atoms (hydrogen atoms are ignored to simplify the topology).
[0122] The computing device executing the method converts it into a 5×5 weighted adjacency matrix. and With n-pentane For example, its main carbon chains are connected sequentially, so the second diagonal element of the matrix is 1 (single bond weight), and the other non-bonded elements are all 0.
[0123] Step 2: For and Add two rows and two columns of reference dimension to expand it into a 7×7 extended adjacency matrix. Taking the expanded matrix of n-pentane as an example, the off-diagonal elements in rows 1 and 2, and columns 1 and 2, are all assigned a value of 1; while for the non-bonded atom pairs that were originally 0 in the original 5×5 region (such as the first carbon and the third carbon), their corresponding elements in the expanded matrix are all replaced with symbolic parameters. At this point, the molecular diagram transforms from a discrete 0-1 matrix into a symbolic parameter with continuous variables. The algebraic function matrix.
[0124] Step 3: In the first iteration, for In the interval The system calculates the equivalent conductance matrix and Laplace matrix, extracts the resistance distance using the generalized inverse matrix, and then updates the Kirchhoff matrix. The system extracts the first... After the second iteration, the element in the first row and second column of the matrix forms the characteristic function. (Regarding n-pentane) and (Regarding isopentane).
[0125] By taking the square of the difference between the two functions in the interval... Numerical integration and square root extraction are performed, and the feature differences from each iteration are accumulated. After 20 iterations, the system converges, outputting a final image similarity distance of 6.8 × 10⁻⁶. -4 It accurately quantifies the minute shifts in the topology of straight chains and single-branch chains.
[0126] To verify the accuracy and technical advantages of the method of the present invention in determining the similarity of organic molecules, this embodiment uses a publicly available cheminformatics dataset (containing alkane isomers and substituted benzene derivatives) for comparative experiments. Two commonly used benchmark methods in the field are selected as comparison items: Method 1 is the Tanimoto similarity method based on two-dimensional molecular fingerprints; Method 2 is the traditional graph editing distance algorithm.
[0127] Comparison of isomorphic image recognition and anti-interference capabilities:
[0128] The test sample introduced a 1-pentene isomorphic sequence with scrambled node numbers.
[0129] Comparison Method 1: Due to hash collisions, when processing isomorphic graphs containing cycles or complex branches, occasional misjudgments of similarity of 0.999 (not absolute 1) occur.
[0130] Comparison Method 2: Node matching is limited by the graph isomorphism problem, when the number of molecular nodes... At this time, the computation time increases exponentially, and it is easy to get trapped in local optima, leading to misjudgment.
[0131] The method of this invention benefits from the established absolute coordinates and parameterized extended adjacency matrix. Even with completely reversed or randomly shuffled node numbers, the calculated graph similarity distance is always strictly within 10. -5 The order of magnitude (the limit of floating-point operations, i.e., the absolute distance is 0). Furthermore, due to the use of deterministic Kirchhoff iteration calculations, the time complexity is stable at [value missing]. Compared to the GED algorithm, the computational efficiency is improved by two orders of magnitude, completely solving the ambiguity problem of isomorphism determination.
[0132] Correlation between topological differences and physical properties: Using three isomers, n-pentane, isopentane, and neopentane, the Pearson correlation coefficient between the similarity distance output by the algorithm and the actual physical boiling point (intermolecular forces and structural compactness) was tested.
[0133] Comparison Method 2 (Traditional GED): Since it only calculates the discrete steps of adding / deleting nodes / edges, the number of edit steps for converting n-pentane to isopentane and isopentane to neopentane is the same (distance discretization), which cannot reflect the continuous change of topological compactness, and the correlation coefficient with the boiling point difference is only 0.65.
[0134] The method of this invention: This method maps discrete structures to parameters. The constructed continuously differentiable function space captures global topological properties through multiple rounds of resistive current shunting effect. The experimentally measured distance between n-pentane and isopentane is 6.8 × 10⁻⁶. -4 The distance between isopentane and neopentane is 1.3 × 10⁻⁶. -3 The distance between n-pentane and neopentane is 2.0 × 10⁻⁶. -3 The distance gradient perfectly maps the topological evolution from linear to tetrahedral structures, and its Pearson correlation coefficient with the boiling point variation is as high as 0.98, demonstrating that this method has extremely high physicochemical interpretability.
Claims
1. A method for determining the similarity of organic molecules using resistive distance-Kirchhoff iteration, characterized in that, Includes the following steps: The structural information of two organic molecules to be compared is obtained, and the structural information is transformed into a weighted adjacency matrix representing the organic molecule graph by simplifying the linear input norm of the molecules. An extended adjacency matrix is constructed by replacing elements and expanding dimensions using preset sign parameters in combination with the weighted adjacency matrix, wherein the sign parameters are used for integral calculation; By using the Kirchhoff iteration process, the graph structure corresponding to the extended adjacency matrix is treated as a passive resistance network, and the resistance distance matrix sequence of each organic molecule graph is calculated. Based on the resistivity distance matrix sequence corresponding to the two organic molecular graphs obtained through iteration, the similarity distance between the two organic molecular graphs is calculated, and the degree of similarity between the two organic molecules is determined according to the similarity distance.
2. The method for determining the similarity of organic molecules using resistive distance-Kirchhoff iteration according to claim 1, characterized in that, The structural information includes the types of atoms within the organic molecule and the types of chemical bonds between atoms. Transforming this structural information into a weighted adjacency matrix representing the organic molecule graph through simplified linear input canonicalization includes the following steps: Parse the simplified linear input canonical string corresponding to the organic molecules to be compared, and extract the atom type and the chemical bond type; Construct the organic molecule graph, with atoms as nodes and chemical bonds as edges, and number the nodes according to the order in which the atoms appear in the simplified molecule linear input standard string; Weights are assigned based on the chemical bond type and its corresponding bond order or bond energy characteristics, and corresponding weight values are set for different chemical bond types. The element values of the corresponding positions of two nodes connected by chemical bonds in the weighted adjacency matrix are assigned the weight values corresponding to the chemical bonds, the element values of the corresponding positions of nodes not connected by chemical bonds are assigned 0, and the element values on the main diagonal are assigned 0.
3. The method for determining the similarity of organic molecules using resistive distance-Kirchhoff iteration according to claim 1, characterized in that, The process of constructing an extended adjacency matrix by using preset sign parameters in conjunction with the weighted adjacency matrix for element replacement and dimension expansion includes the following steps: An expansion space of two rows and two columns is added to the weighted adjacency matrix; Assign a fixed value of 1 to the non-diagonal elements in the newly added rows and columns; Traverse the region containing the weighted adjacency matrix, retain the elements with values greater than 0, and replace all off-diagonal elements with values of 0 in the region with the symbol parameter. Assign 0 to all diagonal elements of the expanded matrix while maintaining the matrix's symmetry to complete the construction of the expanded adjacency matrix.
4. The method for determining the similarity of organic molecules using resistive distance-Kirchhoff iteration according to claim 1, characterized in that, The Kirchhoff iteration process includes the steps of constructing the conductance matrix and the degree matrix: In the first iteration, the extended adjacency matrix is used as the adjacency matrix for the current round; Initialize the conductance matrix. For the non-diagonal and non-zero element in the adjacency matrix of the current round, assign the element value of the corresponding position in the conductance matrix to the reciprocal of the non-diagonal and non-zero element, and assign 0 to the remaining positions in the conductance matrix. Construct the degree matrix, and set the degree matrix as a diagonal matrix. The value of each element on the main diagonal of the degree matrix is set as the sum of all elements in the corresponding row of the conductance matrix.
5. The method for determining the similarity of organic molecules using resistive distance-Kirchhoff iteration according to claim 4, characterized in that, The Kirchhoff iteration process also includes the steps of calculating the Laplace matrix and its pseudo-inverse matrix: The degree matrix is subtracted from the conductance matrix element by element to obtain the Laplace matrix; The Laplace matrix is inverted by using a matrix of all 1s of the same order as the Laplace matrix to obtain the pseudo-inverse matrix of the Laplace matrix.
6. The method for determining the similarity of organic molecules using resistive distance-Kirchhoff iteration according to claim 5, characterized in that, The Kirchhoff iteration process also includes the extraction and updating of the resistance distance matrix: Extract the intersection terms of the main diagonal and off-diagonal elements of the pseudo-inverse matrix, calculate the equivalent resistance distance between any two nodes in the organic molecular graph, and generate the symmetrical resistance distance matrix. The resistance distance matrix is numerically amplified by a preset dimension scaling factor to generate a Kirchhoff matrix; The Kirchhoff matrix is used as the adjacency matrix of the current iteration in the next iteration. The aforementioned iteration steps are repeated until the difference in the matrix norm of the Kirchhoff matrix output by two adjacent iterations is less than the preset convergence threshold, or the set maximum number of iterations is reached. Then, the iteration is stopped and the resistance distance matrix sequence is output.
7. The method for determining the similarity of organic molecules using resistive distance-Kirchhoff iteration according to claim 6, characterized in that, Calculating the similarity distance between two organic molecular graphs includes the following steps: Extract the elements at fixed positions in the Kirchhoff matrix corresponding to the two organic molecules to be compared after each iteration, and construct characteristic functions with respect to the symbol parameters respectively; Within a preset integration interval, the square of the difference between the two characteristic functions is numerically integrated to obtain the integral value corresponding to each iteration. The square root of the integral value is taken to obtain the distance component corresponding to each iteration; The similarity distance is calculated based on the distance components corresponding to each iteration.
8. The method for determining the similarity of organic molecules using resistive distance-Kirchhoff iteration according to claim 7, characterized in that, The steps for calculating the similarity distance based on the distance components corresponding to each iteration include: A weighted average is calculated for all distance components that have completed all iterations, and the calculated weighted average is used as the final similarity distance between the two organic molecular graphs.
9. The method for determining the similarity of organic molecules using resistive distance-Kirchhoff iteration according to claim 1, characterized in that, The rule for determining the degree of similarity between two organic molecules based on the similarity distance is as follows: If the similarity distance is 0, the two organic molecules involved in the comparison are determined to be the same molecules with the same topological structure. If the similarity distance is greater than 0, it is determined that the two organic molecules have structural differences, and the value of the similarity distance is proportional to the degree of structural difference between the organic molecules.
10. The method for determining the similarity of organic molecules using resistive distance-Kirchhoff iteration according to claim 1, characterized in that, The method can be applied to bioinformatics network analysis, protein-protein interaction network comparison, gene regulatory network similarity analysis, or candidate molecule screening in drug development.