# 距离几何

距离几何是一种数学方法，它由一组点对之间的距离，确定分子等物体可能的三维结构。给定原子间距离的上下界，它给出满足这些界限的坐标；视所用算法不同，输出可以是单一结构、一组结构，或用完全枚举法得到的、与约束相符的全部不全等实现。<sup>[1](https://www.lix.polytechnique.fr/~liberti/dmdgp-survey.pdf)</sup> 它的主要用途是：由 NMR 数据确定分子构象、生成小分子构象，以及无线传感器网络定位。<sup>[2](https://www.math.ucdavis.edu/~saito/data/distmat/liberti-etal_euclidean-dist-geom.pdf)</sup>

| 关键事实 | 细节 |
|---|---|
| 问题陈述 | 给定一个带边权的图，求它在 \( \mathbb{R}^{K} \) 中的一个实现，使各点对的欧几里得距离等于相应的边权<sup>[2](https://www.math.ucdavis.edu/~saito/data/distmat/liberti-etal_euclidean-dist-geom.pdf)</sup> |
| 复杂度 | 当 \( K = 1 \) 时为强 NP 完全，一般 \( K > 1 \) 时为强 NP 难（萨克斯）；分子情形即使在一维也是 NP 完全的<sup>[2](https://www.math.ucdavis.edu/~saito/data/distmat/liberti-etal_euclidean-dist-geom.pdf)</sup><sup> • </sup><sup>[3](https://www.lix.polytechnique.fr/%7Eliberti/mdgp_encopt2.pdf)</sup> |
| 经典流程 | 界限平滑、用特征值方法嵌入、用模拟退火优化<sup>[4](https://ti.inf.ethz.ch/ew/courses/GCMB07/material/lecture13/havel-distgeom-review.pdf)</sup> |
| NMR 数据量 | 对一个含 \( n \) 个残基的蛋白质，只能获得约 \( 15n \) 个由 NOE 导出的距离约束，且限于氢原子之间 4–5 Å 的范围内<sup>[5](https://www.lifesciencessociety.org/CSB2005/PDF3/28_wangl_NMR.pdf)</sup><sup> • </sup><sup>[1](https://www.lix.polytechnique.fr/~liberti/dmdgp-survey.pdf)</sup> |
| 精确距离情形 | 当所有成对距离都精确已知时，可由线性时间算法得出唯一的三维结构<sup>[3](https://www.lix.polytechnique.fr/%7Eliberti/mdgp_encopt2.pdf)</sup> |
| 基准测试 | 在 1epw 蛋白质实例（3861 个原子、35028 个距离）上，分支-剪枝算法在 0.25 秒内找出了全部解，最大距离误差（LDE）为 \( 4 \times 10^{-12} \)；DGSOL 则耗时 2038 秒<sup>[1](https://www.lix.polytechnique.fr/~liberti/dmdgp-survey.pdf)</sup> |
| 广泛使用的软件 | RDKit 中的 ETKDG 被称为小分子领域最常用的距离几何方法<sup>[6](https://epub.uni-bayreuth.de/id/eprint/7960/1/J%20Comput%20Chem%20-%202024%20-%20Margraf%20-%20Neural%20graph%20distance%20embedding%20for%20molecular%20geometry%20generation.pdf)</sup> |

## 工作原理

欧几里得距离几何问题（DGP）是：给定 \( K > 0 \) 和一个边权非负的简单无向图，求该图在 \( \mathbb{R}^{K} \) 中的一个实现，使各点对的欧几里得距离等于相应的边权。<sup>[2](https://www.math.ucdavis.edu/~saito/data/distmat/liberti-etal_euclidean-dist-geom.pdf)</sup> 其分子版本则寻求原子坐标 \( x_{1}, \ldots, x_{m} \)，使

\[ f(x_{1}, \ldots, x_{m}) = \sum_{(i,j) \in S} \left( \| x_{i} - x_{j} \|^{2} - d_{ij}^{2} \right)^{2}, \]

最小；该式为零当且仅当所有距离约束都得到满足。<sup>[3](https://www.lix.polytechnique.fr/%7Eliberti/mdgp_encopt2.pdf)</sup>

有两种经典判据可判断一个距离矩阵是否对应真实的点。凯莱（Cayley）给出的必要条件表述为凯莱–门格尔行列式为零：\( \mathbb{R}^{3} \) 中的五点、共面的四点、共线的三点，其行列式均为零。<sup>[2](https://www.math.ucdavis.edu/~saito/data/distmat/liberti-etal_euclidean-dist-geom.pdf)</sup> 现代判据是代数性的：距离矩阵 \( D \) 对应 \( d \) 维中的一个实现，当且仅当相应的格拉姆矩阵 \( Y \) 半正定且秩等于 \( d \)。<sup>[7](https://optimization-online.org/wp-content/uploads/2008/12/2170.pdf)</sup> 改用距离的平方，并放松嵌入维数的约束，可把部分距离矩阵补全转化为一个凸问题，用半定规划即可全局求解。<sup>[8](https://ems.press/content/serial-article-files/44673)</sup>

## 具体做法

EMBED 算法是由距离数据确定分子结构的标准流程，分为三个阶段。<sup>[4](https://ti.inf.ethz.ch/ew/courses/GCMB07/material/lecture13/havel-distgeom-review.pdf)</sup>

**界限平滑。** 稀疏的实验界限被外推到所有原子间距离的上下限，主要借助三角不等式，即使问题规模很大也能快速计算。用四元（四点）不等式做平滑更紧致，但原子数超过 100 至 200 之后，计算量便大到难以承受。<sup>[4](https://ti.inf.ethz.ch/ew/courses/GCMB07/material/lecture13/havel-distgeom-review.pdf)</sup>

**嵌入。** 在界限范围内随机选取一个距离矩阵，并通过度量化迫使随机距离既满足给定的界限，也满足三角不等式；早期的 EMBED 结构出现膨胀、彼此过于相似的问题，这一处理大大改善了采样。随后用度量矩阵上的特征值方法由距离算出最佳拟合坐标，速度快，且不受局部极小值困扰。<sup>[4](https://ti.inf.ethz.ch/ew/courses/GCMB07/material/lecture13/havel-distgeom-review.pdf)</sup>

**优化。** 以误差函数为目标对嵌入坐标进行精修，通常采用模拟退火。<sup>[4](https://ti.inf.ethz.ch/ew/courses/GCMB07/material/lecture13/havel-distgeom-review.pdf)</sup>

分支-剪枝（BP）算法用离散搜索取代这一连续流程：它构造一棵二叉搜索树，第 \( v \) 层的结点表示顶点 \( v \) 的可能位置；当直接距离可行性检验失败，即当 \( \left| \| x_{u} - x_{v} \| - d_{uv} \right| > \varepsilon \) 时，就剪掉该结点。BP 是完备的：它可以在找到第一个可行嵌入时停止，也可以把全部嵌入枚举出来。<sup>[1](https://www.lix.polytechnique.fr/~liberti/dmdgp-survey.pdf)</sup>

## 起源

其数学基础是用距离来刻画全等、凸性等几何概念；背后的代数则可追溯到格拉斯曼（Grassmann）。<sup>[2](https://www.math.ucdavis.edu/~saito/data/distmat/liberti-etal_euclidean-dist-geom.pdf)</sup><sup> • </sup><sup>[8](https://ems.press/content/serial-article-files/44673)</sup><sup> • </sup><sup>[9](https://epubs.siam.org/doi/10.1137/120875909)</sup>

该方法在分子上的应用，始于戈登·M·克里彭（Gordon M. Crippen）1977 年发表于《计算物理学杂志》（*Journal of Computational Physics*）的论文《构象计算的一种新途径：距离几何》（"A novel approach to calculation of conformation: Distance geometry"）。文中提出用受能量与几何约束的全部原子间距离构成矩阵 \( D \)，进而算出原子坐标，并在环己烷和胰蛋白酶抑制剂上做了试验。<sup>[10](https://doi.org/10.1016/0021-9991%2877%2990112-7)</sup> 克里彭与 T. F. 哈维尔（T. F. Havel）随后于 1978 年在《晶体学报 A 辑》（*Acta Crystallographica Section A*）发表《由距离信息稳定计算坐标》（"Stable calculation of coordinates from distance information"），<sup>[11](https://doi.org/10.1107/s0567739478000522)</sup> 1979 年，I. D. 昆茨（I. D. Kuntz）、克里彭与 P. A. 科尔曼（P. A. Kollman）又在《生物聚合物》（*Biopolymers*）上将该方法用于蛋白质三级结构。<sup>[12](https://doi.org/10.1002/bip.1979.360180414)</sup><sup> • </sup><sup>[13](https://www.sciencedirect.com/science/article/abs/pii/0022519383901121)</sup><sup> • </sup><sup>[14](https://optimization-online.org/wp-content/uploads/2008/08/2073.pdf)</sup><sup> • </sup><sup>[9](https://epubs.siam.org/doi/10.1137/120875909)</sup> 在化学之外，耶米尼（Yemini）1978 年关于“定位问题”的报告首次明确表述了稀疏距离 DGP；而 K 可嵌入性在 \( K = 1 \) 时为强 NP 完全，一般 \( K > 1 \) 时为强 NP 难。<sup>[2](https://www.math.ucdavis.edu/~saito/data/distmat/liberti-etal_euclidean-dist-geom.pdf)</sup><sup> • </sup><sup>[15](https://link.springer.com/article/10.1007/s10589-011-9402-6)</sup>

## 变体

有多种具名算法处理这一问题。EMBED 与 DISGEO 软件包（做两遍 EMBED）之后又出现了 DG-II 软件包；格伦特（Glunt）、海登（Hayden）、洪（Hong）与韦尔斯（Wells）的交替投影算法计算最接近的欧几里得距离矩阵。<sup>[16](https://doi.org/10.1137/0611042)</sup> 莫雷（Moré）与吴（Wu）1997 年提出的全局延拓法 DGSOL，是少数可免费获得源码的求解程序之一。<sup>[17](https://doi.org/10.1137/s1052623495283024)</sup><sup> • </sup><sup>[2](https://www.math.ucdavis.edu/~saito/data/distmat/liberti-etal_euclidean-dist-geom.pdf)</sup> 董（Dong）与吴（Wu）的几何构建算法用 \( O(n) \) 次浮点运算解决全部距离精确已知的情形，而矩阵分解与 SVD 方法需要 \( O(n^{2}) \) 至 \( O(n^{3}) \)。<sup>[18](https://doi.org/10.1023/a:1013857218127)</sup> 克里彭 1982 年的能量嵌入法，把分子从高维空间中的低能构象投影到三维，同时尽可能少地扰动能量。<sup>[19](https://doi.org/10.1002/jcc.540030404)</sup>

在离散搜索方面，拉沃尔（Lavor）、利贝尔蒂（Liberti）与马库兰（Maculan）2006 年提出的可离散化分子距离几何问题（DMDGP）要求已知键长、键角，以及相隔三个连续键的原子之间的距离；这样每个原子的位置便由前面三个原子确定，共给出 \( 2^{m-3} \) 个候选，而 BP 算法在速度和精度上表现良好，并能找出全部不全等的解。<sup>[20](https://doi.org/10.48550/arxiv.q-bio/0608012)</sup><sup> • </sup><sup>[15](https://link.springer.com/article/10.1007/s10589-011-9402-6)</sup> 比斯瓦斯（Biswas）、托（Toh）与叶（Ye）为图实现引入的半定规划松弛，能从稀疏、含噪的距离数据中得出含数千个原子的分子的精确结构。<sup>[21](https://doi.org/10.1137/05062754x)</sup> 在化学信息学中，RDKit 的 ETKDG 从平滑后的界限中采样随机距离矩阵，加入来自小分子晶体学的扭转角偏好，并强制手性；其 EmbedMolecule 与 EmbedMultipleConfs 函数提供 useRandomCoords、ETKDGv3 参数集等选项。<sup>[22](https://rdkit.org/docs/source/rdkit.Chem.rdDistGeom.html)</sup><sup> • </sup><sup>[6](https://epub.uni-bayreuth.de/id/eprint/7960/1/J%20Comput%20Chem%20-%202024%20-%20Margraf%20-%20Neural%20graph%20distance%20embedding%20for%20molecular%20geometry%20generation.pdf)</sup>

## 应用

**NMR 结构测定**是最著名的应用：NMR 通过由 NOE 导出的、与距离相关的交叉弛豫来估计原子间距离。<sup>[8](https://ems.press/content/serial-article-files/44673)</sup><sup> • </sup><sup>[27](https://nmr.chem.ucsb.edu/education/part4.html)</sup> 含 \( n \) 个残基的蛋白质只能给出约 \( 15n \) 个 NOE 约束，因此实用流程都把距离几何与精修结合起来；尼尔格斯（Nilges）、克洛尔（Clore）与格勒嫩博恩（Gronenborn）1988 年的距离几何–动力学模拟退火混合计算，由质子间距离数据测定了蛋白质结构；布劳恩（Braun）与乡（Gō）1985 年的 DISMAN 则提供了扭转角空间中的另一条路径。<sup>[5](https://www.lifesciencessociety.org/CSB2005/PDF3/28_wangl_NMR.pdf)</sup><sup> • </sup><sup>[23](https://doi.org/10.1016/0014-5793%2888%2981148-7)</sup><sup> • </sup><sup>[24](https://doi.org/10.1016/0022-2836%2885%2990134-2)</sup>

**小分子构象生成**使用 RDKit 的 EmbedMultipleConfs，它生成多个构象（默认 numConfs=10），并可选地基于 RMSD 进行剪除。<sup>[22](https://rdkit.org/docs/source/rdkit.Chem.rdDistGeom.html)</sup> **传感器网络定位**是在 \( m \) 个锚点位置已知、且成对距离在无线电范围 \( R \) 内近似已知的条件下确定传感器位置；比斯瓦斯–叶的 SDP 松弛通过面约化从 EDM 框架导出。<sup>[8](https://ems.press/content/serial-article-files/44673)</sup> 近来的机器学习工作把预测出的距离输入距离几何算法：GraphDG 与 CGCF 预测成对距离矩阵，再通过距离几何恢复坐标；nGDE 方法则用图神经网络预测原子间距离，随后做多维标度与力场精修。<sup>[25](https://www.mdpi.com/2624-8549/8/2/29)</sup><sup> • </sup><sup>[6](https://epub.uni-bayreuth.de/id/eprint/7960/1/J%20Comput%20Chem%20-%202024%20-%20Margraf%20-%20Neural%20graph%20distance%20embedding%20for%20molecular%20geometry%20generation.pdf)</sup>

## 局限与替代方法

**手性。** 距离几何无法区分对映异构体，因此对刚性原子四元组的手性约束是问题描述的一部分，各种方法还把优化锚定到已知的三维结构上，以保持立体化学。<sup>[4](https://ti.inf.ethz.ch/ew/courses/GCMB07/material/lecture13/havel-distgeom-review.pdf)</sup>

**稀疏、含噪的区间数据。** NMR 实验只提供短程距离（不超过 4 或 5 Å），一般限于氢原子之间，而且只给出上下界而非精确值；由 NOESY 导出的界限受运动平均的影响，可能比基于 X 射线衍射的约束宽得多。<sup>[1](https://www.lix.polytechnique.fr/~liberti/dmdgp-survey.pdf)</sup> 能处理区间的 BP 变体为这种一般性付出了代价：iBP 的实现只限于无歧义的约束，且排除了侧链，因而无法用于真实的 NOE 数据。<sup>[26](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-015-0451-1)</sup> 含噪的测量还会把 SDP 的解推到更高的维数，需要正则化和梯度下降后处理。<sup>[7](https://optimization-online.org/wp-content/uploads/2008/12/2170.pdf)</sup>

**复杂度与精度的权衡。** 一般问题是 NP 难的，而当 \( \varepsilon \) 足够小时，即使只求 \( \varepsilon \) 最优解也是 NP 难的；BP 的最坏情形是 \( |V| \) 的指数级，不过一般的蛋白质实例搜索树宽度有界。<sup>[3](https://www.lix.polytechnique.fr/%7Eliberti/mdgp_encopt2.pdf)</sup><sup> • </sup><sup>[1](https://www.lix.polytechnique.fr/~liberti/dmdgp-survey.pdf)</sup> 几何构建法在某个原子的方程组无解时即可发现距离数据不一致，完整的一致性检查代价为 \( O(n^{2}) \)。<sup>[18](https://doi.org/10.1023/a:1013857218127)</sup> ETKDG 在饱和多环化合物上颇为吃力，有时根本生成不出嵌入；nGDE 在这类分子上更稳健，对类药分子则与 ETKDG 不相上下。<sup>[6](https://epub.uni-bayreuth.de/id/eprint/7960/1/J%20Comput%20Chem%20-%202024%20-%20Margraf%20-%20Neural%20graph%20distance%20embedding%20for%20molecular%20geometry%20generation.pdf)</sup>

**替代方法。** DISMAN 等扭转角空间方法搜索内坐标而非笛卡儿坐标，距离几何–动力学模拟退火混合法则把两者结合起来。<sup>[24](https://doi.org/10.1016/0022-2836%2885%2990134-2)</sup><sup> • </sup><sup>[23](https://doi.org/10.1016/0014-5793%2888%2981148-7)</sup> SDP 松弛以放弃精确的秩约束，换取凸性和多项式时间可解性。<sup>[8](https://ems.press/content/serial-article-files/44673)</sup>

## References

1. [Recent advances on the discretizable molecular distance geometry problem](https://www.lix.polytechnique.fr/~liberti/dmdgp-survey.pdf)
2. [Euclidean Distance Geometry and Applications (Liberti, Lavor, Maculan, Mucherino)](https://www.math.ucdavis.edu/~saito/data/distmat/liberti-etal_euclidean-dist-geom.pdf)
3. [An overview of distinct approaches for the molecular distance geometry problem](https://www.lix.polytechnique.fr/%7Eliberti/mdgp_encopt2.pdf)
4. [Distance Geometry: Theory, Algorithms, and Chemical Applications (Havel)](https://ti.inf.ethz.ch/ew/courses/GCMB07/material/lecture13/havel-distgeom-review.pdf)
5. [An Algebraic Geometry Approach to Protein Structure Determination from NMR Data (Wang, Mettu, Donald, CSB 2005)](https://www.lifesciencessociety.org/CSB2005/PDF3/28_wangl_NMR.pdf)
6. [Neural graph distance embedding for molecular geometry generation (J Comput Chem, 2024)](https://epub.uni-bayreuth.de/id/eprint/7960/1/J%20Comput%20Chem%20-%202024%20-%20Margraf%20-%20Neural%20graph%20distance%20embedding%20for%20molecular%20geometry%20generation.pdf)
7. [Semidefinite Programming Approaches to Distance Geometry Problems (Biswas PhD thesis, Stanford)](https://optimization-online.org/wp-content/uploads/2008/12/2170.pdf)
8. [Euclidean distance matrices, semidefinite programming and sensor network localization](https://ems.press/content/serial-article-files/44673)
9. [Euclidean Distance Geometry and Applications (SIAM Review)](https://epubs.siam.org/doi/10.1137/120875909)
10. [A novel approach to calculation of conformation: Distance geometry (Journal of Computational Physics, 1977)](https://doi.org/10.1016/0021-9991%2877%2990112-7)
11. [G. M. Crippen, T. F. Havel (1978). Stable calculation of coordinates from distance information. Acta Crystallographica Section A.](https://doi.org/10.1107/s0567739478000522)
12. [I. D. Kuntz, G. M. Crippen, P. A. Kollman (1979). Application of distance geometry to protein tertiary structure calculations. Biopolymers.](https://doi.org/10.1002/bip.1979.360180414)
13. [The combinatorial distance geometry method for the calculation of molecular conformation. I. (Havel, Kuntz, Crippen, J. Theor. Biol. 1983)](https://www.sciencedirect.com/science/article/abs/pii/0022519383901121)
14. [An SDP-based divide-and-conquer algorithm for large scale noisy anchor-free graph realization (DISCO)](https://optimization-online.org/wp-content/uploads/2008/08/2073.pdf)
15. [The discretizable molecular distance geometry problem (Computational Optimization and Applications, 2012)](https://link.springer.com/article/10.1007/s10589-011-9402-6)
16. [W. Glunt and colleagues (1990). An Alternating Projection Algorithm for Computing the Nearest Euclidean Distance Matrix. SIAM Journal on Matrix Analysis and Applications.](https://doi.org/10.1137/0611042)
17. [Jorge J. Moré, Zhijun Wu (1997). Global Continuation for Distance Geometry Problems. SIAM Journal on Optimization.](https://doi.org/10.1137/s1052623495283024)
18. [Qunfeng Dong, Zhijun Wu (2002). A linear-time algorithm for solving the molecular distance geometry problem with exact inter-atomic distances. Journal of Global Optimization.](https://doi.org/10.1023/a:1013857218127)
19. [Gordon M. Crippen (1982). Conformational analysis by energy embedding. Journal of Computational Chemistry.](https://doi.org/10.1002/jcc.540030404)
20. [Lavor, Carlile, Liberti, Leo, Maculan, Nelson (2006). The Discretizable Molecular Distance Geometry Problem. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.q-bio/0608012)
21. [Pratik Biswas, Kim-Chuan Toh, Yinyu Ye (2008). A Distributed SDP Approach for Large-Scale Noisy Anchor-Free Graph Realization with Applications to Molecular Conformation. SIAM Journal on Scientific Computing.](https://doi.org/10.1137/05062754x)
22. [rdkit.Chem.rdDistGeom module, The RDKit 2026.03.5 documentation](https://rdkit.org/docs/source/rdkit.Chem.rdDistGeom.html)
23. [Determination of three‐dimensional structures of proteins from interproton distance data by hybrid distance geometry‐dynamical simulated annealing calculations (FEBS Letters, 1988)](https://doi.org/10.1016/0014-5793%2888%2981148-7)
24. [Calculation of protein conformations by proton-proton distance constraints (Journal of Molecular Biology, 1985)](https://doi.org/10.1016/0022-2836%2885%2990134-2)
25. [PDCG: A Diffusion Model Guided by Pre-Training for Molecular Conformation Generation (MDPI)](https://www.mdpi.com/2624-8549/8/2/29)
26. [An algorithm to enumerate all possible protein conformations verifying a set of distance constraints (iBP, BMC Bioinformatics 2015)](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-015-0451-1)
27. [NMR Theory, UCSB Chem and Biochem NMR Facility](https://nmr.chem.ucsb.edu/education/part4.html)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 几何学与拓扑学 › Metric, convex, and discrete geometry

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/distance-geometry

English original: https://www.edgepedia.org/distance-geometry
