
类别 | 格式名称 (扩展名) | 核心特点与存储内容 | 主要应用场景 | 优点 | 缺点 |
|---|---|---|---|---|---|
文本序列格式 | SMILES (.smi 或 .txt) | 用简短的ASCII字符串表示分子的二维连接信息(原子、键、分支、环)。示例:CC(=O)Oc1ccccc1C(=O)O (阿司匹林) | 数据库存储、文档记录、快速检索、机器学习模型输入。 | 极其简洁,人类可读,存储空间小。 | 不包含三维坐标,不同写法可能对应同一分子(非绝对唯一)。 |
InChI/InChIKey (.txt) | IUPAC制定的国际标准,分层编码分子式、连接、立体化学、电荷等所有信息。InChIKey是其固定长度的哈希版本。 | 数据库索引、文献检索、唯一性标识。 | 绝对唯一,标准开放,能完整描述分子结构。 | 字符串很长,不包含三维坐标。 | |
SMARTS (.smar) | SMILES的扩展,用于定义分子子结构模式。 | 子结构搜索(如查找所有芳香环)、药物设计中的骨架筛选。 | 强大的模式匹配能力,是化学信息学搜索的核心工具之一。 | 语法比SMILES更复杂,专用于查询。 | |
三维坐标文件格式 | MOL/SDF (.mol, .sdf) | MDL/Biovia开发的行业标准。.mol 存储单个分子;.sdf 可在一个文件里存储多个分子及各自属性数据(如logP、活性值)。 | 分子结构可视化、分子对接、虚拟筛选、化学信息学软件通用交换格式。 | 同时存储原子坐标和连接表,信息完整;.sdf 便于管理化合物库。 | 有V2000(限制999原子)和V3000(支持大数据)版本差异,存在兼容性问题。 |
MOL2 (.mol2) | Tripos公司开发,除坐标和连接外,明确包含原子类型(如O.3, C.ar)和部分原子电荷。 | 分子力学计算、分子对接(如AutoDock)、力场参数化。 | 信息丰富,明确指定了杂化状态和电荷,避免软件误判,可靠性高。 | 文件体积较大。 | |
PDB (.pdb) | 蛋白质数据库的原始格式,用于存储生物大分子(蛋白、核酸)和小分子的三维结构。 | 结构生物学、蛋白质-配体复合物分析、分子对接。 | 生物大分子研究的基石,全球通用。 | 格式规范严格(列固定),易出错,不推荐用于存储小分子。 | |
XYZ (.xyz) | 最简单的格式:第一行是原子数,第二行是注释,后面每行是元素符号和X、Y、Z坐标。 | 量子化学计算(Gaussian, ORCA)、分子动力学轨迹、分子可视化入门。 | 极度简单,任何文本编辑器可写,易解析。 | 不含连接信息,软件需自行猜测成键,可能导致错误;信息量最少。 | |
其他专门格式 | CIF (.cif) | 晶体学信息文件,精确存储晶体结构、空间群、晶胞参数、原子位置及占有率。 | X射线晶体学、材料科学、固体化学。 | 描述晶体结构的国际标准,信息完整且高度精确。 | 不适用于溶液中的单个小分子模型。 |
FASTA (.fasta 或 .fa) | 生物信息学标准,用单字母代码表示氨基酸(蛋白质)或碱基(DNA/RNA)序列。 | 生物序列比对(BLAST)、数据库搜索、进化分析。 | 序列存储的绝对标准,格式简单,支持模糊碱基。 | 只含一维序列信息,不含三维结构。 |
小分子结构(数据库):采用moI2和mol(sdf)的存储格式 生物大分子(蛋白质、核酸)结构:采用moI2和pdb的存储格式。这些结构文件格式可以被大多数分子模拟软件所识别。



数字标记 | 字符串标记 | 化学键类型 | 说明 |
|---|---|---|---|
1 | single | 单键 | 最常见的键类型,表示一对共用电子。 |
2 | double | 双键 | 包含两对共用电子。 |
3 | triple | 三键 | 包含三对共用电子。 |
4 | ar 或 aromatic | 芳香键 | 用于苯环等芳香体系,键级在1和2之间,具有离域特性。 |
5 | am 或 amide | 酰胺键 | 特指蛋白质或多肽中连接氨基酸的酰胺/肽键(-CO-NH-)。 |
6 | du | 虚键 | 用于表示分子间的相互作用(如氢键)或暂定的连接关系。 |
7 | un | 未知键 | 当无法确定或识别化学键的具体类型时使用。 |
8 | nc | 不相连 | 明确标记两个原子之间没有化学键,主要用于避免自动补键算法产生错误连接。 |
- | quadruple | 四键 | 非常罕见的键型,主要存在于某些过渡金属二聚体(如Re-Re键)中 |

obabel -imol2 ligand.mol2 -opdb -O ligand.pdbobabel -H
Usage:
obabel[-i<input-type>] <infilename> [-o<output-type>] -O<outfilename> [Options]
The extension of a file decides the format, unless it is overridden
by -i or -o options, e.g. -icml, or -o smi
See below for available format-types, which are the same as the
file extensions and are case independent.
If no input or output file is given stdin or stdout are used instead.
More than one input file can be specified and their names can contain
wildcard chars (* and ?). The format of each file can be different unless
the -i option has been used, when they are all the same.
By default, the molecules are aggregated in the output file,
but see -m option, Splitting, below.
Options, other than -i -o -O -m, must come after the input files.
Conversion options
-f <#> Start import at molecule # specified
-l <#> End import at molecule # specified
-e Continue with next object after error, if possible
-z Compress the output with gzip
-zin Decompress the input with gzip
-k Attempt to translate keywords
-H Outputs this help text
-Hxxx (xxx is file format ID e.g. -Hcml) gives format info
-Hall Outputs details of all formats
-V Outputs version number
-L <category> Lists plugin classes of this category, e.g. <formats>
Use just -L for a list of plugin categories.
Use -L <ID> e.g. -L sdf for details of a format or other plugin.
-m Produces multiple output files, to allow:
Splitting: e.g. obabel infile.mol -O new.smi -m
puts each molecule into new1.smi new2.smi etc
Batch conversion: e.g. obabel *.mol -osmi -m
converts each input file to a .smi file
Interface to OBAPI internals
API options, e.g. ---errorlevel 2
errorlevel # min warning level displayed
To see a list of recognized file formats use
babel -L formats [read] [write]
To see details and specific options for a particular format, e.g CML, use
babel -L cml2244
-OEChem-04132606022D
21 21 0 0 0 0 0 0 0999 V2000
3.7321 -0.0600 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
6.3301 1.4400 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
4.5981 1.4400 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
2.8660 -1.5600 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
4.5981 -0.5600 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.4641 -0.0600 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
4.5981 -1.5600 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
6.3301 -0.5600 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.4641 -2.0600 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
6.3301 -1.5600 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.4641 0.9400 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.8660 -0.5600 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.0000 -0.0600 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
4.0611 -1.8700 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
6.8671 -0.2500 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
5.4641 -2.6800 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
6.8671 -1.8700 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
2.3100 0.4769 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
1.4631 0.2500 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
1.6900 -0.5969 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
6.3301 2.0600 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0obabel -isdf test.sdf -opdb -O test.pdb --gen3d -p 7.4COMPND 2244
AUTHOR GENERATED BY OPEN BABEL 3.1.0
HETATM 1 O UNL 1 1.108 -0.092 -0.004 1.00 0.00 O
HETATM 2 O UNL 1 1.737 0.314 2.611 1.00 0.00 O1-
HETATM 3 O UNL 1 2.218 -1.702 3.508 1.00 0.00 O
HETATM 4 O UNL 1 1.043 -0.824 -2.233 1.00 0.00 O
HETATM 5 C UNL 1 0.284 -1.114 0.527 1.00 0.00 C
HETATM 6 C UNL 1 0.538 -1.578 1.829 1.00 0.00 C
HETATM 7 C UNL 1 -0.805 -1.619 -0.190 1.00 0.00 C
HETATM 8 C UNL 1 -0.251 -2.609 2.363 1.00 0.00 C
HETATM 9 C UNL 1 -1.596 -2.629 0.360 1.00 0.00 C
HETATM 10 C UNL 1 -1.314 -3.134 1.627 1.00 0.00 C
HETATM 11 C UNL 1 1.600 -1.026 2.707 1.00 0.00 C
HETATM 12 C UNL 1 1.419 -0.043 -1.370 1.00 0.00 C
HETATM 13 C UNL 1 2.317 1.129 -1.636 1.00 0.00 C
HETATM 14 H UNL 1 -1.024 -1.244 -1.126 1.00 0.00 H
HETATM 15 H UNL 1 -0.043 -2.980 3.303 1.00 0.00 H
HETATM 16 H UNL 1 -2.394 -3.004 -0.176 1.00 0.00 H
HETATM 17 H UNL 1 -1.889 -3.895 2.020 1.00 0.00 H
HETATM 18 H UNL 1 2.498 1.654 -0.722 1.00 0.00 H
HETATM 19 H UNL 1 1.848 1.786 -2.338 1.00 0.00 H
HETATM 20 H UNL 1 3.246 0.782 -2.038 1.00 0.00 H
obabel -isdf PubChem_search_records.sdf -opdb -O ./.pdb -m

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。