Files
macrolactone-toolkit/docs/getting-started.md
lingyuzeng 3e07402f4e feat(numbering): publish canonical numbering API
Add a public numbering module and route fragmenting, validation,
and scaffold preparation through the canonical numbering entry.

Rewrite the repository entry docs around the fixed numbering
contract, add MkDocs landing pages, and document the mirror
mapping used for medicinal-chemistry comparisons.

Also refresh the validation analysis reports to explain the
canonical-versus-mirrored numbering relationship.
2026-03-20 15:14:31 +08:00

40 lines
1.1 KiB
Markdown

# 快速开始
这页只放最短路径:安装、验证、第一次调用。
## 安装与验证
```bash
pixi install
pixi run pytest
pixi run python -c "import macro_lactone_toolkit"
```
## 第一次分析
```python
from macro_lactone_toolkit import MacroLactoneAnalyzer, MacrolactoneFragmenter
analyzer = MacroLactoneAnalyzer()
fragmenter = MacrolactoneFragmenter()
print(analyzer.get_valid_ring_sizes("O=C1CCCCCCCCCCCCCCO1"))
print(fragmenter.number_molecule("O=C1CCCCCCCCCCCCCCO1").position_to_atom)
```
```bash
pixi run macro-lactone-toolkit analyze --smiles "O=C1CCCCCCCCCCCCCCO1"
pixi run macro-lactone-toolkit number --smiles "O=C1CCCCCCCCCCCCCCO1"
pixi run macro-lactone-toolkit fragment --smiles "O=C1CCCC(C)CCCCCCCCCCO1" --parent-id mol_001
```
## 你需要记住的规则
- `1 = 内酯羰基碳`
- `2 = 相邻酯氧`
- `3..N = 从 2 位出发沿环唯一图遍历顺序继续编号`
- 16 元环镜像映射固定为 `p_mirror = ring_size - p + 3`
- 不支持 `clockwise` / `anticlockwise` 参数
如果你要继续往下看,去 [user-guide/index.md](user-guide/index.md)。