Molecular coding method, device and equipment and readable storage medium

By traversing the molecular fragment structure and using encoding rules to generate coding representations, the uncertainty and complexity of molecular structure encoding in the prior art are solved, and more efficient and accurate molecular encoding is achieved.

CN118942560APending Publication Date: 2024-11-12DOUYIN VISION CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411060313.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing molecular structure encoding methods have problems of uncertainty and high computational complexity, especially when dealing with complex molecular structures and large-scale molecular libraries, resulting in inconsistency and inefficiency in coding results.

Method used

By determining the root node of the molecular fragment structure, traversing the molecular fragment structure to obtain traversal record information, and encoding it using specified encoding rules is performed to generate coding representations of multiple atoms in the molecular fragment structure, avoiding manual rules and complex graphs Analytical process.

Benefits of technology

It improves the consistency and accuracy of encoding, reduces the computational complexity, ensures the uniqueness and efficiency of encoding results, and is suitable for the processing of complex and large molecular structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118942560A_ABST
    Figure CN118942560A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a molecular coding method, device and equipment and a readable storage medium. The method comprises the following steps: determining a root node corresponding to a molecular fragment structure based on the molecular fragment structure of a target molecule; and based on the root node, traversing the molecular fragment structure to obtain traversal record information corresponding to the molecular fragment structure, the traversal record information corresponding to the molecular fragment structure indicating attribute information of each atom passed by traversing the corresponding traversal path. And encoding the traversal record information corresponding to the molecular fragment structure by adopting a specified encoding rule, and determining an encoding result corresponding to the molecular fragment structure, the encoding result comprising encoding representations of a plurality of atoms in the molecular fragment structure. Therefore, the application scene of molecular coding can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and readable storage media for molecular encoding. Background Art

[0002] In the field of chemistry and bioinformatics, the representation and analysis of molecular structures are important steps in studying the properties and behaviors of molecules. Common methods include encoding molecular structures using encoding rules corresponding to SMiles Arbitrary Target Specification (SMARTS) to convert complex molecular structures into simple text format strings, which are easy to process and analyze by computers.

[0003] However, the existing encoding method has uncertainty. In order to match the target molecule, the text format string must be parsed into a graph structure and then matched with the target molecule. This increases the computational complexity on the one hand and the time consumption on the other. Summary of the invention

[0004] In a first aspect of the present disclosure, a method for molecular encoding is provided. The method may include: determining a root node corresponding to the molecular fragment structure based on a molecular fragment structure of a target molecule. Based on the root node, traversing the molecular fragment structure to obtain traversal record information corresponding to the molecular fragment structure, wherein the traversal record information corresponding to the molecular fragment structure indicates attribute information of each atom passed through the corresponding traversal path. By using a specified encoding rule to perform encoding on the traversal record information corresponding to the molecular fragment structure, an encoding result corresponding to the molecular fragment structure is determined, wherein the encoding result includes encoding representations of multiple atoms in the molecular fragment structure.

[0005] In a second aspect of the present disclosure, a molecular coding device is provided. The device may include: a root node determination module, configured to determine the root node corresponding to the molecular fragment structure based on the molecular fragment structure of the target molecule. A traversal record information determination module, configured to traverse the molecular fragment structure based on the root node, and obtain the traversal record information corresponding to the molecular fragment structure, the traversal record information corresponding to the molecular fragment structure indicating the attribute information of each atom passed by the corresponding traversal path. A coding result determination module, configured to perform coding on the traversal record information corresponding to the molecular fragment structure by adopting a specified coding rule, and determine the coding result corresponding to the molecular fragment structure, the coding result including the coding representation of multiple atoms in the molecular fragment structure.

[0006] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the electronic device executes the method of the first aspect.

[0007] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the medium, and when the computer program is executed by a processor, the method of the first aspect is implemented.

[0008] In a fifth aspect of the present disclosure, a computer program product is provided, wherein the computer program product comprises computer executable instructions, wherein the computer executable instructions implement the method of the first aspect when executed by a processor.

[0009] It should be understood that the content described in this section is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0011] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0012] Figure 2 A flow chart showing a method of molecular encoding according to some embodiments of the present disclosure is shown;

[0013] Figure 3 shows an example diagram of a target molecule according to some embodiments of the present disclosure;

[0014] Figure 4 An example diagram showing a virtual root node determination principle according to some embodiments of the present disclosure;

[0015] Figure 5 A schematic diagram showing traversal results according to some embodiments of the present disclosure is shown;

[0016] Figure 6 A schematic diagram showing traversal results according to other embodiments of the present disclosure;

[0017] Figure 7 A schematic diagram of a full traversal path according to some embodiments of the present disclosure is shown;

[0018] Figure 8 A schematic structural block diagram of a molecular encoding device according to some embodiments of the present disclosure is shown; and

[0019] Fig. 9 A block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented is shown. DETAILED DESCRIPTION

[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0021] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0022] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.

[0023] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0024] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scopes of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to relevant users and their authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. The relevant users may include any type of right holders, such as individuals, enterprises, and groups.

[0025] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can independently choose whether to provide information to software or hardware such as an electronic device, application, server or storage medium that executes the operation of the technical solution of the present disclosure based on the prompt message.

[0026] As an optional but non-limiting implementation, in response to receiving an active request from a relevant user, a prompt message is sent to the relevant user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide information to the electronic device.

[0027] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0028] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. The environment 100 includes an electronic device 110. It is desirable to use such an electronic device 110 to implement the encoding of a molecular fragment structure 102 of a target molecule to obtain an encoded representation 120 of the molecular fragment structure. To this end, in some implementations, a computer program 150 may be installed and run in the electronic device 110 to specify the encoding of the molecular fragment structure. The purpose of molecular fragment structure encoding is to accurately describe the local chemical environment of the molecule, helping to improve the accuracy and efficiency of molecular simulation and energy calculation.

[0029] Exemplarily, the electronic device 110 may include any computing system with computing capabilities, such as various computing devices / systems, terminal devices, server devices, etc. The terminal device may be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a handheld computer, a portable game terminal, a game device, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. The server device may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. The server device may include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, and the like. It should be understood that the structure and function of each element in the environment 100 are described for exemplary purposes only, without implying any limitation on the scope of the present disclosure.

[0030] At present, in the field of molecular structure coding, the commonly used method is to manually formulate rules, which leads to uncertainty in the generation of codes and is prone to inconsistencies and errors. For complex molecular structures, the workload of manually formulating rules is huge and prone to errors. In the coding process of cyclic molecules, traditional methods are difficult to avoid repeated coding, resulting in non-unique coding results and affecting the accuracy of molecular matching. In addition, parsing the code into a graph structure and then matching it with the molecule is a complex problem with high computational complexity and low efficiency, making it difficult to quickly apply it in large-scale molecular libraries.

[0031] For example, a molecule may be represented by a graph, that is, G=(V, E), where V may represent a set of atoms in the target molecule and E may represent a set of chemical bonds between two atoms. i It can represent the i-th atom in the target molecule, which can include characteristics such as element type, number of connections, aromaticity, smallest ring, number of ring connections, etc. i ∈V. E can represent the connection of the i-th atom v i and the jth atom v j The chemical bond between them has characteristics such as bond order (single, double, triple or aromatic bond) and whether it is in the ring. The molecular fragment structure can be represented as a derived subgraph, that is, G'=G[V']=(V',E'), G' can represent the induced subgraph. V' can represent the node set in the induced subgraph G', that is, the atoms in the local region. E' can represent the edge set in the induced subgraph G', that is, the chemical bonds in the local region. i ' can be the i-th atom in the derived subgraph G' and has the corresponding partial features. ij ' can be the connected atom v in the derived subgraph G' i ' and the atom v j 'Chemical bonds between and have corresponding partial characteristics.

[0032] In a chemical environment, a fully connected subgraph means that all atoms and the bonds between them are interconnected, with no isolated atoms or broken bonds. Based on this, the chemical environment can be defined as: f(G') = (f v (V'), f e (E')), f v and f e Act on atoms and bonds separately, retaining at least some of the characteristics of atoms and bonds. v (V') can form a feature set corresponding to the partial features of all atoms in the subgraph, f e (E') can form a feature set corresponding to the partial features of all chemical bonds in the subgraph.

[0033] f(G') can be understood as a collection of different subgraphs. Considering that G' must satisfy the topological relationship and atomic and bond characteristics required by f(G'), it must be G'∈f(G'). At the same time, since f v and f e Only some features of atoms and bonds are retained, so if any subgraph G" differs from G' only in the unretained features, then G"∈f(G') is also true.

[0034] In the process of molecular analysis, there is often a process of molecular recognition. For example, for a given molecule, it is necessary to perform graph matching based on a set of different subgraphs f(G'). For electronic devices, the complexity of graph matching is relatively high.

[0035] The embodiment of the present disclosure proposes a molecular coding scheme. According to the scheme, based on the molecular fragment structure of the target molecule, the root node corresponding to the molecular fragment structure is determined. Based on the root node, the molecular fragment structure is traversed to obtain the traversal record information corresponding to the molecular fragment structure, and the traversal record information corresponding to the molecular fragment structure indicates the attribute information of each atom passed by the corresponding traversal path. By using a specified coding rule to perform coding on the traversal record information corresponding to the molecular fragment structure, the coding result corresponding to the molecular fragment structure is determined, and the coding result includes the coding representation of multiple atoms in the molecular fragment structure.

[0036] Thus, by traversing the molecular fragment structure and using the specified encoding rules to encode the traversal record information. This automated encoding method eliminates manual handwriting errors and improves consistency and accuracy. The traversal record information can indicate the attribute information of each atom, ensuring that the encoding result accurately reflects the local chemical environment of the molecule. By determining the root node and traversing the molecular fragment structure from the root node, a unique traversal record information is generated. The traversal record information records the attribute information of each atom passed by the path. Even if the molecular fragment structure is cyclic, the path can be ensured to be unique. This avoids repeated encoding and ensures the uniqueness and accuracy of the encoding result. In addition, the encoding result can be generated directly based on the traversal record information, avoiding complex graph parsing and matching processes, and matching can be performed based on the encoding representation. The computational complexity is reduced and the efficiency is improved.

[0037] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Figure 2 200 according to some embodiments of the present disclosure. The process 200 may be implemented at the electronic device 110. For ease of discussion, the following will refer to Figure 1 The process 200 is described below.

[0038] like Figure 2As shown, in block 201, the electronic device 110 determines a root node corresponding to the molecular fragment structure based on the molecular fragment structure of the target molecule. The molecular fragment structure may include one atom in the target molecule, a bond or bond angle connecting at least two atoms, a carbon-carbon bond in a benzene ring, and the like.

[0039] For each molecular fragment structure, a root node corresponding to the molecular fragment structure may be determined. Figure 3 FIG. 3 shows a schematic diagram of a molecular fragment structure 300 according to some embodiments of the present disclosure. For example, if the molecular fragment structure corresponds to Figure 3 The bond angles formed by the atoms corresponding to the numbers 4, 6, 7 and 8 can be the atom numbered 6 (the central atom of the bond angle) as the root node. It should be noted that hydrogen atoms are omitted in the presentation of the molecular fragment structure involved in the present disclosure and in the encoding process, and the purpose of the omission is to save the amount of encoding.

[0040] If the molecular fragment structure corresponds to Figure 3 The bond between the atoms corresponding to numbers 4 and 6 in the molecular fragment structure is formed. A virtual root node can be created between the two atoms (atoms corresponding to numbers 4 and 6) at the center of the molecular fragment structure. The bond between the two atoms (atoms corresponding to numbers 4 and 6) is disconnected, and the two atoms (atoms corresponding to numbers 4 and 6) are connected to the created virtual root nodes. Figure 4 FIG. 4 is a schematic diagram showing a creation principle 400 for creating a virtual root node according to some embodiments of the present disclosure. Figure 4 In the example, the node corresponding to number -1 is used as the created virtual root node. After the root node is created, the two atoms (atoms corresponding to numbers 4 and 6) that are originally connected by the bond need to be disconnected, and the two atoms (atoms corresponding to numbers 4 and 6) are connected to the created virtual root node respectively.

[0041] In box 202, the electronic device 110 traverses the molecular fragment structure based on the root node to obtain traversal record information corresponding to the molecular fragment structure, where the traversal record information corresponding to the molecular fragment structure indicates attribute information of each atom passed through the corresponding traversal path.

[0042] Take the root node as the traversal starting point and traverse the molecular fragment structure. Figure 3 The bonds formed by the atoms corresponding to numbers 4 and 6 are Figure 5 A schematic diagram of obtaining a traversal result 500 according to some embodiments of the present disclosure is shown. The traversal result may be to expand the molecular fragment structure into a tree structure. The virtual root node corresponding to the label -1 may be used as the traversal starting point for traversing the molecular fragment structure.

[0043] For molecular fragment structures Figure 3The bond angles formed by the atoms corresponding to the numbers 4, 6, 7, and 8 are: Figure 6 A schematic diagram of obtaining a traversal result 600 according to some embodiments of the present disclosure is shown. The root node corresponding to the atom labeled 6 can be used as a traversal starting point for traversing the molecular fragment structure.

[0044] Starting from the root node, traverse each atom contained in the molecular fragment structure and generate traversal record information. The traversal record information may include attribute information of the atom passed by the traversal path. The attribute information may indicate the characteristic information of the atom. If the molecular fragment structure corresponds to Figure 3 For the bond formed by the atoms corresponding to numbers 4 and 6, the characteristic information of the atoms corresponding to numbers 4 and 6 can be full information. For example, the attribute information can indicate the element type, aromaticity, number of connections, number of ring connections, and the smallest ring of the atoms corresponding to numbers 4 and 6.

[0045] And for Figure 3 For atoms other than the molecular fragment structure (except atoms corresponding to numbers 4 and 6), the attribute information can only indicate basic information. For example, only the element type and the number of connections are retained. Based on this, by traversing the recorded information, the expression of various molecular fragment structures can be realized. The specific process of traversing the molecular fragment structure will be described in detail later.

[0046] In block 203 , the electronic device 110 performs encoding on the traversal record information corresponding to the molecular fragment structure by adopting a specified encoding rule to determine an encoding result corresponding to the molecular fragment structure, where the encoding result includes encoding representations of multiple atoms in the molecular fragment structure.

[0047] After determining the traversal record information corresponding to the molecular fragment structure, the traversal record information corresponding to the molecular fragment structure can be encoded using a specified encoding rule, thereby obtaining an encoding result. Since the traversal record information corresponds to the relevant attribute information of the atoms in the molecular fragment structure, such as element type, aromaticity, number of connections, etc., the encoding result includes the encoding representation of multiple atoms in the molecular fragment structure. And the encoding representation can indicate multiple characteristics of the atoms.

[0048] The specified coding rules may include the coding rules corresponding to SMARTS to perform coding on the molecular fragment structure of the target molecule to obtain a character string describing the local chemical language. In the coding rules corresponding to SMARTS, the characteristics of atoms can be expressed by different character strings. For example, the description of atoms may include element type (corresponding to the character string "#"), number of connections (corresponding to the character string "X"), aromaticity (corresponding to the character string "A / a"), the smallest ring (corresponding to the character string "r"), the number of ring connections (corresponding to the character string "x"), etc. For the description of chemical bonds, the single bond, double bond, triple bond and aromatic bond represented by the symbol "-", the symbol "=", the symbol "#", and the symbol ":" may be included. The symbol "@" and the symbol "!@" may represent intra-ring bonds and non-intra-ring bonds, etc., respectively. For the coding rules corresponding to SMARTS, fuzzy features may be deleted. For example, if a feature described by a numerical range is considered to be a fuzzy feature, it can be discarded. Exemplarily, for a ring, if the coding rules include less than or greater than an N-membered ring (N is a positive integer), the feature belongs to the description of the numerical range, which can be discarded. On the contrary, if the value is a three-membered ring, a five-membered ring, etc., it can be retained.

[0049] In addition, the specified encoding rules may also include encoding rules corresponding to the Simplified Molecular Input Line Entry System (SMILES), encoding rules corresponding to the International Chemical Identifier (InChI), and the like.

[0050] Through the above process, the coding representation is automatically generated based on the molecular fragment structure of the target molecule and the specified coding rules, which can handle more atom types and more complex molecular structures and meet the needs of large data sets. By traversing the molecular fragment structure and recording the attribute information of each atom in the traversal path, complex or special chemical structures can be identified more accurately.

[0051] There are multiple implementations for the electronic device 110 to determine the traversal record information. In one implementation, the electronic device 110 may determine the traversal record information by: taking the root node as the first traversed node, traversing atoms in the molecular fragment structure based on a first traversal order. For each traversed atom, a traversal mark of each atom is recorded, and the traversal mark of each atom is at least used to indicate the traversal path corresponding to the atom.

[0052] Based on the traversal mark of each atom, the traversal record information corresponding to each atom is obtained. Based on the traversal record information corresponding to each atom, the traversal record information corresponding to the molecular fragment structure is generated.

[0053] The first traversal order may be a depth-first traversal order with the root node as the first traversal node. The so-called depth-first traversal order may mean starting from the root node, following the traversal path until reaching the deepest level where no further progress is made, and then backtracking to the root node to continue exploring the next branch.

[0054] In the process of traversing the atoms in the molecular fragment structure in the first traversal order, the electronic device 110 visits each atom and records the traversal mark of the atom in sequence. For example, the traversal mark may indicate the traversal path corresponding to the atom, the identifier of the atom, etc. Figure 4 Taking the example of, taking the label of the atom in the graph as an example, the traversal process is as follows. The first traversal path: first traverse the virtual root node labeled -1, and then traverse the node labeled 6. A branch appears at the node labeled 6, thereby traversing two branches in sequence, that is, traversing the node labeled 7 and the node labeled 8 in sequence (until there is no deeper node). Exemplarily, for the node labeled 6, the traversal mark of the node can indicate: label 6, first traversal path, connected to the node labeled -1. For the node labeled 7, the traversal mark of the node can indicate: label 7, one of the branches of the first traversal path, connected to the node labeled 6. For the node labeled 8, the traversal mark of the node can indicate: label 8, two of the branches of the first traversal path, connected to the node labeled 6. Since the node labeled 7 and the node labeled 8 are at a deeper level that cannot move forward, the first traversal path ends.

[0055] The traversal continues thereafter, corresponding to the second traversal path. The second traversal path traverses the virtual root node labeled -1, and then traverses the node labeled 4. A branch appears at the node labeled 4, and each branch is traversed in sequence. The first branch includes the node labeled 5. The second branch includes the node labeled 0, the node labeled 1, the node labeled 2, and the node labeled 3 in sequence. The third branch includes the node labeled 3, the node labeled 2, the node labeled 1, and the node labeled 0. Thus, the second traversal path ends. Similarly, based on the second traversal path, the traversal mark of each node can be obtained.

[0056] The first traversal path and the second traversal path may correspond to the full traversal path of the tree structure. Figure 7 It shows that according to some embodiments of the present disclosure Figure 4A schematic diagram of the full traversal path 700 of the corresponding molecular fragment structure. After all traversals are completed, the traversal marks of each atom corresponding to the entire traversal path can be obtained. Based on the traversal marks of each atom, the attribute information such as the chemical element type, number of connections, and ring formation mark of each atom can be determined. The traversal record information corresponding to each atom is summarized to obtain the traversal record information corresponding to the molecular fragment structure.

[0057] After traversing the molecular fragment structure to obtain the traversal marks of each atom, the traversal marks can be processed to determine the traversal record information of the atom. Specifically, for the traversal mark of each atom that has been traversed, in response to the traversal mark indicating that the atom is recorded in an existing traversal path, the atom is determined to be a ring-forming atom. The traversal record information corresponding to the atom is generated, and the traversal record information at least indicates the chemical element type corresponding to the atom, the ring-forming atom mark, the number of ring connections and the bond characteristics, etc.

[0058] Still combined Figure 7 Example. The second traversal path first traverses the virtual root node labeled -1, and then traverses the node labeled 4. A branch appears at the node labeled 4, thereby traversing three branches in sequence. The first branch includes the node labeled 5. The second branch includes the node labeled 0, the node labeled 1, the node labeled 2, and the node labeled 3 in sequence. The third branch includes the node labeled 3, the node labeled 2, the node labeled 1, and the node labeled 0 in sequence. During the traversal process, the electronic device 110 records the traversal path taken to reach each node. When the newly visited node already exists on the recorded traversal path, the traversal (of the current branch or current path) will be stopped. And the key features between the ring nodes, the order in which the ring nodes appear in the path, etc. are recorded as loop marks.

[0059] For example, for the second branch, the first node of the second branch is the node labeled 4, followed by the node labeled 0, the node labeled 1, the node labeled 2, and the node labeled 3. After the traversal of the node labeled 3 is completed, the traversal of the node labeled 4 continues. Since the node labeled 4 already exists on the recorded traversal path, the traversal of the second branch can be stopped. On this basis, it can also be determined that the node labeled 4, the node labeled 0, the node labeled 1, the node labeled 2, and the node labeled 3 form a ring structure, and the number of ring connections is 5. In addition, based on the acquisition of relevant information about the bonds during the traversal process, it can also be determined that the number of connections for each atom is 1.

[0060] Similarly, for the third branch, the first node of the third branch is the node labeled 4, followed by the node labeled 3, the node labeled 2, the node labeled 1, and the node labeled 0. After the traversal of the node labeled 0 is completed, the traversal of the node labeled 4 continues. Since the node labeled 4 already exists on the recorded path, the traversal of the third branch can be stopped. On this basis, it can also be determined that the node labeled 4, the node labeled 3, the node labeled 2, the node labeled 1, and the node labeled 0 form a ring structure, and the number of ring connections is 5. In addition, based on the acquisition of relevant information about the bonds during the traversal process, it can also be determined that the number of connections for each atom is 1.

[0061] The beneficial effect of the above process is that the molecular fragment structure can be expanded into a tree structure. Each node in the tree structure can represent an atom or a group of atoms, and each edge can represent a chemical bond. The tree structure is unique and definite. This can improve the accuracy and completeness of chemical structure determination.

[0062] In addition, in order to satisfy the uniqueness of the tree structure, the electronic device 110 may also sort the coded representations of the multiple atoms. Specifically, the coded representations of the multiple atoms include a character string, and determining the coding result corresponding to the molecular fragment structure includes: encoding the traversal record information corresponding to the molecular fragment structure by adopting a specified coding rule to obtain an initial coding result, and the initial coding result includes the initial coding representations of the multiple atoms in the molecular fragment structure. Sorting the initial coding representations of the multiple atoms in the lexicographic order obtains the coding result corresponding to the molecular fragment structure.

[0063] The initial encoding result is obtained by encoding the traversal record information corresponding to the molecular fragment structure using a specified encoding rule. As mentioned above, the traversal record information is obtained based on the traversal record information corresponding to each atom. Therefore, the initial encoding result can also indicate the initial encoding representation of multiple atoms in the molecular fragment structure. Exemplarily, the encoding representation of each atom can be in the form of a string.

[0064] Based on the encoding representation in the form of a string, the initial encoding representations of multiple atoms can be sorted to obtain the encoding results corresponding to the molecular fragment structure. As mentioned above, the molecular fragment structure can be expanded into a tree structure by traversal. Based on this, the tree structure can be sorted for the first time, that is, starting from the root node, the traversal record information of each child node is recursively encoded to obtain the initial encoding representations of multiple atoms.

[0065] The sorting of the initial coded representations of multiple atoms can be based on a lexicographic order. The purpose of the sorting is to ensure the consistency and comparability of the initial coded representations. For example, by sorting, it can be ensured that the same molecular fragment structure can generate the same encoding result. In addition, the sorting allows the representations of different molecules to be directly compared. Even if the topological structures of two molecules are similar, the different chemical environments of the molecules can be clearly distinguished through the sorted representations. For example, Figure 7 The corresponding full traversal path is sorted after encoding as an example. The initial encoding representation of multiple atoms can be:

[0066] “(-!@[#6AX3x0r0:](~[#6X4])(~[#8X1]))(-!@[#6AX4x2r5:](~[#6X4])(~[#6X4]( ~[#6X4](~[#6X4](~[#6X4]~1))))(~[#6X4](~[#6X4](~[#6X4](~[#6X4]~1)))))".

[0067] An exemplary explanation is given using part of the coding representation in the initial coding representation. For example, in the initial coding representation “((-!@[#6AX3x0r0:](~[#6X4])(~[#8X1]))”, the symbol “-!@” can represent a single bond that is not within a ring. The string “[#6AX3x0r0:]” can represent a carbon atom (C), trivalent (X3), and no ring is formed (r0). The string “(~[#6X4])” can represent connection to a tetravalent carbon atom (C), using an arbitrary bond (~). The string “(~[#8X1])” can represent connection to a monovalent oxygen atom (O), using an arbitrary bond (~). Other coding representations can refer to the coding rules corresponding to SMART, and the details will not be repeated.

[0068] In addition, for the ring-forming atoms that appear during the traversal process, since the traversal process will repeatedly traverse the ring-forming atoms, it is also necessary to deduplicate the repeatedly traversed ring-forming atoms. The deduplication process of the electronic device 110 may include: based on the second traversal order, performing a duplicate check on the encoded representations of multiple atoms to obtain a duplicate check result. In response to the duplicate check result indicating that there are repeatedly encoded atoms in the encoded representations of multiple atoms, deduplication is performed on the repeatedly encoded atoms to obtain a deduplication encoding result, and the deduplication encoding result includes the encoded representations of multiple atoms retained after deduplication. According to the lexicographical order, the encoded representations of the multiple atoms after deduplication are sorted to obtain the encoding result corresponding to the molecular fragment structure.

[0069] As mentioned above, the first traversal order may be a depth-first traversal order with the root node as the first traversal node. Corresponding to the first traversal order, the second traversal order may be a breadth-first traversal order with the root node as the first traversal node.

[0070] Combination Figure 7 As shown, based on the breadth-first traversal order, the coding representation of multiple atoms in the molecular fragment structure. Suppose first traverse the second branch in the second path consisting of a node numbered 3, a node numbered 2, a node numbered 1, and a node numbered 0. Thereafter, traverse the third branch in the second path consisting of a node numbered 0, a node numbered 1, a node numbered 2, and a node numbered 3 again. In response to the node numbered 0 appearing in the traversal of the third branch, the node numbered 0 has been recorded in the previous traversal of the second branch. This indicates that the node numbered 0 belongs to a repeatedly coded atom. Similarly, in response to the nodes numbered 1 to 3 appearing in the traversal of the third branch, they can all be determined as repeatedly coded atoms in turn. Thus, the coding representation corresponding to the repeatedly coded atoms can be deduplicated to obtain a deduplicated coding result. Figure 7 After deduplication is performed on the encoding results of the tree structure in Figure 5 The molecular structure of .

[0071] Since the deduplication operation deletes the atoms with duplicate encoding, this may cause the attribute information of the remaining atoms, such as the number of connections and ring marks, to change. Therefore, it is necessary to update the traversal record information corresponding to the multiple atoms after deduplication. Encoding is performed based on the updated traversal record information to obtain the deduplication encoding result. After obtaining the deduplication encoding result, the encoding representations of the multiple atoms included in the deduplication encoding result can still be sorted according to the lexicographic order to obtain the encoding result corresponding to the molecular fragment structure. For example, Figure 5 The molecular structure in is the deduplicated molecular structure. The sorted deduplicated encoding result based on the deduplicated molecular structure can be "(-!@[#6AX3x0r0:](~[#6X4])(~[#8X1]))(-!@[#6AX4x2r5:](~[#6X4])(~[#6X4](~[#6X4]~1))(~[#6X4](~[#6X4]~1)))". The symbol "~1" marks the position of the ring (appearing in pairs). By comparing the initial encoding representations of multiple atoms, it can be found that the number of strings has been reduced in the deduplicated encoding representation.

[0072] The reordering ensures that the encoding results will not be non-unique due to changes in atomic property information during the deduplication process, ensuring the uniqueness and certainty of the molecular fragment structure encoding results.

[0073] In order to ensure the uniqueness of the encoding result corresponding to the molecular fragment structure, in some implementations, the electronic device 110 assigns a number to each atom in the multiple atoms retained after deduplication. Based on the number, the traversal record information corresponding to the molecular fragment structure is updated. The traversal record information corresponding to the molecular fragment structure is encoded to obtain a deduplication encoding result, which includes an encoding representation of each atom in the multiple atoms retained after deduplication.

[0074] For the de-duplication encoding results, number assignment can also be performed. Figure 4 For example, the molecular fragment structure corresponds to Figure 4 The bond formed by the atoms corresponding to the labels 4 and 6. Exemplarily, the multiple atoms retained after deduplication include the atoms corresponding to the label 4 and the atoms corresponding to the label 6. Based on this, the atoms corresponding to the label 4 and the atoms corresponding to the label 6 can be assigned numbers. The numbers are usually represented by numbers or letters.

[0075] Based on the serial number, the traversal record information corresponding to the molecular fragment structure is updated. Since the traversal record information corresponding to the molecular fragment structure is obtained based on the traversal mark of each atom, the updated traversal record information corresponding to the molecular fragment structure includes the assigned serial number.

[0076] The traversal record information corresponding to the molecular fragment structure is encoded to obtain a de-duplication encoding result. That is, the de-duplication encoding result includes an encoding representation of each atom in the multiple atoms retained after de-duplication, and the encoding representation of the atom can indicate the number corresponding to the atom.

[0077] There are many possible ways to assign numbers, and we need to traverse all the ways to assign numbers. Figure 4 For example, allocation method 1 may be to assign number 1 to the atom corresponding to number 4 and assign number 2 to the atom corresponding to number 6. Exemplarily, for each number assignment method, a corresponding de-duplication encoding result is generated. The encoding representation containing number 1 may include:

[0078] "[#6AX3x0r0:1](~[#6X4])(~[#8X1])-!@[#6AX4x2r5:2](~[#6X4])(~[#6X4]~[#6X4]~1)~[#6X4]~[#6X4]~1".

[0079] In addition, the second allocation method may be to allocate number 2 to the atom corresponding to number 4, and to allocate number 1 to the atom corresponding to number 6. Exemplarily, the coded representation including number 2 may include:

[0080] "[#6AX3x0r0:2](~[#6X4])(~[#8X1])-!@[#6AX4x2r5:1](~[#6X4])(~[#6X4]~[#6X4]~1)~[#6X4]~[#6X4]~1".

[0081] For the method of traversing all possible number allocations, the corresponding number of de-duplication encoding results can be obtained. For the case where the encoding result is a string, all the number of de-duplication encoding results can be compared in lexicographical order. Finally, based on the comparison result, the one with the smallest comparison result can be selected as the encoding result corresponding to the molecular fragment structure. Alternatively, the largest one can be selected as the encoding result corresponding to the molecular fragment structure. It is sufficient to unify the (largest or smallest) selection criteria during the encoding process. By selecting the one with the smallest comparison result as the encoding result corresponding to the molecular fragment structure, the encoding representation containing the number 1 can be selected as the final result.

[0082] Through the above process, in order to generate a unique and definite coding result corresponding to the molecular fragment structure, it is necessary to consider different labeling methods and select the smallest or largest one. This method can cope with different chemical structure types and meet the effect of unique and definite coding results. For example, for bonds, bond angles, and conventional dihedral angles (torsion angles between four atoms), there are usually 2 ways of assigning numbers. For non-regular dihedral angles, there are usually 6 ways of assigning numbers. By assigning numbers, it can be ensured that the coding results corresponding to various complex molecular fragment structures are unique and definite.

[0083] In some implementations, the electronic device 110 responds to the molecular fragment structure including a first symmetric structure, where the first symmetric structure indicates a symmetric structure centered on a central atom, and uses the central atom of the first symmetric structure as a root node.

[0084] The first symmetric structure can indicate that there is a symmetric structure with a central atom as the core in the molecular fragment. This symmetric structure is usually manifested as other atoms or atomic groups symmetrically distributed around the central atom. For example, the structure formed by the carbon atoms and the hydrogen atoms connected to them in the benzene ring is a symmetric structure. After identifying the first symmetric structure, find the central atom of the symmetric structure. The central atom is the core of the symmetrical distribution of all other atoms in the symmetric structure. For example, in a benzene ring, the central atom can be any carbon atom in the ring, because the position of each carbon atom is structurally equivalent. In this way, it can be ensured that when encoding the molecular fragment structure, the selected root node is unique and symmetrical, thereby simplifying the subsequent traversal and encoding process.

[0085] In some implementations, the electronic device 110 is responsive to the molecular fragment structure including a second symmetric structure, the second symmetric structure indicating a symmetric structure centered on the bond. A virtual root node is set between two atoms connected by the bond, and the two atoms are respectively connected to the virtual root node. On this basis, determining the encoding result corresponding to the molecular fragment structure includes: deleting the encoding representation corresponding to the virtual root node, and obtaining the encoding representation of the remaining multiple atoms. Based on the sorting of the encoding representations of the remaining multiple atoms, the encoding result corresponding to the molecular fragment structure is determined.

[0086] The second symmetric structure can indicate a symmetric structure centered on the bond, which is usually manifested as symmetry between the atoms at both ends of the bond and the parts connected thereto. To ensure that this structure is uniquely and definitively encoded, a virtual root node can be introduced. The virtual root node is a node that does not really exist and is used to assist in building a tree structure of a molecular fragment. The virtual root node is connected to the atoms at both ends of the bond to form a new tree structure. After completing the traversal using the virtual root node and obtaining the encoding result corresponding to the molecular fragment structure, since the encoding result includes the encoding representation corresponding to the virtual root node, the encoding representation corresponding to the virtual root node also needs to be deleted.

[0087] After deleting the encoding representation corresponding to the root node, the node closest to the deleted virtual root node can be selected as the new root node based on the specified priority. The specified priority can be determined based on the first traversal order, the second traversal order or the lexicographic order. After determining the new root node, starting from the root node, the atoms in the molecular fragment structure are traversed based on the first traversal order. Based on the traversal record information corresponding to each traversed atom, the traversal record information corresponding to the molecular fragment structure is generated, and finally the traversal record information is encoded to obtain the encoding result corresponding to the molecular fragment structure.

[0088] For example, in the preceding example, the sorted de-duplication encoding result obtained by de-duplication of the molecular structure can be:

[0089] "(-!@[#6AX3x0r0:](~[#6X4])(~[#8X1]))(-!@[#6AX4x2r5:](~[#6X4])(~[#6X4](~[#6X4]~1))(~[#6X4](~[#6X4]~1)))". In the encoding representation with a virtual root node, the two main parts are separated by the virtual root node. The encoding representation of the first part is:

[0090] "(-!@[#6AX3x0r0:](~[#6X4])(~[#8X1]))".

[0091] The second part is coded as:

[0092] "(-!@[#6AX4x2r5:](~[#6X4])(~[#6X4](~[#6X4]~1))(~[#6X4](~[#6X4]~1)))".

[0093] After removing the virtual root node, the encoding result corresponding to the molecular fragment structure can be:

[0094] "[#6AX3x0r0:](~[#6X4])(~[#8X1])-!@[#6AX4x2r5:](~[#6X4])(~[#6X4]~[#6X4]~1)~[#6X4]~[#6X4]~1". Therefore, in the process of allocating numbers, it can be executed based on the encoding result corresponding to the molecular fragment structure after removing the virtual root node. This corresponds to the encoding representation containing number 1 and the encoding representation containing number 2 in the previous example.

[0095] Figure 8 A schematic structural block diagram of a molecular encoding apparatus 800 according to some embodiments of the present disclosure is shown. The apparatus 800 may be implemented in or included in the electronic device 110, for example. Each module / component in the apparatus 800 may be implemented by hardware, software, firmware, or any combination thereof.

[0096] As shown in the figure, the device 800 includes a root node determination module 801, which is configured to determine the root node corresponding to the molecular fragment structure based on the molecular fragment structure of the target molecule. A traversal record information determination module 802 is configured to traverse the molecular fragment structure based on the root node to obtain the traversal record information corresponding to the molecular fragment structure, and the traversal record information corresponding to the molecular fragment structure indicates the attribute information of each atom passed by the traversal path corresponding to the traversal. An encoding result determination module 803 is configured to perform encoding on the traversal record information corresponding to the molecular fragment structure by adopting a specified encoding rule, and determine the encoding result corresponding to the molecular fragment structure, and the encoding result includes the encoding representation of multiple atoms in the molecular fragment structure.

[0097] In some embodiments of the present disclosure, the traversal record information determination module 802 may include: a traversal submodule, which is configured to: take the root node as the first node to be traversed, and traverse the atoms in the molecular fragment structure based on the first traversal order. A traversal mark recording submodule, which is configured to record the traversal mark of each atom for each traversed atom, and the traversal mark of each atom is at least used to indicate the traversal path corresponding to the atom. An atom traversal record information generation submodule, which is configured to obtain the traversal record information corresponding to each atom based on the traversal mark of each atom. A molecular traversal record information generation submodule, which is configured to generate the traversal record information corresponding to the molecular fragment structure based on the traversal record information corresponding to each atom.

[0098] In some embodiments of the present disclosure, the atom traversal record information generation submodule is specifically configured to: for each traversal mark of each atom that has been traversed, in response to the traversal mark indicating that the atom is recorded in an existing traversal path, determine that the atom is a ring-forming atom. Generate traversal record information corresponding to the atom, the traversal record information at least indicating the ring-forming atom mark, ring connection number and bond characteristics corresponding to the atom.

[0099] In some embodiments of the present disclosure, the encoding representation of the multiple atoms includes a character string, and the encoding result determination module 803 can be specifically configured to: perform encoding on the traversal record information corresponding to the molecular fragment structure by adopting a specified encoding rule to obtain an initial encoding result, the initial encoding result including the initial encoding representation of the multiple atoms in the molecular fragment structure. According to the lexicographic order, the initial encoding representation of the multiple atoms is sorted to obtain the encoding result corresponding to the molecular fragment structure.

[0100] In some embodiments of the present disclosure, the coded representations of the multiple atoms include character strings, and the coding result determination module 803 can be specifically configured to: perform a duplicate check on the coded representations of the multiple atoms based on the second traversal order to obtain a duplicate check result. In response to the duplicate check result indicating that there are duplicated atoms in the coded representations of the multiple atoms, perform deduplication on the duplicated atoms to obtain a deduplication encoding result, and the deduplication encoding result includes the coded representations of the multiple atoms retained after deduplication. The deduplication encoded representations of the multiple atoms are sorted in lexicographic order to obtain the encoding result corresponding to the molecular fragment structure.

[0101] In some embodiments of the present disclosure, the encoding result determination module 803 determines the de-duplication encoding result in the following manner: assigning a number to each atom in the plurality of atoms retained after de-duplication, updating the traversal record information corresponding to the molecular fragment structure based on the number, performing encoding on the traversal record information corresponding to the molecular fragment structure, and obtaining a de-duplication encoding result, wherein the de-duplication encoding result includes an encoding representation of each atom in the plurality of atoms retained after de-duplication.

[0102] In some embodiments of the present disclosure, the root node determination module 801 is configured to, in response to the molecular fragment structure including a first symmetric structure, the first symmetric structure indicating a symmetric structure centered on a central atom, take the central atom of the first symmetric structure as the root node.

[0103] In some embodiments of the present disclosure, the root node determination module 801 is configured to respond to the molecular fragment structure including a second symmetric structure, the second symmetric structure indicating a symmetric structure centered on a bond. A virtual root node is set between two atoms connected by a bond, and the two atoms are respectively connected to the virtual root node. On this basis, the coding result determination module 803 is also configured to delete the coding representation corresponding to the virtual root node, and obtain the coding representation of the remaining multiple atoms. Based on the sorting of the coding representations of the remaining multiple atoms, the coding result corresponding to the molecular fragment structure is determined.

[0104] Fig. 9 900 is a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented. It should be understood that Fig. 9 The electronic device 900 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Fig. 9 The electronic device 900 shown may include or be implemented as Figure 1 Electronic device 110 or Figure 8 Device 800.

[0105] like Fig. 9 As shown, the electronic device 900 is in the form of a general electronic device. The components of the electronic device 900 may include, but are not limited to, one or more processors or processing units 910, a memory 920, a storage device 930, one or more communication units 940, one or more input devices 950, and one or more output devices 960. The processing unit 910 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 920. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 900.

[0106] The electronic device 900 typically includes a plurality of computer storage media. Such media can be any accessible media that can be obtained by the electronic device 900, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 920 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory) or some combination thereof. The storage device 930 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 900.

[0107] The electronic device 900 may further include additional removable / non-removable, volatile / non-volatile storage media. Fig. 9 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. Memory 920 may include a computer program product 925 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0108] The communication unit 940 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 900 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 900 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0109] The input device 950 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 960 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 900 may also communicate with one or more external devices (not shown) through the communication unit 940 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 900, or communicate with any device that allows the electronic device 900 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0110] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0111] According to an exemplary implementation of the present disclosure, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 2 The methods provided in the various optional methods are therefore not described in detail here.

[0112] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0113] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0114] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0115] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0116] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A method for molecular encoding, comprising: Based on the molecular fragment structure of the target molecule, determining a root node corresponding to the molecular fragment structure; Based on the root node, traverse the molecular fragment structure to obtain traversal record information corresponding to the molecular fragment structure, wherein the traversal record information corresponding to the molecular fragment structure indicates attribute information of each atom passed by the traversal path corresponding to the traversal; as well as The traversal record information corresponding to the molecular fragment structure is encoded by adopting a specified encoding rule to determine an encoding result corresponding to the molecular fragment structure, wherein the encoding result includes encoding representations of multiple atoms in the molecular fragment structure.

2. The method according to claim 1, wherein traversing the molecular fragment structure to obtain the traversal record information corresponding to the molecular fragment structure comprises: Taking the root node as the first traversed node, traversing the atoms in the molecular fragment structure based on a first traversal order; For each atom that has been traversed, recording a traversal mark of each atom, wherein the traversal mark of each atom is at least used to indicate a traversal path corresponding to the atom; Based on the traversal mark of each atom, obtaining the traversal record information corresponding to each atom; as well as Based on the traversal record information corresponding to each atom, the traversal record information corresponding to the molecular fragment structure is generated.

3. The method according to claim 2, wherein obtaining the traversal record information corresponding to each atom based on the traversal mark of each atom comprises: For each traversal mark of each atom traversed, in response to the traversal mark indicating that the atom is recorded in an existing traversal path, determining that the atom is a ring-forming atom; as well as The traversal record information corresponding to the atom is generated, wherein the traversal record information at least indicates the ring-forming atom label, the number of ring connections and the bond characteristics corresponding to the atom.

4. The method according to claim 1, wherein the coded representation of the plurality of atoms comprises a character string, and determining the coded result corresponding to the molecular fragment structure comprises: By using a specified encoding rule to encode the traversal record information corresponding to the molecular fragment structure, an initial encoding result is obtained, wherein the initial encoding result includes initial encoding representations of multiple atoms in the molecular fragment structure; as well as The initial coding representations of the multiple atoms are sorted according to the lexicographic order to obtain the coding result corresponding to the molecular fragment structure.

5. The method according to claim 1, wherein the coded representation of the plurality of atoms comprises a character string, and determining the coded result corresponding to the molecular fragment structure comprises: Based on the second traversal order, performing a duplicate check on the encoded representations of the multiple atoms to obtain a duplicate check result; In response to the duplicate checking result indicating that there are duplicated atoms in the encoded representations of the multiple atoms, deduplication is performed on the duplicated atoms to obtain a deduplication encoding result, wherein the deduplication encoding result includes the encoded representations of the multiple atoms retained after deduplication; as well as The encoding representations of the multiple atoms after deduplication are sorted according to the lexicographic order to obtain the encoding result corresponding to the molecular fragment structure.

6. The method according to claim 5, wherein the de-re-coding result is determined by: For each atom in the plurality of atoms retained after deduplication, Assign numbers to each of the atoms; Based on the number, updating the traversal record information corresponding to the molecular fragment structure; Encoding is performed on the traversal record information corresponding to the molecular fragment structure to obtain the de-duplication encoding result, wherein the de-duplication encoding result includes the encoding representation of each atom in the plurality of atoms retained after de-duplication.

7. The method according to claim 1, wherein determining the root node corresponding to the molecular fragment structure comprises: In response to the molecular fragment structure comprising a first symmetric structure, the first symmetric structure indicates a symmetric structure centered on a central atom; as well as The central atom of the first symmetric structure is used as the root node.

8. The method according to claim 1, wherein determining the root node corresponding to the molecular fragment structure comprises: In response to the molecular fragment structure comprising a second symmetric structure, the second symmetric structure indicates a bond-centered symmetric structure; Setting a virtual root node between the two atoms connected by the bond, and connecting the two atoms to the virtual root node respectively; And determining the coding result corresponding to the molecular fragment structure includes: Deleting the encoding representation corresponding to the virtual root node to obtain the encoding representations of the remaining multiple atoms; as well as Based on the order of the encoding representations of the remaining multiple atoms, the encoding result corresponding to the molecular fragment structure is determined.

9. A molecular coding device comprising: A root node determination module is configured to determine a root node corresponding to the molecular fragment structure based on the molecular fragment structure of the target molecule; A traversal record information determination module is configured to traverse the molecular fragment structure based on the root node to obtain traversal record information corresponding to the molecular fragment structure, wherein the traversal record information corresponding to the molecular fragment structure indicates attribute information of each atom passed by the traversal path corresponding to the traversal; as well as The coding result determination module is configured to perform coding on the traversal record information corresponding to the molecular fragment structure by adopting a specified coding rule to determine the coding result corresponding to the molecular fragment structure, wherein the coding result includes the coding representation of multiple atoms in the molecular fragment structure.

10. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 8.

12. A computer program product comprising computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Molecule generation method and computing device

    CN111816265A

  • Information input method and device, equipment, storage medium and program product

    CN115113740A

  • Molecular reverse synthesis method and system based on quantum graph convolution, storage medium and terminal

    CN116665810A

  • Molecular attribute identification method and device, electronic equipment and readable storage medium

    CN116978466A

  • Chemical molecular structure identification method and device based on multi-stage sequence, and medium

    CN118097665A