This example provides molecular search, supporting smi file upload, molecular feature extraction using RDKit, and subsequent retrieval based on the Milvus vector engine.
Engine Features
- Underlying feature vector similarity search
- Millisecond-level search on billions of records on a single server
- Near real-time search with distributed deployment support
- Insert, delete, search and update data at any time
Molecular Background
SMILES (Simplified Molecular Input Line Entry System) is a specification for unambiguously describing the structure of molecules using ASCII strings. Since SMILES uses a string of characters to describe a three-dimensional chemical structure, it must convert the chemical structure into a spanning tree, employing a depth-first traversal tree algorithm. During conversion, hydrogen atoms are first removed and rings are opened. In the representation, atoms at broken bond ends are marked with numbers, and branches are written in parentheses.
SMILES strings can be imported by most molecular editing software and converted into two-dimensional graphics or three-dimensional molecular models.
Molecular Feature Extraction
RDKit is an open-source toolkit for cheminformatics, based on operations on 2D and 3D molecular compounds. It leverages machine learning methods for compound descriptor generation, fingerprint generation, compound structure similarity calculation, and 2D/3D molecular visualization. It is a highly practical library bridging chemistry and machine learning. It can interconvert various chemical file formats such as mol2, mol, SMILES, sdf, and display them in 2D or 3D for developers.
Vector Engine Index Strategy
Functions
- Input Address: http://localhost:8090
- Upload Data File:
1). Click the upload button to upload files.
2). Click the feature extraction button. Wait for file parsing, feature extraction, and feature storage into the vector engine. Progress can be seen via the console.
- Molecular Search — Enter a molecular SMILES string, click search, and see the returned list sorted by similarity.
P(=O)(OC[C@H]1O[C@@H](n2c3ncnc(N)c3nc2)[C@H](O)[C@@H]1F)(O)O
Help Information
- Swagger API Documentation:
http://localhost:8089/swagger-ui.html