Two-way reversible conversion method and system between peptide molecular smiles and sequence list expression

By combining the SMARTS mode with a terminal library, a bidirectional reversible conversion between peptide SMILES and sequence expressions was achieved, solving the problems of low resolution and loss of topological information in existing technologies, and meeting the needs of identification and data processing of novel synthetic peptides.

CN121999858BActive Publication Date: 2026-07-24ANGXIN BIOTECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANGXIN BIOTECHNOLOGY CO LTD
Filing Date
2026-04-09
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies suffer from low resolution, loss of topological information, poor reversibility, and insufficient scalability when dealing with complex peptide structures, making it difficult to meet the needs of peptide drug development.

Method used

The SMARTS model is used to search molecular graphs and identify peptide structures by indexing the main chain atoms. Combined with end-group libraries and monomer template libraries, bidirectional reversible conversion is achieved, including accurate processing of end-group modifications, topological structures, and disulfide bond information.

Benefits of technology

It enables accurate conversion of complex peptide structures, ensuring the reversibility and scalability of the conversion, improving the data processing efficiency and accuracy of peptide drug development, and supporting the automatic expansion and identification of novel synthetic peptides.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The application discloses a bidirectional reversible conversion method and system between peptide molecules SMILES and sequence expressions, and the core innovation is that: a new sequence description grammar is defined to retain the information of special bonds of polypeptides and specific modifications of amino acids; a topological identification algorithm of main chain atom index and adjacency traversal, end group and topological integration detection and coding; a residue identification algorithm compatible with any standard or non-standard amino acid residue of main chain cutting and template library matching, an expandable end group library / monomer template library and an automatic increment mechanism, automatic identification and sequence annotation of S-S disulfide bond; a high-fidelity assembly algorithm of HELM anchor points and topologically-aware cyclic peptide processing. The application solves the problems that the prior art cannot support complex polypeptide topological structure, has poor reversibility, and has insufficient monomer library expansion, and can be widely applied to quantitative structure-activity relationship model construction, large-scale polypeptide data cleaning and other scenes, and has obvious practicability and innovation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer-aided drug design technology, and specifically relates to a bidirectional reversible conversion method and system between peptide molecules SMILES and their sequence expressions. Background Technology

[0002] In modern drug development, peptide compounds, due to their high specificity and low toxicity, have become important candidate drugs for treating various diseases (such as cancer, metabolic diseases, and infectious diseases). With the development of high-throughput screening, combinatorial chemistry, and computational biology techniques, massive amounts of peptide molecular structure and activity data have been generated. SMILES, as a concise text representation method of molecular structure, is widely used for molecular database storage and computational chemistry software input; while peptide sequences (such as FASTA format or custom extended sequences) are an intuitive form describing peptide composition and linkages, forming the basis for sequence alignment and machine learning model training. Achieving accurate, stable, and reversible conversion between SMILES and sequences is a bridge connecting peptide molecular structure information and sequence information, and a prerequisite for subsequent data mining and model building.

[0003] The structural diversity of peptide molecules gives them a unique advantage in drug development, but it also presents challenges to their structural representation and data processing. SMILES and sequences, as two important molecular representations, are fundamental issues in peptide informatics, and their interconversion is one of the core problems. Currently, some related conversion tools and methods exist, but these techniques have significant limitations when dealing with complex peptide structures, making it difficult to meet practical research and development needs. For example: I. Existing mainstream conversion tools, such as the simple sequence interface provided by RDKit and some online conversion websites (such as Peptide Calculator, SMILES Translator, etc.), typically only support a limited number of peptide types. Specifically, they only support 20 natural amino acids and their D-isomers, lacking support for the increasing number of non-natural amino acids (such as modified amino acids and artificially synthesized amino acids); they only accept FASTA or simple one-dimensional sequences as input, and cannot process sequences containing complex information such as terminal modifications and side chain modifications; they do not support arbitrary monomer expansion, and cannot accurately identify peptide molecules containing modified components such as PEG chains, fatty chains, and glycosyl groups; at the same time, their ability to process special topological structures such as cyclic peptides and bound peptides is severely insufficient, often directly ignoring or incorrectly parsing this topological information.

[0004] For example, RDKit's PeptideToSmiles function can only process linear peptides composed of natural amino acids. It may produce incorrect SMILES for peptides with simple end-group modifications such as N-terminal acetylation (Ac) and C-terminal amidation (NH2). Online conversion websites are mostly designed for basic linear peptides. When the input contains disulfide bonds or cyclic peptide structures, the conversion results often lose crucial topological information.

[0005] II. In the process of converting SMILES to sequences, most existing methods rely on "fuzzy matching" or substructure matching algorithms based on residue fragment libraries. The core idea of ​​this method is to split the SMILES string into multiple sub-fragments and then compare them with a pre-defined amino acid fragment library to determine the corresponding amino acid residues. However, this method has significant limitations: (1) Poor ability to identify topological information: It is unable to reliably identify whether a polypeptide molecule is a linear peptide or a cyclic peptide, and it is even more difficult to determine whether it has N / C terminal modifications or contains side chain binding structures. For example, for head-to-tail cyclic peptides, existing methods often fail to identify the cyclic linkages of their main chain and incorrectly resolve them as linear peptides; for polypeptides containing side chain binding, the linker structure of the binding part is often incorrectly identified as an amino acid side chain or directly discarded.

[0006] (2) Lack of rigorous backbone-level analysis: Existing methods mostly focus on fragment matching of amino acid side chains, while ignoring the structural features of the polypeptide backbone. The polypeptide backbone is composed of N–Cα–C(=O) repeating units linked by peptide bonds, which is the core for determining the residue sequence and molecular topology. The lack of precise backbone analysis leads to problems such as residue order reversal, missed or false detection of residues during the conversion process, making it difficult to guarantee the strict reversibility of the conversion.

[0007] For example, some amino acids with similar side chains (such as leucine and isoleucine) may be misidentified by matching side chain fragments alone; and for residues with multiple modifying groups, fragment matching algorithms often cannot accurately separate the modified parts from the amino acid body, resulting in incorrect analysis results.

[0008] Third, in key stages of peptide drug development, such as constructing quantitative structure-activity relationship models (e.g., deep learning models like PepMNet) or performing large-scale peptide data cleaning, higher requirements are placed on the conversion between SMILES and sequences: it is necessary to generate standardized SMILES from sequences to ensure the uniqueness and computability of molecular structures; it is also necessary to accurately reconstruct sequences, end-group modifications, topological structures, and some structural annotations (e.g., SS pairing information) from SMILES to ensure the integrity and usability of the data.

[0009] However, existing methods struggle to meet the combined requirements of a scalable monomer library, topology awareness, and strict reversibility. Constructing the PepMNet model necessitates preprocessing large-scale peptide datasets, converting SMILES into structured sequence features containing residue sequences, terminal information, and disulfide bond positions. Existing tools, unable to accurately resolve complex structures, result in significant data filtering or mislabeling, impacting model training performance. Furthermore, the irreversibility of existing methods during data cleaning makes it impossible to deduce the original SMILES from the converted sequences, hindering data traceability and verification. For instance, Chinese patent CN117292742A discloses an anticancer peptide identification method and system. This invention treats peptides as linear sequences rather than chemical topological structures, with conversion logic only adapting to the standard 20 amino acids. Lacking a scalable monomer library and topology awareness, it fails to process complex peptide data; simultaneously, the absence of a reversible conversion mechanism sacrifices data traceability.

[0010] To address these issues, several improvements have been attempted in the field. For example, some tools have expanded their fragment libraries to support non-natural amino acids, but this method requires manual maintenance of a large fragment library, has poor scalability, and cannot handle novel modifications not pre-defined. Some studies have proposed rule-based cyclic peptide resolution methods, but these are only applicable to specific types of cyclic peptides (such as disulfide bond cyclic peptides) and lack versatility. Other tools have attempted to introduce molecular graph traversal algorithms, but lack systematic utilization of the main chain structure, resulting in limited topology recognition accuracy.

[0011] In summary, existing SMILES and sequence conversion technologies have significant limitations in terms of support range, resolution accuracy, reversibility, and scalability, failing to meet the practical needs of complex peptide drug development. Therefore, developing a method and system capable of handling various complex peptide structures, achieving strictly bidirectional reversible conversion, and possessing good scalability has become an urgent technical problem to be solved in this field. Summary of the Invention

[0012] To address the problems existing in the prior art, this invention proposes a bidirectional reversible conversion method and system between peptide molecules SMILES and sequence expressions, so as to achieve accurate conversion of peptide molecules containing natural / non-natural amino acids, terminal modifications, disulfide bonds and binding structures, and meet the comprehensive requirements of "expandable monomer library + topology sensing + strict reversibility".

[0013] The technical solution of the present invention is as follows: On one hand, the present invention provides a method for bidirectional reversible conversion between peptide molecules SMILES and their sequence expressions, comprising: (1) The process of converting SMILES into sequence expressions is as follows: The input peptide molecules SMILES are standardized and a molecular graph is constructed. The molecular graph was searched using SMARTS mode to obtain the order of each residue in the molecule and the corresponding main chain atom index. Based on the main chain atom index and its sequence relationship, it is determined whether the peptide molecule has a head-to-tail main chain ring structure and / or a covalent connection structure between side chains, and corresponding topological description information is generated; The first residue N, the last residue C, and the surrounding non-main chain heavy atoms of the molecular diagram are searched to obtain the set of candidate end-group atoms and perform sequence matching with the end-group library; Based on the main chain atom index, peptide bond positions are identified, peptide bonds are cleaved to obtain residue structure fragments, and after the residue structure fragments are normalized, the corresponding residue sequence representation is determined by structure matching with a monomer template library. Based on the atomic adjacency relationship of the residue structure fragments in the molecular diagram, the disulfide bond connection relationship between residues is located and identified, and disulfide bond annotation information is generated in the form of residue index pairs. By integrating end-group structure representation, residue sequence representation, topological description information, and disulfide bond annotation information, a sequence expression containing residue order and topological constraint information is generated. (2) The sequence expression → SMILES conversion process is as follows: The sequence expression is parsed to obtain residue sequence representation, topological description information, and specific linker annotation information; Based on the residue sequence, the corresponding molecular fragment is searched in the monomer template library, and the main chain is spliced ​​according to the residue order and topological description information to construct a molecular map containing the main chain structure. Remove leaving atoms or groups from the molecular diagram to ensure the correct structural form of amino acids in the polypeptide; Based on the specific linking annotation information, disulfide bonds are reconstructed between corresponding residues in the molecular diagram or specific linking relationships are formed through linkers. The constructed molecular map is encoded to generate SMILES corresponding to the input sequence expression.

[0014] Preferably, the step of using SMARTS mode to search the molecular graph to obtain the order relationship of each residue in the molecule and the corresponding main chain atom index specifically involves: In the molecular diagram, the SMARTS mode is defined as [N;$(NCC(=O))]-[C;$(C(N)C=O)]-[C;$(C=O)]. The SMARTS mode is used to search the molecular diagram based on the N–Cα–C(=O) repeating structure of the peptide molecular backbone. The residue order is established by the backbone atom index, and an adjacency traversal is performed along the peptide bond direction to obtain the order relationship of each residue in the molecule and the corresponding backbone atom index.

[0015] Preferably, the step of determining whether the peptide molecule has a head-to-tail main chain ring structure and / or covalent linkage structure between side chains based on the main chain atom index and its sequence relationship, and generating corresponding topological description information, specifically includes: A comprehensive analysis is conducted on the connection relationship between the main chain N and C and the disconnection or reconstruction of the side chain links to determine whether there is a head-to-tail main chain loop structure and / or a covalent connection structure between side chains, and to generate the corresponding topological description information. Whether a substance is a cyclic peptide can be determined by detecting the presence of a direct chemical bond between the first residue N atom and the last residue C atom; whether a substance is a side-chain binding structure can be determined by identifying specific linking groups on the side chain and the positions of the residues they are linked to.

[0016] Preferably, the step of obtaining the set of candidate end-base atoms and performing sequence matching with the end-base library specifically includes: After the obtained set of candidate end-base atoms is trimmed into submolecules and standardized into canonical end-base SMILES, it is matched with the end-base library. When a match cannot be found, the end-base structure is directly encoded into the end-base structure representation. The endpoint library includes a core endpoint library and an extended endpoint library that are compatible with HELM. The specified endpoint SMILES is first matched with the core endpoint library, and if that fails, it is matched with the extended endpoint library.

[0017] Preferably, the structure normalization process includes: removing cleaved dummy atoms, restoring the C-terminal carboxylic acid form, and retaining side chains and modifying groups; The structure matching with the monolithic template library adopts a two-level matching strategy: first, it performs an exact structure matching with the entries in the monolithic template library; if that fails, it performs a similarity matching with the entries in the monolithic template library using Morgan fingerprints.

[0018] Preferably, the monolithic template library further includes an extensible end-base library and an automatic increment mechanism, as well as the monolithic template library and the automatic increment mechanism: The monomer template library includes a core monomer library and an extension library. If an unknown but structurally well-defined sidechain combination or end-base structure is detected in the SMILES → sequence conversion process, a new extension entry is automatically generated, relevant information is recorded, and it is added to the extension library of the monomer template library or the extension end-base library of the end-base library.

[0019] Preferably, the step of searching for the corresponding molecular fragment in the monomer template library based on the residue sequence and performing main chain splicing according to the residue order and topological description information specifically includes: Each monomer template barcode uses HELM-style SMILES with atomic mapping numbers to define the main chain anchor point. The anchor point and leaving base of each molecular fragment are parsed, and the main chain splicing is achieved by HELM-style fragment fusion operation with anchor point mapping.

[0020] Preferably, the processing for topologically determined cyclic peptides further includes: during the SMILES → sequence expression conversion process, breaking a peptide bond and replenishing the terminal group to form a linear peptide before performing the SMILES → sequence expression conversion process again; during the sequence expression → SMILES conversion process, after generating linear SMILES for sequences without terminal groups, deleting the terminal groups and reforming peptide bonds to form cyclic peptides.

[0021] On the other hand, the present invention provides a bidirectional reversible conversion system between peptide molecules SMILES and sequence expressions, including a preprocessing module, a main chain identification module, a topology determination module, an end-group detection module, a residue identification module, a disulfide bond processing module, a sequence assembly module, a sequence parsing module, a fragment assembly module, a terminal processing module, and a SMILES generation module. The preprocessing module is used for SMILES normalization and molecular map construction; The main chain identification module is used to search for the main chain sequence; The topology determination module is used to identify the topology structure; The endpoint detection module is used for endpoint identification and matching with the endpoint database; The residue identification module is used for residue segmentation and matching with the monomer template library; The disulfide bond processing module is used for disulfide bond identification, annotation, and reconstruction. The sequence assembly module is used to generate sequence expressions for the SMILES→ sequence; The sequence parsing module is used to break down the components and metadata of the sequence. The fragment assembly module is used for splicing molecular fragments in the sequence → SMILES process; The terminal processing module is used for leaving atom deletion and end-base backfilling; The SMILES generation module is used to export SMILES.

[0022] Preferably, the system further includes a Web and script interaction module; The web and script interaction provides a web interface with FastAPI + static front-end and batch processing scripts; the web interface supports web page cards with four conversion modes: linear / binding / cyclic peptide / cyclic peptide-binding; the batch processing script is used to automatically append sequence, topological information and disulfide bond information to large-scale CSV data.

[0023] Compared with the prior art, the present invention has the following technical effects: 1. Traditional methods often directly match side chain fragments or rely on manually labeled connection sequences, which are easily affected by side chain modifications, leading to resolution errors. This invention utilizes main chain N–Cα–C(=O) atomic indexing and graph traversal to drive the reduction of residue sequences and the identification of peptide bond connections, with the main chain structure as the core. This method fundamentally captures the essential characteristics of peptide molecular structure and remains stable even with multiple modifications, long side chains, or complex caps, achieving significantly higher resolution accuracy than traditional methods. Compared to the problems of topological information loss and residue misidentification often found in existing tools, the peptide sequence expression of this invention can completely preserve structural information.

[0024] 2. Existing tools often design independent processing modules for different topologies, resulting in poor compatibility between modules and difficulty in handling peptide molecules with multiple topological combinations. This invention determines whether head-to-tail connections exist through backbone adjacency relationships. By disassembling / reconnecting the binding linker and using the SS mapping algorithm, it processes linear peptides, cyclic peptides, bound peptides, peptides containing disulfide bonds, and their combinations within a unified framework. This eliminates the need to maintain independent conversion code for each topology, significantly improving the system's versatility and flexibility.

[0025] 3. Existing tools often fail or misinterpret unknown end groups or non-natural monomers. The scalable monomer / fragment library and automatic incremental mechanism of this invention prevent simple failure when encountering unknown but structurally well-defined side chain combinations or end groups. Instead, it temporarily records them using canonical SMILES, represented by codes such as [N-cap:SMILES] / [C-cap:SMILES] / with an X, and automatically adds them to the extended library. This "run-and-expand" mechanism continuously enriches the system's recognition capabilities, significantly improving its adaptability in real-world medicinal chemistry scenarios, especially suitable for handling novel synthetic peptide molecules. Furthermore, it eliminates the need for manual library updates. When processing novel synthetic peptides (such as peptides with PEG chain modifications or special linker binding), the system can automatically generate extended templates to expand its recognition capabilities, adapting to the constantly emerging novel molecular structures in peptide drug development.

[0026] 4. Reversibility is a key indicator for SMILES and sequence conversion. Existing tools often suffer from information loss or inconsistency in areas such as caps, non-natural residues, binding, and disulfide bonds. This invention achieves strictly bidirectional reversible conversion between SMILES and sequences through techniques such as HELM anchor assembly, precise disulfide bond reconstruction, and reversible mapping of end-group encoding. Starting from the sequence, SMILES are obtained by splicing HELM anchors and fragments; then, the original sequence (including D / L information, end-group symbols, binding pose, linker SMILES, and SS pairing) can be reconstructed using a backbone-driven SMILES→sequence algorithm. In round-trip testing, conversion of a mixed peptide dataset containing natural amino acids, non-natural amino acids, end-group modifications, cyclic peptides, and disulfide bonds achieved 100% consistency of structural information after both round-trip conversions, solving the data traceability difficulties caused by the irreversibility of conversions in existing tools.

[0027] 5. Most existing publicly available tools focus on the algorithm itself and lack engineering application support. This invention provides a systematic set of scripts and web services. For example, the smi2seq_dataprepare.py batch processing script can efficiently process large-scale CSV format peptide data, processing more than 100,000 SMILES data per hour and automatically generating structured feature tables containing sequence, topological information, disulfide bonds, etc. Compared with manual processing or the step-by-step processing methods of existing tools, the efficiency is improved by more than 50 times, significantly reducing the time cost in scenarios such as QSAR model construction and large-scale data cleaning. The unified web interface supports interactive operation, and non-technical personnel can complete the conversion by simply uploading and selecting modes. The script interface can be directly embedded into deep learning processes to achieve end-to-end data preprocessing. This invention can be widely applied to scenarios such as quantitative structure-activity relationship model construction for peptide drugs, large-scale dataset cleaning, molecular design and optimization, and structure-activity relationship analysis, providing key computational tool support for peptide drug development and promoting the improvement of R&D efficiency. Detailed Implementation

[0028] Example 1 This embodiment provides a bidirectional reversible conversion method between peptide molecules SMILES and sequence expressions. The method has been implemented in various scripts and web interfaces in the / works / pys / peptseq_smi directory, including: SMILES → sequence expression conversion process and sequence expression → SMILES conversion process.

[0029] The SMILES → sequence expression conversion process (with SMILES2Sequence as the core class) is as follows: The input peptide molecules SMILES are standardized and a molecular map is constructed. Specifically, the preprocessing includes: The `clean_smiles` function is called to standardize the input SMILES, including removing redundant spaces, unifying atomic symbol representation (e.g., representing Cl as Cl instead of CL), and handling special characters, to ensure the consistency of the SMILES format.

[0030] The normalized SMILES are converted into a molecular graph (Mol object) using the Chem.MolFromSmiles function of RDKit, and the molecular graph is cleaned by calling the Chem.SanitizeMol function, including checking the rationality of chemical bonds, adding implicit hydrogen atoms, and correcting molecular topology, to ensure the correctness of the molecular graph.

[0031] Example: Input SMILES as "CC(=O)N[C@@H](C(C)C)C(=O)N[C@H](CS)C(=O)O", and after preprocessing, a molecular diagram with the correct structure is obtained.

[0032] The molecular graph is searched using SMARTS mode to obtain the order of residues in the molecule and the corresponding backbone atom indexes.

[0033] In a preferred embodiment of this example, the step of using SMARTS mode to search the molecular graph specifically involves: The SMARTS pattern is defined as [N;$(NCC(=O))]-[C;$(C(N)C=O)]-[C;$(C=O)], which specifically identifies the N–Cα–C(=O) triplet structure of the polypeptide backbone. The `get_backbone_atoms` function is called to search for all N–Cα–C(=O) triplet structures in the molecular graph using the SMARTS pattern, and the residues are chained together from the N-terminus to the C-terminus through adjacency traversal. During the traversal, the indices (atom numbers in the molecular graph) of the N, Cα, and C atoms of each residue are recorded, forming a backbone atoms index list.

[0034] Example: For a linear polypeptide containing 3 residues, the backbone atoms index list is [(N1,Cα1,C1), (N2,Cα2,C2), (N3,Cα3,C3)], where N1 is the N atom index of the first residue, and so on.

[0035] This embodiment overcomes the limitations of existing methods that rely on side-chain fragment matching, proposing a resolution framework centered on the polypeptide backbone structure. Using a custom SMARTS pattern [N;$(NCC(=O))]-[C;$(C(N)C=O)]-[C;$(C=O)], the N–Cα–C(=O) fragment is precisely located, constructing a "backbone atoms index." Adjacency traversal is performed along the peptide bond (C–N bond) in the N-to-C direction to establish the residue sequence order. By statistically analyzing the neighbor types and numbers of backbone atoms (N, Cα, C), linear peptides and backbone cyclic peptides can be automatically distinguished: for linear peptides, the number of neighbors of the N atom of the first residue and the C atom of the last residue differs significantly from that of the middle residues; for backbone cyclic peptides, the number of neighbors of all backbone atoms exhibits a regular distribution. Simultaneously, this statistical information can also help determine the presence of an N / C-terminal cap, providing a basis for subsequent end-group detection. This algorithm ensures the accuracy of residue sequence and molecular topology recognition by firmly grasping the core structural feature of the polypeptide backbone, and can still work stably even when the polypeptide molecule contains complex side chain modifications or multiple components.

[0036] Based on the main chain atom index and its sequence relationship, it is determined whether the peptide molecule has a head-to-tail main chain ring structure and / or a covalent connection structure between side chains, and corresponding topological description information is generated.

[0037] In a preferred embodiment of this invention, the step of determining whether the peptide molecule has a head-to-tail main chain ring structure and / or covalent linkages between side chains based on the main chain atom index and its sequence relationship, and generating corresponding topological description information, specifically includes: A comprehensive analysis is conducted on the connection relationship between the main chain N and C, as well as the disconnection or reconstruction of side chain links, to determine whether head-to-tail cyclization and side chain stapled structures exist, and to generate the corresponding topological information sequence.

[0038] Cyclic peptide identification involves checking the backbone sequence for a single bond between the N atom (N1) of the first residue and the C atom (Cn) of the last residue. If a single bond is found, it is preliminarily identified as a head-tail cyclic peptide. Simultaneously, the number of neighbors for each backbone atom is counted. For head-tail cyclic peptides, the number of neighbors for all backbone N and C atoms is typically 2 (excluding the Cα atom), further validating the cyclic peptide structure.

[0039] The binding structure determination involves analyzing the heavy atoms in the molecular diagram, excluding the backbone and terminal groups, to identify the presence of side-chain linkers (such as fragments containing olefin bonds, long alkyl chains, or other characteristic structures). If a linker exists, the dedicated function `_detach_sidechain_linkers` is called to separate the main chain from the binding linker before performing backbone analysis, recording the positions (poses) of the residues connected by the linker and the SMILES of the linker.

[0040] Example: For the stapled peptide “Ac-[Ala3 stapled to Ala7]-NH2”, the pose is recorded as “3-7” and the linker SMILES is “C=C(CCCC)” by recognizing the Ala3 and Ala7 residues linked by the linker.

[0041] The molecular diagram is searched for its first residue N, last residue C, and surrounding non-main chain heavy atoms (e.g., BFS search, DFS search, or other search algorithms, based on the biochemical property that amino acids are linked together by peptide bonds to form polypeptides, to identify so-called backbone siderchain atoms or groups, Caps, linkers), identifying substituent regions of N-cap and C-cap, obtaining a set of terminal group candidate atoms, and performing sequence matching with the terminal group library.

[0042] Furthermore, multiple backbone identifications can be performed before topology determination. Backbone identification is performed based on the presence or absence of peptide bonds between the first and last amino acids to determine whether it is a head-to-tail cyclic peptide topology. After the topology is determined, backbone analysis can also be used to locate whether the Ca-linked side chains of each amino acid are connected to other amino acids (for example, if non-standard amino acids are present after backbone splitting peptide bonds, and the non-standard amino acid contains backbone units >= 2, it indicates that two amino acid side chains are covalently linked, and subsequent template matching and linker detection and split are initiated).

[0043] In a preferred embodiment of this study, N-terminal detection is performed as follows: Starting with the N atom (N1) of the first residue, a BFS traversal is conducted to collect all non-backbone heavy atoms connected to N1, forming an N-cap candidate atom set. These atoms are then combined with backbone key atoms such as N1 and Cα1, trimmed into submolecules, and the Chem.MolToSmiles function is called to generate canonical SMILES. C-terminal detection is performed as follows: Starting with the C atom (Cn) of the last residue, a BFS traversal is conducted to collect all non-backbone heavy atoms connected to Cn, forming a C-cap candidate atom set. This set is similarly trimmed into submolecules and canonical SMILES are generated.

[0044] In a preferred embodiment of this invention, the step of obtaining the candidate atom set for end groups and performing sequence matching with the end group library involves matching the canonical SMILES of N-cap and C-cap with the N_CAPS library and the C_CAPS library, respectively. If the match is successful, the corresponding end group code is obtained (e.g., Ac represents acetylation, NH2 represents amidation); if the match fails, the end group structure is directly encoded into the end group structure sequence, denoted as "X_cap", and output in the sequence expression in the form of [N-cap:SMILES] / [C-cap:SMILES], ensuring that the end group information is not lost.

[0045] Example: The canonical SMILES of the N-terminal base is "CC(=O)", which matches the "Ac" entry in the N_CAPS library, so the N-terminal base is encoded as "Ac-"; the canonical SMILES of the C-terminal base is "N", which matches the "NH2" entry in the C_CAPS library, so the C-terminal base is encoded as "-NH2".

[0046] Furthermore, the endpoint library includes a core endpoint library and an extended endpoint library that are compatible with HELM. The specified endpoint SMILES is first matched with the core endpoint library, and if that fails, it is matched with the extended endpoint library.

[0047] Based on the main chain atom index, peptide bond positions are identified, peptide bonds are cleaved to obtain residue structure fragments, and after the residue structure fragments are structurally normalized, the corresponding residue sequence representation is determined by structural matching with a monomer template library.

[0048] In a preferred embodiment of this invention, residue splitting and matching includes: Peptide bond identification and cleavage: Based on the backbone atoms index list, identify all peptide bonds connecting adjacent residues (i.e., C–N single bonds between the C atom of the i-th residue and the N atom of the (i+1)-th residue) and record their indices. (Call the FragmentOnBonds function of RDKit) Cleave the molecular diagram at these peptide bond positions (C–N bonds) in one operation (using the FragmentOnBonds function), and map back to the fragments corresponding to each residue according to the Cα atom to obtain multiple residue fragments.

[0049] Residue fragment normalization: The _normalized_residue_mol function is called to normalize each residue fragment: remove dummy atoms introduced during the cleavage process (such as *); restore the C-terminal ester or amide group to the carboxylic acid form (–C(=O)OH); retain all modifying groups on the side chain, such as phosphate groups, sugar groups, etc., to ensure the consistency of the fragment structure.

[0050] The Cα chirality determination specifically involves calling the _alpha_cip function to determine the chirality (R / S configuration) of the Cα atom in each residue fragment, in order to distinguish between D-type and L-type amino acids, and recording it as "D-XXX" or "L-XXX".

[0051] As a preferred implementation of this embodiment, a two-level matching strategy is adopted when searching the monomer template library: First, a precise structural match is performed between the canonical index (the index of the monomer template library) and the entries in the monomer template library (such as MCS, standard SMILES comparison, etc. The implementation logic of precise structural matching is: using precise matching that considers the valence state, charge state, and other factors of each heavy atom. If no precise template is found, the valence state and charge state of the atoms are ignored and structural matching is performed again). If a matching entry is found, the corresponding residue code is obtained. If precise matching fails, the similarity between the fragment and all entries in the monomer template library (such as Tanimoto similarity) is calculated through Morgan fingerprint (the main parameter settings are determined according to the actual application scenario and are not limited here. In this embodiment, the radius is set to 2 and the number of bits is 1024). The best code with the highest similarity and the alternative list (the list can be set, such as Top 3) are returned for further confirmation by the user or automatic selection by the system.

[0052] Example: The normalized canonical SMILES of a certain residue fragment is "C[C@@H](N)C(=O)O", which exactly matches the "Val" (valine) entry in the template library, so the residue code is "Val"; another modified residue fragment cannot be matched precisely, and the best code is "X1" obtained by fingerprint similarity matching, and the alternative list is "X1,X2,X3".

[0053] In addition, for complex residues, the following process is used: modified residues containing multiple components (such as residues modified with PEG chains, residues containing aliphatic chains, etc.) are automatically split and fragment information of each component is recorded to facilitate individual analysis of each component in subsequent feature engineering.

[0054] In a preferred embodiment of this invention, the monolithic template library further includes an extensible end-base library and an automatic increment mechanism, as well as the monolithic template library and the automatic increment mechanism: The monomer template library comprises a core monomer library and an extension library. The monomer template library structure can be designed as follows: a core monomer library JSON file (data / monomersFromHELMCoreLibrary.json) compatible with HELM (Hierarchical Editing Language for Macromolecules), along with extension libraries (extend_lib.json, extend_lib_custom.json). The core library contains common natural amino acids, non-natural amino acids, and terminal modifications; the extension library stores novel monomers and fragments defined by the user or automatically discovered by the system.

[0055] If an unknown but structurally well-defined sidechain combination or end-base structure is detected during the SMILES → sequence expression conversion process, a new extended entry is automatically generated, recording the code of this structure, standardizing the mapping relationship between SMILES (canonical SMILES), components, and fragments, and adding it to the extended library of the monomer template library or the extended end-base library of the end-base library. Simultaneously, the SMILES of residues and component fragments can be recorded in the frag_smi.json file, allowing subsequent feature construction to directly reuse this fragment information without repeated parsing.

[0056] Based on the atomic adjacency of the residue structural fragments in the molecular diagram, the disulfide bond connections between residues are located and identified, and disulfide bond annotation information is generated in the form of residue index pairs. Disulfide bonds are common stable chemical bonds in polypeptide molecules, and their accurate identification and recording are crucial for maintaining the reversibility of conversion.

[0057] In a preferred embodiment of this invention, the automatic location and identification of disulfide bonds includes: SS bond localization: After the main chain mapping is completed, all chemical bonds in the molecular diagram are traversed, S–S single bonds are selected, and the indices of the two sulfur atoms of these bonds are recorded.

[0058] Residue index pair establishment: For each sulfur atom of an S–S bond, the _assign_sulfur_to_residue function is called to perform BFS from the sulfur atom outward to find the nearest Cα residue, thereby determining the residue indexes i and j to which the sulfur atom belongs, and establishing the residue index pair (i,j) (i.e., there is a disulfide bond between the i-th residue and the j-th residue).

[0059] Sequence annotation: In the sequence token list, change the residue symbols with residue indices i and j to C (if the original code is another sulfur-containing monomer, such as cysteine ​​derivative); append |SS:ij... metadata after the sequence expression, and separate multiple disulfide bonds with commas to clearly indicate the position of the disulfide bonds.

[0060] Example: If there are two S–S bonds in the molecular diagram, with corresponding residue index pairs of (2,5) and (3,6), then append “|SS:2-5,3-6” to the sequence, and mark the codes of the 2nd, 3rd, 5th and 6th residues as “C”.

[0061] By integrating end-group structure sequences, residue sequence representations, topological description information, and disulfide bond annotation information, a sequence expression containing residue order and topological constraint information is generated.

[0062] As a preferred embodiment of this invention, sequence integration and generation includes: Sequence integration: Integrate the N-cap encoding (if any), residue code sequence, and C-cap encoding (if any) in sequence as the base sequence token; if a cyclic peptide structure is present, add the "Cyclo-" tag at the beginning or end of the sequence; if a stapled structure is present, add the "stapled:pose-linkerSMILES" tag.

[0063] Sequence generation: The basic sequence token is combined with disulfide bond metadata to form the final sequence string. At the same time, a detailed dictionary of details is generated, including residue matching information (code, candidate list, and similarity for each residue), caps information (SMILES and encoding of N-cap / C-cap), topological information (linear / cyclic peptide / binding), and warnings (such as unknown residues, low similarity matches, etc.).

[0064] Output: Returns the final sequence string and a details dictionary. Users can choose whether to output details information as needed.

[0065] Example: The final output sequence is "Ac-Cys-Val-Cys-Ala-Cys-Ser-Cys-NH2|SS:1-4,2-5". The details dictionary contains information such as the matching status of each residue, the end groups being Ac and NH2, and the topology being linear.

[0066] The sequence expression → SMILES conversion process can use seq2smi.py or seq2smi_v2.py as the core script, with seq2smi_v2.py being an optimized version that supports more complex topologies. This process includes steps such as sequence parsing, fragment assembly, terminal processing and caps backfilling, and SS disulfide bond reconstruction. The sequence expression is parsed to obtain residue sequence representation, topological description information, and specific linker annotation information.

[0067] As a preferred embodiment of this practice, the sequence expression splitting and parsing specifically involves: Tokenization: Call the _tokenize_preserve_brackets function to tokenize the input sequence, preserving the parentheses (such as [N-cap:SMILES]) and the metadata after | (including pose:..., linker:..., SS:...), to prevent the content within the parentheses from being incorrectly split.

[0068] Sequence splitting: The `parse_sequence` function is called to extract the N-cap, C-cap, and residue list. Specifically, using "-" as the separator, the N-cap at the beginning of the sequence (e.g., "Ac-") and the C-cap at the end (e.g., "-NH2") are identified; the middle part is the residue sequence, and D-type residues (e.g., "D-Ala"), staple markers (e.g., "stapled:3-7-C=C(CCCC)"), or Cyclo markers (e.g., "Cyclo-") are identified.

[0069] Disulfide bond parsing: The extract_disulfide_pairs_from_sequence function is called to collect and parse SS pairing information from the metadata after | to obtain a list of residue index pairs, such as [(2,5), (3,6)].

[0070] Example: The input sequence is “Cyclo-Ala-D-Val-Cys|SS:3-3” (assuming it is a cyclic peptide and contains intramolecular disulfide bonds). After splitting, the N-cap is empty, the C-cap is empty, the residue list is [Ala, D-Val, Cys], the Cyclo tag is True, and the SS pairing is [(3,3)].

[0071] Based on the residue sequence, the corresponding molecular fragment is searched in the monomer template library, and the main chain is spliced ​​according to the residue order and topological description information to construct a molecular graph containing the main chain structure.

[0072] To achieve high-fidelity conversion from sequence to smilies, this embodiment proposes an assembly algorithm based on HELM anchors. Through precise positioning and step-by-step splicing of HELM anchors, high fidelity conversion from sequence to smilies is ensured, accurately reproducing the structural features of the original polypeptide. As a preferred embodiment, the step of searching for corresponding molecular fragments in a monomer template library based on the residue sequence and splicing the main chain according to the residue order and topological description information specifically involves: Anchor definition and template lookup: Each monomer template entry uses HELM-style SMILES with atommapNum to define the main chain anchor (e.g., [H:1], [OH:2]). These anchors clarify the connection positions and methods between monomers. For N-cap, each residue, and C-cap, the corresponding template entries are searched in MonomerLib (core library + extension library). The template entries contain HELM-style SMILES with AtomMapNum, anchor information (AtomMapNum of anchor atoms), leaving atoms information (AtomMapNum of leaving base atoms), etc.

[0073] Fragment generation: The build_fragment function is called to generate molecular fragments (Mol objects) based on the SMILES of the template entries, and the anchors and atomic indices of leaving atoms of each fragment are recorded.

[0074] Fragment splicing: Initialize the splicing molecule as an N-cap fragment (if any), then concatenate the current residue fragment with the splicing molecule according to residue order using the `fuse_by_anchor_maps_helm` function. The concatenation rule is as follows: match the C-terminal anchor of the previous fragment (e.g., `AtomMapNum=2`) with the N-terminal anchor of the next fragment (e.g., `AtomMapNum=1`) to form a peptide bond, and remove the leaving atoms of the previous fragment and the N-terminal leaving atoms of the next fragment. During the splicing process, maintain `tail_anchors` (the terminal anchors of the current splicing molecule) and `leaving_all` (indices of all leaving base atoms to be deleted).

[0075] Binding structure processing: In stapled mode, based on the residue index indicated by the pose (such as 3 and 7), find the corresponding residue fragment, select the anchor atom on the side chain (such as the O atom of the hydroxyl group in the side chain); call the build_fragment function to generate the linker fragment, connect the two anchors of the linker to the side chain anchors of the two residues respectively, and add the leaving atoms of the linker to leaving_all.

[0076] Example: N-cap is Ac, its template SMILES is "CC(=O)[O:1]", anchor is [1], and leaving atom is [1]; the first residue is Ala, its template SMILES is "[H:1]N[C@@H](C)C(=O)[O:2]", anchors are [1,2], and leaving atoms are [1]; during splicing, Ac's anchor 1 is connected to Ala's anchor 1, and Ac's leaving atom 1 and Ala's leaving atom 1 are removed to obtain the Ac-Ala fragment.

[0077] Remove leaving atoms or groups from the molecular diagram to ensure the correct structural form of amino acids in the polypeptide.

[0078] As a preferred embodiment of this invention, deleting leaving atoms or groups from the molecular diagram specifically includes: Deleting leaving atoms: Call the Chem.DeleteSubstructs function or manually delete all atoms in leaving_all to ensure that leaving bases generated during splicing are completely removed.

[0079] C-terminal processing: For linear peptides, call the _ensure_terminal_carboxyl function to ensure that the C-terminus is in the form of –C(=O)OH; if the C-terminus is modified such as amidation, then process it according to the C-cap template.

[0080] Custom caps backfill: If the sequence contains a custom end base (such as [N-cap:CC(=O)O]), call the _apply_custom_n_cap / _apply_custom_c_cap function to graft the SMILES fragment of the custom end base to the N or C end of the backbone, and achieve precise connection through anchor point matching.

[0081] Example: Define a custom C-cap as [C-cap:OC(=O)CH3], and transfer it to the C-terminal carbonyl carbon to form a C-terminal ester group modification.

[0082] Based on the specific linker annotation information, disulfide bonds are reconstructed between corresponding residues in the molecular diagram or specific linker relationships are formed through linkers.

[0083] The constructed molecular map is encoded to generate SMILES corresponding to the input sequence expression.

[0084] In a preferred embodiment of this invention, based on the specific linker annotation information, disulfide bonds are reconstructed between corresponding residues in the molecular graph, or specific linker relationships are formed through linkers. The constructed molecular graph is then encoded to generate SMILES corresponding to the input sequence expression, specifically including: Sulfur atom localization: The `apply_disulfide_bonds` function is called to locate the side-chain sulfur atoms of the i-th and j-th residues based on the previously parsed residue index pairs (i,j). For cysteine ​​residues, the side-chain sulfur atom is typically the S atom of its side chain.

[0085] Sulfur atom treatment: Explicit H atoms are removed from the two sulfur atoms, and the number of implicit H atoms is set to 0 to ensure that the sulfur atoms are in a free state. This involves removing hydrogen atoms (including explicit and implicit H atoms) from the sulfur atoms and adding single bonds between the corresponding two S atoms to generate a true disulfide bridge structure.

[0086] Adding an SS bond: A single bond is added between two sulfur atoms to form an SS disulfide bond.

[0087] Final processing: The generated molecules are cleaned using the Chem.SanitizeMol function to ensure that the molecular structure is reasonable; the Chem.MolToSmiles function is then called to generate canonical SMILES as the final output.

[0088] Example: For residue index pair (3,3), find the side chain S atom of the 3rd Cys residue, delete its H atom and add an intramolecular SS bond to generate SMILES, a cyclic peptide structure.

[0089] In response to the unique topological structure of cyclic peptides, this embodiment designs a topology-aware processing method, which is implemented in two directions: SMILES→sequence and sequence→SMILES.

[0090] As a preferred embodiment of this example, the processing of topologically determined cyclic peptides includes: during the SMILES → sequence conversion process, for a given cyclic peptide SMILES, all peptide bonds are detected first, then one peptide bond is selected to be broken, and the N-terminal H and C-terminal OH are explicitly added back to make it a linear peptide, and then a unified SMILES → sequence conversion process is performed.

[0091] During the sequence-to-smiles conversion process, linear smiles are generated from sequences without terminal groups (labeled Cyclo). The explicit H / OH at the N / C ends are then removed, and a peptide bond is re-formed between the first residue N and the last residue C, thereby forming a head-to-tail cyclic peptide.

[0092] This processing method, in conjunction with backbone-based topology decision logic, achieves unified and reversible conversion of cyclic peptides in both conversion directions, avoiding the limitations of existing tools in processing cyclic peptides.

[0093] To verify the effectiveness and superiority of the method provided in this embodiment, the following uses two typical complex polypeptide molecules (Octreotide and Kalata B1) as examples to demonstrate the conversion effect of the present invention.

[0094] Example 1: Octreotide Octreotide is a synthetic octapeptide containing both natural and non-natural amino acids (D-phenylalanine). It has an amidation modification at the C-terminus and contains a disulfide bond, resulting in a complex structure.

[0095] (1) SMILES → Sequence Conversion: Input Octreotide's SMILES "CC(=O)N[C@@H](C(C)C)C(=O)N[C@H](C(C)C)C(=O)N[C@H](CS)C(=O)N[C@@H](C1=CC=CC=C1)C(=O)N[C@H](CH2C6H5)C(=O)N[C@@H](CH2OH)C(=O)NHC(=O)CH(CH3)2", and after conversion by the method in this embodiment, the output sequence is "Ac-D-Phe-Cys-Phe-D-Trp-Lys-Thr-Cys-Thr-NH2|SS:2-7". The sequence accurately contains N-terminal acetylation (Ac), C-terminal amidation (NH2), the non-natural amino acids D-Phe and D-Trp, the correct order of the 8 residues, and the position of the disulfide bond (between the 2nd and 7th residues), with all structural information completely preserved.

[0096] (2) Sequence → SMILES conversion: The above output sequence “Ac-D-Phe-Cys-Phe-D-Trp-Lys-Thr-Cys-Thr-NH2|SS:2-7” is used as input. After conversion by the method in this embodiment, the generated SMILES is completely consistent with the original input SMILES after canonical normalization, which verifies the strict reversibility of bidirectional conversion.

[0097] Example 2: Kalata B1 Kalata B1 is a natural cyclic peptide containing 11 amino acid residues. It has a head-tail cyclic structure and three intramolecular disulfide bonds, making it a complex topological structure and a typical example for testing the cyclic peptide conversion ability.

[0098] (1) SMILES → Sequence Conversion: Input the SMILES of Kalata B1 (containing cyclization and disulfide bond structures). In this embodiment, the method first identifies the head-tail cyclic peptide topology through backbone adjacency traversal, breaks one peptide bond to convert it into a linear peptide for analysis, and then detects 3 SS disulfide bonds. The final output sequence is "Cyclo-Gly-Leu-Cys-Thr-Val-Cys-Ser-Val-Cys-Tyr-Asn|SS:3-6,3-9,6-9", where the "Cyclo-" label clearly indicates its cyclic peptide properties, and the disulfide bond index pairs accurately reflect the connection relationship of the 3 disulfide bonds.

[0099] (2) Sequence → SMILES conversion: After inputting “Cyclo-Gly-Leu-Cys-Thr-Val-Cys-Ser-Val-Cys-Tyr-Asn|SS:3-6,3-9,6-9”, the system first generates linear SMILES, then deletes the terminal groups and reconstructs the head-tail peptide bonds to form a ring structure. At the same time, three SS bonds are added according to the disulfide bond index. The generated SMILES is completely consistent with the original cyclic peptide SMILES after standardization, which proves the effective processing capability of the method in this embodiment for complex cyclic peptide topologies.

[0100] As can be seen from the two examples above, the method described in this embodiment can accurately process complex peptides containing non-natural amino acids, terminal modifications, disulfide bonds, and cyclic peptide structures, achieving strict bidirectional reversible conversion between SMILES and sequences, and meeting the practical application needs in peptide drug development.

[0101] Example 2 Accordingly, this embodiment provides a bidirectional reversible conversion system between peptide SMILES and sequence expressions, used to implement the method described in any embodiment of the present invention, including a preprocessing module, a main chain identification module, a topology determination module, an end-base detection module, a residue identification module, a disulfide bond processing module, a sequence assembly module, a sequence parsing module, a fragment assembly module, a terminal processing module, and a SMILES generation module.

[0102] The preprocessing module is used for SMILES normalization and molecular map construction.

[0103] The main chain identification module is used to search for the main chain sequence.

[0104] The topology determination module is used to identify the topology structure.

[0105] The terminology detection module is used for terminology identification and matching with the terminology database.

[0106] The residue identification module is used for residue segmentation and matching with the monomer template library.

[0107] The disulfide bond processing module is used for disulfide bond identification, annotation, and reconstruction.

[0108] The sequence assembly module is used to generate the sequence expression of the SMILES→ sequence.

[0109] The sequence parsing module is used to split the components and metadata of the sequence.

[0110] The fragment assembly module is used for splicing molecular fragments during the sequence → SMILES process.

[0111] The terminal processing module is used for leaving atom deletion and end-base backfilling.

[0112] The SMILES generation module is used to export SMILES.

[0113] As a preferred embodiment of this invention, to improve the system's usability and engineering application capabilities, the system further includes a Web and script interaction module.

[0114] The web and script interaction provides a FastAPI + static front-end web interface and batch processing scripts. The web interface supports four conversion modes: linear, stapled, cyclic, and cyclic-stapled. Users can upload samples or sequences, select the conversion mode, view the conversion results in real time, and download the results. The interface is simple, intuitive, and easy to use, suitable for non-technical users.

[0115] The batch processing scripts, such as smi2seq_dataprepare.py, are custom scripts that can automatically append Sequence, Topology (linear / cyclic peptide / binding information), and SS (disulfide bond) information to large-scale CSV data. These scripts can be directly embedded into deep learning workflows such as QSAR models and PepMNet to automatically generate high-quality sequence and topology feature tables from the original SMILES table, improving the efficiency and accuracy of data preprocessing.

[0116] As a preferred embodiment of this invention, the system further includes an extensible library management module for managing the core monolithic library, the extension library, and automatically incrementally generating extension template entries.

[0117] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0118] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0119] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0120] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0121] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for bidirectional reversible conversion between peptide molecules SMILES and their sequence expressions, characterized in that, include: (1) The process of converting SMILES into sequence expressions is as follows: The input peptide molecules SMILES are standardized and a molecular graph is constructed. The molecular graph was searched using SMARTS mode to obtain the order of each residue in the molecule and the corresponding main chain atom index. Based on the main chain atom index and its sequence relationship, it is determined whether the peptide molecule has a head-to-tail main chain ring structure and / or a covalent connection structure between side chains, and corresponding topological description information is generated; The first residue N, the last residue C, and the surrounding non-main chain heavy atoms of the molecular diagram are searched to obtain the set of candidate end-group atoms and perform sequence matching with the end-group library; Based on the main chain atom index, peptide bond positions are identified, peptide bonds are cleaved to obtain residue structure fragments, and after the residue structure fragments are normalized, the corresponding residue sequence representation is determined by structure matching with a monomer template library. Based on the atomic adjacency relationship of the residue structure fragments in the molecular diagram, the disulfide bond connection relationship between residues is located and identified, and disulfide bond annotation information is generated in the form of residue index pairs. By integrating end-group structure representation, residue sequence representation, topological description information, and disulfide bond annotation information, a sequence expression containing residue order and topological constraint information is generated. (2) The sequence expression → SMILES conversion process is as follows: The sequence expression is parsed to obtain residue sequence representation, topological description information, and specific linker annotation information; Based on the residue sequence, the corresponding molecular fragment is searched in the monomer template library, and the main chain is spliced ​​according to the residue order and topological description information to construct a molecular map containing the main chain structure. Remove leaving atoms or groups from the molecular diagram to ensure the correct structural form of amino acids in the polypeptide; Based on the specific linking annotation information, disulfide bonds are reconstructed between corresponding residues in the molecular diagram or specific linking relationships are formed through linkers. The constructed molecular map is encoded to generate SMILES corresponding to the input sequence expression.

2. The bidirectional reversible conversion method between peptide molecules SMILES and their sequence expressions according to claim 1, characterized in that, The process of using SMARTS mode to search the molecular graph to obtain the order relationship of each residue in the molecule and the corresponding main chain atom index is as follows: In the molecular diagram, the SMARTS mode is defined as [N;$(NCC(=O))]-[C;$(C(N)C=O)]-[C;$(C=O)]. The SMARTS mode is used to search the molecular diagram based on the N–Cα–C(=O) repeating structure of the peptide molecular backbone. The residue order is established by the backbone atom index, and an adjacency traversal is performed along the peptide bond direction to obtain the order relationship of each residue in the molecule and the corresponding backbone atom index.

3. The method for bidirectional reversible conversion between peptide molecules SMILES and their sequence expressions according to claim 1, characterized in that, The step of determining whether the peptide molecule has a head-to-tail main chain ring structure and / or covalent linkage structure between side chains based on the main chain atom index and its sequence relationship, and generating corresponding topological description information, specifically includes: A comprehensive analysis is conducted on the connection relationship between the main chain N and C and the disconnection or reconstruction of the side chain links to determine whether there is a head-to-tail main chain loop structure and / or a covalent connection structure between side chains, and to generate the corresponding topological description information. Whether a substance is a cyclic peptide can be determined by detecting the presence of a direct chemical bond between the first residue N atom and the last residue C atom; whether a substance is a side-chain binding structure can be determined by identifying specific linking groups on the side chain and the positions of the residues they are linked to.

4. The method for bidirectional reversible conversion between peptide molecules SMILES and their sequence expressions according to claim 1, characterized in that, The specific steps of obtaining the set of candidate end-base atoms and performing sequence matching with the end-base library are as follows: After the obtained set of candidate end-base atoms is trimmed into submolecules and standardized into canonical end-base SMILES, it is matched with the end-base library. When a match cannot be found, the end-base structure is directly encoded into the end-base structure representation. The endpoint library includes a core endpoint library and an extended endpoint library that are compatible with HELM. The specified endpoint SMILES is first matched with the core endpoint library, and if that fails, it is matched with the extended endpoint library.

5. The method for bidirectional reversible conversion between peptide molecules SMILES and their sequence expressions according to claim 1, characterized in that, The structure normalization process includes: removing cleaved dummy atoms, restoring the C-terminal carboxylic acid form, and retaining side chains and modifying groups; The structure matching with the monolithic template library adopts a two-level matching strategy: first, it performs an exact structure matching with the entries in the monolithic template library; if that fails, it performs a similarity matching with the entries in the monolithic template library using Morgan fingerprints.

6. The method for bidirectional reversible conversion between peptide molecules SMILES and their sequence expressions according to claim 1, characterized in that, The monolithic template library also includes an extensible end-base library and an automatic increment mechanism, as well as the monolithic template library and automatic increment mechanism: The monomer template library includes a core monomer library and an extension library. If an unknown but structurally well-defined sidechain combination or end-base structure is detected in the SMILES → sequence conversion process, a new extension entry is automatically generated, relevant information is recorded, and it is added to the extension library of the monomer template library or the extension end-base library of the end-base library.

7. The method for bidirectional reversible conversion between peptide molecules SMILES and their sequence expressions according to claim 1, characterized in that, The specific steps of searching for the corresponding molecular fragment in the monomer template library based on the residue sequence and assembling the main chain according to the residue order and topological description information are as follows: Each monomer template barcode uses HELM-style SMILES with atomic mapping numbers to define the main chain anchor point. The anchor point and leaving base of each molecular fragment are parsed, and the main chain splicing is achieved by HELM-style fragment fusion operation with anchor point mapping.

8. The method for bidirectional reversible conversion between peptide molecules SMILES and their sequence expressions according to claim 1, characterized in that, The processing of topologically determined cyclic peptides also includes: during the SMILES → sequence expression conversion process, breaking a peptide bond and replenishing the terminal group to make it a linear peptide before performing the SMILES → sequence expression conversion process again; during the sequence expression → SMILES conversion process, after generating linear SMILES for sequences without terminal groups, deleting the terminal groups and reforming peptide bonds to form cyclic peptides.

9. A bidirectional reversible conversion system between peptide molecules SMILES and their sequence expressions, characterized in that, The system is used to implement the method as described in any one of claims 1 to 8, and includes a preprocessing module, a main chain identification module, a topology determination module, an end base detection module, a residue identification module, a disulfide bond processing module, a sequence assembly module, a sequence parsing module, a fragment assembly module, a terminal processing module, and a SMILES generation module. The preprocessing module is used for SMILES normalization and molecular map construction; The main chain identification module is used to search for the main chain sequence; The topology determination module is used to identify the topology structure; The endpoint detection module is used for endpoint identification and matching with the endpoint database; The residue identification module is used for residue segmentation and matching with the monomer template library; The disulfide bond processing module is used for disulfide bond identification, annotation, and reconstruction. The sequence assembly module is used to generate sequence expressions for the SMILES→ sequence; The sequence parsing module is used to break down the components and metadata of the sequence. The fragment assembly module is used for splicing molecular fragments in the sequence → SMILES process; The terminal processing module is used for leaving atom deletion and end-base backfilling; The SMILES generation module is used to export SMILES.

10. The bidirectional reversible conversion system between peptide molecules SMILES and sequence expressions according to claim 9, characterized in that, The system also includes a web and script interaction module; The web and script interaction provides a web interface with FastAPI + static front-end and batch processing scripts; the web interface supports web page cards with four conversion modes: linear / binding / cyclic peptide / cyclic peptide-binding; the batch processing script is used to automatically append sequence, topological information and disulfide bond information to large-scale CSV data.