Add files using upload-large-folder tool
Browse files- AMVL/.gitignore +120 -0
- AMVL/AMVL_code_structure_and_workflow.md +425 -0
- AMVL/AMVL_新药预测实操流程.md +463 -0
- AMVL/README.md +78 -0
- COM/build_pubchem_drugbank_mapping.py +582 -0
- COM/calc_morgan_similarity.py +176 -0
- COM/compound_inchikey.csv +0 -0
- COM/compound_smiles.csv +0 -0
- COM/inchikey.py +119 -0
- COM/pubchem_clean_sdf/CID_10537120.sdf +233 -0
- COM/pubchem_clean_sdf/CID_11445721.sdf +377 -0
- COM/pubchem_clean_sdf/CID_12530.sdf +257 -0
- COM/pubchem_clean_sdf/CID_135398635.sdf +253 -0
- COM/pubchem_clean_sdf/CID_15839040.sdf +354 -0
- COM/pubchem_clean_sdf/CID_162847016.sdf +323 -0
- COM/pubchem_clean_sdf/CID_442534.sdf +319 -0
- COM/pubchem_clean_sdf/CID_5281559.sdf +211 -0
- COM/pubchem_clean_sdf/CID_5281759.sdf +425 -0
- COM/pubchem_clean_sdf/CID_5362616.sdf +182 -0
- COM/pubchem_clean_sdf/CID_68316.sdf +196 -0
- COM/pubchem_clean_sdf/CID_7009658.sdf +449 -0
- COM/pubchem_clean_sdf/CID_70698224.sdf +560 -0
- COM/pubchem_clean_sdf/CID_977145.sdf +291 -0
- COM/pubchem_clean_sdf/CID_97730.sdf +304 -0
- COM/pubchem_clean_sdf/CID_995.sdf +203 -0
- COM/smiles.py +129 -0
- COM/tcmsp_molecule_cache.json +982 -0
- KG/train_compgcn_mol_instance_similarity.py +742 -0
- LLM/build_pubchem_drug_text_table.py +1086 -0
- LLM/calc_pubchem_text_embedding_similarity.py +227 -0
- LLM/embed_pubchem_drug_texts.py +555 -0
- LLM/pubchem_drug_texts.csv +0 -0
- MS/annotate_ms_structure_resolution.py +644 -0
- MS/build_ms_intersection_compound_match.py +705 -0
- MS/三者交集完整输出.csv +254 -0
- MS/三者并集完整输出.csv +0 -0
- MS/三者并集完整输出_结构标注.csv +0 -0
- TAR/chembl_summary_table.csv +0 -0
- TAR/chembl_summary_table_with_uniprot.csv +0 -0
- TAR/chembl_uniprot_mapping.txt +0 -0
- TAR/compound_target_jaccard_pairs.csv +0 -0
- TAR/compute_compound_target_similarity.py +273 -0
- TAR/convert_chembl_targets_to_uniprot.py +208 -0
- TAR/drug_target_uniprot_only.csv +0 -0
- presentation/README.md +33 -0
- presentation/insert_amvl_method_intro.py +189 -0
- presentation/insert_amvl_method_intro_v2.py +195 -0
- presentation/insert_overall_mean_coverage_slides.py +398 -0
- presentation/insert_weighted_ms_result_slides.py +447 -0
- 原始记录/SC.ipynb +1622 -0
AMVL/.gitignore
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Byte-compiled / optimized / DLL files
|
| 2 |
+
__pycache__/
|
| 3 |
+
*.py[cod]
|
| 4 |
+
*$py.class
|
| 5 |
+
|
| 6 |
+
# C extensions
|
| 7 |
+
*.so
|
| 8 |
+
|
| 9 |
+
# Distribution / packaging
|
| 10 |
+
.Python
|
| 11 |
+
build/
|
| 12 |
+
develop-eggs/
|
| 13 |
+
dist/
|
| 14 |
+
downloads/
|
| 15 |
+
eggs/
|
| 16 |
+
.eggs/
|
| 17 |
+
lib/
|
| 18 |
+
lib64/
|
| 19 |
+
parts/
|
| 20 |
+
sdist/
|
| 21 |
+
var/
|
| 22 |
+
wheels/
|
| 23 |
+
pip-wheel-metadata/
|
| 24 |
+
share/python-wheels/
|
| 25 |
+
*.egg-info/
|
| 26 |
+
.installed.cfg
|
| 27 |
+
*.egg
|
| 28 |
+
MANIFEST
|
| 29 |
+
|
| 30 |
+
# PyInstaller
|
| 31 |
+
*.manifest
|
| 32 |
+
*.spec
|
| 33 |
+
|
| 34 |
+
# Installer logs
|
| 35 |
+
pip-log.txt
|
| 36 |
+
pip-delete-this-directory.txt
|
| 37 |
+
|
| 38 |
+
# Unit test / coverage reports
|
| 39 |
+
htmlcov/
|
| 40 |
+
.tox/
|
| 41 |
+
.nox/
|
| 42 |
+
.coverage
|
| 43 |
+
.coverage.*
|
| 44 |
+
.cache
|
| 45 |
+
nosetests.xml
|
| 46 |
+
coverage.xml
|
| 47 |
+
*.cover
|
| 48 |
+
*.py,cover
|
| 49 |
+
.hypothesis/
|
| 50 |
+
.pytest_cache/
|
| 51 |
+
|
| 52 |
+
# Jupyter Notebook
|
| 53 |
+
.ipynb_checkpoints
|
| 54 |
+
*/.ipynb_checkpoints/*
|
| 55 |
+
|
| 56 |
+
# IPython
|
| 57 |
+
profile_default/
|
| 58 |
+
ipython_config.py
|
| 59 |
+
|
| 60 |
+
# pyenv
|
| 61 |
+
.python-version
|
| 62 |
+
|
| 63 |
+
# Environments
|
| 64 |
+
.env
|
| 65 |
+
.venv
|
| 66 |
+
env/
|
| 67 |
+
venv/
|
| 68 |
+
ENV/
|
| 69 |
+
env.bak/
|
| 70 |
+
venv.bak/
|
| 71 |
+
|
| 72 |
+
# IDE settings
|
| 73 |
+
.vscode/
|
| 74 |
+
.idea/
|
| 75 |
+
*.swp
|
| 76 |
+
*.swo
|
| 77 |
+
*~
|
| 78 |
+
.project
|
| 79 |
+
.pydevproject
|
| 80 |
+
.settings/
|
| 81 |
+
|
| 82 |
+
# macOS
|
| 83 |
+
.DS_Store
|
| 84 |
+
.AppleDouble
|
| 85 |
+
.LSOverride
|
| 86 |
+
|
| 87 |
+
# Windows
|
| 88 |
+
Thumbs.db
|
| 89 |
+
ehthumbs.db
|
| 90 |
+
Desktop.ini
|
| 91 |
+
|
| 92 |
+
# Data files (usually large and shouldn't be in git)
|
| 93 |
+
data/
|
| 94 |
+
datasets/
|
| 95 |
+
*.csv
|
| 96 |
+
*.xlsx
|
| 97 |
+
*.xls
|
| 98 |
+
*.h5
|
| 99 |
+
*.hdf5
|
| 100 |
+
|
| 101 |
+
# Results and outputs
|
| 102 |
+
results/
|
| 103 |
+
output/
|
| 104 |
+
smi_result/
|
| 105 |
+
*.log
|
| 106 |
+
*.out
|
| 107 |
+
|
| 108 |
+
# Model checkpoints
|
| 109 |
+
*.pth
|
| 110 |
+
*.pt
|
| 111 |
+
*.ckpt
|
| 112 |
+
*.h5
|
| 113 |
+
*.pkl
|
| 114 |
+
*.pickle
|
| 115 |
+
|
| 116 |
+
# Temporary files
|
| 117 |
+
*.tmp
|
| 118 |
+
*.temp
|
| 119 |
+
tmp/
|
| 120 |
+
temp/
|
AMVL/AMVL_code_structure_and_workflow.md
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AMVL 当前代码结构与工作流说明
|
| 2 |
+
|
| 3 |
+
这份文档描述的是当前本地副本的实际内容,而不是论文仓库最初下载时的理想结构。
|
| 4 |
+
|
| 5 |
+
有两点先说明:
|
| 6 |
+
|
| 7 |
+
- 原仓库自带的 `README.md` 仍保留原样,这里不重复改写它。
|
| 8 |
+
- 当前目录更像“研究代码 + 数据整理脚本 + 实验笔记”的集合,不是一个带统一 CLI 或完整依赖声明的工程项目。
|
| 9 |
+
|
| 10 |
+
## 1. 当前仓库实际包含什么
|
| 11 |
+
|
| 12 |
+
根目录下现在主要有这些内容:
|
| 13 |
+
|
| 14 |
+
- `function/`:算法实现,包括 AMVL 主方法和若干对比方法。
|
| 15 |
+
- `utils/`:数据读取、特征拼接、评估和批量实验工作流。
|
| 16 |
+
- `tool/`:围绕 `.mat` 检查、新药扩展矩阵构建、数据源整理、DrugBank 补全、疾病名称映射的辅助脚本。
|
| 17 |
+
- `notebook/`:以 Notebook 形式保存的实验分析和相似度/表示计算过程。
|
| 18 |
+
- `data/`:当前本地已经放入的 `Fdataset`、`Cdataset`、`Ydataset`、`iDrug` 以及若干补充 CSV。
|
| 19 |
+
- `img/`:文档配图。
|
| 20 |
+
|
| 21 |
+
当前仓库没有看到 `requirements.txt`、`pyproject.toml` 或 `environment.yml`,因此依赖需要按代码本身反推。
|
| 22 |
+
|
| 23 |
+
## 2. 依赖与运行前提
|
| 24 |
+
|
| 25 |
+
按当前代码,常见依赖包括:
|
| 26 |
+
|
| 27 |
+
- `numpy`
|
| 28 |
+
- `pandas`
|
| 29 |
+
- `scipy`
|
| 30 |
+
- `scikit-learn`
|
| 31 |
+
- `torch`
|
| 32 |
+
- `xgboost`
|
| 33 |
+
- `lightgbm`
|
| 34 |
+
- `requests`
|
| 35 |
+
|
| 36 |
+
可选依赖:
|
| 37 |
+
|
| 38 |
+
- `cupy`:`function/AMVL.py` 可选走 GPU。
|
| 39 |
+
- `bsdtar`:`tool/supplement_dataset_targets_from_drugbank.py` 读取本地 `Drugbank2025.7z` 时会调用。
|
| 40 |
+
|
| 41 |
+
当前代码里有几个和运行直接相关的事实:
|
| 42 |
+
|
| 43 |
+
- `scipy` 对 `.mat` 读写是必需的,`function/AMVL.py` 和多个 `tool/` 脚本都依赖它。
|
| 44 |
+
- `benchmark_all_cases()` 会把结果写到 `data/Benchmark/*.xlsx`,但当前本地目录里还没有 `data/Benchmark/`,运行前需要先建目录。
|
| 45 |
+
- 没有统一的依赖锁定文件,所以不同机器上最容易先卡在包缺失。
|
| 46 |
+
|
| 47 |
+
## 3. 核心算法文件
|
| 48 |
+
|
| 49 |
+
### 3.1 `function/AMVL.py`
|
| 50 |
+
|
| 51 |
+
这是当前仓库里最核心、功能也最集中的文件。
|
| 52 |
+
|
| 53 |
+
主入口:
|
| 54 |
+
|
| 55 |
+
- `AMVL(Wrd, Wrr_list, Wdd_list, params, use_cupy=False)`
|
| 56 |
+
|
| 57 |
+
当前实现的主流程是:
|
| 58 |
+
|
| 59 |
+
1. 先对药物-疾病矩阵做 `BMC_F()` 补全。
|
| 60 |
+
2. 基于补全后的矩阵计算 `gip_similarity()`。
|
| 61 |
+
3. 把 GIP 与原始多视图相似矩阵做加权融合。
|
| 62 |
+
4. 用 `MSBMF_F()` 做分解恢复。
|
| 63 |
+
5. 用 `MVL_F()` 做多视图学习。
|
| 64 |
+
6. 最终把结果裁剪到 `[0, 1]`。
|
| 65 |
+
|
| 66 |
+
同一文件里还包含:
|
| 67 |
+
|
| 68 |
+
- `BMC_F()` 和 `svt()`
|
| 69 |
+
- `MSBMF_F()`
|
| 70 |
+
- `MVL_F()`
|
| 71 |
+
- `solve_sylvester_admm()`
|
| 72 |
+
- `predict_new_drug()` / `predict_new_drugs()`
|
| 73 |
+
- `predict_new_drug_from_mat()` / `predict_new_drugs_from_mat()`
|
| 74 |
+
|
| 75 |
+
这说明当前项目不是“各算法各文件完全解耦”的设计,AMVL 相关子模块已经内嵌在一起。
|
| 76 |
+
|
| 77 |
+
需要特别注意的行为:
|
| 78 |
+
|
| 79 |
+
- `predict_new_*_from_mat()` 直接用 `scipy.io.loadmat()` 读原始 `.mat`,不会像 `utils.read_mat_file()` 那样自动做 `MinMax` 归一化。
|
| 80 |
+
- 也就是说,给新药预测接口喂的扩展相似矩阵,最好本身已经在合适数值范围内,通常应是 `[0, 1]`。
|
| 81 |
+
- 单药兼容接口 `predict_new_drug()` / `predict_new_drug_from_mat()` 如果发现你实际追加了多个新药,只会返回最后一个新药的结果;批量场景应改用 `predict_new_drugs()` / `predict_new_drugs_from_mat()`。
|
| 82 |
+
|
| 83 |
+
### 3.2 其他算法文件
|
| 84 |
+
|
| 85 |
+
这些文件主要用于基线或对照实现:
|
| 86 |
+
|
| 87 |
+
- `function/BMC.py`
|
| 88 |
+
当前是独立版 BMC,接口更接近传统论文实现,需要显式传 `trIndex` 以及上下界 `a/b`。
|
| 89 |
+
|
| 90 |
+
- `function/MVL.py`
|
| 91 |
+
独立版 MVL,使用 `scipy.linalg.solve_sylvester`,比 `AMVL.py` 内置版本更“标准基线化”。
|
| 92 |
+
|
| 93 |
+
- `function/MSBMF.py`
|
| 94 |
+
独立版多相似性双线性矩阵分解实现。
|
| 95 |
+
|
| 96 |
+
- `function/VDA_GKSBMF.py`
|
| 97 |
+
先计算 GIP,再与原始相似矩阵融合,然后做分解恢复。
|
| 98 |
+
|
| 99 |
+
- `function/HGIMC.py`
|
| 100 |
+
包含 `fBMC()`、`fGRB()`、`fHGI()` 等过程,更偏传统异构图推理管线。
|
| 101 |
+
|
| 102 |
+
- `function/DRPADC.py`
|
| 103 |
+
`WeightImputeLogFactorization()` 是主函数,属于加权逻辑矩阵分解路线。
|
| 104 |
+
|
| 105 |
+
- `function/ITRPCA.py`
|
| 106 |
+
目前更像研究草稿:主函数 `ITRPCA_F()` 可以看出整体思路,但 `prox_tnn()`、`ffindw()` 仍是占位式实现,不应直接当成熟生产代码使用。
|
| 107 |
+
|
| 108 |
+
## 4. `utils/` 里的真实职责
|
| 109 |
+
|
| 110 |
+
### 4.1 `utils/utils.py`
|
| 111 |
+
|
| 112 |
+
这是当前数据读取与特征准备的中心文件。
|
| 113 |
+
|
| 114 |
+
主要函数:
|
| 115 |
+
|
| 116 |
+
- `read_mat_file(file_path)`
|
| 117 |
+
读取 `.mat`,去除 MATLAB 元数据键,并对除 `Wrname/Wdname` 外的所有数值矩阵做 `MinMax` 归一化。
|
| 118 |
+
|
| 119 |
+
- `load_dataset(dataset_name, root_dir="data", embedding_type='llm')`
|
| 120 |
+
当前统一数据入口。
|
| 121 |
+
|
| 122 |
+
它会读取:
|
| 123 |
+
|
| 124 |
+
- `data/<dataset>/<dataset>.mat`
|
| 125 |
+
- `data/<dataset>/<dataset>_drug_embedding_<embedding_type>.csv`
|
| 126 |
+
- `data/<dataset>/<dataset>_disease_embedding_<embedding_type>.csv`
|
| 127 |
+
|
| 128 |
+
并返回:
|
| 129 |
+
|
| 130 |
+
- `Wrd`
|
| 131 |
+
- 多组 `Wrr_*`
|
| 132 |
+
- 多组 `Wdd_*`
|
| 133 |
+
- 对应的 `Trr_*` / `Tdd_*`
|
| 134 |
+
- 药物/疾病名称
|
| 135 |
+
- 药物/疾病 embedding
|
| 136 |
+
|
| 137 |
+
当前支持的视图组合已经写死在函数里,包括:
|
| 138 |
+
|
| 139 |
+
- `5 + 2`
|
| 140 |
+
- `5 + 3`
|
| 141 |
+
- `6 + 2`
|
| 142 |
+
- `6 + 3`
|
| 143 |
+
- `7 + 2`
|
| 144 |
+
- `7 + 3`
|
| 145 |
+
- `8 + 2`
|
| 146 |
+
- `8 + 3`
|
| 147 |
+
|
| 148 |
+
- `wrap_for_algorithm_func(...)`
|
| 149 |
+
根据算法签名自动决定传 `Wrr_list/Wdd_list` 还是 `Trr/Tdd`。
|
| 150 |
+
|
| 151 |
+
- `precompute_similarity_features(...)`
|
| 152 |
+
从 3D 相似张量中提取 `mean/max/min/std` 特征。
|
| 153 |
+
|
| 154 |
+
- `optimized_feature_extraction(...)`
|
| 155 |
+
用线程池把药物相似统计特征、疾病相似统计特征和 embedding 拼接成机器学习基线特征。
|
| 156 |
+
|
| 157 |
+
- `extract_and_merge_datasets(...)`
|
| 158 |
+
把多个 `.mat` 数据集映射到共同药物/疾病 ID 空间。
|
| 159 |
+
|
| 160 |
+
- `extract_embeddings(...)`
|
| 161 |
+
从大 embedding 表中切出某个子数据集需要的行并存成 CSV。
|
| 162 |
+
|
| 163 |
+
### 4.2 `utils/workflow.py`
|
| 164 |
+
|
| 165 |
+
这是当前批量实验最重要的工作流文件。
|
| 166 |
+
|
| 167 |
+
#### `train_eval(...)`
|
| 168 |
+
|
| 169 |
+
当前实现的要点:
|
| 170 |
+
|
| 171 |
+
- 对正样本做 `StratifiedKFold` 分配。
|
| 172 |
+
- 每折从负样本里抽取与正样本同数量的测试负例。
|
| 173 |
+
- 测试折里的正样本会先在 `Wrd` 里被置零,避免泄漏。
|
| 174 |
+
- 若 `ml_benchmark=True`,训练集负样本会进一步做下采样平衡。
|
| 175 |
+
|
| 176 |
+
支持两类模式:
|
| 177 |
+
|
| 178 |
+
- 算法模式:直接调用 `AMVL` 或其他方法。
|
| 179 |
+
- 机器学习基线模式:当前会训练 `SVM`、`RandomForest`、`XGBoost`、`LightGBM`、`MLP`。
|
| 180 |
+
|
| 181 |
+
对 `AMVL`,这里写死了一套参数:
|
| 182 |
+
|
| 183 |
+
```python
|
| 184 |
+
{
|
| 185 |
+
'alpha': 10,
|
| 186 |
+
'beta': 10,
|
| 187 |
+
'lamdaR': 0.1,
|
| 188 |
+
'lamdaD': 0.1,
|
| 189 |
+
'threshold': 0.8,
|
| 190 |
+
'max_iter': 400,
|
| 191 |
+
'tol1': 2e-3,
|
| 192 |
+
'tol2': 1e-5,
|
| 193 |
+
'gip_w': 0.2
|
| 194 |
+
}
|
| 195 |
+
```
|
| 196 |
+
|
| 197 |
+
#### `benchmark_all_cases(func, datasets, folds=10, filename=None)`
|
| 198 |
+
|
| 199 |
+
这是当前最像“批量跑论文表格”的入口。
|
| 200 |
+
|
| 201 |
+
行为是:
|
| 202 |
+
|
| 203 |
+
1. 遍历数据集列表。
|
| 204 |
+
2. 对每个数据集构造多种视图组合。
|
| 205 |
+
3. 对每种组合调用 `train_eval()`。
|
| 206 |
+
4. 输出整理后的 DataFrame。
|
| 207 |
+
5. 保存到 `data/Benchmark/<name>.xlsx`。
|
| 208 |
+
|
| 209 |
+
当前固定写了 16 种组合。
|
| 210 |
+
|
| 211 |
+
当前限制也很明确:
|
| 212 |
+
|
| 213 |
+
- 这个函数内部写死了 `load_dataset(dataset_name, embedding_type='llm')`。
|
| 214 |
+
- 所以它默认假设药物和疾病两侧都存在同名 `llm` embedding 文件。
|
| 215 |
+
|
| 216 |
+
#### `case_study(...)`
|
| 217 |
+
|
| 218 |
+
当前逻辑上是做“去掉已知关联后,输出 top-k 新候选”。
|
| 219 |
+
|
| 220 |
+
但它的调用方式是:
|
| 221 |
+
|
| 222 |
+
```python
|
| 223 |
+
algorithm_func(Wrd=Wrd, Wrr_list=Wrr_list, Wdd_list=Wdd_list, params=params)
|
| 224 |
+
```
|
| 225 |
+
|
| 226 |
+
因此从当前实现看,它实际上更适合 `AMVL` 这类兼容该签名的方法,不是完全通用的 case study 框架。
|
| 227 |
+
|
| 228 |
+
### 4.3 `utils/eval.py`
|
| 229 |
+
|
| 230 |
+
功能比较明确:
|
| 231 |
+
|
| 232 |
+
- `evaluate_model(...)`:算 AUC、AUPR、Average F1
|
| 233 |
+
- `calculate_ci(...)`:算 95% 置信区间
|
| 234 |
+
|
| 235 |
+
## 5. `tool/` 目录现在能做什么
|
| 236 |
+
|
| 237 |
+
### `tool/inspect_mat.py`
|
| 238 |
+
|
| 239 |
+
作用:
|
| 240 |
+
|
| 241 |
+
- 查看 `.mat` 文件里有哪些变量
|
| 242 |
+
- 打印矩阵形状、数据类型、内存占用和简单统计
|
| 243 |
+
|
| 244 |
+
适合先用它确认扩展后的 `.mat` 是否真的把新药追加成功。
|
| 245 |
+
|
| 246 |
+
### `tool/build_new_drug_mat.py`
|
| 247 |
+
|
| 248 |
+
这是当前新药预测流程里最关键的辅助脚本。
|
| 249 |
+
|
| 250 |
+
作用:
|
| 251 |
+
|
| 252 |
+
- 读取一个原始参考集 `.mat`
|
| 253 |
+
- 把一个或多个新药追加到选定的 `drug_*` 相似矩阵
|
| 254 |
+
- 同步把 `Wrname` 末尾追加这些新药 ID
|
| 255 |
+
- 输出新的扩展版 `.mat`
|
| 256 |
+
|
| 257 |
+
当前实现的几个重要细节:
|
| 258 |
+
|
| 259 |
+
- 支持 `--new-drug-id`、`--new-drug-ids`、`--new-drug-ids-file` 三种入口。
|
| 260 |
+
- 默认只扩展 `drug_ChemS` 和 `drug_TargetS`,对应 `--chem-csv` 与 `--target-csv`。
|
| 261 |
+
- 缺失的新药-老药非对角配对会被填成 `0`,新药自身对角线默认补 `1`。
|
| 262 |
+
- 默认不会改 `didr`。
|
| 263 |
+
- 如果你没有把所有 `drug_*` 矩阵都扩展到同尺寸,那么后续直接调用 `predict_new_drugs_from_mat()` 会因为矩阵尺寸不一致报错。
|
| 264 |
+
|
| 265 |
+
因此当前有两种安全用法:
|
| 266 |
+
|
| 267 |
+
1. 只保留扩展过的药物视图:
|
| 268 |
+
运行时加 `--drop-unmodified-drug-matrices`
|
| 269 |
+
2. 保留其他旧矩阵,但预测时手动指定 `drug_sim_names=[...]`
|
| 270 |
+
|
| 271 |
+
另外,脚本里默认的 `--chem-csv` 和 `--target-csv` 指向的是本机的测试路径,不应当当成通用默认值。
|
| 272 |
+
|
| 273 |
+
### `tool/prepare_dataset_drug_sources.py`
|
| 274 |
+
|
| 275 |
+
作用:
|
| 276 |
+
|
| 277 |
+
- 从数据集的 `Wrname` 或 `.mat` 中抽取有序药物 ID
|
| 278 |
+
- 按当前数据集顺序生成药物元数据、结构表、靶点摘要表、靶点关系表和覆盖率 JSON
|
| 279 |
+
|
| 280 |
+
当前已知限制:
|
| 281 |
+
|
| 282 |
+
- 默认依赖 `data/drugs_info.csv`
|
| 283 |
+
- 默认还依赖 `data/Wrname_name_targets_new2.csv`
|
| 284 |
+
- 但当前本地目录里没有这个 `Wrname_name_targets_new2.csv`
|
| 285 |
+
|
| 286 |
+
所以脚本是可用的,但默认参数在当前副本上并不完整,运行前要自行补这个源文件或改参数。
|
| 287 |
+
|
| 288 |
+
### `tool/supplement_dataset_targets_from_drugbank.py`
|
| 289 |
+
|
| 290 |
+
作用:
|
| 291 |
+
|
| 292 |
+
- 用本地 DrugBank 压缩包补齐数据集的靶点关系和靶点摘要
|
| 293 |
+
- 尽量保留已有高信息行,只替换占位式缺失行
|
| 294 |
+
|
| 295 |
+
当前额外前提:
|
| 296 |
+
|
| 297 |
+
- 需要本地 `Drugbank2025.7z`
|
| 298 |
+
- 需要系统可调用 `bsdtar`
|
| 299 |
+
|
| 300 |
+
### `tool/build_fdataset_disease_mapping.py`
|
| 301 |
+
|
| 302 |
+
作用:
|
| 303 |
+
|
| 304 |
+
- 从 `fdataset_wdname.csv` 读取疾病 ID
|
| 305 |
+
- 用 NCBI E-utilities 拉取 OMIM 标题
|
| 306 |
+
- 再用 Google Translate 生成中文机翻列
|
| 307 |
+
|
| 308 |
+
这是一个联网脚本,运行结果受外部接口可用性影响。
|
| 309 |
+
|
| 310 |
+
## 6. 当前数据目录的实际状态
|
| 311 |
+
|
| 312 |
+
当前本地 `data/` 下已经有:
|
| 313 |
+
|
| 314 |
+
- `Fdataset`
|
| 315 |
+
- `Cdataset`
|
| 316 |
+
- `Ydataset`
|
| 317 |
+
- `iDrug`
|
| 318 |
+
|
| 319 |
+
以及:
|
| 320 |
+
|
| 321 |
+
- `drugs_info.csv`
|
| 322 |
+
- `drug_protein_uniprot.csv`
|
| 323 |
+
|
| 324 |
+
按当前副本,几个数据集的可用性并不完全一致。
|
| 325 |
+
|
| 326 |
+
### `Fdataset`
|
| 327 |
+
|
| 328 |
+
当前看到的文件包括:
|
| 329 |
+
|
| 330 |
+
- `Fdataset.mat`
|
| 331 |
+
- `Fdataset_drug_embedding_llm.csv`
|
| 332 |
+
- `Fdataset_disease_embedding_llm.csv`
|
| 333 |
+
- 疾病名称映射 CSV
|
| 334 |
+
- 原始药物/靶点来源 CSV
|
| 335 |
+
|
| 336 |
+
这套数据和 `load_dataset(..., embedding_type='llm')` 是匹配的。
|
| 337 |
+
|
| 338 |
+
### `Cdataset`
|
| 339 |
+
|
| 340 |
+
当前看到的是:
|
| 341 |
+
|
| 342 |
+
- `Cdataset.mat`
|
| 343 |
+
- `Cdataset_drug_embedding_llm.csv`
|
| 344 |
+
- `Cdataset_disease_embedding_kg.csv`
|
| 345 |
+
|
| 346 |
+
这里要特别注意:
|
| 347 |
+
|
| 348 |
+
- 如果调用 `load_dataset("Cdataset", embedding_type="llm")`,会缺疾病 embedding。
|
| 349 |
+
- 如果调用 `load_dataset("Cdataset", embedding_type="kg")`,又会缺药物 embedding。
|
| 350 |
+
|
| 351 |
+
所以当前这份本地副本里,`Cdataset` 不能直接按 `load_dataset()` 现有接口无修改跑通。
|
| 352 |
+
|
| 353 |
+
### `Ydataset`
|
| 354 |
+
|
| 355 |
+
当前同时有 `llm` 和 `kg` 两套药物/疾病 embedding 文件,和现有接口比较匹配。
|
| 356 |
+
|
| 357 |
+
### `iDrug`
|
| 358 |
+
|
| 359 |
+
当前包含:
|
| 360 |
+
|
| 361 |
+
- `iDrug.mat`
|
| 362 |
+
- `iDrug_drug_embedding_llm.csv`
|
| 363 |
+
- `iDrug_drug_embedding_kg.csv`
|
| 364 |
+
- `iDrug_disease_embedding_llm.csv`
|
| 365 |
+
- `drug_info/` 下的一系列已整理输出
|
| 366 |
+
|
| 367 |
+
这说明 `iDrug` 在当前副本里已经被当成一个本地扩展数据集在维护,而不只是原论文三套 benchmark 之一。
|
| 368 |
+
|
| 369 |
+
## 7. 当前版本最值得记住的几个差异点
|
| 370 |
+
|
| 371 |
+
### 7.1 评估路径和新药预测路径的数据读取不完全一样
|
| 372 |
+
|
| 373 |
+
- `utils.read_mat_file()` 会自动归一化数值矩阵。
|
| 374 |
+
- `function/AMVL.py` 里的 `*_from_mat` 预测接口不会自动归一化。
|
| 375 |
+
|
| 376 |
+
这意味着:
|
| 377 |
+
|
| 378 |
+
- 跑 benchmark 时,矩阵数值范围会被统一处理。
|
| 379 |
+
- 跑新药 `.mat` 预测时,你自己构造进去的相似矩阵数值就会原样参与计算。
|
| 380 |
+
|
| 381 |
+
### 7.2 默认视图选择是“按存在的键自动收集”
|
| 382 |
+
|
| 383 |
+
`_load_prediction_inputs_from_mat()` 默认会优先按下面这组键名去找:
|
| 384 |
+
|
| 385 |
+
- 药物:`drug_AtcS`、`drug_ChemS`、`drug_DDIS`、`drug_GepS`、`drug_KgS`、`drug_LlmS`、`drug_SideS`、`drug_TargetS`
|
| 386 |
+
- 疾病:`disease_DoS`、`disease_KgS`、`disease_LlmS`、`disease_PhS`
|
| 387 |
+
|
| 388 |
+
只要键存在,就可能被一并拿去预测。
|
| 389 |
+
|
| 390 |
+
所以如果某些 `drug_*` 还是旧尺寸而另一些已扩成新尺寸,默认预测入口会出问题。
|
| 391 |
+
|
| 392 |
+
### 7.3 项目里仍有一些历史命名残留
|
| 393 |
+
|
| 394 |
+
当前代码和 README 里还能看到 `AdaMVL` 等旧命名残留,例如:
|
| 395 |
+
|
| 396 |
+
- README 的 clone 示例目录名
|
| 397 |
+
- `function/AMVL.py` 里训练完成提示文案
|
| 398 |
+
|
| 399 |
+
这不影响核心逻辑,但说明仓库现在仍处于持续演化状态。
|
| 400 |
+
|
| 401 |
+
## 8. 推荐的当前使用顺序
|
| 402 |
+
|
| 403 |
+
如果按当前副本实际内容来用,建议顺序是:
|
| 404 |
+
|
| 405 |
+
1. 先用 `tool/inspect_mat.py` 核查 `.mat` 中有哪些键和它们的尺寸。
|
| 406 |
+
2. 跑 benchmark 前先确认对应数据集的 embedding 文件是否齐全,必要时补文件或改 `load_dataset()`。
|
| 407 |
+
3. 做新药预测时,先用 `tool/build_new_drug_mat.py` 生成扩展版 `.mat`。
|
| 408 |
+
4. 预测时优先用 `predict_new_drugs_from_mat()`,单药兼容接口只适合只追加 1 个新药的场景。
|
| 409 |
+
5. 如果要继续维护 `iDrug` 一类本地扩展数据集,再使用 `prepare_dataset_drug_sources.py` 和 `supplement_dataset_targets_from_drugbank.py` 整理来源数据。
|
| 410 |
+
|
| 411 |
+
## 9. 一句话总结
|
| 412 |
+
|
| 413 |
+
当前这份 AMVL 本地仓库已经不只是论文复现实验代码。
|
| 414 |
+
|
| 415 |
+
它现在实际包含了三块东西:
|
| 416 |
+
|
| 417 |
+
- 多视图药物重定位算法实现
|
| 418 |
+
- 批量 benchmark / case study 工作流
|
| 419 |
+
- 面向新药扩展和本地数据整理的一组实操脚本
|
| 420 |
+
|
| 421 |
+
真正使用时,最重要的不是只看 README,而是先确认:
|
| 422 |
+
|
| 423 |
+
- 你走的是“评估工作流”还是“新药预测工作流”
|
| 424 |
+
- 你的 `.mat` 和 embedding 文件是否与当前代码的默认读取逻辑匹配
|
| 425 |
+
- 你的药物相似矩阵是否已经统一扩展到一致尺寸
|
AMVL/AMVL_新药预测实操流程.md
ADDED
|
@@ -0,0 +1,463 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AMVL 新药预测实操流程
|
| 2 |
+
|
| 3 |
+
这份文档只讲当前本地这份 AMVL 代码里,怎样把一个或多个新药接到现有参考集上,然后做疾病关联预测。
|
| 4 |
+
|
| 5 |
+
它基于当前目录中的真实代码实现,重点对应:
|
| 6 |
+
|
| 7 |
+
- `function/AMVL.py`
|
| 8 |
+
- `tool/build_new_drug_mat.py`
|
| 9 |
+
- `tool/inspect_mat.py`
|
| 10 |
+
|
| 11 |
+
`README.md` 保持原样,不在这里重复。
|
| 12 |
+
|
| 13 |
+
## 1. 先理解当前代码到底在预测什么
|
| 14 |
+
|
| 15 |
+
当前这套新药预测不是“输入一个药名或一条 SMILES,直接端到端输出适应症”。
|
| 16 |
+
|
| 17 |
+
它做的是:
|
| 18 |
+
|
| 19 |
+
1. 先有一套参考药物-疾病关联矩阵 `Wrd_known`。
|
| 20 |
+
2. 再把新药追加到药物相似矩阵里。
|
| 21 |
+
3. 让新药通过“和老药的多视图相似关系”进入模型。
|
| 22 |
+
4. 最终输出新药对现有疾病集合的预测分数。
|
| 23 |
+
|
| 24 |
+
所以新药预测至少需要两部分:
|
| 25 |
+
|
| 26 |
+
- 一套原始参考集
|
| 27 |
+
- 新药与参考集中老药的相似度信息
|
| 28 |
+
|
| 29 |
+
## 2. 当前代码里有哪几个入口
|
| 30 |
+
|
| 31 |
+
### 2.1 底层入口
|
| 32 |
+
|
| 33 |
+
`function/AMVL.py` 里和新药预测相关的函数有四个:
|
| 34 |
+
|
| 35 |
+
- `predict_new_drug(...)`
|
| 36 |
+
- `predict_new_drugs(...)`
|
| 37 |
+
- `predict_new_drug_from_mat(...)`
|
| 38 |
+
- `predict_new_drugs_from_mat(...)`
|
| 39 |
+
|
| 40 |
+
推荐优先级:
|
| 41 |
+
|
| 42 |
+
1. 批量场景优先用 `predict_new_drugs_from_mat(...)`
|
| 43 |
+
2. 单药场景可以用 `predict_new_drug_from_mat(...)`
|
| 44 |
+
3. 只有当你已经在 Python 里自己准备好矩阵对象时,才直接调用不带 `_from_mat` 的版本
|
| 45 |
+
|
| 46 |
+
### 2.2 单药和多药的区别
|
| 47 |
+
|
| 48 |
+
当前代码已经支持一次追加多个新药。
|
| 49 |
+
|
| 50 |
+
但要注意:
|
| 51 |
+
|
| 52 |
+
- `predict_new_drug()` 和 `predict_new_drug_from_mat()` 是兼容旧接口的单药封装。
|
| 53 |
+
- 如果实际追加了多个新药,这两个函数只返回最后一个新药的结果。
|
| 54 |
+
|
| 55 |
+
因此:
|
| 56 |
+
|
| 57 |
+
- 真正做批量新药预测时,应该直接用 `predict_new_drugs()` 或 `predict_new_drugs_from_mat()`。
|
| 58 |
+
|
| 59 |
+
## 3. 新药预测所需的数据结构
|
| 60 |
+
|
| 61 |
+
### 3.1 原始关联矩阵
|
| 62 |
+
|
| 63 |
+
在 `.mat` 文件里,已知药物-疾病关联矩阵叫:
|
| 64 |
+
|
| 65 |
+
- `didr`
|
| 66 |
+
|
| 67 |
+
它在文件里的方向是:
|
| 68 |
+
|
| 69 |
+
- 疾病 × 药物
|
| 70 |
+
|
| 71 |
+
进入 AMVL 之后会转成:
|
| 72 |
+
|
| 73 |
+
- `Wrd_known = didr.T`
|
| 74 |
+
- 也就是药物 × 疾病
|
| 75 |
+
|
| 76 |
+
做新药预测时:
|
| 77 |
+
|
| 78 |
+
- 原始 `didr` 不需要先把新药手工补进去
|
| 79 |
+
- 代码会自动在 `Wrd_known` 底部补若干行全零,表示新药的未知疾病标签
|
| 80 |
+
|
| 81 |
+
### 3.2 药物相似矩阵
|
| 82 |
+
|
| 83 |
+
这是新药预测最关键的部分。
|
| 84 |
+
|
| 85 |
+
当前本地 `.mat` 常见药物视图键包括:
|
| 86 |
+
|
| 87 |
+
- `drug_AtcS`
|
| 88 |
+
- `drug_ChemS`
|
| 89 |
+
- `drug_DDIS`
|
| 90 |
+
- `drug_GepS`
|
| 91 |
+
- `drug_KgS`
|
| 92 |
+
- `drug_LlmS`
|
| 93 |
+
- `drug_SideS`
|
| 94 |
+
- `drug_TargetS`
|
| 95 |
+
|
| 96 |
+
原参考集里它们通常是:
|
| 97 |
+
|
| 98 |
+
- `x × x`
|
| 99 |
+
|
| 100 |
+
若追加 `k` 个新药,则必须扩成:
|
| 101 |
+
|
| 102 |
+
- `(x + k) × (x + k)`
|
| 103 |
+
|
| 104 |
+
这里的要求不是“把新药名字加到 `Wrname` 末尾”这么简单,而是:
|
| 105 |
+
|
| 106 |
+
- 新药与每个老药的相似度要有数值
|
| 107 |
+
- 新药与新药之间的相似度也要有数值
|
| 108 |
+
- 所有参与预测的 `drug_*` 矩阵必须同尺寸
|
| 109 |
+
|
| 110 |
+
### 3.3 疾病相似矩阵
|
| 111 |
+
|
| 112 |
+
当前常见疾病视图键包括:
|
| 113 |
+
|
| 114 |
+
- `disease_DoS`
|
| 115 |
+
- `disease_PhS`
|
| 116 |
+
- `disease_KgS`
|
| 117 |
+
- `disease_LlmS`
|
| 118 |
+
|
| 119 |
+
如果疾病集合不变,那么这些矩阵通常不需要扩展,仍保持:
|
| 120 |
+
|
| 121 |
+
- `y × y`
|
| 122 |
+
|
| 123 |
+
### 3.4 名称字段
|
| 124 |
+
|
| 125 |
+
`.mat` 里通常还有:
|
| 126 |
+
|
| 127 |
+
- `Wrname`:药物名或药物 ID
|
| 128 |
+
- `Wdname`:疾病名或疾病 ID
|
| 129 |
+
|
| 130 |
+
它们的作用主要是:
|
| 131 |
+
|
| 132 |
+
- 固定行列顺序
|
| 133 |
+
- 帮助把预测分数映射回药物/疾病名字
|
| 134 |
+
|
| 135 |
+
模型真正使用的是矩阵数值,不是名字字符串本身。
|
| 136 |
+
|
| 137 |
+
## 4. 当前推荐的实操总流程
|
| 138 |
+
|
| 139 |
+
按当前代码,最稳妥的流程是:
|
| 140 |
+
|
| 141 |
+
1. 选定一个参考集 `.mat`
|
| 142 |
+
2. 准备新药与老药的相似度矩阵 CSV
|
| 143 |
+
3. 用 `tool/build_new_drug_mat.py` 生成扩展版 `.mat`
|
| 144 |
+
4. 用 `tool/inspect_mat.py` 检查扩展结果
|
| 145 |
+
5. 调用 `predict_new_drugs_from_mat()` 或 `predict_new_drug_from_mat()` 做预测
|
| 146 |
+
|
| 147 |
+
下面展开讲。
|
| 148 |
+
|
| 149 |
+
## 5. 第一步:选参考集
|
| 150 |
+
|
| 151 |
+
当前本地 `data/` 下可以看到:
|
| 152 |
+
|
| 153 |
+
- `data/Fdataset/Fdataset.mat`
|
| 154 |
+
- `data/Cdataset/Cdataset.mat`
|
| 155 |
+
- `data/Ydataset/Ydataset.mat`
|
| 156 |
+
- `data/iDrug/iDrug.mat`
|
| 157 |
+
|
| 158 |
+
你先要决定预测是基于哪一套参考药物-疾病体系。
|
| 159 |
+
|
| 160 |
+
最常见的是:
|
| 161 |
+
|
| 162 |
+
- `Fdataset.mat`
|
| 163 |
+
- `iDrug.mat`
|
| 164 |
+
|
| 165 |
+
选择参考集后,后续新药相似矩阵里的老药顺序必须对齐这个参考集的 `Wrname`。
|
| 166 |
+
|
| 167 |
+
## 6. 第二步:准备新药相似度输入
|
| 168 |
+
|
| 169 |
+
### 6.1 当前脚本默认支持哪些视图
|
| 170 |
+
|
| 171 |
+
`tool/build_new_drug_mat.py` 目前默认只处理两类输入:
|
| 172 |
+
|
| 173 |
+
- `--chem-csv` 对应 `drug_ChemS`
|
| 174 |
+
- `--target-csv` 对应 `drug_TargetS`
|
| 175 |
+
|
| 176 |
+
也就是说,当前脚本开箱即用的重点是:
|
| 177 |
+
|
| 178 |
+
- 化学结构相似
|
| 179 |
+
- 靶点相似
|
| 180 |
+
|
| 181 |
+
如果以后你还想扩展 `drug_LlmS`、`drug_KgS` 等,需要继续改脚本。
|
| 182 |
+
|
| 183 |
+
### 6.2 CSV 需要满足什么格式
|
| 184 |
+
|
| 185 |
+
脚本内部按下面规则读取 CSV:
|
| 186 |
+
|
| 187 |
+
- `pd.read_csv(csv_path, index_col=0)`
|
| 188 |
+
- 第一列作为行索引
|
| 189 |
+
- 列名和行名都转成字符串
|
| 190 |
+
|
| 191 |
+
因此 CSV 最稳妥的结构是:
|
| 192 |
+
|
| 193 |
+
- 第一列是药物 ID
|
| 194 |
+
- 表头是药物 ID
|
| 195 |
+
- 行列都是同一批药物 ID
|
| 196 |
+
- 单��格是相似度数值
|
| 197 |
+
|
| 198 |
+
它可以是:
|
| 199 |
+
|
| 200 |
+
- 老药 + 新药的完整相似矩阵
|
| 201 |
+
|
| 202 |
+
也可以是:
|
| 203 |
+
|
| 204 |
+
- 至少覆盖“新药 vs 老药”和“新药 vs 新药”的矩阵
|
| 205 |
+
|
| 206 |
+
### 6.3 当前脚本对缺失值怎么处理
|
| 207 |
+
|
| 208 |
+
`tool/build_new_drug_mat.py` 当前的逻辑是:
|
| 209 |
+
|
| 210 |
+
- 对角线缺失时自动补 `1.0`
|
| 211 |
+
- 其他缺失的新药相关配对自动补 `0.0`
|
| 212 |
+
|
| 213 |
+
这意味着:
|
| 214 |
+
|
| 215 |
+
- 脚本不会因为少量缺失相似度直接崩掉
|
| 216 |
+
- 但补成 `0` 本身会影响预测结果
|
| 217 |
+
|
| 218 |
+
所以更好的做法仍然是尽量提供完整的新药相关相似度。
|
| 219 |
+
|
| 220 |
+
## 7. 第三步:用脚本构造扩展版 `.mat`
|
| 221 |
+
|
| 222 |
+
### 7.1 单药场景
|
| 223 |
+
|
| 224 |
+
例如基于 `Fdataset` 追加一个新药:
|
| 225 |
+
|
| 226 |
+
```bash
|
| 227 |
+
python tool/build_new_drug_mat.py \
|
| 228 |
+
--input-mat data/Fdataset/Fdataset.mat \
|
| 229 |
+
--output-mat data/Fdataset/Fdataset_new_drug.mat \
|
| 230 |
+
--new-drug-id CID_72 \
|
| 231 |
+
--chem-csv /path/to/chem_similarity.csv \
|
| 232 |
+
--target-csv /path/to/target_similarity.csv \
|
| 233 |
+
--drop-unmodified-drug-matrices
|
| 234 |
+
```
|
| 235 |
+
|
| 236 |
+
### 7.2 多药场景
|
| 237 |
+
|
| 238 |
+
如果一次追加多个新药,推荐用 `--new-drug-ids` 或 `--new-drug-ids-file`。
|
| 239 |
+
|
| 240 |
+
示例:
|
| 241 |
+
|
| 242 |
+
```bash
|
| 243 |
+
python tool/build_new_drug_mat.py \
|
| 244 |
+
--input-mat data/Fdataset/Fdataset.mat \
|
| 245 |
+
--output-mat data/Fdataset/Fdataset_batch_new_drugs.mat \
|
| 246 |
+
--new-drug-ids CID_72,CID_73,CID_74 \
|
| 247 |
+
--chem-csv /path/to/chem_similarity.csv \
|
| 248 |
+
--target-csv /path/to/target_similarity.csv \
|
| 249 |
+
--drop-unmodified-drug-matrices
|
| 250 |
+
```
|
| 251 |
+
|
| 252 |
+
或者:
|
| 253 |
+
|
| 254 |
+
```bash
|
| 255 |
+
python tool/build_new_drug_mat.py \
|
| 256 |
+
--input-mat data/Fdataset/Fdataset.mat \
|
| 257 |
+
--output-mat data/Fdataset/Fdataset_batch_new_drugs.mat \
|
| 258 |
+
--new-drug-ids-file /path/to/new_drug_ids.txt \
|
| 259 |
+
--chem-csv /path/to/chem_similarity.csv \
|
| 260 |
+
--target-csv /path/to/target_similarity.csv \
|
| 261 |
+
--drop-unmodified-drug-matrices
|
| 262 |
+
```
|
| 263 |
+
|
| 264 |
+
### 7.3 为什么这里推荐 `--drop-unmodified-drug-matrices`
|
| 265 |
+
|
| 266 |
+
因为当前 `predict_new_*_from_mat()` 默认会自动收集 `.mat` 里存在的所有药物视图键。
|
| 267 |
+
|
| 268 |
+
如果你只扩了:
|
| 269 |
+
|
| 270 |
+
- `drug_ChemS`
|
| 271 |
+
- `drug_TargetS`
|
| 272 |
+
|
| 273 |
+
但没扩:
|
| 274 |
+
|
| 275 |
+
- `drug_AtcS`
|
| 276 |
+
- `drug_DDIS`
|
| 277 |
+
- `drug_GepS`
|
| 278 |
+
- `drug_KgS`
|
| 279 |
+
- `drug_LlmS`
|
| 280 |
+
- `drug_SideS`
|
| 281 |
+
|
| 282 |
+
那么 `.mat` 里就会同时存在:
|
| 283 |
+
|
| 284 |
+
- 一部分是 `(x+k) × (x+k)`
|
| 285 |
+
- 一部分还是 `x × x`
|
| 286 |
+
|
| 287 |
+
这样后续默认预测会因为尺寸不一致报错。
|
| 288 |
+
|
| 289 |
+
`--drop-unmodified-drug-matrices` 的作用就是:
|
| 290 |
+
|
| 291 |
+
- 只保留你这次真正扩过的药物视图
|
| 292 |
+
|
| 293 |
+
这样最省事。
|
| 294 |
+
|
| 295 |
+
如果你不想删旧矩阵,也可以在预测时显式传:
|
| 296 |
+
|
| 297 |
+
- `drug_sim_names=['drug_ChemS', 'drug_TargetS']`
|
| 298 |
+
|
| 299 |
+
## 8. 第四步:检查扩展后的 `.mat`
|
| 300 |
+
|
| 301 |
+
扩展完后,建议立刻检查:
|
| 302 |
+
|
| 303 |
+
```bash
|
| 304 |
+
python tool/inspect_mat.py data/Fdataset/Fdataset_new_drug.mat
|
| 305 |
+
```
|
| 306 |
+
|
| 307 |
+
至少确认三件事:
|
| 308 |
+
|
| 309 |
+
1. `Wrname` 长度是否真的增加了
|
| 310 |
+
2. 参与预测的 `drug_*` 矩阵是否都变成了同一个新尺寸
|
| 311 |
+
3. `didr` 是否仍保持原始老药规模
|
| 312 |
+
|
| 313 |
+
如果是追加 1 个新药,理想状态通常是:
|
| 314 |
+
|
| 315 |
+
- `didr` 还是原来的疾病 × 老药
|
| 316 |
+
- `drug_ChemS`、`drug_TargetS` 变成老药数 `+1`
|
| 317 |
+
- `Wrname` 也变成老药数 `+1`
|
| 318 |
+
|
| 319 |
+
## 9. 第五步:从 `.mat` 直接做预测
|
| 320 |
+
|
| 321 |
+
### 9.1 单药预测
|
| 322 |
+
|
| 323 |
+
```python
|
| 324 |
+
from function.AMVL import predict_new_drug_from_mat
|
| 325 |
+
|
| 326 |
+
predictions, ranked_results, drug_names, disease_names = predict_new_drug_from_mat(
|
| 327 |
+
"data/Fdataset/Fdataset_new_drug.mat",
|
| 328 |
+
drug_sim_names=["drug_ChemS", "drug_TargetS"],
|
| 329 |
+
disease_sim_names=["disease_DoS", "disease_PhS", "disease_LlmS"],
|
| 330 |
+
return_names=True,
|
| 331 |
+
)
|
| 332 |
+
```
|
| 333 |
+
|
| 334 |
+
返回值含义:
|
| 335 |
+
|
| 336 |
+
- `predictions`:这个新药对全部疾病的预测分数
|
| 337 |
+
- `ranked_results`:按分数降序排序后的疾病列表
|
| 338 |
+
- `drug_names`:药物名称/ID 数组
|
| 339 |
+
- `disease_names`:疾病名称/ID 数组
|
| 340 |
+
|
| 341 |
+
`ranked_results` 在 `return_names=True` 时每项通常是:
|
| 342 |
+
|
| 343 |
+
- `(disease_index, probability, disease_name)`
|
| 344 |
+
|
| 345 |
+
### 9.2 多药预测
|
| 346 |
+
|
| 347 |
+
```python
|
| 348 |
+
from function.AMVL import predict_new_drugs_from_mat
|
| 349 |
+
|
| 350 |
+
predictions_all, ranked_results_all, new_drug_names, disease_names = predict_new_drugs_from_mat(
|
| 351 |
+
"data/Fdataset/Fdataset_batch_new_drugs.mat",
|
| 352 |
+
drug_sim_names=["drug_ChemS", "drug_TargetS"],
|
| 353 |
+
disease_sim_names=["disease_DoS", "disease_PhS", "disease_LlmS"],
|
| 354 |
+
return_names=True,
|
| 355 |
+
)
|
| 356 |
+
```
|
| 357 |
+
|
| 358 |
+
这里:
|
| 359 |
+
|
| 360 |
+
- `predictions_all` 形状是 `k × y`
|
| 361 |
+
- `new_drug_names` 是本次追加的新药列表
|
| 362 |
+
- `ranked_results_all[i]` 对应第 `i` 个新药的排序结果
|
| 363 |
+
|
| 364 |
+
## 10. 当前预测接口的默认参数
|
| 365 |
+
|
| 366 |
+
如果你不手动传 `params`,当前新药预测会使用:
|
| 367 |
+
|
| 368 |
+
```python
|
| 369 |
+
{
|
| 370 |
+
'alpha': 10,
|
| 371 |
+
'beta': 10,
|
| 372 |
+
'lamdaR': 0.1,
|
| 373 |
+
'lamdaD': 0.1,
|
| 374 |
+
'threshold': 0.8,
|
| 375 |
+
'max_iter': 300,
|
| 376 |
+
'tol1': 2e-3,
|
| 377 |
+
'tol2': 1e-5,
|
| 378 |
+
'gip_w': 0.2
|
| 379 |
+
}
|
| 380 |
+
```
|
| 381 |
+
|
| 382 |
+
如果你想做灵敏度比较,可以自己传新的 `params`。
|
| 383 |
+
|
| 384 |
+
## 11. 当前代码里几个最容易踩的坑
|
| 385 |
+
|
| 386 |
+
### 11.1 只追加了 `Wrname`,没补相似矩阵
|
| 387 |
+
|
| 388 |
+
这是最常见误区。
|
| 389 |
+
|
| 390 |
+
错误理解:
|
| 391 |
+
|
| 392 |
+
- “把新药名字加进 `Wrname`,模型就知道这是新药了”
|
| 393 |
+
|
| 394 |
+
实际不是。
|
| 395 |
+
|
| 396 |
+
真正决定预测的是:
|
| 397 |
+
|
| 398 |
+
- 新药和老药之间的相似度数值
|
| 399 |
+
|
| 400 |
+
名字只是索引标签。
|
| 401 |
+
|
| 402 |
+
### 11.2 药物视图尺寸不一致
|
| 403 |
+
|
| 404 |
+
只要参与预测的 `drug_*` 里有的还是老尺寸、有的是扩展尺寸,预测入口就会出错。
|
| 405 |
+
|
| 406 |
+
解决办法:
|
| 407 |
+
|
| 408 |
+
- 要么全部扩到一致尺寸
|
| 409 |
+
- 要么只选择那几张已经扩好的矩阵
|
| 410 |
+
|
| 411 |
+
### 11.3 误用单药接口做多药预测
|
| 412 |
+
|
| 413 |
+
如果 `.mat` 里追加了多个新药,但你调用的是:
|
| 414 |
+
|
| 415 |
+
- `predict_new_drug_from_mat()`
|
| 416 |
+
|
| 417 |
+
那它只会返回最后一个新药。
|
| 418 |
+
|
| 419 |
+
多药场景一定改用:
|
| 420 |
+
|
| 421 |
+
- `predict_new_drugs_from_mat()`
|
| 422 |
+
|
| 423 |
+
### 11.4 相似度数值没有预处理
|
| 424 |
+
|
| 425 |
+
当前新药 `.mat` 预测路径不会自动对你扩进去的矩阵做 `MinMax` 归一化。
|
| 426 |
+
|
| 427 |
+
因此你自己提供的相似度 CSV 最好已经满足:
|
| 428 |
+
|
| 429 |
+
- 数值量纲一致
|
| 430 |
+
- 通常落在 `[0, 1]`
|
| 431 |
+
- 与原参考集口径尽量一致
|
| 432 |
+
|
| 433 |
+
### 11.5 没有显式限制使用哪些视图
|
| 434 |
+
|
| 435 |
+
如果扩展 `.mat` 中保留了很多旧 `drug_*` 键,默认 `_from_mat` 接口会尝试把存在的都拿来用。
|
| 436 |
+
|
| 437 |
+
最稳妥的两种方式:
|
| 438 |
+
|
| 439 |
+
- 构造 `.mat` 时用 `--drop-unmodified-drug-matrices`
|
| 440 |
+
- 预测时显式传 `drug_sim_names=[...]`
|
| 441 |
+
|
| 442 |
+
## 12. 一个最稳妥的当前建议
|
| 443 |
+
|
| 444 |
+
如果你只是想把现在这套代码先用起来,而不是一次性把所有视图都补全,建议按这个最小可用方案:
|
| 445 |
+
|
| 446 |
+
1. 选一个参考集,比如 `Fdataset.mat`
|
| 447 |
+
2. 只准备 `drug_ChemS` 和 `drug_TargetS` 的扩展相似度
|
| 448 |
+
3. 用 `tool/build_new_drug_mat.py` 构造扩展 `.mat`
|
| 449 |
+
4. 加 `--drop-unmodified-drug-matrices`
|
| 450 |
+
5. 用 `predict_new_drugs_from_mat()` 预测
|
| 451 |
+
6. 预测时显式传 `drug_sim_names=["drug_ChemS", "drug_TargetS"]`
|
| 452 |
+
|
| 453 |
+
这样和当前本地代码的适配度最高,最不容易被旧尺寸矩阵或默认视图自动选择坑住。
|
| 454 |
+
|
| 455 |
+
## 13. 一句话总结
|
| 456 |
+
|
| 457 |
+
当前这份 AMVL 新药预测流程的本质是:
|
| 458 |
+
|
| 459 |
+
- 不改原始 `didr`
|
| 460 |
+
- 把新药追加进药物相似网络
|
| 461 |
+
- 让模型基于“新药和老药的相似关系”去推断疾病关联
|
| 462 |
+
|
| 463 |
+
真正决定结果的是扩展后的 `drug_*` 数值矩阵,而不是新药名字本身。
|
AMVL/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AMVL: A Multi-View Learning Method for Enhanced Drug Repurposing Using CTPs, Knowledge Graph, and LLM
|
| 2 |
+
|
| 3 |
+
This repository contains the code, datasets, and resources for the project **AMVL**, which integrates multi-view learning approaches with transcriptomic profiles, knowledge graphs, and large language models to improve drug repositioning predictions.
|
| 4 |
+
|
| 5 |
+

|
| 6 |
+
|
| 7 |
+
## Project Structure
|
| 8 |
+
|
| 9 |
+
### `data/`
|
| 10 |
+
|
| 11 |
+
[download link](https://doi.org/10.5281/zenodo.14726287)
|
| 12 |
+
|
| 13 |
+
- **Benchmark**: Contains benchmark Excel files from previous studies, which include data on heterogeneous networks for various drug repositioning algorithms.
|
| 14 |
+
- **Fdataset, Cdataset, Ydataset**: Three evaluation datasets.
|
| 15 |
+
- **Fdataset**: Gold-standard dataset for evaluation.
|
| 16 |
+
- **Cdataset and Ydataset**: Standard datasets for evaluation.
|
| 17 |
+
- Each dataset includes:
|
| 18 |
+
- Raw files for knowledge graph representations and large language model (LLM) representations.
|
| 19 |
+
- Integrated MATLAB files containing:
|
| 20 |
+
- 8 drug similarity matrices.
|
| 21 |
+
- 3 disease similarity matrices.
|
| 22 |
+
- **other**: Contains files with IDs for all drugs and diseases.
|
| 23 |
+
|
| 24 |
+
### `function/`
|
| 25 |
+
Contains the code for all methods discussed in this work, as well as code for comparison methods. This includes implementations of multi-view learning algorithms and models for drug repositioning.
|
| 26 |
+
|
| 27 |
+
### `notebook/`
|
| 28 |
+
Jupyter notebooks that provide:
|
| 29 |
+
- Evaluation framework and workflows.
|
| 30 |
+
- Code to compute similarity matrices from representations.
|
| 31 |
+
- Subset extraction of representations for each dataset.
|
| 32 |
+
- Processing steps and methods for obtaining knowledge graph representations and large language model representations.
|
| 33 |
+
|
| 34 |
+
### `utils/`
|
| 35 |
+
Utility scripts, including:
|
| 36 |
+
- Evaluation workflow code.
|
| 37 |
+
- Scripts for various evaluation metrics.
|
| 38 |
+
- Additional helper functions required for processing and evaluation.
|
| 39 |
+
|
| 40 |
+
### `img/`
|
| 41 |
+
Stores images related to the project, which may be used for documentation or visual explanations of the project’s methodologies and results.
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## Getting Started
|
| 46 |
+
|
| 47 |
+
### Prerequisites
|
| 48 |
+
|
| 49 |
+
Ensure that you have the following libraries and dependencies installed:
|
| 50 |
+
- Python 3.x
|
| 51 |
+
- `requests`, `beautifulsoup4`, and other necessary packages listed in `requirements.txt` (if available).
|
| 52 |
+
|
| 53 |
+
### Installation
|
| 54 |
+
|
| 55 |
+
Clone this repository and navigate to the project directory:
|
| 56 |
+
```bash
|
| 57 |
+
git clone https://github.com/yourusername/AdaMVL.git
|
| 58 |
+
cd AdaMVL
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
Install the required packages:
|
| 62 |
+
```bash
|
| 63 |
+
pip install -r requirements.txt
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
### Usage
|
| 67 |
+
|
| 68 |
+
1. **Data Preparation**: Ensure that the datasets in `data/` are correctly structured, with the benchmark and evaluation datasets properly organized.
|
| 69 |
+
2. **Method Implementation**: The `function/` directory includes all necessary implementations for running multi-view learning models.
|
| 70 |
+
3. **Evaluation and Analysis**: Use the Jupyter notebooks in the `notebook/` directory to conduct evaluation workflows, similarity calculations, and representation extraction.
|
| 71 |
+
4. **Utilities**: The `utils/` directory contains helper scripts for metrics and processing, which are used in the notebooks and main methods.
|
| 72 |
+
|
| 73 |
+
### Running the Notebooks
|
| 74 |
+
Open the notebooks in `notebook/` to explore the evaluation process and follow along with representation calculations, similarity extraction, and other analyses:
|
| 75 |
+
```bash
|
| 76 |
+
jupyter notebook
|
| 77 |
+
```
|
| 78 |
+
|
COM/build_pubchem_drugbank_mapping.py
ADDED
|
@@ -0,0 +1,582 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import csv
|
| 5 |
+
import html
|
| 6 |
+
import json
|
| 7 |
+
import re
|
| 8 |
+
import sys
|
| 9 |
+
import time
|
| 10 |
+
from dataclasses import dataclass
|
| 11 |
+
from datetime import datetime
|
| 12 |
+
from pathlib import Path
|
| 13 |
+
from typing import Iterable
|
| 14 |
+
from urllib.error import HTTPError, URLError
|
| 15 |
+
from urllib.request import Request, urlopen
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
COM_DIR = Path("/mnt/disk1/yanganqi/QQCM/COM")
|
| 19 |
+
PUBCHEM_DIR = COM_DIR / "pubchem_clean_sdf"
|
| 20 |
+
TCMSP_DIR = COM_DIR / "tcmsp_mol2"
|
| 21 |
+
QQCM_HELPER_DIR = Path(
|
| 22 |
+
"/mnt/disk1/yanganqi/QQCM/KG/qqcm_compound_subgraph/helper_tables"
|
| 23 |
+
)
|
| 24 |
+
MOL_ID_LABELS_TSV = QQCM_HELPER_DIR / "qqcm_mol_id_labels.tsv"
|
| 25 |
+
MOL_GROUPS_TSV = QQCM_HELPER_DIR / "qqcm_compound_multi_mol_id_groups.tsv"
|
| 26 |
+
CID_LOOKUP_DIR = Path("/mnt/disk1/yanganqi/QQCM/LLM/pubchem_cache/cid_lookup")
|
| 27 |
+
TCM_MKG_D14_TSV = Path("/mnt/disk1/yanganqi/TCM-MKG/D14_InChIKey_SourceID.tsv")
|
| 28 |
+
PHARMEBINET_NODES_TSV = Path(
|
| 29 |
+
"/mnt/disk1/yanganqi/pharmebinet_tsv_24_02_06/tsv_files/nodes.tsv"
|
| 30 |
+
)
|
| 31 |
+
TCMSP_PAGE_CACHE_JSON = COM_DIR / "tcmsp_molecule_cache.json"
|
| 32 |
+
|
| 33 |
+
OUTPUT_TSV = COM_DIR / "qqcm_pubchem_drugbank_mapping.tsv"
|
| 34 |
+
OUTPUT_MD = COM_DIR / "qqcm_pubchem_drugbank_mapping.md"
|
| 35 |
+
|
| 36 |
+
PUBCHEM_BATCH_SIZE = 100
|
| 37 |
+
PUBCHEM_BATCH_URL = (
|
| 38 |
+
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"
|
| 39 |
+
"{cid_list}/property/Title,IUPACName/JSON"
|
| 40 |
+
)
|
| 41 |
+
PUBCHEM_HEADERS = {
|
| 42 |
+
"User-Agent": "Mozilla/5.0",
|
| 43 |
+
"Accept": "application/json",
|
| 44 |
+
}
|
| 45 |
+
DRUGBANK_URL_PATTERN = re.compile(r"/drugs/(DB\d{5})")
|
| 46 |
+
TCMSP_FIELD_PATTERN = re.compile(
|
| 47 |
+
r'<th class="left_header">([^<]+)</th><td(?: style="background-color:#f6fcff")?>(.*?)</td>',
|
| 48 |
+
re.S,
|
| 49 |
+
)
|
| 50 |
+
TCMSP_PAGE_HEADERS = {
|
| 51 |
+
"User-Agent": "Mozilla/5.0",
|
| 52 |
+
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
| 53 |
+
}
|
| 54 |
+
MANUAL_INCHIKEY_NAME_FALLBACKS = {
|
| 55 |
+
# PubChem CID 131834464 exposes structure descriptors but no usable title.
|
| 56 |
+
# TCMSP molecule page for MOL000490 has the same InChIKey and names it petunidin.
|
| 57 |
+
"BLBZAMLPGFAHFX-UHFFFAOYSA-N": "petunidin",
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
@dataclass(frozen=True)
|
| 62 |
+
class StructureRow:
|
| 63 |
+
file_name: str
|
| 64 |
+
source: str
|
| 65 |
+
inchikey: str
|
| 66 |
+
pubchem_cid: int | None
|
| 67 |
+
cid_resolution: str
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
@dataclass(frozen=True)
|
| 71 |
+
class TcmspPageInfo:
|
| 72 |
+
molecule_name: str
|
| 73 |
+
pubchem_cid: int | None
|
| 74 |
+
inchikey: str
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def numeric_suffix(value: str, prefix: str) -> int:
|
| 78 |
+
return int(value.removeprefix(prefix))
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
def load_mol_id_labels() -> dict[str, dict[str, str]]:
|
| 82 |
+
rows: dict[str, dict[str, str]] = {}
|
| 83 |
+
with MOL_ID_LABELS_TSV.open(newline="", encoding="utf-8") as handle:
|
| 84 |
+
reader = csv.DictReader(handle, delimiter="\t")
|
| 85 |
+
for row in reader:
|
| 86 |
+
rows[row["mol_id"]] = row
|
| 87 |
+
return rows
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
def load_group_cid_map() -> dict[str, list[int]]:
|
| 91 |
+
mol_to_cids: dict[str, list[int]] = {}
|
| 92 |
+
with MOL_GROUPS_TSV.open(newline="", encoding="utf-8") as handle:
|
| 93 |
+
reader = csv.DictReader(handle, delimiter="\t")
|
| 94 |
+
for row in reader:
|
| 95 |
+
mol_ids = row["mol_ids"].split("|")
|
| 96 |
+
cid_values = [
|
| 97 |
+
numeric_suffix(mol_id, "CID_")
|
| 98 |
+
for mol_id in mol_ids
|
| 99 |
+
if mol_id.startswith("CID_")
|
| 100 |
+
]
|
| 101 |
+
if not cid_values:
|
| 102 |
+
continue
|
| 103 |
+
for mol_id in mol_ids:
|
| 104 |
+
if mol_id.startswith("MOL"):
|
| 105 |
+
mol_to_cids[mol_id] = cid_values
|
| 106 |
+
return mol_to_cids
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
def load_lookup_cid_map() -> dict[str, int]:
|
| 110 |
+
lookup: dict[str, int] = {}
|
| 111 |
+
for json_path in sorted(CID_LOOKUP_DIR.glob("MOL*.json")):
|
| 112 |
+
with json_path.open(encoding="utf-8") as handle:
|
| 113 |
+
payload = json.load(handle)
|
| 114 |
+
candidates = payload.get("cid_candidates") or []
|
| 115 |
+
if candidates and int(candidates[0]) > 0:
|
| 116 |
+
lookup[json_path.stem] = int(candidates[0])
|
| 117 |
+
return lookup
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
def load_drugbank_ids_by_inchikey() -> dict[str, list[str]]:
|
| 121 |
+
inchikey_to_dbids: dict[str, set[str]] = {}
|
| 122 |
+
with TCM_MKG_D14_TSV.open(newline="", encoding="utf-8") as handle:
|
| 123 |
+
reader = csv.DictReader(handle, delimiter="\t")
|
| 124 |
+
for row in reader:
|
| 125 |
+
if row["Source"] != "DrugBank":
|
| 126 |
+
continue
|
| 127 |
+
inchikey_to_dbids.setdefault(row["InChIKey"], set()).add(row["SourceID"])
|
| 128 |
+
return {
|
| 129 |
+
inchikey: sorted(dbids)
|
| 130 |
+
for inchikey, dbids in inchikey_to_dbids.items()
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
def load_drugbank_names() -> dict[str, str]:
|
| 135 |
+
csv.field_size_limit(sys.maxsize)
|
| 136 |
+
dbid_to_name: dict[str, str] = {}
|
| 137 |
+
with PHARMEBINET_NODES_TSV.open(newline="", encoding="utf-8") as handle:
|
| 138 |
+
reader = csv.DictReader(handle, delimiter="\t")
|
| 139 |
+
for row in reader:
|
| 140 |
+
match = DRUGBANK_URL_PATTERN.search(row["url"])
|
| 141 |
+
if not match:
|
| 142 |
+
continue
|
| 143 |
+
dbid = match.group(1)
|
| 144 |
+
name = row["name"].strip()
|
| 145 |
+
if name and dbid not in dbid_to_name:
|
| 146 |
+
dbid_to_name[dbid] = name
|
| 147 |
+
return dbid_to_name
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
def fetch_pubchem_name_batch(cids: list[int]) -> dict[int, str]:
|
| 151 |
+
cid_list = ",".join(str(cid) for cid in cids)
|
| 152 |
+
url = PUBCHEM_BATCH_URL.format(cid_list=cid_list)
|
| 153 |
+
request = Request(url, headers=PUBCHEM_HEADERS)
|
| 154 |
+
with urlopen(request, timeout=60) as response:
|
| 155 |
+
payload = json.load(response)
|
| 156 |
+
properties = payload.get("PropertyTable", {}).get("Properties", [])
|
| 157 |
+
names: dict[int, str] = {}
|
| 158 |
+
for prop in properties:
|
| 159 |
+
cid = int(prop["CID"])
|
| 160 |
+
names[cid] = (prop.get("Title") or prop.get("IUPACName") or "").strip()
|
| 161 |
+
return names
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
def fetch_pubchem_names(cids: Iterable[int]) -> dict[int, str]:
|
| 165 |
+
unique_cids = sorted({cid for cid in cids if cid is not None})
|
| 166 |
+
cid_to_name: dict[int, str] = {}
|
| 167 |
+
|
| 168 |
+
for start in range(0, len(unique_cids), PUBCHEM_BATCH_SIZE):
|
| 169 |
+
batch = unique_cids[start : start + PUBCHEM_BATCH_SIZE]
|
| 170 |
+
for attempt in range(3):
|
| 171 |
+
try:
|
| 172 |
+
cid_to_name.update(fetch_pubchem_name_batch(batch))
|
| 173 |
+
break
|
| 174 |
+
except (HTTPError, URLError, TimeoutError) as exc:
|
| 175 |
+
if attempt == 2:
|
| 176 |
+
for cid in batch:
|
| 177 |
+
try:
|
| 178 |
+
cid_to_name.update(fetch_pubchem_name_batch([cid]))
|
| 179 |
+
except (HTTPError, URLError, TimeoutError):
|
| 180 |
+
cid_to_name.setdefault(cid, "")
|
| 181 |
+
else:
|
| 182 |
+
time.sleep(2 ** attempt)
|
| 183 |
+
continue
|
| 184 |
+
time.sleep(0.1)
|
| 185 |
+
|
| 186 |
+
return cid_to_name
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
def clean_html_cell(value: str) -> str:
|
| 190 |
+
value = re.sub(r"<br\s*/?>", " ", value)
|
| 191 |
+
value = re.sub(r"<[^>]+>", " ", value)
|
| 192 |
+
value = html.unescape(value).replace("\xa0", " ")
|
| 193 |
+
return re.sub(r"\s+", " ", value).strip()
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
def load_tcmsp_cache() -> dict[str, dict[str, str | int | None]]:
|
| 197 |
+
if not TCMSP_PAGE_CACHE_JSON.exists():
|
| 198 |
+
return {}
|
| 199 |
+
return json.loads(TCMSP_PAGE_CACHE_JSON.read_text(encoding="utf-8"))
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
def save_tcmsp_cache(cache: dict[str, dict[str, str | int | None]]) -> None:
|
| 203 |
+
TCMSP_PAGE_CACHE_JSON.write_text(
|
| 204 |
+
json.dumps(cache, ensure_ascii=False, indent=2),
|
| 205 |
+
encoding="utf-8",
|
| 206 |
+
)
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
def fetch_tcmsp_page_info(mol_id: str) -> TcmspPageInfo:
|
| 210 |
+
qn = str(numeric_suffix(mol_id, "MOL"))
|
| 211 |
+
url = f"https://www.tcmsp-e.com/molecule.php?qn={qn}"
|
| 212 |
+
html_text = ""
|
| 213 |
+
for attempt in range(4):
|
| 214 |
+
try:
|
| 215 |
+
request = Request(url, headers=TCMSP_PAGE_HEADERS)
|
| 216 |
+
with urlopen(request, timeout=30) as response:
|
| 217 |
+
html_text = response.read().decode("utf-8", "ignore")
|
| 218 |
+
break
|
| 219 |
+
except (HTTPError, URLError, TimeoutError):
|
| 220 |
+
if attempt == 3:
|
| 221 |
+
return TcmspPageInfo(molecule_name="", pubchem_cid=None, inchikey="")
|
| 222 |
+
time.sleep(2 ** attempt)
|
| 223 |
+
|
| 224 |
+
fields: dict[str, str] = {}
|
| 225 |
+
for key, value in TCMSP_FIELD_PATTERN.findall(html_text):
|
| 226 |
+
fields[key.strip()] = clean_html_cell(value)
|
| 227 |
+
|
| 228 |
+
raw_cid = fields.get("Pubchem Cid", "").strip()
|
| 229 |
+
if raw_cid.isdigit() and int(raw_cid) > 0:
|
| 230 |
+
pubchem_cid = int(raw_cid)
|
| 231 |
+
else:
|
| 232 |
+
pubchem_cid = None
|
| 233 |
+
|
| 234 |
+
return TcmspPageInfo(
|
| 235 |
+
molecule_name=fields.get("Molecule name", "").strip(),
|
| 236 |
+
pubchem_cid=pubchem_cid,
|
| 237 |
+
inchikey=fields.get("InChIKey", "").strip(),
|
| 238 |
+
)
|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
def load_tcmsp_page_info(rows: list[StructureRow]) -> dict[str, TcmspPageInfo]:
|
| 242 |
+
needed_mol_ids = sorted(
|
| 243 |
+
row.file_name
|
| 244 |
+
for row in rows
|
| 245 |
+
if row.source == "tcmsp_mol2" and row.pubchem_cid is None
|
| 246 |
+
)
|
| 247 |
+
|
| 248 |
+
if not needed_mol_ids:
|
| 249 |
+
return {}
|
| 250 |
+
|
| 251 |
+
cache = load_tcmsp_cache()
|
| 252 |
+
updated = False
|
| 253 |
+
result: dict[str, TcmspPageInfo] = {}
|
| 254 |
+
|
| 255 |
+
for mol_id in needed_mol_ids:
|
| 256 |
+
cached = cache.get(mol_id)
|
| 257 |
+
if cached is None:
|
| 258 |
+
info = fetch_tcmsp_page_info(mol_id)
|
| 259 |
+
cache[mol_id] = {
|
| 260 |
+
"molecule_name": info.molecule_name,
|
| 261 |
+
"pubchem_cid": info.pubchem_cid,
|
| 262 |
+
"inchikey": info.inchikey,
|
| 263 |
+
}
|
| 264 |
+
updated = True
|
| 265 |
+
save_tcmsp_cache(cache)
|
| 266 |
+
time.sleep(0.05)
|
| 267 |
+
else:
|
| 268 |
+
info = TcmspPageInfo(
|
| 269 |
+
molecule_name=str(cached.get("molecule_name", "") or ""),
|
| 270 |
+
pubchem_cid=(
|
| 271 |
+
int(cached["pubchem_cid"])
|
| 272 |
+
if cached.get("pubchem_cid") not in (None, "")
|
| 273 |
+
else None
|
| 274 |
+
),
|
| 275 |
+
inchikey=str(cached.get("inchikey", "") or ""),
|
| 276 |
+
)
|
| 277 |
+
result[mol_id] = info
|
| 278 |
+
|
| 279 |
+
return result
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
def build_structure_rows(
|
| 283 |
+
labels: dict[str, dict[str, str]],
|
| 284 |
+
group_cids: dict[str, list[int]],
|
| 285 |
+
lookup_cids: dict[str, int],
|
| 286 |
+
) -> list[StructureRow]:
|
| 287 |
+
rows: list[StructureRow] = []
|
| 288 |
+
|
| 289 |
+
for path in sorted(
|
| 290 |
+
PUBCHEM_DIR.glob("CID_*.sdf"), key=lambda item: numeric_suffix(item.stem, "CID_")
|
| 291 |
+
):
|
| 292 |
+
mol_id = path.stem
|
| 293 |
+
label_row = labels[mol_id]
|
| 294 |
+
rows.append(
|
| 295 |
+
StructureRow(
|
| 296 |
+
file_name=mol_id,
|
| 297 |
+
source="pubchem_clean_sdf",
|
| 298 |
+
inchikey=label_row["compound_inchikey"],
|
| 299 |
+
pubchem_cid=numeric_suffix(mol_id, "CID_"),
|
| 300 |
+
cid_resolution="direct_cid",
|
| 301 |
+
)
|
| 302 |
+
)
|
| 303 |
+
|
| 304 |
+
for path in sorted(
|
| 305 |
+
TCMSP_DIR.glob("MOL*.mol2"), key=lambda item: numeric_suffix(item.stem, "MOL")
|
| 306 |
+
):
|
| 307 |
+
mol_id = path.stem
|
| 308 |
+
label_row = labels[mol_id]
|
| 309 |
+
resolved_cid: int | None = None
|
| 310 |
+
resolution = ""
|
| 311 |
+
|
| 312 |
+
lookup_cid = lookup_cids.get(mol_id)
|
| 313 |
+
group_cid_list = group_cids.get(mol_id, [])
|
| 314 |
+
if lookup_cid is not None:
|
| 315 |
+
resolved_cid = lookup_cid
|
| 316 |
+
resolution = "cid_lookup_cache"
|
| 317 |
+
elif group_cid_list:
|
| 318 |
+
resolved_cid = group_cid_list[0]
|
| 319 |
+
resolution = "group_table_fallback"
|
| 320 |
+
else:
|
| 321 |
+
resolution = "unresolved"
|
| 322 |
+
|
| 323 |
+
rows.append(
|
| 324 |
+
StructureRow(
|
| 325 |
+
file_name=mol_id,
|
| 326 |
+
source="tcmsp_mol2",
|
| 327 |
+
inchikey=label_row["compound_inchikey"],
|
| 328 |
+
pubchem_cid=resolved_cid,
|
| 329 |
+
cid_resolution=resolution,
|
| 330 |
+
)
|
| 331 |
+
)
|
| 332 |
+
|
| 333 |
+
return rows
|
| 334 |
+
|
| 335 |
+
|
| 336 |
+
def write_tsv(
|
| 337 |
+
rows: list[StructureRow],
|
| 338 |
+
pubchem_names: dict[int, str],
|
| 339 |
+
drugbank_ids_by_inchikey: dict[str, list[str]],
|
| 340 |
+
drugbank_names_by_id: dict[str, str],
|
| 341 |
+
tcmsp_page_info: dict[str, TcmspPageInfo],
|
| 342 |
+
) -> dict[str, int]:
|
| 343 |
+
pubchem_name_missing = 0
|
| 344 |
+
drugbank_hit_rows = 0
|
| 345 |
+
unresolved_drugbank_name_ids = 0
|
| 346 |
+
tcmsp_name_fallback_rows = 0
|
| 347 |
+
tcmsp_pubchem_cid_rows = 0
|
| 348 |
+
manual_inchikey_name_rows = 0
|
| 349 |
+
|
| 350 |
+
with OUTPUT_TSV.open("w", newline="", encoding="utf-8") as handle:
|
| 351 |
+
writer = csv.writer(handle, delimiter="\t")
|
| 352 |
+
writer.writerow(
|
| 353 |
+
["file_name", "compound_name", "drugbank_id", "drugbank_name"]
|
| 354 |
+
)
|
| 355 |
+
|
| 356 |
+
for row in rows:
|
| 357 |
+
page_info = tcmsp_page_info.get(row.file_name)
|
| 358 |
+
effective_pubchem_cid = row.pubchem_cid
|
| 359 |
+
if effective_pubchem_cid is None and page_info and page_info.pubchem_cid is not None:
|
| 360 |
+
effective_pubchem_cid = page_info.pubchem_cid
|
| 361 |
+
tcmsp_pubchem_cid_rows += 1
|
| 362 |
+
|
| 363 |
+
compound_name = (
|
| 364 |
+
pubchem_names.get(effective_pubchem_cid, "")
|
| 365 |
+
if effective_pubchem_cid is not None
|
| 366 |
+
else ""
|
| 367 |
+
)
|
| 368 |
+
if not compound_name and page_info and page_info.molecule_name:
|
| 369 |
+
compound_name = page_info.molecule_name
|
| 370 |
+
tcmsp_name_fallback_rows += 1
|
| 371 |
+
if not compound_name:
|
| 372 |
+
for candidate_inchikey in [
|
| 373 |
+
row.inchikey,
|
| 374 |
+
page_info.inchikey if page_info else "",
|
| 375 |
+
]:
|
| 376 |
+
fallback_name = MANUAL_INCHIKEY_NAME_FALLBACKS.get(candidate_inchikey, "")
|
| 377 |
+
if fallback_name:
|
| 378 |
+
compound_name = fallback_name
|
| 379 |
+
manual_inchikey_name_rows += 1
|
| 380 |
+
break
|
| 381 |
+
if not compound_name:
|
| 382 |
+
pubchem_name_missing += 1
|
| 383 |
+
|
| 384 |
+
candidate_inchikeys = {row.inchikey}
|
| 385 |
+
if page_info and page_info.inchikey:
|
| 386 |
+
candidate_inchikeys.add(page_info.inchikey)
|
| 387 |
+
|
| 388 |
+
raw_dbids = sorted(
|
| 389 |
+
{
|
| 390 |
+
dbid
|
| 391 |
+
for candidate_inchikey in candidate_inchikeys
|
| 392 |
+
for dbid in drugbank_ids_by_inchikey.get(candidate_inchikey, [])
|
| 393 |
+
}
|
| 394 |
+
)
|
| 395 |
+
resolved_pairs = []
|
| 396 |
+
for dbid in raw_dbids:
|
| 397 |
+
db_name = drugbank_names_by_id.get(dbid, "").strip()
|
| 398 |
+
if db_name:
|
| 399 |
+
resolved_pairs.append((dbid, db_name))
|
| 400 |
+
else:
|
| 401 |
+
unresolved_drugbank_name_ids += 1
|
| 402 |
+
|
| 403 |
+
if resolved_pairs:
|
| 404 |
+
drugbank_hit_rows += 1
|
| 405 |
+
|
| 406 |
+
writer.writerow(
|
| 407 |
+
[
|
| 408 |
+
row.file_name,
|
| 409 |
+
compound_name,
|
| 410 |
+
"|".join(dbid for dbid, _ in resolved_pairs),
|
| 411 |
+
"|".join(db_name for _, db_name in resolved_pairs),
|
| 412 |
+
]
|
| 413 |
+
)
|
| 414 |
+
|
| 415 |
+
return {
|
| 416 |
+
"pubchem_name_missing": pubchem_name_missing,
|
| 417 |
+
"drugbank_hit_rows": drugbank_hit_rows,
|
| 418 |
+
"unresolved_drugbank_name_ids": unresolved_drugbank_name_ids,
|
| 419 |
+
"tcmsp_name_fallback_rows": tcmsp_name_fallback_rows,
|
| 420 |
+
"tcmsp_pubchem_cid_rows": tcmsp_pubchem_cid_rows,
|
| 421 |
+
"manual_inchikey_name_rows": manual_inchikey_name_rows,
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
|
| 425 |
+
def write_md(
|
| 426 |
+
rows: list[StructureRow],
|
| 427 |
+
stats: dict[str, int],
|
| 428 |
+
pubchem_names: dict[int, str],
|
| 429 |
+
drugbank_ids_by_inchikey: dict[str, list[str]],
|
| 430 |
+
drugbank_names_by_id: dict[str, str],
|
| 431 |
+
tcmsp_page_info: dict[str, TcmspPageInfo],
|
| 432 |
+
) -> None:
|
| 433 |
+
total_rows = len(rows)
|
| 434 |
+
pubchem_rows = sum(row.source == "pubchem_clean_sdf" for row in rows)
|
| 435 |
+
tcmsp_rows = sum(row.source == "tcmsp_mol2" for row in rows)
|
| 436 |
+
direct_cid_rows = sum(row.cid_resolution == "direct_cid" for row in rows)
|
| 437 |
+
lookup_rows = sum(row.cid_resolution == "cid_lookup_cache" for row in rows)
|
| 438 |
+
fallback_rows = sum(row.cid_resolution == "group_table_fallback" for row in rows)
|
| 439 |
+
unresolved_cid_rows = sum(row.cid_resolution == "unresolved" for row in rows)
|
| 440 |
+
unique_pubchem_cids = len(
|
| 441 |
+
{
|
| 442 |
+
(
|
| 443 |
+
row.pubchem_cid
|
| 444 |
+
if row.pubchem_cid is not None
|
| 445 |
+
else tcmsp_page_info.get(row.file_name).pubchem_cid
|
| 446 |
+
if tcmsp_page_info.get(row.file_name) is not None
|
| 447 |
+
else None
|
| 448 |
+
)
|
| 449 |
+
for row in rows
|
| 450 |
+
}
|
| 451 |
+
- {None}
|
| 452 |
+
)
|
| 453 |
+
unique_drugbank_ids = len(
|
| 454 |
+
{
|
| 455 |
+
dbid
|
| 456 |
+
for row in rows
|
| 457 |
+
for candidate_inchikey in (
|
| 458 |
+
{row.inchikey}
|
| 459 |
+
| (
|
| 460 |
+
{tcmsp_page_info[row.file_name].inchikey}
|
| 461 |
+
if row.file_name in tcmsp_page_info and tcmsp_page_info[row.file_name].inchikey
|
| 462 |
+
else set()
|
| 463 |
+
)
|
| 464 |
+
)
|
| 465 |
+
for dbid in drugbank_ids_by_inchikey.get(candidate_inchikey, [])
|
| 466 |
+
if dbid in drugbank_names_by_id
|
| 467 |
+
}
|
| 468 |
+
)
|
| 469 |
+
generated_at = datetime.now().astimezone().isoformat(timespec="seconds")
|
| 470 |
+
|
| 471 |
+
unresolved_examples = [
|
| 472 |
+
row.file_name for row in rows if row.cid_resolution == "unresolved"
|
| 473 |
+
][:10]
|
| 474 |
+
unresolved_example_text = "、".join(unresolved_examples) if unresolved_examples else "无"
|
| 475 |
+
|
| 476 |
+
md = f"""# QQCM COM 化合物 PubChem / DrugBank 映射说明
|
| 477 |
+
|
| 478 |
+
## 输出文件
|
| 479 |
+
|
| 480 |
+
- 映射表:`{OUTPUT_TSV}`
|
| 481 |
+
- 说明文件:`{OUTPUT_MD}`
|
| 482 |
+
|
| 483 |
+
## 列说明
|
| 484 |
+
|
| 485 |
+
- `file_name`:结构文件名,已去掉后缀。
|
| 486 |
+
- `compound_name`:PubChem 化合物名称。优先使用 `Title`,若缺失则回退到 `IUPACName`。
|
| 487 |
+
- `drugbank_id`:按 `InChIKey` 映射到的 DrugBank ID。若同一结构对应多个 DrugBank 条目,则用 `|` 连接。
|
| 488 |
+
- `drugbank_name`:DrugBank 药物名称,与 `drugbank_id` 按位置一一对应;多值时同样用 `|` 连接。
|
| 489 |
+
|
| 490 |
+
## 生成方法
|
| 491 |
+
|
| 492 |
+
1. 从 `{PUBCHEM_DIR}` 与 `{TCMSP_DIR}` 枚举全部结构文件。
|
| 493 |
+
2. 用 `{MOL_ID_LABELS_TSV}` 获取每个文件对应的 `InChIKey`。
|
| 494 |
+
3. 对 `CID_xxx` 文件直接使用文件名中的 PubChem CID。
|
| 495 |
+
4. 对 `MOLxxxxxx` 文件优先使用 `{CID_LOOKUP_DIR}` 中的 CID 缓存;若缺失,则回退到 `{MOL_GROUPS_TSV}` 中同组的 PubChem CID。
|
| 496 |
+
5. 对仍未落到有效 PubChem CID 的 `MOL` 条目,访问 TCMSP 分子页 `https://www.tcmsp-e.com/molecule.php?qn=<数字编号>`,补取 `Molecule name`、`Pubchem Cid`、`InChIKey`。
|
| 497 |
+
6. 通过 PubChem PUG REST `property/Title,IUPACName` 批量获取化合物名称。
|
| 498 |
+
7. 若 PubChem 仍无名称,则使用 TCMSP 页面的 `Molecule name` 作为回退名称。
|
| 499 |
+
8. 用 `{TCM_MKG_D14_TSV}` 获取 `InChIKey -> DrugBank ID`。
|
| 500 |
+
9. 用 `{PHARMEBINET_NODES_TSV}` 中带 `/drugs/DBxxxxx` URL 的 DrugBank 化学节点解析 `DrugBank ID -> DrugBank 药物名`。
|
| 501 |
+
|
| 502 |
+
## 统计
|
| 503 |
+
|
| 504 |
+
- 生成时间:`{generated_at}`
|
| 505 |
+
- 总行数:`{total_rows}`
|
| 506 |
+
- `pubchem_clean_sdf` 文件数:`{pubchem_rows}`
|
| 507 |
+
- `tcmsp_mol2` 文件数:`{tcmsp_rows}`
|
| 508 |
+
- 直接使用文件名 CID 的行数:`{direct_cid_rows}`
|
| 509 |
+
- 使用 `cid_lookup` 缓存解析的 `MOL` 行数:`{lookup_rows}`
|
| 510 |
+
- 使用分组表回退解析的 `MOL` 行数:`{fallback_rows}`
|
| 511 |
+
- 仍未解析出 PubChem CID 的行数:`{unresolved_cid_rows}`
|
| 512 |
+
- 实际请求的唯一 PubChem CID 数:`{unique_pubchem_cids}`
|
| 513 |
+
- 使用 TCMSP 页面补到 PubChem CID 的行数:`{stats["tcmsp_pubchem_cid_rows"]}`
|
| 514 |
+
- 使用 TCMSP `Molecule name` 回退填名的行数:`{stats["tcmsp_name_fallback_rows"]}`
|
| 515 |
+
- 使用同 InChIKey 人工兜底名称的行数:`{stats["manual_inchikey_name_rows"]}`
|
| 516 |
+
- PubChem 名称缺失行数:`{stats["pubchem_name_missing"]}`
|
| 517 |
+
- 含有 DrugBank 映射的行数:`{stats["drugbank_hit_rows"]}`
|
| 518 |
+
- 写入的唯一 DrugBank ID 数:`{unique_drugbank_ids}`
|
| 519 |
+
- 已知 DrugBank ID 但未在 PharmaBiNet 节点中解析出药物名的次数:`{stats["unresolved_drugbank_name_ids"]}`
|
| 520 |
+
|
| 521 |
+
## 备注
|
| 522 |
+
|
| 523 |
+
- 本次只在存在映射时填写 `drugbank_id` / `drugbank_name`,没有映射则留空。
|
| 524 |
+
- 对于本地 `cid_lookup` 返回 `0` 的条目,本次按“未映射到有效 PubChem CID”处理,不再当作真实 CID 使用。
|
| 525 |
+
- 对于 PubChem 没有可用名称、但 TCMSP 页面可用的 `MOL` 条目,本次使用 TCMSP 的 `Molecule name` 作为回退名称。
|
| 526 |
+
- `BLBZAMLPGFAHFX-UHFFFAOYSA-N` 这条 PubChem 记录仅公开了结构描述,未给出正式标题;本次依据同 InChIKey 的 TCMSP 分子页名称回退为 `petunidin`。
|
| 527 |
+
- 未解析到有效 PubChem CID 的示例:`{unresolved_example_text}`
|
| 528 |
+
- 若后续需要复现,可直接运行:
|
| 529 |
+
|
| 530 |
+
```bash
|
| 531 |
+
python3 {COM_DIR / "build_pubchem_drugbank_mapping.py"}
|
| 532 |
+
```
|
| 533 |
+
"""
|
| 534 |
+
|
| 535 |
+
OUTPUT_MD.write_text(md, encoding="utf-8")
|
| 536 |
+
|
| 537 |
+
|
| 538 |
+
def main() -> None:
|
| 539 |
+
labels = load_mol_id_labels()
|
| 540 |
+
group_cids = load_group_cid_map()
|
| 541 |
+
lookup_cids = load_lookup_cid_map()
|
| 542 |
+
rows = build_structure_rows(labels, group_cids, lookup_cids)
|
| 543 |
+
tcmsp_page_info = load_tcmsp_page_info(rows)
|
| 544 |
+
|
| 545 |
+
pubchem_names = fetch_pubchem_names(
|
| 546 |
+
(
|
| 547 |
+
row.pubchem_cid
|
| 548 |
+
if row.pubchem_cid is not None
|
| 549 |
+
else tcmsp_page_info.get(row.file_name).pubchem_cid
|
| 550 |
+
if tcmsp_page_info.get(row.file_name) is not None
|
| 551 |
+
else None
|
| 552 |
+
)
|
| 553 |
+
for row in rows
|
| 554 |
+
)
|
| 555 |
+
drugbank_ids_by_inchikey = load_drugbank_ids_by_inchikey()
|
| 556 |
+
drugbank_names_by_id = load_drugbank_names()
|
| 557 |
+
|
| 558 |
+
stats = write_tsv(
|
| 559 |
+
rows,
|
| 560 |
+
pubchem_names,
|
| 561 |
+
drugbank_ids_by_inchikey,
|
| 562 |
+
drugbank_names_by_id,
|
| 563 |
+
tcmsp_page_info,
|
| 564 |
+
)
|
| 565 |
+
write_md(
|
| 566 |
+
rows,
|
| 567 |
+
stats,
|
| 568 |
+
pubchem_names,
|
| 569 |
+
drugbank_ids_by_inchikey,
|
| 570 |
+
drugbank_names_by_id,
|
| 571 |
+
tcmsp_page_info,
|
| 572 |
+
)
|
| 573 |
+
|
| 574 |
+
print(f"Wrote mapping table: {OUTPUT_TSV}")
|
| 575 |
+
print(f"Wrote explanation: {OUTPUT_MD}")
|
| 576 |
+
print(f"Total rows: {len(rows)}")
|
| 577 |
+
print(f"PubChem names fetched: {sum(1 for value in pubchem_names.values() if value)}")
|
| 578 |
+
print(f"DrugBank names available: {len(drugbank_names_by_id)}")
|
| 579 |
+
|
| 580 |
+
|
| 581 |
+
if __name__ == "__main__":
|
| 582 |
+
main()
|
COM/calc_morgan_similarity.py
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
# -*- coding: utf-8 -*-
|
| 3 |
+
# 这个脚本负责根据 `compound_smiles.csv` 重算化学结构相似度矩阵。
|
| 4 |
+
# 主流程是:
|
| 5 |
+
# 1. 逐个读取化合物的 SMILES;
|
| 6 |
+
# 2. 优先从 SMILES 构建分子,失败时回退到本地 sdf / mol2;
|
| 7 |
+
# 3. 对分子做“软标准化”;
|
| 8 |
+
# 4. 生成 Morgan 指纹;
|
| 9 |
+
# 5. 计算全量 Tanimoto 相似度矩阵并导出。
|
| 10 |
+
|
| 11 |
+
from __future__ import annotations
|
| 12 |
+
|
| 13 |
+
# argparse 用来解析命令行参数。
|
| 14 |
+
import argparse
|
| 15 |
+
# csv 用来读取输入表。
|
| 16 |
+
import csv
|
| 17 |
+
# Path 用统一方式处理路径。
|
| 18 |
+
from pathlib import Path
|
| 19 |
+
|
| 20 |
+
# numpy / pandas 用来承载和导出相似度矩阵。
|
| 21 |
+
import numpy as np
|
| 22 |
+
import pandas as pd
|
| 23 |
+
# RDKit 用来解析结构、做软标准化,并计算指纹与相似度。
|
| 24 |
+
from rdkit import Chem, DataStructs
|
| 25 |
+
from rdkit.Chem import AllChem
|
| 26 |
+
from rdkit.Chem import SaltRemover
|
| 27 |
+
from rdkit.Chem.MolStandardize import rdMolStandardize
|
| 28 |
+
from rdkit.Chem.rdmolops import RemoveHs
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
# 本地 PubChem 清洗后 sdf 目录。
|
| 32 |
+
SDF_DIR = Path("/mnt/disk1/yanganqi/QQCM/COM/pubchem_clean_sdf")
|
| 33 |
+
# 本地 TCMSP mol2 目录。
|
| 34 |
+
MOL2_DIR = Path("/mnt/disk1/yanganqi/QQCM/COM/tcmsp_mol2")
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def standardize_mol_soft(mol: Chem.Mol | None) -> Chem.Mol | None:
|
| 38 |
+
# None 直接返回,方便调用端串联多个回退步骤。
|
| 39 |
+
if mol is None:
|
| 40 |
+
return None
|
| 41 |
+
try:
|
| 42 |
+
# 尽量去掉盐和反离子,但保留“不要把整个分子删空”的保护。
|
| 43 |
+
remover = SaltRemover.SaltRemover()
|
| 44 |
+
mol = remover.StripMol(mol, dontRemoveEverything=True)
|
| 45 |
+
except Exception:
|
| 46 |
+
pass
|
| 47 |
+
try:
|
| 48 |
+
# Cleanup 会尽量统一一些常见结构表达。
|
| 49 |
+
mol = rdMolStandardize.Cleanup(mol)
|
| 50 |
+
except Exception:
|
| 51 |
+
pass
|
| 52 |
+
try:
|
| 53 |
+
# 指纹计算前去掉显式氢,减少表达差异。
|
| 54 |
+
mol = RemoveHs(mol)
|
| 55 |
+
except Exception:
|
| 56 |
+
pass
|
| 57 |
+
# 返回尽力标准化后的分子对象。
|
| 58 |
+
return mol
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
def load_from_structure(file_name: str) -> Chem.Mol | None:
|
| 62 |
+
# 根据扩展名决定去 sdf 目录还是 mol2 目录找原始结构文件。
|
| 63 |
+
path = SDF_DIR / file_name if file_name.lower().endswith(".sdf") else MOL2_DIR / file_name
|
| 64 |
+
# 本地没有这个结构文件时直接返回空。
|
| 65 |
+
if not path.exists():
|
| 66 |
+
return None
|
| 67 |
+
try:
|
| 68 |
+
# sdf 和 mol2 分别走各自的 RDKit 读取入口。
|
| 69 |
+
if file_name.lower().endswith(".sdf"):
|
| 70 |
+
supplier = Chem.SDMolSupplier(str(path), sanitize=False, removeHs=False)
|
| 71 |
+
mol = supplier[0] if supplier and len(supplier) > 0 else None
|
| 72 |
+
else:
|
| 73 |
+
mol = Chem.MolFromMol2File(
|
| 74 |
+
str(path),
|
| 75 |
+
sanitize=False,
|
| 76 |
+
removeHs=False,
|
| 77 |
+
cleanupSubstructures=False,
|
| 78 |
+
)
|
| 79 |
+
except Exception:
|
| 80 |
+
# 结构文件损坏或 RDKit 读取失败时,让调用端继续按“缺失结构”处理。
|
| 81 |
+
return None
|
| 82 |
+
# 读出来的结构和直接从 SMILES 构建出的结构统一走同一套软标准化。
|
| 83 |
+
return standardize_mol_soft(mol)
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
def parse_args() -> argparse.Namespace:
|
| 87 |
+
# 定义命令行参数,支持切换输入表、输出路径和 Morgan 配置。
|
| 88 |
+
parser = argparse.ArgumentParser(
|
| 89 |
+
description="Recalculate Morgan/Tanimoto chemical similarity matrix from compound_smiles.csv."
|
| 90 |
+
)
|
| 91 |
+
parser.add_argument(
|
| 92 |
+
"--smiles-csv",
|
| 93 |
+
type=Path,
|
| 94 |
+
default=Path("/mnt/disk1/yanganqi/QQCM/COM/compound_smiles.csv"),
|
| 95 |
+
)
|
| 96 |
+
parser.add_argument(
|
| 97 |
+
"--output",
|
| 98 |
+
type=Path,
|
| 99 |
+
default=Path("/mnt/disk1/yanganqi/QQCM/COM/chemical_structure_similarity_morgan.csv"),
|
| 100 |
+
)
|
| 101 |
+
parser.add_argument("--radius", type=int, default=2)
|
| 102 |
+
parser.add_argument("--nbits", type=int, default=2048)
|
| 103 |
+
# 返回解析后的参数对象。
|
| 104 |
+
return parser.parse_args()
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
def main() -> None:
|
| 108 |
+
# 先读取命令行参数。
|
| 109 |
+
args = parse_args()
|
| 110 |
+
|
| 111 |
+
# ids 保存最终成功入矩阵的化合物 ID 顺序。
|
| 112 |
+
ids: list[str] = []
|
| 113 |
+
# mols 保存对应的 RDKit 分子对象。
|
| 114 |
+
mols: list[Chem.Mol] = []
|
| 115 |
+
# failed_rows 记录哪些输入行最终没能构出有效分子。
|
| 116 |
+
failed_rows: list[str] = []
|
| 117 |
+
|
| 118 |
+
print("Loading compounds from compound_smiles.csv ...")
|
| 119 |
+
with args.smiles_csv.open("r", encoding="utf-8") as handle:
|
| 120 |
+
reader = csv.DictReader(handle)
|
| 121 |
+
for row in reader:
|
| 122 |
+
# file_name 既用于回退找结构文件,也用于确定最终 compound_id。
|
| 123 |
+
file_name = row["file_name"]
|
| 124 |
+
# smiles 是首选结构来源。
|
| 125 |
+
smiles = row["smiles"]
|
| 126 |
+
# 先直接从 SMILES 构分子。
|
| 127 |
+
mol = Chem.MolFromSmiles(smiles)
|
| 128 |
+
mol = standardize_mol_soft(mol)
|
| 129 |
+
# 如果 SMILES 不可用,再回退到本地结构文件。
|
| 130 |
+
if mol is None:
|
| 131 |
+
mol = load_from_structure(file_name)
|
| 132 |
+
# 结构仍然不可用时,记入失败列表并跳过。
|
| 133 |
+
if mol is None:
|
| 134 |
+
failed_rows.append(file_name)
|
| 135 |
+
continue
|
| 136 |
+
# 矩阵行列名统一取文件 stem,例如 `CID_72.sdf` -> `CID_72`。
|
| 137 |
+
ids.append(Path(file_name).stem)
|
| 138 |
+
mols.append(mol)
|
| 139 |
+
|
| 140 |
+
print(f"Loaded molecules: {len(mols)}")
|
| 141 |
+
if failed_rows:
|
| 142 |
+
print(f"Failed to rebuild molecules from smiles: {len(failed_rows)}")
|
| 143 |
+
print("Examples:", failed_rows[:10])
|
| 144 |
+
|
| 145 |
+
print("Generating Morgan fingerprints ...")
|
| 146 |
+
# 对每个分子生成固定长度的 Morgan bit 指纹。
|
| 147 |
+
fps = [
|
| 148 |
+
AllChem.GetMorganFingerprintAsBitVect(
|
| 149 |
+
mol,
|
| 150 |
+
radius=args.radius,
|
| 151 |
+
nBits=args.nbits,
|
| 152 |
+
useChirality=False,
|
| 153 |
+
)
|
| 154 |
+
for mol in mols
|
| 155 |
+
]
|
| 156 |
+
|
| 157 |
+
print("Calculating Tanimoto similarity matrix ...")
|
| 158 |
+
# n 是成功进入矩阵的分子数量。
|
| 159 |
+
n = len(fps)
|
| 160 |
+
# 先初始化一个 n x n 的浮点矩阵。
|
| 161 |
+
sim_matrix = np.zeros((n, n), dtype=np.float32)
|
| 162 |
+
for i in range(n):
|
| 163 |
+
# RDKit 的 BulkTanimotoSimilarity 一次返回“第 i 个分子 vs 全部”的相似度。
|
| 164 |
+
sim_matrix[i, :] = DataStructs.BulkTanimotoSimilarity(fps[i], fps)
|
| 165 |
+
|
| 166 |
+
# 包装成 DataFrame,行列名都使用相同 compound_id 顺序。
|
| 167 |
+
df = pd.DataFrame(sim_matrix, index=ids, columns=ids)
|
| 168 |
+
df.to_csv(args.output, encoding="utf-8-sig")
|
| 169 |
+
|
| 170 |
+
print("Done.")
|
| 171 |
+
print(f"Output: {args.output}")
|
| 172 |
+
print(f"Matrix shape: {df.shape}")
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
if __name__ == "__main__":
|
| 176 |
+
main()
|
COM/compound_inchikey.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
COM/compound_smiles.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
COM/inchikey.py
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import os
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
import pandas as pd
|
| 10 |
+
from rdkit import Chem
|
| 11 |
+
from tqdm import tqdm
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
SDF_DIR = Path("/mnt/disk1/yanganqi/QQCM/COM/pubchem_clean_sdf")
|
| 15 |
+
MOL2_DIR = Path("/mnt/disk1/yanganqi/QQCM/COM/tcmsp_mol2")
|
| 16 |
+
ALT_SDF_ROOT = Path("/mnt/disk1/yanganqi/QQCM/清窍聪明汤结构-mol2-sdf")
|
| 17 |
+
OUT_CSV = Path("/mnt/disk1/yanganqi/QQCM/COM/compound_inchikey.csv")
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def sdf_to_inchikey(file_path: Path) -> str | None:
|
| 21 |
+
try:
|
| 22 |
+
supplier = Chem.SDMolSupplier(str(file_path))
|
| 23 |
+
mol = supplier[0] if supplier and len(supplier) > 0 else None
|
| 24 |
+
if mol is not None:
|
| 25 |
+
return Chem.MolToInchiKey(mol)
|
| 26 |
+
except Exception:
|
| 27 |
+
return None
|
| 28 |
+
return None
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def mol2_to_inchikey(file_path: Path) -> str | None:
|
| 32 |
+
try:
|
| 33 |
+
mol = Chem.MolFromMol2File(str(file_path))
|
| 34 |
+
if mol is not None:
|
| 35 |
+
return Chem.MolToInchiKey(mol)
|
| 36 |
+
except Exception:
|
| 37 |
+
pass
|
| 38 |
+
try:
|
| 39 |
+
mol = Chem.MolFromMol2File(
|
| 40 |
+
str(file_path),
|
| 41 |
+
sanitize=False,
|
| 42 |
+
removeHs=False,
|
| 43 |
+
cleanupSubstructures=False,
|
| 44 |
+
)
|
| 45 |
+
if mol is not None:
|
| 46 |
+
return Chem.MolToInchiKey(mol)
|
| 47 |
+
except Exception:
|
| 48 |
+
return None
|
| 49 |
+
return None
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def build_alt_sdf_lookup(root: Path) -> dict[str, Path]:
|
| 53 |
+
lookup: dict[str, Path] = {}
|
| 54 |
+
for path in root.rglob("*.sdf"):
|
| 55 |
+
lookup.setdefault(path.stem, path)
|
| 56 |
+
return lookup
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
def main() -> None:
|
| 60 |
+
results: list[dict[str, str | None]] = []
|
| 61 |
+
alt_sdf_lookup = build_alt_sdf_lookup(ALT_SDF_ROOT)
|
| 62 |
+
|
| 63 |
+
print("=== Processing SDF files ===")
|
| 64 |
+
sdf_files = sorted(f for f in os.listdir(SDF_DIR) if f.endswith(".sdf"))
|
| 65 |
+
for filename in tqdm(sdf_files):
|
| 66 |
+
path = SDF_DIR / filename
|
| 67 |
+
inchikey = sdf_to_inchikey(path)
|
| 68 |
+
results.append(
|
| 69 |
+
{
|
| 70 |
+
"file_name": filename,
|
| 71 |
+
"source": "pubchem_sdf",
|
| 72 |
+
"parse_source": "pubchem_sdf",
|
| 73 |
+
"fallback_path": "",
|
| 74 |
+
"inchikey": inchikey,
|
| 75 |
+
}
|
| 76 |
+
)
|
| 77 |
+
|
| 78 |
+
print("=== Processing MOL2 files ===")
|
| 79 |
+
mol2_files = sorted(f for f in os.listdir(MOL2_DIR) if f.endswith(".mol2"))
|
| 80 |
+
for filename in tqdm(mol2_files):
|
| 81 |
+
path = MOL2_DIR / filename
|
| 82 |
+
stem = path.stem
|
| 83 |
+
|
| 84 |
+
inchikey = mol2_to_inchikey(path)
|
| 85 |
+
parse_source = "tcmsp_mol2"
|
| 86 |
+
fallback_path = ""
|
| 87 |
+
|
| 88 |
+
if inchikey is None and stem in alt_sdf_lookup:
|
| 89 |
+
fallback = alt_sdf_lookup[stem]
|
| 90 |
+
inchikey = sdf_to_inchikey(fallback)
|
| 91 |
+
if inchikey is not None:
|
| 92 |
+
parse_source = "fallback_sdf"
|
| 93 |
+
fallback_path = str(fallback)
|
| 94 |
+
|
| 95 |
+
results.append(
|
| 96 |
+
{
|
| 97 |
+
"file_name": filename,
|
| 98 |
+
"source": "tcmsp_mol2",
|
| 99 |
+
"parse_source": parse_source,
|
| 100 |
+
"fallback_path": fallback_path,
|
| 101 |
+
"inchikey": inchikey,
|
| 102 |
+
}
|
| 103 |
+
)
|
| 104 |
+
|
| 105 |
+
df = pd.DataFrame(results)
|
| 106 |
+
df["status"] = df["inchikey"].apply(lambda value: "success" if pd.notna(value) else "fail")
|
| 107 |
+
df_clean = df.dropna(subset=["inchikey"]).copy()
|
| 108 |
+
OUT_CSV.parent.mkdir(parents=True, exist_ok=True)
|
| 109 |
+
df_clean.to_csv(OUT_CSV, index=False)
|
| 110 |
+
|
| 111 |
+
print("=== Done ===")
|
| 112 |
+
print(f"Total: {len(df)}")
|
| 113 |
+
print(f"Success: {len(df_clean)}")
|
| 114 |
+
print(f"Failed: {len(df) - len(df_clean)}")
|
| 115 |
+
print(f"Saved to: {OUT_CSV}")
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
if __name__ == "__main__":
|
| 119 |
+
main()
|
COM/pubchem_clean_sdf/CID_10537120.sdf
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
10537120
|
| 2 |
+
-OEChem-12172502523D
|
| 3 |
+
|
| 4 |
+
36 36 0 1 0 0 0 0 0999 V2000
|
| 5 |
+
-0.2656 0.7790 1.8245 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 6 |
+
3.4818 -1.2066 -1.5650 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 7 |
+
-4.0005 -1.4150 -0.6242 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 8 |
+
1.3072 1.2640 0.0224 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 9 |
+
0.2216 0.2668 0.5763 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 10 |
+
2.0003 0.6427 -1.2079 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
0.7995 -1.1343 0.7799 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 12 |
+
2.3822 1.5941 1.0949 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
0.6869 2.6196 -0.3924 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
-0.9830 0.1679 -0.3277 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
2.5353 -0.7448 -0.9289 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
1.8635 -1.5834 0.0931 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
0.1084 -2.0416 1.7657 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
-2.2348 -0.0223 0.1141 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
-3.4298 -0.1194 -0.7876 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 20 |
+
-4.4730 0.9332 -0.4371 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
2.8455 1.2712 -1.5158 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
1.3223 0.5700 -2.0655 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
1.9416 2.1185 1.9504 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
2.8783 0.6985 1.4810 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
3.1614 2.2456 0.6821 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
1.4623 3.3027 -0.7602 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
-0.0432 2.5120 -1.2009 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
0.1922 3.1187 0.4471 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
-0.8212 0.2041 -1.4021 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
2.2586 -2.5832 0.2394 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
-0.6831 1.6433 1.6737 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
0.1212 -1.6026 2.7684 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 33 |
+
0.5992 -3.0187 1.8360 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 34 |
+
-0.9297 -2.2232 1.4738 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
-2.4345 -0.1118 1.1791 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
-3.1467 -0.0165 -1.8406 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
-4.8229 0.8227 0.5959 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
-5.3545 0.8209 -1.0779 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 39 |
+
-4.0775 1.9461 -0.5641 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 40 |
+
-4.3205 -1.4943 0.2909 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 41 |
+
1 5 1 0 0 0 0
|
| 42 |
+
1 27 1 0 0 0 0
|
| 43 |
+
2 11 2 0 0 0 0
|
| 44 |
+
3 15 1 0 0 0 0
|
| 45 |
+
3 36 1 0 0 0 0
|
| 46 |
+
4 5 1 0 0 0 0
|
| 47 |
+
4 6 1 0 0 0 0
|
| 48 |
+
4 8 1 0 0 0 0
|
| 49 |
+
4 9 1 0 0 0 0
|
| 50 |
+
5 7 1 0 0 0 0
|
| 51 |
+
5 10 1 0 0 0 0
|
| 52 |
+
6 11 1 0 0 0 0
|
| 53 |
+
6 17 1 0 0 0 0
|
| 54 |
+
6 18 1 0 0 0 0
|
| 55 |
+
7 12 2 0 0 0 0
|
| 56 |
+
7 13 1 0 0 0 0
|
| 57 |
+
8 19 1 0 0 0 0
|
| 58 |
+
8 20 1 0 0 0 0
|
| 59 |
+
8 21 1 0 0 0 0
|
| 60 |
+
9 22 1 0 0 0 0
|
| 61 |
+
9 23 1 0 0 0 0
|
| 62 |
+
9 24 1 0 0 0 0
|
| 63 |
+
10 14 2 0 0 0 0
|
| 64 |
+
10 25 1 0 0 0 0
|
| 65 |
+
11 12 1 0 0 0 0
|
| 66 |
+
12 26 1 0 0 0 0
|
| 67 |
+
13 28 1 0 0 0 0
|
| 68 |
+
13 29 1 0 0 0 0
|
| 69 |
+
13 30 1 0 0 0 0
|
| 70 |
+
14 15 1 0 0 0 0
|
| 71 |
+
14 31 1 0 0 0 0
|
| 72 |
+
15 16 1 0 0 0 0
|
| 73 |
+
15 32 1 0 0 0 0
|
| 74 |
+
16 33 1 0 0 0 0
|
| 75 |
+
16 34 1 0 0 0 0
|
| 76 |
+
16 35 1 0 0 0 0
|
| 77 |
+
M END
|
| 78 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 79 |
+
10537120
|
| 80 |
+
|
| 81 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 82 |
+
0.6
|
| 83 |
+
|
| 84 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 85 |
+
4
|
| 86 |
+
5
|
| 87 |
+
2
|
| 88 |
+
3
|
| 89 |
+
11
|
| 90 |
+
14
|
| 91 |
+
1
|
| 92 |
+
6
|
| 93 |
+
7
|
| 94 |
+
12
|
| 95 |
+
9
|
| 96 |
+
10
|
| 97 |
+
13
|
| 98 |
+
8
|
| 99 |
+
|
| 100 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 101 |
+
17
|
| 102 |
+
1 -0.68
|
| 103 |
+
10 -0.29
|
| 104 |
+
11 0.49
|
| 105 |
+
12 -0.14
|
| 106 |
+
13 0.14
|
| 107 |
+
14 -0.29
|
| 108 |
+
15 0.42
|
| 109 |
+
2 -0.57
|
| 110 |
+
25 0.15
|
| 111 |
+
26 0.15
|
| 112 |
+
27 0.4
|
| 113 |
+
3 -0.68
|
| 114 |
+
31 0.15
|
| 115 |
+
36 0.4
|
| 116 |
+
5 0.56
|
| 117 |
+
6 0.06
|
| 118 |
+
7 -0.28
|
| 119 |
+
|
| 120 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 121 |
+
2.6
|
| 122 |
+
|
| 123 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 124 |
+
7
|
| 125 |
+
1 1 acceptor
|
| 126 |
+
1 1 donor
|
| 127 |
+
1 2 acceptor
|
| 128 |
+
1 3 acceptor
|
| 129 |
+
1 3 donor
|
| 130 |
+
3 4 8 9 hydrophobe
|
| 131 |
+
6 4 5 6 7 11 12 rings
|
| 132 |
+
|
| 133 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 134 |
+
16
|
| 135 |
+
|
| 136 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 137 |
+
2
|
| 138 |
+
|
| 139 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 140 |
+
0
|
| 141 |
+
|
| 142 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 143 |
+
1
|
| 144 |
+
|
| 145 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 146 |
+
0
|
| 147 |
+
|
| 148 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 149 |
+
0
|
| 150 |
+
|
| 151 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 152 |
+
1
|
| 153 |
+
|
| 154 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 155 |
+
5
|
| 156 |
+
|
| 157 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 158 |
+
00A0C8A000000004
|
| 159 |
+
|
| 160 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 161 |
+
36.1226
|
| 162 |
+
|
| 163 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 164 |
+
35.522
|
| 165 |
+
|
| 166 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 167 |
+
10465860 71 18272094846593353103
|
| 168 |
+
11471102 22 11815893422934707110
|
| 169 |
+
11961588 58 16951700292315179774
|
| 170 |
+
12251169 10 11383817247693170263
|
| 171 |
+
12423570 1 13360336286908300344
|
| 172 |
+
12716301 132 17532380948681415986
|
| 173 |
+
12932764 1 18187635878655119589
|
| 174 |
+
13705890 14 18341897423765596295
|
| 175 |
+
15210252 30 17240769423845670701
|
| 176 |
+
15775835 57 12613044902264888823
|
| 177 |
+
15852999 172 18124314063160688320
|
| 178 |
+
16945 1 18411709802238007184
|
| 179 |
+
17041 50 18341045225388101701
|
| 180 |
+
18186145 218 18409446986292130501
|
| 181 |
+
187816 3 18188223000563488374
|
| 182 |
+
20511035 2 17617083046909335640
|
| 183 |
+
20645477 70 18131624600115038791
|
| 184 |
+
20671657 53 17917440782626944420
|
| 185 |
+
20820808 20 17604158046873830798
|
| 186 |
+
21452121 99 17169550941836539419
|
| 187 |
+
21524375 3 17903340851555314929
|
| 188 |
+
21947302 44 18263362649831255900
|
| 189 |
+
22112679 90 17979920406273934322
|
| 190 |
+
22182313 1 17975440180317433094
|
| 191 |
+
23382010 3 17968111849049961670
|
| 192 |
+
23402539 116 18334568062523586068
|
| 193 |
+
23493267 7 15936990590185032056
|
| 194 |
+
23526113 38 18262532454359695998
|
| 195 |
+
25 1 17822017471335090587
|
| 196 |
+
2748010 2 18047498860924136146
|
| 197 |
+
276578 36 12035738604123977172
|
| 198 |
+
3060560 45 18041549325917364679
|
| 199 |
+
3250762 1 17829347013514541778
|
| 200 |
+
3323516 105 18334303101659308987
|
| 201 |
+
58051976 378 18120923173706370455
|
| 202 |
+
7364860 26 17988919011177939160
|
| 203 |
+
74978 22 18412820279534520317
|
| 204 |
+
7832392 63 18337668616731964405
|
| 205 |
+
|
| 206 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 207 |
+
311.66
|
| 208 |
+
5.91
|
| 209 |
+
2.18
|
| 210 |
+
1.45
|
| 211 |
+
7.61
|
| 212 |
+
0.27
|
| 213 |
+
-0.23
|
| 214 |
+
-0.28
|
| 215 |
+
2.74
|
| 216 |
+
-0.89
|
| 217 |
+
-0.47
|
| 218 |
+
-0.84
|
| 219 |
+
-0.29
|
| 220 |
+
0.38
|
| 221 |
+
|
| 222 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>
|
| 223 |
+
630.996
|
| 224 |
+
|
| 225 |
+
> <PUBCHEM_SHAPE_VOLUME>
|
| 226 |
+
181.4
|
| 227 |
+
|
| 228 |
+
> <PUBCHEM_COORDINATE_TYPE>
|
| 229 |
+
2
|
| 230 |
+
5
|
| 231 |
+
10
|
| 232 |
+
|
| 233 |
+
$$$$
|
COM/pubchem_clean_sdf/CID_11445721.sdf
ADDED
|
@@ -0,0 +1,377 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
11445721
|
| 2 |
+
-OEChem-12172503062D
|
| 3 |
+
|
| 4 |
+
122128 0 1 0 0 0 0 0999 V2000
|
| 5 |
+
7.7331 -1.6941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 6 |
+
10.4982 3.5133 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 7 |
+
10.1269 4.8779 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 8 |
+
9.4869 7.5853 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 9 |
+
10.3702 6.0954 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 10 |
+
6.0010 -1.6941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
7.7331 -3.6941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 12 |
+
6.0010 -4.6941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
4.2690 -3.6941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
5.1350 -5.1941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
2.5369 -4.6941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
2.5369 -6.6941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
4.2690 -7.6941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
6.0010 -7.6941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
8.6342 3.0061 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 20 |
+
7.7580 1.4612 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 21 |
+
7.7701 2.5027 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 22 |
+
8.6581 0.9369 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 23 |
+
8.6303 4.0061 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 24 |
+
9.5461 2.5027 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
8.6706 -0.1480 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
9.5581 1.4612 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
7.7624 4.5027 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
6.8081 0.9369 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
6.9021 2.9994 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
7.7423 5.5442 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 31 |
+
9.5383 4.5164 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
8.6383 6.0754 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 33 |
+
7.7331 -0.6941 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 34 |
+
9.5725 3.3517 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
6.7956 -0.1480 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
6.8939 1.9645 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
9.5424 5.5580 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
6.8983 3.9994 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 39 |
+
6.7884 6.0611 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 40 |
+
9.6303 4.0099 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 41 |
+
8.6424 7.1604 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 42 |
+
6.7674 7.1459 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 43 |
+
9.6706 -0.1403 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 44 |
+
9.1773 -1.0102 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 45 |
+
7.7007 7.6992 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 46 |
+
9.4985 6.5854 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 47 |
+
6.2542 8.0041 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 48 |
+
5.7676 7.1305 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 49 |
+
6.8671 -2.1941 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 50 |
+
6.8671 -3.1941 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 51 |
+
6.0010 -3.6941 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 52 |
+
5.1350 -2.1941 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 53 |
+
5.1350 -3.1941 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 54 |
+
4.2690 -1.6941 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 55 |
+
4.2690 -4.6941 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 56 |
+
3.4030 -5.1941 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 57 |
+
3.4030 -6.1941 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 58 |
+
5.1350 -6.1941 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 59 |
+
4.2690 -6.6941 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 60 |
+
6.0010 -6.6941 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 61 |
+
8.5045 2.0749 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 62 |
+
9.3974 0.5176 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 63 |
+
10.1581 2.4037 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 64 |
+
9.7484 3.0888 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 65 |
+
9.7739 0.8800 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 66 |
+
10.1677 1.5743 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 67 |
+
6.6058 1.5230 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 68 |
+
6.1961 0.8379 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 69 |
+
6.2911 3.1047 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 70 |
+
6.6923 2.4160 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 71 |
+
7.0162 5.1023 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 72 |
+
9.7451 3.9319 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 73 |
+
10.1496 4.6202 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 74 |
+
8.2706 -1.0031 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 75 |
+
9.7868 2.7699 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 76 |
+
10.1543 3.5660 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 77 |
+
9.3582 3.9335 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 78 |
+
6.1860 -0.0349 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 79 |
+
6.5798 -0.7293 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 80 |
+
7.2060 2.5003 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 81 |
+
6.3582 2.2766 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 82 |
+
6.5818 1.4288 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 83 |
+
10.1528 5.4496 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 84 |
+
9.7536 6.1409 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 85 |
+
6.3601 4.3073 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 86 |
+
6.1756 6.1554 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 87 |
+
6.5906 5.4735 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 88 |
+
9.2529 7.0519 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 89 |
+
8.8538 7.7433 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 90 |
+
9.6754 -0.7603 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 91 |
+
10.2906 -0.1355 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 92 |
+
9.6658 0.4797 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 93 |
+
8.6428 -1.3243 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 94 |
+
9.4914 -1.5447 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 95 |
+
9.7118 -0.6960 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 96 |
+
8.0962 8.1767 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 97 |
+
7.2980 8.1706 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 98 |
+
6.7862 8.3224 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 99 |
+
5.9359 8.5362 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 100 |
+
5.7220 7.6859 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 101 |
+
5.7580 7.7504 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 102 |
+
5.1476 7.1209 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 103 |
+
5.7771 6.5106 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 104 |
+
11.0340 3.8253 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 105 |
+
7.4040 -2.5041 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 106 |
+
10.0202 7.9015 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 107 |
+
6.8671 -3.8141 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 108 |
+
5.4641 -4.0041 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 109 |
+
5.1350 -1.5741 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 110 |
+
5.1350 -3.8141 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 111 |
+
8.2700 -3.3841 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 112 |
+
4.5790 -1.1572 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 113 |
+
3.7320 -1.3841 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 114 |
+
3.9590 -2.2311 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 115 |
+
6.5380 -5.0041 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 116 |
+
3.7320 -4.3841 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 117 |
+
3.4030 -4.5741 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 118 |
+
3.4030 -6.8141 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 119 |
+
5.6720 -5.8841 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 120 |
+
4.8059 -7.0041 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 121 |
+
2.0000 -5.0041 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 122 |
+
6.6116 -6.8018 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 123 |
+
6.2131 -6.1115 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 124 |
+
2.5369 -7.3141 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 125 |
+
3.7320 -8.0041 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 126 |
+
6.5380 -8.0041 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 127 |
+
29 1 1 1 0 0 0
|
| 128 |
+
45 1 1 1 0 0 0
|
| 129 |
+
2 36 1 0 0 0 0
|
| 130 |
+
2100 1 0 0 0 0
|
| 131 |
+
3 36 2 0 0 0 0
|
| 132 |
+
4 42 1 0 0 0 0
|
| 133 |
+
4102 1 0 0 0 0
|
| 134 |
+
5 42 2 0 0 0 0
|
| 135 |
+
6 45 1 0 0 0 0
|
| 136 |
+
6 48 1 0 0 0 0
|
| 137 |
+
46 7 1 6 0 0 0
|
| 138 |
+
7107 1 0 0 0 0
|
| 139 |
+
47 8 1 1 0 0 0
|
| 140 |
+
8111 1 0 0 0 0
|
| 141 |
+
49 9 1 1 0 0 0
|
| 142 |
+
51 9 1 6 0 0 0
|
| 143 |
+
10 51 1 0 0 0 0
|
| 144 |
+
10 54 1 0 0 0 0
|
| 145 |
+
52 11 1 1 0 0 0
|
| 146 |
+
11117 1 0 0 0 0
|
| 147 |
+
53 12 1 6 0 0 0
|
| 148 |
+
12120 1 0 0 0 0
|
| 149 |
+
55 13 1 1 0 0 0
|
| 150 |
+
13121 1 0 0 0 0
|
| 151 |
+
14 56 1 0 0 0 0
|
| 152 |
+
14122 1 0 0 0 0
|
| 153 |
+
15 17 1 0 0 0 0
|
| 154 |
+
15 19 1 0 0 0 0
|
| 155 |
+
15 20 1 0 0 0 0
|
| 156 |
+
15 30 1 1 0 0 0
|
| 157 |
+
16 17 1 0 0 0 0
|
| 158 |
+
16 18 1 0 0 0 0
|
| 159 |
+
16 24 1 0 0 0 0
|
| 160 |
+
16 32 1 1 0 0 0
|
| 161 |
+
17 25 1 0 0 0 0
|
| 162 |
+
17 57 1 6 0 0 0
|
| 163 |
+
18 21 1 0 0 0 0
|
| 164 |
+
18 22 1 0 0 0 0
|
| 165 |
+
18 58 1 6 0 0 0
|
| 166 |
+
19 23 1 0 0 0 0
|
| 167 |
+
19 27 1 0 0 0 0
|
| 168 |
+
19 36 1 6 0 0 0
|
| 169 |
+
20 22 1 0 0 0 0
|
| 170 |
+
20 59 1 0 0 0 0
|
| 171 |
+
20 60 1 0 0 0 0
|
| 172 |
+
21 29 1 0 0 0 0
|
| 173 |
+
21 39 1 0 0 0 0
|
| 174 |
+
21 40 1 0 0 0 0
|
| 175 |
+
22 61 1 0 0 0 0
|
| 176 |
+
22 62 1 0 0 0 0
|
| 177 |
+
23 26 1 0 0 0 0
|
| 178 |
+
23 34 2 0 0 0 0
|
| 179 |
+
24 31 1 0 0 0 0
|
| 180 |
+
24 63 1 0 0 0 0
|
| 181 |
+
24 64 1 0 0 0 0
|
| 182 |
+
25 34 1 0 0 0 0
|
| 183 |
+
25 65 1 0 0 0 0
|
| 184 |
+
25 66 1 0 0 0 0
|
| 185 |
+
26 28 1 0 0 0 0
|
| 186 |
+
26 35 1 0 0 0 0
|
| 187 |
+
26 67 1 1 0 0 0
|
| 188 |
+
27 33 1 0 0 0 0
|
| 189 |
+
27 68 1 0 0 0 0
|
| 190 |
+
27 69 1 0 0 0 0
|
| 191 |
+
28 33 1 0 0 0 0
|
| 192 |
+
28 37 1 0 0 0 0
|
| 193 |
+
28 42 1 1 0 0 0
|
| 194 |
+
29 31 1 0 0 0 0
|
| 195 |
+
29 70 1 0 0 0 0
|
| 196 |
+
30 71 1 0 0 0 0
|
| 197 |
+
30 72 1 0 0 0 0
|
| 198 |
+
30 73 1 0 0 0 0
|
| 199 |
+
31 74 1 0 0 0 0
|
| 200 |
+
31 75 1 0 0 0 0
|
| 201 |
+
32 76 1 0 0 0 0
|
| 202 |
+
32 77 1 0 0 0 0
|
| 203 |
+
32 78 1 0 0 0 0
|
| 204 |
+
33 79 1 0 0 0 0
|
| 205 |
+
33 80 1 0 0 0 0
|
| 206 |
+
34 81 1 0 0 0 0
|
| 207 |
+
35 38 1 0 0 0 0
|
| 208 |
+
35 82 1 0 0 0 0
|
| 209 |
+
35 83 1 0 0 0 0
|
| 210 |
+
37 41 1 0 0 0 0
|
| 211 |
+
37 84 1 0 0 0 0
|
| 212 |
+
37 85 1 0 0 0 0
|
| 213 |
+
38 41 1 0 0 0 0
|
| 214 |
+
38 43 1 0 0 0 0
|
| 215 |
+
38 44 1 0 0 0 0
|
| 216 |
+
39 86 1 0 0 0 0
|
| 217 |
+
39 87 1 0 0 0 0
|
| 218 |
+
39 88 1 0 0 0 0
|
| 219 |
+
40 89 1 0 0 0 0
|
| 220 |
+
40 90 1 0 0 0 0
|
| 221 |
+
40 91 1 0 0 0 0
|
| 222 |
+
41 92 1 0 0 0 0
|
| 223 |
+
41 93 1 0 0 0 0
|
| 224 |
+
43 94 1 0 0 0 0
|
| 225 |
+
43 95 1 0 0 0 0
|
| 226 |
+
43 96 1 0 0 0 0
|
| 227 |
+
44 97 1 0 0 0 0
|
| 228 |
+
44 98 1 0 0 0 0
|
| 229 |
+
44 99 1 0 0 0 0
|
| 230 |
+
45 46 1 0 0 0 0
|
| 231 |
+
45101 1 0 0 0 0
|
| 232 |
+
46 47 1 0 0 0 0
|
| 233 |
+
46103 1 0 0 0 0
|
| 234 |
+
47 49 1 0 0 0 0
|
| 235 |
+
47104 1 0 0 0 0
|
| 236 |
+
48 49 1 0 0 0 0
|
| 237 |
+
48 50 1 1 0 0 0
|
| 238 |
+
48105 1 0 0 0 0
|
| 239 |
+
49106 1 0 0 0 0
|
| 240 |
+
50108 1 0 0 0 0
|
| 241 |
+
50109 1 0 0 0 0
|
| 242 |
+
50110 1 0 0 0 0
|
| 243 |
+
51 52 1 0 0 0 0
|
| 244 |
+
51112 1 0 0 0 0
|
| 245 |
+
52 53 1 0 0 0 0
|
| 246 |
+
52113 1 0 0 0 0
|
| 247 |
+
53 55 1 0 0 0 0
|
| 248 |
+
53114 1 0 0 0 0
|
| 249 |
+
54 55 1 0 0 0 0
|
| 250 |
+
54 56 1 6 0 0 0
|
| 251 |
+
54115 1 0 0 0 0
|
| 252 |
+
55116 1 0 0 0 0
|
| 253 |
+
56118 1 0 0 0 0
|
| 254 |
+
56119 1 0 0 0 0
|
| 255 |
+
M END
|
| 256 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 257 |
+
11445721
|
| 258 |
+
|
| 259 |
+
> <PUBCHEM_COMPOUND_CANONICALIZED>
|
| 260 |
+
1
|
| 261 |
+
|
| 262 |
+
> <PUBCHEM_CACTVS_COMPLEXITY>
|
| 263 |
+
1560
|
| 264 |
+
|
| 265 |
+
> <PUBCHEM_CACTVS_HBOND_ACCEPTOR>
|
| 266 |
+
14
|
| 267 |
+
|
| 268 |
+
> <PUBCHEM_CACTVS_HBOND_DONOR>
|
| 269 |
+
8
|
| 270 |
+
|
| 271 |
+
> <PUBCHEM_CACTVS_ROTATABLE_BOND>
|
| 272 |
+
7
|
| 273 |
+
|
| 274 |
+
> <PUBCHEM_CACTVS_SUBSKEYS>
|
| 275 |
+
AAADcfB8PAAAAAAAAAAAAAAAAAAAAAAAAAA0aMGCAAAAAADAAAAAGgAACAAADxSwgAMCCAAABgCIAiDSCAAAAAAgAAAACAEAAAgREBIAAQAiQAAFwAAPAAPI6PyPgAAAAAAAAADAAAYAADAAAAAAAAAAAA==
|
| 276 |
+
|
| 277 |
+
> <PUBCHEM_IUPAC_OPENEYE_NAME>
|
| 278 |
+
(4aS,6aR,6aR,6bR,8aR,10S,12aR,14bS)-10-[(2R,3R,4R,5R,6R)-3,4-dihydroxy-6-methyl-5-[(2S,3R,4S,5S,6R)-3,4,5-trihydroxy-6-(hydroxymethyl)tetrahydropyran-2-yl]oxy-tetrahydropyran-2-yl]oxy-2,2,6b,9,9,12a-hexamethyl-1,3,4,5,6,6a,7,8,8a,10,11,12,13,14b-tetradecahydropicene-4a,6a-dicarboxylic acid
|
| 279 |
+
|
| 280 |
+
> <PUBCHEM_IUPAC_CAS_NAME>
|
| 281 |
+
(4aS,6aR,6aR,6bR,8aR,10S,12aR,14bS)-10-[[(2R,3R,4R,5R,6R)-3,4-dihydroxy-6-methyl-5-[[(2S,3R,4S,5S,6R)-3,4,5-trihydroxy-6-(hydroxymethyl)-2-oxanyl]oxy]-2-oxanyl]oxy]-2,2,6b,9,9,12a-hexamethyl-1,3,4,5,6,6a,7,8,8a,10,11,12,13,14b-tetradecahydropicene-4a,6a-dicarboxylic acid
|
| 282 |
+
|
| 283 |
+
> <PUBCHEM_IUPAC_NAME_MARKUP>
|
| 284 |
+
(4<I>a</I><I>S</I>,6<I>a</I><I>R</I>,6<I>a</I><I>R</I>,6<I>b</I><I>R</I>,8<I>a</I><I>R</I>,10<I>S</I>,12<I>a</I><I>R</I>,14<I>b</I><I>S</I>)-10-[(2<I>R</I>,3<I>R</I>,4<I>R</I>,5<I>R</I>,6<I>R</I>)-3,4-dihydroxy-6-methyl-5-[(2<I>S</I>,3<I>R</I>,4<I>S</I>,5<I>S</I>,6<I>R</I>)-3,4,5-trihydroxy-6-(hydroxymethyl)oxan-2-yl]oxyoxan-2-yl]oxy-2,2,6<I>b</I>,9,9,12<I>a</I>-hexamethyl-1,3,4,5,6,6<I>a</I>,7,8,8<I>a</I>,10,11,12,13,14<I>b</I>-tetradecahydropicene-4<I>a</I>,6<I>a</I>-dicarboxylic acid
|
| 285 |
+
|
| 286 |
+
> <PUBCHEM_IUPAC_NAME>
|
| 287 |
+
(4aS,6aR,6aR,6bR,8aR,10S,12aR,14bS)-10-[(2R,3R,4R,5R,6R)-3,4-dihydroxy-6-methyl-5-[(2S,3R,4S,5S,6R)-3,4,5-trihydroxy-6-(hydroxymethyl)oxan-2-yl]oxyoxan-2-yl]oxy-2,2,6b,9,9,12a-hexamethyl-1,3,4,5,6,6a,7,8,8a,10,11,12,13,14b-tetradecahydropicene-4a,6a-dicarboxylic acid
|
| 288 |
+
|
| 289 |
+
> <PUBCHEM_IUPAC_SYSTEMATIC_NAME>
|
| 290 |
+
(4aS,6aR,6aR,6bR,8aR,10S,12aR,14bS)-10-[(2R,3R,4R,5R,6R)-5-[(2S,3R,4S,5S,6R)-6-(hydroxymethyl)-3,4,5-tris(oxidanyl)oxan-2-yl]oxy-6-methyl-3,4-bis(oxidanyl)oxan-2-yl]oxy-2,2,6b,9,9,12a-hexamethyl-1,3,4,5,6,6a,7,8,8a,10,11,12,13,14b-tetradecahydropicene-4a,6a-dicarboxylic acid
|
| 291 |
+
|
| 292 |
+
> <PUBCHEM_IUPAC_TRADITIONAL_NAME>
|
| 293 |
+
(4aS,6aR,6aR,6bR,8aR,10S,12aR,14bS)-10-[(2R,3R,4R,5R,6R)-3,4-dihydroxy-6-methyl-5-[(2S,3R,4S,5S,6R)-3,4,5-trihydroxy-6-methylol-tetrahydropyran-2-yl]oxy-tetrahydropyran-2-yl]oxy-2,2,6b,9,9,12a-hexamethyl-1,3,4,5,6,6a,7,8,8a,10,11,12,13,14b-tetradecahydropicene-4a,6a-dicarboxylic acid
|
| 294 |
+
|
| 295 |
+
> <PUBCHEM_IUPAC_INCHI>
|
| 296 |
+
InChI=1S/C42H66O14/c1-20-32(56-34-30(47)28(45)27(44)23(19-43)54-34)29(46)31(48)33(53-20)55-26-11-12-39(6)24(38(26,4)5)10-13-40(7)25(39)9-8-21-22-18-37(2,3)14-15-41(22,35(49)50)16-17-42(21,40)36(51)52/h8,20,22-34,43-48H,9-19H2,1-7H3,(H,49,50)(H,51,52)/t20-,22+,23-,24+,25-,26+,27-,28+,29-,30-,31-,32+,33+,34+,39+,40-,41+,42-/m1/s1
|
| 297 |
+
|
| 298 |
+
> <PUBCHEM_IUPAC_INCHIKEY>
|
| 299 |
+
OPPNKBZIGKCERC-YAYHLVITSA-N
|
| 300 |
+
|
| 301 |
+
> <PUBCHEM_XLOGP3_AA>
|
| 302 |
+
3.3
|
| 303 |
+
|
| 304 |
+
> <PUBCHEM_EXACT_MASS>
|
| 305 |
+
794.44525677
|
| 306 |
+
|
| 307 |
+
> <PUBCHEM_MOLECULAR_FORMULA>
|
| 308 |
+
C42H66O14
|
| 309 |
+
|
| 310 |
+
> <PUBCHEM_MOLECULAR_WEIGHT>
|
| 311 |
+
795.0
|
| 312 |
+
|
| 313 |
+
> <PUBCHEM_SMILES>
|
| 314 |
+
C[C@@H]1[C@@H]([C@@H]([C@H]([C@@H](O1)O[C@H]2CC[C@]3([C@H](C2(C)C)CC[C@@]4([C@@H]3CC=C5[C@]4(CC[C@@]6([C@H]5CC(CC6)(C)C)C(=O)O)C(=O)O)C)C)O)O)O[C@H]7[C@@H]([C@H]([C@@H]([C@H](O7)CO)O)O)O
|
| 315 |
+
|
| 316 |
+
> <PUBCHEM_CONNECTIVITY_SMILES>
|
| 317 |
+
CC1C(C(C(C(O1)OC2CCC3(C(C2(C)C)CCC4(C3CC=C5C4(CCC6(C5CC(CC6)(C)C)C(=O)O)C(=O)O)C)C)O)O)OC7C(C(C(C(O7)CO)O)O)O
|
| 318 |
+
|
| 319 |
+
> <PUBCHEM_CACTVS_TPSA>
|
| 320 |
+
233
|
| 321 |
+
|
| 322 |
+
> <PUBCHEM_MONOISOTOPIC_WEIGHT>
|
| 323 |
+
794.44525677
|
| 324 |
+
|
| 325 |
+
> <PUBCHEM_TOTAL_CHARGE>
|
| 326 |
+
0
|
| 327 |
+
|
| 328 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 329 |
+
56
|
| 330 |
+
|
| 331 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 332 |
+
18
|
| 333 |
+
|
| 334 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 335 |
+
0
|
| 336 |
+
|
| 337 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 338 |
+
0
|
| 339 |
+
|
| 340 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 341 |
+
0
|
| 342 |
+
|
| 343 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 344 |
+
0
|
| 345 |
+
|
| 346 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 347 |
+
1
|
| 348 |
+
|
| 349 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 350 |
+
-1
|
| 351 |
+
|
| 352 |
+
> <PUBCHEM_COORDINATE_TYPE>
|
| 353 |
+
1
|
| 354 |
+
5
|
| 355 |
+
255
|
| 356 |
+
|
| 357 |
+
> <PUBCHEM_BONDANNOTATIONS>
|
| 358 |
+
29 1 5
|
| 359 |
+
45 1 5
|
| 360 |
+
52 11 5
|
| 361 |
+
53 12 6
|
| 362 |
+
55 13 5
|
| 363 |
+
15 30 5
|
| 364 |
+
16 32 5
|
| 365 |
+
17 57 6
|
| 366 |
+
18 58 6
|
| 367 |
+
19 36 6
|
| 368 |
+
26 67 5
|
| 369 |
+
28 42 5
|
| 370 |
+
48 50 5
|
| 371 |
+
54 56 6
|
| 372 |
+
46 7 6
|
| 373 |
+
47 8 5
|
| 374 |
+
49 9 5
|
| 375 |
+
51 9 6
|
| 376 |
+
|
| 377 |
+
$$$$
|
COM/pubchem_clean_sdf/CID_12530.sdf
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
12530
|
| 2 |
+
-OEChem-12172503223D
|
| 3 |
+
|
| 4 |
+
41 40 0 0 0 0 0 0 0999 V2000
|
| 5 |
+
-7.6096 0.6217 0.1414 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 6 |
+
-6.5996 -1.4141 0.0320 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 7 |
+
1.0890 -0.3559 -0.1212 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 8 |
+
2.3663 0.4859 -0.0740 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 9 |
+
-0.1587 0.5279 -0.0609 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 10 |
+
3.6162 -0.3973 -0.0958 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
-1.4688 -0.2650 -0.0821 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 12 |
+
4.8907 0.4453 -0.0155 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
-2.7173 0.6200 -0.0475 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
6.1742 -0.3908 -0.0021 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
-3.9935 -0.2276 0.0024 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
7.4812 0.3992 0.0998 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
-5.2618 0.6255 0.0105 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
8.7200 -0.4802 0.1625 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
-6.5283 -0.1946 0.0503 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
1.0729 -0.9527 -1.0410 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
1.0787 -1.0582 0.7210 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
2.3861 1.1739 -0.9279 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
2.3674 1.0988 0.8356 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
-0.1486 1.2242 -0.9087 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
-0.1270 1.1385 0.8501 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
3.6297 -0.9973 -1.0136 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
3.5876 -1.0968 0.7483 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
-1.4956 -0.8909 -0.9827 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
-1.4837 -0.9467 0.7774 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
4.9245 1.1363 -0.8668 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
4.8611 1.0619 0.8914 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
-2.6798 1.2759 0.8305 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 33 |
+
-2.7345 1.2645 -0.9343 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 34 |
+
6.1237 -1.0921 0.8408 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
6.2043 -1.0040 -0.9117 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
-3.9772 -0.8644 0.8960 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
-4.0169 -0.9043 -0.8612 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
7.4513 1.0317 0.9948 H 0 0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1 0 0 0 0
|
| 73 |
+
10 31 1 0 0 0 0
|
| 74 |
+
11 13 1 0 0 0 0
|
| 75 |
+
11 32 1 0 0 0 0
|
| 76 |
+
11 33 1 0 0 0 0
|
| 77 |
+
12 14 1 0 0 0 0
|
| 78 |
+
12 34 1 0 0 0 0
|
| 79 |
+
12 35 1 0 0 0 0
|
| 80 |
+
13 15 1 0 0 0 0
|
| 81 |
+
13 36 1 0 0 0 0
|
| 82 |
+
13 37 1 0 0 0 0
|
| 83 |
+
14 38 1 0 0 0 0
|
| 84 |
+
14 39 1 0 0 0 0
|
| 85 |
+
14 40 1 0 0 0 0
|
| 86 |
+
M END
|
| 87 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 88 |
+
12530
|
| 89 |
+
|
| 90 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 91 |
+
1.2
|
| 92 |
+
|
| 93 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 94 |
+
1
|
| 95 |
+
61
|
| 96 |
+
31
|
| 97 |
+
34
|
| 98 |
+
27
|
| 99 |
+
32
|
| 100 |
+
47
|
| 101 |
+
28
|
| 102 |
+
58
|
| 103 |
+
24
|
| 104 |
+
7
|
| 105 |
+
36
|
| 106 |
+
5
|
| 107 |
+
14
|
| 108 |
+
33
|
| 109 |
+
49
|
| 110 |
+
35
|
| 111 |
+
50
|
| 112 |
+
60
|
| 113 |
+
21
|
| 114 |
+
3
|
| 115 |
+
20
|
| 116 |
+
52
|
| 117 |
+
43
|
| 118 |
+
13
|
| 119 |
+
11
|
| 120 |
+
15
|
| 121 |
+
12
|
| 122 |
+
2
|
| 123 |
+
59
|
| 124 |
+
41
|
| 125 |
+
16
|
| 126 |
+
40
|
| 127 |
+
56
|
| 128 |
+
9
|
| 129 |
+
39
|
| 130 |
+
23
|
| 131 |
+
29
|
| 132 |
+
4
|
| 133 |
+
6
|
| 134 |
+
8
|
| 135 |
+
22
|
| 136 |
+
26
|
| 137 |
+
57
|
| 138 |
+
37
|
| 139 |
+
55
|
| 140 |
+
18
|
| 141 |
+
10
|
| 142 |
+
19
|
| 143 |
+
54
|
| 144 |
+
25
|
| 145 |
+
44
|
| 146 |
+
38
|
| 147 |
+
30
|
| 148 |
+
17
|
| 149 |
+
42
|
| 150 |
+
53
|
| 151 |
+
51
|
| 152 |
+
45
|
| 153 |
+
48
|
| 154 |
+
46
|
| 155 |
+
|
| 156 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 157 |
+
5
|
| 158 |
+
1 -0.65
|
| 159 |
+
13 0.06
|
| 160 |
+
15 0.66
|
| 161 |
+
2 -0.57
|
| 162 |
+
41 0.5
|
| 163 |
+
|
| 164 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 165 |
+
11
|
| 166 |
+
|
| 167 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 168 |
+
4
|
| 169 |
+
1 1 acceptor
|
| 170 |
+
1 14 hydrophobe
|
| 171 |
+
1 2 acceptor
|
| 172 |
+
3 1 2 15 anion
|
| 173 |
+
|
| 174 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 175 |
+
15
|
| 176 |
+
|
| 177 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 178 |
+
0
|
| 179 |
+
|
| 180 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 181 |
+
0
|
| 182 |
+
|
| 183 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 184 |
+
0
|
| 185 |
+
|
| 186 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 187 |
+
0
|
| 188 |
+
|
| 189 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 190 |
+
0
|
| 191 |
+
|
| 192 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 193 |
+
1
|
| 194 |
+
|
| 195 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 196 |
+
1
|
| 197 |
+
|
| 198 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 199 |
+
000030F200000001
|
| 200 |
+
|
| 201 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 202 |
+
-1.0064
|
| 203 |
+
|
| 204 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 205 |
+
20.354
|
| 206 |
+
|
| 207 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 208 |
+
11315181 36 18272655654059655297
|
| 209 |
+
12091667 2 17458063760070853765
|
| 210 |
+
13533116 47 16950833731350483800
|
| 211 |
+
13885169 127 18409730629768727457
|
| 212 |
+
13964095 4 8070029965003270071
|
| 213 |
+
14123256 10 18410575080378661128
|
| 214 |
+
14251764 18 18113334202617254618
|
| 215 |
+
14251764 46 18411136930815179919
|
| 216 |
+
14729087 3 9727639392945335331
|
| 217 |
+
17834076 25 18410575088973902972
|
| 218 |
+
18006028 8 14996282522262789782
|
| 219 |
+
21315763 28 18407759236023018404
|
| 220 |
+
22224240 67 18114179753045238890
|
| 221 |
+
23035841 295 18261110781182003923
|
| 222 |
+
23521765 1 18341894091256096212
|
| 223 |
+
246663 6 17894915122600809842
|
| 224 |
+
33532 11 18260827060797753922
|
| 225 |
+
33684 2 18410573976566791304
|
| 226 |
+
42788 4 18410575089258876021
|
| 227 |
+
59682541 35 18343299306034772722
|
| 228 |
+
8209 1 18335139791527108836
|
| 229 |
+
|
| 230 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 231 |
+
296.95
|
| 232 |
+
27.02
|
| 233 |
+
0.89
|
| 234 |
+
0.61
|
| 235 |
+
10.23
|
| 236 |
+
0.09
|
| 237 |
+
0
|
| 238 |
+
2.41
|
| 239 |
+
-1.76
|
| 240 |
+
-0.62
|
| 241 |
+
0
|
| 242 |
+
0.1
|
| 243 |
+
0
|
| 244 |
+
-0.03
|
| 245 |
+
|
| 246 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>
|
| 247 |
+
537.324
|
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 0 0 0 0 0 0 0 0 0 0 0 0
|
| 10 |
+
-0.0307 0.4282 0.1407 N 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
-1.2966 2.2147 -0.3151 N 0 0 0 0 0 0 0 0 0 0 0 0
|
| 12 |
+
-1.7360 -1.2704 0.3973 N 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
-3.9105 -0.3212 0.0638 N 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
-3.6603 -2.6083 0.5638 N 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
1.8214 -0.9548 -0.8904 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 16 |
+
1.2119 -0.3933 0.3900 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 17 |
+
3.2717 -1.1426 -0.4921 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 18 |
+
3.5206 0.0706 0.3951 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 19 |
+
4.0016 1.2890 -0.3809 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
-1.3232 -0.0068 0.1544 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
-0.0663 1.7710 -0.1463 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
-2.0729 1.1094 -0.1279 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
-3.5038 0.9961 -0.1909 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
-3.0437 -1.4035 0.3460 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
1.7463 -0.2227 -1.7038 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
0.9084 -1.1767 1.0948 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
3.9487 -1.2335 -1.3464 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
4.2158 -0.1451 1.2143 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
3.2637 1.6115 -1.1220 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
4.9513 1.0816 -0.8835 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
1.7213 -2.4963 -2.0656 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
4.3548 -2.3711 0.5704 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 33 |
+
0.8301 2.3710 -0.2223 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 34 |
+
4.5010 3.1227 0.0111 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
-4.9079 -0.5135 0.0438 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
-3.1232 -3.4426 0.7732 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
-4.6693 -2.7013 0.5220 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
1 12 1 0 0 0 0
|
| 39 |
+
1 14 1 0 0 0 0
|
| 40 |
+
2 11 1 0 0 0 0
|
| 41 |
+
2 27 1 0 0 0 0
|
| 42 |
+
3 13 1 0 0 0 0
|
| 43 |
+
3 28 1 0 0 0 0
|
| 44 |
+
4 15 1 0 0 0 0
|
| 45 |
+
4 30 1 0 0 0 0
|
| 46 |
+
5 19 2 0 0 0 0
|
| 47 |
+
6 12 1 0 0 0 0
|
| 48 |
+
6 16 1 0 0 0 0
|
| 49 |
+
6 17 1 0 0 0 0
|
| 50 |
+
7 17 2 0 0 0 0
|
| 51 |
+
7 18 1 0 0 0 0
|
| 52 |
+
8 16 1 0 0 0 0
|
| 53 |
+
8 20 2 0 0 0 0
|
| 54 |
+
9 19 1 0 0 0 0
|
| 55 |
+
9 20 1 0 0 0 0
|
| 56 |
+
9 31 1 0 0 0 0
|
| 57 |
+
10 20 1 0 0 0 0
|
| 58 |
+
10 32 1 0 0 0 0
|
| 59 |
+
10 33 1 0 0 0 0
|
| 60 |
+
11 12 1 0 0 0 0
|
| 61 |
+
11 13 1 0 0 0 0
|
| 62 |
+
11 21 1 0 0 0 0
|
| 63 |
+
12 22 1 0 0 0 0
|
| 64 |
+
13 14 1 0 0 0 0
|
| 65 |
+
13 23 1 0 0 0 0
|
| 66 |
+
14 15 1 0 0 0 0
|
| 67 |
+
14 24 1 0 0 0 0
|
| 68 |
+
15 25 1 0 0 0 0
|
| 69 |
+
15 26 1 0 0 0 0
|
| 70 |
+
16 18 2 0 0 0 0
|
| 71 |
+
17 29 1 0 0 0 0
|
| 72 |
+
18 19 1 0 0 0 0
|
| 73 |
+
M END
|
| 74 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 75 |
+
135398635
|
| 76 |
+
|
| 77 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 78 |
+
0.6
|
| 79 |
+
|
| 80 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 81 |
+
1
|
| 82 |
+
9
|
| 83 |
+
15
|
| 84 |
+
11
|
| 85 |
+
16
|
| 86 |
+
6
|
| 87 |
+
10
|
| 88 |
+
2
|
| 89 |
+
7
|
| 90 |
+
12
|
| 91 |
+
13
|
| 92 |
+
14
|
| 93 |
+
8
|
| 94 |
+
3
|
| 95 |
+
5
|
| 96 |
+
4
|
| 97 |
+
|
| 98 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 99 |
+
27
|
| 100 |
+
1 -0.56
|
| 101 |
+
10 -0.85
|
| 102 |
+
11 0.28
|
| 103 |
+
12 0.54
|
| 104 |
+
13 0.28
|
| 105 |
+
14 0.28
|
| 106 |
+
15 0.28
|
| 107 |
+
16 -0.03
|
| 108 |
+
17 0.04
|
| 109 |
+
18 0.14
|
| 110 |
+
19 0.72
|
| 111 |
+
2 -0.68
|
| 112 |
+
20 0.56
|
| 113 |
+
27 0.4
|
| 114 |
+
28 0.4
|
| 115 |
+
29 0.15
|
| 116 |
+
3 -0.68
|
| 117 |
+
30 0.4
|
| 118 |
+
31 0.37
|
| 119 |
+
32 0.4
|
| 120 |
+
33 0.4
|
| 121 |
+
4 -0.68
|
| 122 |
+
5 -0.57
|
| 123 |
+
6 0.05
|
| 124 |
+
7 -0.57
|
| 125 |
+
8 -0.58
|
| 126 |
+
9 -0.49
|
| 127 |
+
|
| 128 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 129 |
+
3
|
| 130 |
+
|
| 131 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 132 |
+
14
|
| 133 |
+
1 1 acceptor
|
| 134 |
+
1 10 donor
|
| 135 |
+
1 2 acceptor
|
| 136 |
+
1 2 donor
|
| 137 |
+
1 3 acceptor
|
| 138 |
+
1 3 donor
|
| 139 |
+
1 4 acceptor
|
| 140 |
+
1 4 donor
|
| 141 |
+
1 5 acceptor
|
| 142 |
+
1 9 donor
|
| 143 |
+
3 6 7 17 cation
|
| 144 |
+
5 1 11 12 13 14 rings
|
| 145 |
+
5 6 7 16 17 18 rings
|
| 146 |
+
6 8 9 16 18 19 20 rings
|
| 147 |
+
|
| 148 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 149 |
+
20
|
| 150 |
+
|
| 151 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 152 |
+
4
|
| 153 |
+
|
| 154 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 155 |
+
0
|
| 156 |
+
|
| 157 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 158 |
+
0
|
| 159 |
+
|
| 160 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 161 |
+
0
|
| 162 |
+
|
| 163 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 164 |
+
0
|
| 165 |
+
|
| 166 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 167 |
+
1
|
| 168 |
+
|
| 169 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 170 |
+
-1
|
| 171 |
+
|
| 172 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 173 |
+
081204EB00000001
|
| 174 |
+
|
| 175 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 176 |
+
48.2612
|
| 177 |
+
|
| 178 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 179 |
+
71.242
|
| 180 |
+
|
| 181 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 182 |
+
10366900 7 17774997968959353777
|
| 183 |
+
10498660 4 18408888438327117164
|
| 184 |
+
10608611 8 18411417272116028044
|
| 185 |
+
10616163 171 18411703196520562950
|
| 186 |
+
11132069 177 18407757032108664129
|
| 187 |
+
11405975 8 18337673014340125698
|
| 188 |
+
12633257 1 18197502818102747394
|
| 189 |
+
13140716 1 18339648849488330547
|
| 190 |
+
13214271 11 18411976996511911621
|
| 191 |
+
13224815 77 18342462538535521894
|
| 192 |
+
13296908 3 18409731755044773923
|
| 193 |
+
13544592 145 18125168138692378351
|
| 194 |
+
14289901 80 18333735731989023722
|
| 195 |
+
15196674 1 18410012134720207107
|
| 196 |
+
15219456 202 18342458131719721576
|
| 197 |
+
15375358 24 18411979135553240053
|
| 198 |
+
15375462 6 18410013243359859238
|
| 199 |
+
17492 89 18334858311887121010
|
| 200 |
+
18175812 5 18412825759385243446
|
| 201 |
+
18186145 218 17603582993602310062
|
| 202 |
+
19141452 34 18271251603597262115
|
| 203 |
+
19591789 44 16606334000373612205
|
| 204 |
+
200 152 17202472325863934093
|
| 205 |
+
20645477 56 18261678069580168317
|
| 206 |
+
20645477 70 17988640740283722582
|
| 207 |
+
20681677 274 18335978680149788706
|
| 208 |
+
21065198 57 18337953394105489194
|
| 209 |
+
21501502 16 18341899528595106760
|
| 210 |
+
21618674 54 18408321107564738226
|
| 211 |
+
221490 88 18411707565072131970
|
| 212 |
+
23402539 116 18260542334081841838
|
| 213 |
+
23557571 272 18337402611746821350
|
| 214 |
+
23559900 14 18339357449343436442
|
| 215 |
+
2748010 2 18412834572874717895
|
| 216 |
+
296302 2 18343865515409656261
|
| 217 |
+
34934 24 18408316692396503585
|
| 218 |
+
474 4 17168437063991603068
|
| 219 |
+
495365 180 17631429220750381969
|
| 220 |
+
5104073 3 18410012121835351633
|
| 221 |
+
67856867 119 18187363242900672760
|
| 222 |
+
7097593 13 17826497874029102058
|
| 223 |
+
8809292 202 18337675204694558851
|
| 224 |
+
9709674 26 18270121188804033375
|
| 225 |
+
|
| 226 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 227 |
+
357.34
|
| 228 |
+
8.36
|
| 229 |
+
2.62
|
| 230 |
+
0.83
|
| 231 |
+
0.09
|
| 232 |
+
0.28
|
| 233 |
+
0.08
|
| 234 |
+
-0.64
|
| 235 |
+
-0.36
|
| 236 |
+
-0.24
|
| 237 |
+
0.09
|
| 238 |
+
0.33
|
| 239 |
+
0.18
|
| 240 |
+
0.98
|
| 241 |
+
|
| 242 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>
|
| 243 |
+
776.407
|
| 244 |
+
|
| 245 |
+
> <PUBCHEM_SHAPE_VOLUME>
|
| 246 |
+
192.5
|
| 247 |
+
|
| 248 |
+
> <PUBCHEM_COORDINATE_TYPE>
|
| 249 |
+
2
|
| 250 |
+
5
|
| 251 |
+
10
|
| 252 |
+
|
| 253 |
+
$$$$
|
COM/pubchem_clean_sdf/CID_15839040.sdf
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 0 0 0 0 0 0 0 0 0 0 0
|
| 8 |
+
5.5400 -1.4816 -0.2974 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 9 |
+
-2.0432 0.0637 -1.3448 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 10 |
+
-1.3203 0.8801 -0.2665 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
-0.1651 1.7507 -0.7861 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 12 |
+
-3.1964 -0.7858 -0.7900 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
0.5586 2.6031 0.2691 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
-4.3614 -0.0138 -0.1653 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
-5.5095 -0.9118 0.2976 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
1.2818 1.8415 1.3916 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
-6.6014 -0.0995 0.9949 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
2.4137 0.9535 0.9416 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
-7.7275 -0.9925 1.4908 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
2.1653 -0.3775 0.6067 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
3.7095 1.4630 0.8601 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
3.2128 -1.1991 0.1898 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
4.7571 0.6415 0.4435 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
4.5087 -0.6895 0.1083 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
1.6061 -2.9393 -0.0245 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
-2.4341 0.7348 -2.1181 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
-0.9431 0.1974 0.5015 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
-2.0458 1.5446 0.2169 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
0.5673 1.1019 -1.2787 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
-2.7945 -1.4955 -0.0544 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
-3.5873 -1.4123 -1.6031 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
1.2813 3.2538 -0.2418 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 33 |
+
-0.1702 3.2873 0.7233 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 34 |
+
-4.7415 0.7141 -0.8925 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
-3.9967 0.5570 0.6961 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
-5.9324 -1.4419 -0.5641 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
-5.1223 -1.6721 0.9868 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
0.5593 1.2498 1.9675 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 39 |
+
1.6757 2.5747 2.1083 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 40 |
+
-6.1762 0.4452 1.8459 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 41 |
+
-7.0094 0.6464 0.3030 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 42 |
+
-1.5841 -1.2781 -2.6936 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 43 |
+
0.0793 3.1018 -2.1799 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 44 |
+
-7.3566 -1.7282 2.2115 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 45 |
+
-8.1960 -1.5305 0.6604 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 46 |
+
-8.4981 -0.3920 1.9843 H 0 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 1 0 0 0 0
|
| 81 |
+
11 33 1 0 0 0 0
|
| 82 |
+
12 14 1 0 0 0 0
|
| 83 |
+
12 34 1 0 0 0 0
|
| 84 |
+
12 35 1 0 0 0 0
|
| 85 |
+
13 15 1 0 0 0 0
|
| 86 |
+
13 36 1 0 0 0 0
|
| 87 |
+
13 37 1 0 0 0 0
|
| 88 |
+
14 16 2 0 0 0 0
|
| 89 |
+
14 17 1 0 0 0 0
|
| 90 |
+
15 40 1 0 0 0 0
|
| 91 |
+
15 41 1 0 0 0 0
|
| 92 |
+
15 42 1 0 0 0 0
|
| 93 |
+
16 18 1 0 0 0 0
|
| 94 |
+
16 43 1 0 0 0 0
|
| 95 |
+
17 19 2 0 0 0 0
|
| 96 |
+
17 44 1 0 0 0 0
|
| 97 |
+
18 20 2 0 0 0 0
|
| 98 |
+
19 20 1 0 0 0 0
|
| 99 |
+
19 45 1 0 0 0 0
|
| 100 |
+
21 47 1 0 0 0 0
|
| 101 |
+
21 48 1 0 0 0 0
|
| 102 |
+
21 49 1 0 0 0 0
|
| 103 |
+
M END
|
| 104 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 105 |
+
15839040
|
| 106 |
+
|
| 107 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 108 |
+
1.2
|
| 109 |
+
|
| 110 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 111 |
+
1
|
| 112 |
+
36
|
| 113 |
+
12
|
| 114 |
+
4
|
| 115 |
+
89
|
| 116 |
+
46
|
| 117 |
+
42
|
| 118 |
+
71
|
| 119 |
+
50
|
| 120 |
+
15
|
| 121 |
+
83
|
| 122 |
+
45
|
| 123 |
+
6
|
| 124 |
+
29
|
| 125 |
+
8
|
| 126 |
+
34
|
| 127 |
+
53
|
| 128 |
+
44
|
| 129 |
+
32
|
| 130 |
+
31
|
| 131 |
+
96
|
| 132 |
+
64
|
| 133 |
+
97
|
| 134 |
+
39
|
| 135 |
+
49
|
| 136 |
+
81
|
| 137 |
+
69
|
| 138 |
+
91
|
| 139 |
+
21
|
| 140 |
+
48
|
| 141 |
+
30
|
| 142 |
+
70
|
| 143 |
+
60
|
| 144 |
+
55
|
| 145 |
+
5
|
| 146 |
+
77
|
| 147 |
+
75
|
| 148 |
+
35
|
| 149 |
+
95
|
| 150 |
+
23
|
| 151 |
+
16
|
| 152 |
+
65
|
| 153 |
+
85
|
| 154 |
+
66
|
| 155 |
+
56
|
| 156 |
+
58
|
| 157 |
+
33
|
| 158 |
+
90
|
| 159 |
+
41
|
| 160 |
+
63
|
| 161 |
+
86
|
| 162 |
+
51
|
| 163 |
+
76
|
| 164 |
+
10
|
| 165 |
+
24
|
| 166 |
+
62
|
| 167 |
+
14
|
| 168 |
+
11
|
| 169 |
+
19
|
| 170 |
+
82
|
| 171 |
+
87
|
| 172 |
+
54
|
| 173 |
+
92
|
| 174 |
+
7
|
| 175 |
+
98
|
| 176 |
+
99
|
| 177 |
+
72
|
| 178 |
+
40
|
| 179 |
+
61
|
| 180 |
+
43
|
| 181 |
+
67
|
| 182 |
+
103
|
| 183 |
+
20
|
| 184 |
+
93
|
| 185 |
+
68
|
| 186 |
+
26
|
| 187 |
+
37
|
| 188 |
+
59
|
| 189 |
+
102
|
| 190 |
+
52
|
| 191 |
+
38
|
| 192 |
+
105
|
| 193 |
+
88
|
| 194 |
+
3
|
| 195 |
+
73
|
| 196 |
+
2
|
| 197 |
+
27
|
| 198 |
+
94
|
| 199 |
+
100
|
| 200 |
+
22
|
| 201 |
+
13
|
| 202 |
+
18
|
| 203 |
+
47
|
| 204 |
+
17
|
| 205 |
+
57
|
| 206 |
+
101
|
| 207 |
+
80
|
| 208 |
+
84
|
| 209 |
+
79
|
| 210 |
+
9
|
| 211 |
+
74
|
| 212 |
+
104
|
| 213 |
+
78
|
| 214 |
+
28
|
| 215 |
+
25
|
| 216 |
+
|
| 217 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 218 |
+
20
|
| 219 |
+
1 -0.68
|
| 220 |
+
12 0.14
|
| 221 |
+
14 -0.14
|
| 222 |
+
16 -0.15
|
| 223 |
+
17 -0.15
|
| 224 |
+
18 0.08
|
| 225 |
+
19 -0.15
|
| 226 |
+
2 -0.68
|
| 227 |
+
20 0.08
|
| 228 |
+
21 0.28
|
| 229 |
+
3 -0.36
|
| 230 |
+
38 0.4
|
| 231 |
+
39 0.4
|
| 232 |
+
4 -0.53
|
| 233 |
+
43 0.15
|
| 234 |
+
44 0.15
|
| 235 |
+
45 0.15
|
| 236 |
+
46 0.45
|
| 237 |
+
5 0.28
|
| 238 |
+
7 0.28
|
| 239 |
+
|
| 240 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 241 |
+
10
|
| 242 |
+
|
| 243 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 244 |
+
9
|
| 245 |
+
1 1 acceptor
|
| 246 |
+
1 1 donor
|
| 247 |
+
1 15 hydrophobe
|
| 248 |
+
1 2 acceptor
|
| 249 |
+
1 2 donor
|
| 250 |
+
1 3 acceptor
|
| 251 |
+
1 4 donor
|
| 252 |
+
4 8 10 11 13 hydrophobe
|
| 253 |
+
6 14 16 17 18 19 20 rings
|
| 254 |
+
|
| 255 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 256 |
+
21
|
| 257 |
+
|
| 258 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 259 |
+
2
|
| 260 |
+
|
| 261 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 262 |
+
0
|
| 263 |
+
|
| 264 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 265 |
+
0
|
| 266 |
+
|
| 267 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 268 |
+
0
|
| 269 |
+
|
| 270 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 271 |
+
0
|
| 272 |
+
|
| 273 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 274 |
+
1
|
| 275 |
+
|
| 276 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 277 |
+
3
|
| 278 |
+
|
| 279 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 280 |
+
00F1AF4000000001
|
| 281 |
+
|
| 282 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 283 |
+
45.3688
|
| 284 |
+
|
| 285 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 286 |
+
45.671
|
| 287 |
+
|
| 288 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 289 |
+
10316853 100 18114471162308244491
|
| 290 |
+
12467345 10 18060142020588288041
|
| 291 |
+
12553582 1 18199165365836452526
|
| 292 |
+
12596602 18 17274539944556296659
|
| 293 |
+
12633257 1 17275095150198165725
|
| 294 |
+
12778500 126 17846789494474125825
|
| 295 |
+
13402501 40 18260830410212816499
|
| 296 |
+
13464513 79 18113896087044155648
|
| 297 |
+
13533116 47 18341897441599931257
|
| 298 |
+
14251732 14 15357695306212483125
|
| 299 |
+
14251764 30 17894629245198374571
|
| 300 |
+
14341114 176 18342178882221801313
|
| 301 |
+
14617045 38 18411704300416822294
|
| 302 |
+
14765038 42 17916854859320939016
|
| 303 |
+
15238133 3 15482668009179786146
|
| 304 |
+
15527383 91 18343581862953169857
|
| 305 |
+
15537594 2 18201432606094399566
|
| 306 |
+
1813 80 17458346329911031461
|
| 307 |
+
192875 21 10953734470106480326
|
| 308 |
+
20157964 124 8574714602377075929
|
| 309 |
+
20554085 129 14476968866024034951
|
| 310 |
+
20567600 75 18261946380840540445
|
| 311 |
+
20578428 11 15359121458745854775
|
| 312 |
+
21267235 1 18343305830121977254
|
| 313 |
+
21521721 280 18269551805722929824
|
| 314 |
+
21623969 137 18334858329171796651
|
| 315 |
+
23016692 55 15647049392069734233
|
| 316 |
+
25222932 49 17313935450300457163
|
| 317 |
+
2871803 45 18338781343931334156
|
| 318 |
+
345986 75 17916860210491487835
|
| 319 |
+
351380 180 9583518732711638859
|
| 320 |
+
3737641 26 18340204072822323718
|
| 321 |
+
46194498 28 17749106729046145829
|
| 322 |
+
5104073 3 18270104709552381464
|
| 323 |
+
5207 217 11602545329611974625
|
| 324 |
+
6669772 16 13263832709573847679
|
| 325 |
+
8509985 295 16845576439567559033
|
| 326 |
+
|
| 327 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 328 |
+
408.69
|
| 329 |
+
14.71
|
| 330 |
+
2.71
|
| 331 |
+
1.4
|
| 332 |
+
26.15
|
| 333 |
+
0.17
|
| 334 |
+
-0.34
|
| 335 |
+
6.53
|
| 336 |
+
6.95
|
| 337 |
+
-2.68
|
| 338 |
+
-0.26
|
| 339 |
+
1.25
|
| 340 |
+
-0.4
|
| 341 |
+
1.06
|
| 342 |
+
|
| 343 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>
|
| 344 |
+
806.608
|
| 345 |
+
|
| 346 |
+
> <PUBCHEM_SHAPE_VOLUME>
|
| 347 |
+
244.9
|
| 348 |
+
|
| 349 |
+
> <PUBCHEM_COORDINATE_TYPE>
|
| 350 |
+
2
|
| 351 |
+
5
|
| 352 |
+
10
|
| 353 |
+
|
| 354 |
+
$$$$
|
COM/pubchem_clean_sdf/CID_162847016.sdf
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
+
3.1050 -0.3855 -0.5287 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
-0.9698 -2.4953 -0.7472 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
4.5993 -0.1779 -0.2673 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
-1.9220 -2.3304 0.4308 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
4.9065 1.1053 0.5075 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
-3.3625 -1.9783 0.1021 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
-3.7887 -0.6304 0.6799 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
6.3935 1.3517 0.7093 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
-2.9477 0.5187 0.1813 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
-1.7977 0.8942 0.8754 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
-3.3196 1.2046 -0.9750 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
-1.0195 1.9557 0.4135 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
-2.5415 2.2660 -1.4370 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
-1.3914 2.6416 -0.7427 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
0.4105 1.5608 2.2722 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
0.9730 -1.1061 -2.2066 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
1.3284 -2.8301 -2.2482 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
3.3869 -1.5986 -2.2865 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
3.2900 -2.5230 -0.7952 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
0.5076 -1.2736 0.2530 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
2.5855 -0.4317 0.4343 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 33 |
+
2.7006 0.4740 -1.0763 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 34 |
+
-1.3015 -1.8138 -1.5385 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
-1.0649 -3.5262 -1.1049 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
4.9949 -1.0364 0.2896 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
5.1311 -0.1507 -1.2265 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
4.4779 1.9624 -0.0257 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 39 |
+
4.4155 1.0638 1.4871 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 40 |
+
-3.4970 -1.9840 -0.9856 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 41 |
+
-3.9970 -2.7787 0.4995 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 42 |
+
-4.8424 -0.4464 0.4351 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 43 |
+
-3.7416 -0.6621 1.7762 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 44 |
+
0.5006 -3.3565 1.1625 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 45 |
+
6.8518 0.5311 1.2703 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 46 |
+
6.9085 1.4403 -0.2524 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 47 |
+
6.5532 2.2788 1.2686 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 48 |
+
-1.5610 0.3321 1.7721 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 49 |
+
-4.2121 0.9196 -1.5256 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 50 |
+
-2.8425 2.7915 -2.3393 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 51 |
+
-1.0491 4.0333 -2.0118 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 52 |
+
1.3347 1.9771 2.6865 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 53 |
+
-0.3616 1.6749 3.0407 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 54 |
+
0.6146 0.5107 2.0381 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 55 |
+
1 7 1 0 0 0 0
|
| 56 |
+
1 40 1 0 0 0 0
|
| 57 |
+
2 11 2 0 0 0 0
|
| 58 |
+
3 19 1 0 0 0 0
|
| 59 |
+
3 22 1 0 0 0 0
|
| 60 |
+
4 21 1 0 0 0 0
|
| 61 |
+
4 47 1 0 0 0 0
|
| 62 |
+
5 6 1 0 0 0 0
|
| 63 |
+
5 7 1 0 0 0 0
|
| 64 |
+
5 23 1 0 0 0 0
|
| 65 |
+
5 24 1 0 0 0 0
|
| 66 |
+
6 8 1 0 0 0 0
|
| 67 |
+
6 25 1 0 0 0 0
|
| 68 |
+
6 26 1 0 0 0 0
|
| 69 |
+
7 9 1 0 0 0 0
|
| 70 |
+
7 27 1 0 0 0 0
|
| 71 |
+
8 10 1 0 0 0 0
|
| 72 |
+
8 28 1 0 0 0 0
|
| 73 |
+
8 29 1 0 0 0 0
|
| 74 |
+
9 11 1 0 0 0 0
|
| 75 |
+
9 30 1 0 0 0 0
|
| 76 |
+
9 31 1 0 0 0 0
|
| 77 |
+
10 12 1 0 0 0 0
|
| 78 |
+
10 32 1 0 0 0 0
|
| 79 |
+
10 33 1 0 0 0 0
|
| 80 |
+
11 13 1 0 0 0 0
|
| 81 |
+
12 15 1 0 0 0 0
|
| 82 |
+
12 34 1 0 0 0 0
|
| 83 |
+
12 35 1 0 0 0 0
|
| 84 |
+
13 14 1 0 0 0 0
|
| 85 |
+
13 36 1 0 0 0 0
|
| 86 |
+
13 37 1 0 0 0 0
|
| 87 |
+
14 16 1 0 0 0 0
|
| 88 |
+
14 38 1 0 0 0 0
|
| 89 |
+
14 39 1 0 0 0 0
|
| 90 |
+
15 41 1 0 0 0 0
|
| 91 |
+
15 42 1 0 0 0 0
|
| 92 |
+
15 43 1 0 0 0 0
|
| 93 |
+
16 17 2 0 0 0 0
|
| 94 |
+
16 18 1 0 0 0 0
|
| 95 |
+
17 19 1 0 0 0 0
|
| 96 |
+
17 44 1 0 0 0 0
|
| 97 |
+
18 20 2 0 0 0 0
|
| 98 |
+
18 45 1 0 0 0 0
|
| 99 |
+
19 21 2 0 0 0 0
|
| 100 |
+
20 21 1 0 0 0 0
|
| 101 |
+
20 46 1 0 0 0 0
|
| 102 |
+
22 48 1 0 0 0 0
|
| 103 |
+
22 49 1 0 0 0 0
|
| 104 |
+
22 50 1 0 0 0 0
|
| 105 |
+
M END
|
| 106 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 107 |
+
162847016
|
| 108 |
+
|
| 109 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 110 |
+
1.4
|
| 111 |
+
|
| 112 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 113 |
+
1
|
| 114 |
+
41
|
| 115 |
+
52
|
| 116 |
+
31
|
| 117 |
+
8
|
| 118 |
+
3
|
| 119 |
+
49
|
| 120 |
+
53
|
| 121 |
+
72
|
| 122 |
+
35
|
| 123 |
+
69
|
| 124 |
+
6
|
| 125 |
+
38
|
| 126 |
+
61
|
| 127 |
+
27
|
| 128 |
+
80
|
| 129 |
+
67
|
| 130 |
+
63
|
| 131 |
+
32
|
| 132 |
+
14
|
| 133 |
+
26
|
| 134 |
+
21
|
| 135 |
+
57
|
| 136 |
+
77
|
| 137 |
+
81
|
| 138 |
+
54
|
| 139 |
+
76
|
| 140 |
+
46
|
| 141 |
+
13
|
| 142 |
+
23
|
| 143 |
+
39
|
| 144 |
+
40
|
| 145 |
+
51
|
| 146 |
+
2
|
| 147 |
+
62
|
| 148 |
+
79
|
| 149 |
+
78
|
| 150 |
+
44
|
| 151 |
+
4
|
| 152 |
+
12
|
| 153 |
+
65
|
| 154 |
+
58
|
| 155 |
+
34
|
| 156 |
+
33
|
| 157 |
+
28
|
| 158 |
+
9
|
| 159 |
+
18
|
| 160 |
+
24
|
| 161 |
+
45
|
| 162 |
+
75
|
| 163 |
+
30
|
| 164 |
+
42
|
| 165 |
+
25
|
| 166 |
+
73
|
| 167 |
+
43
|
| 168 |
+
7
|
| 169 |
+
64
|
| 170 |
+
19
|
| 171 |
+
11
|
| 172 |
+
47
|
| 173 |
+
20
|
| 174 |
+
70
|
| 175 |
+
74
|
| 176 |
+
59
|
| 177 |
+
5
|
| 178 |
+
17
|
| 179 |
+
48
|
| 180 |
+
71
|
| 181 |
+
36
|
| 182 |
+
29
|
| 183 |
+
15
|
| 184 |
+
37
|
| 185 |
+
22
|
| 186 |
+
50
|
| 187 |
+
60
|
| 188 |
+
16
|
| 189 |
+
10
|
| 190 |
+
55
|
| 191 |
+
68
|
| 192 |
+
56
|
| 193 |
+
66
|
| 194 |
+
|
| 195 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 196 |
+
21
|
| 197 |
+
1 -0.68
|
| 198 |
+
11 0.45
|
| 199 |
+
13 0.06
|
| 200 |
+
14 0.14
|
| 201 |
+
16 -0.14
|
| 202 |
+
17 -0.15
|
| 203 |
+
18 -0.15
|
| 204 |
+
19 0.08
|
| 205 |
+
2 -0.57
|
| 206 |
+
20 -0.15
|
| 207 |
+
21 0.08
|
| 208 |
+
22 0.28
|
| 209 |
+
3 -0.36
|
| 210 |
+
4 -0.53
|
| 211 |
+
40 0.4
|
| 212 |
+
44 0.15
|
| 213 |
+
45 0.15
|
| 214 |
+
46 0.15
|
| 215 |
+
47 0.45
|
| 216 |
+
7 0.28
|
| 217 |
+
9 0.06
|
| 218 |
+
|
| 219 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 220 |
+
11
|
| 221 |
+
|
| 222 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 223 |
+
8
|
| 224 |
+
1 1 acceptor
|
| 225 |
+
1 1 donor
|
| 226 |
+
1 15 hydrophobe
|
| 227 |
+
1 2 acceptor
|
| 228 |
+
1 3 acceptor
|
| 229 |
+
1 4 donor
|
| 230 |
+
5 5 6 8 10 12 hydrophobe
|
| 231 |
+
6 16 17 18 19 20 21 rings
|
| 232 |
+
|
| 233 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 234 |
+
22
|
| 235 |
+
|
| 236 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 237 |
+
1
|
| 238 |
+
|
| 239 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 240 |
+
0
|
| 241 |
+
|
| 242 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 243 |
+
0
|
| 244 |
+
|
| 245 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 246 |
+
0
|
| 247 |
+
|
| 248 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 249 |
+
0
|
| 250 |
+
|
| 251 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 252 |
+
1
|
| 253 |
+
|
| 254 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 255 |
+
-1
|
| 256 |
+
|
| 257 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 258 |
+
09B4D92800000001
|
| 259 |
+
|
| 260 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 261 |
+
41.132
|
| 262 |
+
|
| 263 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 264 |
+
40.597
|
| 265 |
+
|
| 266 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 267 |
+
10670039 82 18192171454593597476
|
| 268 |
+
10838868 49 17827318251685062528
|
| 269 |
+
11112241 14 16772368811900995768
|
| 270 |
+
11370993 70 18118679924761121732
|
| 271 |
+
11595378 159 18187352251947409482
|
| 272 |
+
12035758 1 18189639244860255691
|
| 273 |
+
12467345 10 18040986312019527818
|
| 274 |
+
13402501 40 18343302608447950162
|
| 275 |
+
14081887 123 18336834095526646022
|
| 276 |
+
144659 178 13009609532126822752
|
| 277 |
+
14468879 13 17390809772735613293
|
| 278 |
+
14787075 74 18201146694079050364
|
| 279 |
+
14790565 3 17547856253322104937
|
| 280 |
+
15840311 113 17485682298339060321
|
| 281 |
+
17492 54 18198315443490509695
|
| 282 |
+
21344244 246 17405411691375602063
|
| 283 |
+
21623110 236 18272380801236803744
|
| 284 |
+
21634736 98 14299917179804132189
|
| 285 |
+
22749437 52 17975980864707036390
|
| 286 |
+
23419403 2 17916578881480335097
|
| 287 |
+
23559900 14 18052816945233736170
|
| 288 |
+
3187 122 18189910874880620122
|
| 289 |
+
3524813 1 18271806847424234635
|
| 290 |
+
469060 322 18117302391189138851
|
| 291 |
+
5262128 65 16835440849013824439
|
| 292 |
+
526903 126 18193844747470534071
|
| 293 |
+
574716 61 13829838167407030138
|
| 294 |
+
9981440 41 18260830379979467962
|
| 295 |
+
|
| 296 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 297 |
+
429.27
|
| 298 |
+
8.83
|
| 299 |
+
4.28
|
| 300 |
+
1.57
|
| 301 |
+
16.1
|
| 302 |
+
0.07
|
| 303 |
+
-0.23
|
| 304 |
+
-2.43
|
| 305 |
+
-0.8
|
| 306 |
+
-1.61
|
| 307 |
+
0.63
|
| 308 |
+
-0.17
|
| 309 |
+
-0.42
|
| 310 |
+
2.1
|
| 311 |
+
|
| 312 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>
|
| 313 |
+
851.282
|
| 314 |
+
|
| 315 |
+
> <PUBCHEM_SHAPE_VOLUME>
|
| 316 |
+
255.4
|
| 317 |
+
|
| 318 |
+
> <PUBCHEM_COORDINATE_TYPE>
|
| 319 |
+
2
|
| 320 |
+
5
|
| 321 |
+
10
|
| 322 |
+
|
| 323 |
+
$$$$
|
COM/pubchem_clean_sdf/CID_442534.sdf
ADDED
|
@@ -0,0 +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 0 0 0 0
|
| 6 |
+
-0.8809 2.3512 -1.6300 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 7 |
+
1.9935 0.7820 1.4428 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 8 |
+
-1.5048 4.4277 -0.6373 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 9 |
+
-2.1809 -0.2103 0.4739 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 10 |
+
1.9401 -0.7005 -0.3581 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
4.5933 -0.1303 2.0884 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 12 |
+
5.0395 -2.9022 1.1951 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
-2.3603 -2.2150 1.5911 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
4.3208 -3.1965 -1.5892 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
0.8248 -2.9503 -1.5347 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
-0.2349 1.1631 0.2894 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 17 |
+
1.0916 1.7323 0.8572 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 18 |
+
-0.8727 2.5140 0.7062 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 19 |
+
1.6471 2.4056 -0.4087 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 20 |
+
0.2069 2.5695 1.8224 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
-0.6420 3.3108 -0.5858 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 22 |
+
-0.0938 1.2191 -1.2221 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 23 |
+
0.8503 3.7062 -0.6693 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
-0.8120 -0.1068 0.8494 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
3.1430 2.6456 -0.3786 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
2.7873 0.0342 0.5222 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 27 |
+
3.6744 -0.9147 1.3282 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 28 |
+
-2.8379 -1.3182 0.9137 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
4.4513 -1.8615 0.4133 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 30 |
+
2.6750 -1.4537 -1.3242 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 31 |
+
3.5315 -2.5098 -0.6215 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 32 |
+
-4.2501 -1.3073 0.4554 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 33 |
+
1.6665 -2.0874 -2.2774 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 34 |
+
-4.8872 -2.5103 0.2297 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
-4.8820 -0.0946 0.2703 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
-6.2140 -2.5003 -0.2005 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
-6.2089 -0.0847 -0.1598 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
-6.8748 -1.2876 -0.3951 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 39 |
+
-1.9101 2.4609 1.0499 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 40 |
+
0.5757 3.5639 2.0874 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 41 |
+
-0.0685 2.0542 2.7501 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 42 |
+
-0.4137 0.3267 -1.7653 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 43 |
+
1.0674 4.0979 -1.6710 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 44 |
+
1.0894 4.4927 0.0554 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 45 |
+
-0.2821 -0.9899 0.4822 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 46 |
+
-0.7518 -0.1115 1.9443 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 47 |
+
3.6899 2.1125 -1.1647 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 48 |
+
3.3381 3.7003 -0.6214 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 49 |
+
3.6044 2.5351 0.6085 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 50 |
+
-2.3526 4.1828 -0.2309 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 51 |
+
3.5046 0.5963 -0.0488 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 52 |
+
3.0697 -1.4858 2.0437 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 53 |
+
5.2808 -1.3312 -0.0709 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 54 |
+
3.3045 -0.7738 -1.9135 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 55 |
+
2.9072 -3.2582 -0.1188 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 56 |
+
5.1660 -0.7464 2.5765 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 57 |
+
2.1630 -2.6624 -3.0650 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 58 |
+
1.0392 -1.3203 -2.7405 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 59 |
+
5.5150 -3.4916 0.5847 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 60 |
+
4.8833 -2.5420 -2.0373 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 61 |
+
-4.3823 -3.4607 0.3745 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 62 |
+
-4.3901 0.8550 0.4591 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 63 |
+
0.1845 -3.3333 -2.1582 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 64 |
+
-6.7325 -3.4367 -0.3845 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 65 |
+
-6.7249 0.8594 -0.3086 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 66 |
+
-7.9081 -1.2798 -0.7295 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 67 |
+
1 15 1 0 0 0 0
|
| 68 |
+
1 18 1 0 0 0 0
|
| 69 |
+
2 17 1 0 0 0 0
|
| 70 |
+
2 18 1 0 0 0 0
|
| 71 |
+
3 13 1 0 0 0 0
|
| 72 |
+
3 22 1 0 0 0 0
|
| 73 |
+
4 17 1 0 0 0 0
|
| 74 |
+
4 46 1 0 0 0 0
|
| 75 |
+
5 20 1 0 0 0 0
|
| 76 |
+
5 24 1 0 0 0 0
|
| 77 |
+
6 22 1 0 0 0 0
|
| 78 |
+
6 26 1 0 0 0 0
|
| 79 |
+
7 23 1 0 0 0 0
|
| 80 |
+
7 52 1 0 0 0 0
|
| 81 |
+
8 25 1 0 0 0 0
|
| 82 |
+
8 55 1 0 0 0 0
|
| 83 |
+
9 24 2 0 0 0 0
|
| 84 |
+
10 27 1 0 0 0 0
|
| 85 |
+
10 56 1 0 0 0 0
|
| 86 |
+
11 29 1 0 0 0 0
|
| 87 |
+
11 59 1 0 0 0 0
|
| 88 |
+
12 13 1 0 0 0 0
|
| 89 |
+
12 14 1 0 0 0 0
|
| 90 |
+
12 18 1 0 0 0 0
|
| 91 |
+
12 20 1 0 0 0 0
|
| 92 |
+
13 15 1 0 0 0 0
|
| 93 |
+
13 16 1 0 0 0 0
|
| 94 |
+
14 16 1 0 0 0 0
|
| 95 |
+
14 17 1 0 0 0 0
|
| 96 |
+
14 35 1 0 0 0 0
|
| 97 |
+
15 19 1 0 0 0 0
|
| 98 |
+
15 21 1 0 0 0 0
|
| 99 |
+
16 36 1 0 0 0 0
|
| 100 |
+
16 37 1 0 0 0 0
|
| 101 |
+
17 19 1 0 0 0 0
|
| 102 |
+
18 38 1 0 0 0 0
|
| 103 |
+
19 39 1 0 0 0 0
|
| 104 |
+
19 40 1 0 0 0 0
|
| 105 |
+
20 41 1 0 0 0 0
|
| 106 |
+
20 42 1 0 0 0 0
|
| 107 |
+
21 43 1 0 0 0 0
|
| 108 |
+
21 44 1 0 0 0 0
|
| 109 |
+
21 45 1 0 0 0 0
|
| 110 |
+
22 23 1 0 0 0 0
|
| 111 |
+
22 47 1 0 0 0 0
|
| 112 |
+
23 25 1 0 0 0 0
|
| 113 |
+
23 48 1 0 0 0 0
|
| 114 |
+
24 28 1 0 0 0 0
|
| 115 |
+
25 27 1 0 0 0 0
|
| 116 |
+
25 49 1 0 0 0 0
|
| 117 |
+
26 27 1 0 0 0 0
|
| 118 |
+
26 29 1 0 0 0 0
|
| 119 |
+
26 50 1 0 0 0 0
|
| 120 |
+
27 51 1 0 0 0 0
|
| 121 |
+
28 30 2 0 0 0 0
|
| 122 |
+
28 31 1 0 0 0 0
|
| 123 |
+
29 53 1 0 0 0 0
|
| 124 |
+
29 54 1 0 0 0 0
|
| 125 |
+
30 32 1 0 0 0 0
|
| 126 |
+
30 57 1 0 0 0 0
|
| 127 |
+
31 33 2 0 0 0 0
|
| 128 |
+
31 58 1 0 0 0 0
|
| 129 |
+
32 34 2 0 0 0 0
|
| 130 |
+
32 60 1 0 0 0 0
|
| 131 |
+
33 34 1 0 0 0 0
|
| 132 |
+
33 61 1 0 0 0 0
|
| 133 |
+
34 62 1 0 0 0 0
|
| 134 |
+
M END
|
| 135 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 136 |
+
442534
|
| 137 |
+
|
| 138 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 139 |
+
1
|
| 140 |
+
|
| 141 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 142 |
+
1
|
| 143 |
+
6
|
| 144 |
+
2
|
| 145 |
+
4
|
| 146 |
+
12
|
| 147 |
+
17
|
| 148 |
+
10
|
| 149 |
+
9
|
| 150 |
+
16
|
| 151 |
+
5
|
| 152 |
+
15
|
| 153 |
+
13
|
| 154 |
+
7
|
| 155 |
+
3
|
| 156 |
+
8
|
| 157 |
+
14
|
| 158 |
+
18
|
| 159 |
+
11
|
| 160 |
+
|
| 161 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 162 |
+
39
|
| 163 |
+
1 -0.56
|
| 164 |
+
10 -0.68
|
| 165 |
+
11 -0.68
|
| 166 |
+
13 0.26
|
| 167 |
+
15 0.28
|
| 168 |
+
17 0.56
|
| 169 |
+
18 0.56
|
| 170 |
+
2 -0.56
|
| 171 |
+
20 0.28
|
| 172 |
+
22 0.56
|
| 173 |
+
23 0.28
|
| 174 |
+
24 0.63
|
| 175 |
+
25 0.28
|
| 176 |
+
26 0.28
|
| 177 |
+
27 0.28
|
| 178 |
+
28 0.09
|
| 179 |
+
29 0.28
|
| 180 |
+
3 -0.54
|
| 181 |
+
30 -0.15
|
| 182 |
+
31 -0.15
|
| 183 |
+
32 -0.15
|
| 184 |
+
33 -0.15
|
| 185 |
+
34 -0.15
|
| 186 |
+
4 -0.68
|
| 187 |
+
46 0.4
|
| 188 |
+
5 -0.43
|
| 189 |
+
52 0.4
|
| 190 |
+
55 0.4
|
| 191 |
+
56 0.4
|
| 192 |
+
57 0.15
|
| 193 |
+
58 0.15
|
| 194 |
+
59 0.4
|
| 195 |
+
6 -0.56
|
| 196 |
+
60 0.15
|
| 197 |
+
61 0.15
|
| 198 |
+
62 0.15
|
| 199 |
+
7 -0.68
|
| 200 |
+
8 -0.68
|
| 201 |
+
9 -0.57
|
| 202 |
+
|
| 203 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 204 |
+
9
|
| 205 |
+
|
| 206 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 207 |
+
18
|
| 208 |
+
1 1 acceptor
|
| 209 |
+
1 10 acceptor
|
| 210 |
+
1 10 donor
|
| 211 |
+
1 11 acceptor
|
| 212 |
+
1 11 donor
|
| 213 |
+
1 2 acceptor
|
| 214 |
+
1 3 acceptor
|
| 215 |
+
1 4 acceptor
|
| 216 |
+
1 4 donor
|
| 217 |
+
1 6 acceptor
|
| 218 |
+
1 7 acceptor
|
| 219 |
+
1 7 donor
|
| 220 |
+
1 8 acceptor
|
| 221 |
+
1 8 donor
|
| 222 |
+
1 9 acceptor
|
| 223 |
+
10 1 2 12 13 14 15 16 17 18 19 rings
|
| 224 |
+
6 28 30 31 32 33 34 rings
|
| 225 |
+
6 6 22 23 25 26 27 rings
|
| 226 |
+
|
| 227 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 228 |
+
34
|
| 229 |
+
|
| 230 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 231 |
+
11
|
| 232 |
+
|
| 233 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 234 |
+
0
|
| 235 |
+
|
| 236 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 237 |
+
0
|
| 238 |
+
|
| 239 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 240 |
+
0
|
| 241 |
+
|
| 242 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 243 |
+
0
|
| 244 |
+
|
| 245 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 246 |
+
1
|
| 247 |
+
|
| 248 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 249 |
+
1
|
| 250 |
+
|
| 251 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 252 |
+
0006C0A600000001
|
| 253 |
+
|
| 254 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 255 |
+
128.8307
|
| 256 |
+
|
| 257 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 258 |
+
91.51
|
| 259 |
+
|
| 260 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 261 |
+
11828532 37 17895477051027832595
|
| 262 |
+
12293681 25 17983286037067808271
|
| 263 |
+
12422481 6 17917986149137607047
|
| 264 |
+
12788726 201 18116447963227095085
|
| 265 |
+
13631057 29 18264774264560180650
|
| 266 |
+
14068700 675 18187362078579777634
|
| 267 |
+
1454969 45 18340210778072835596
|
| 268 |
+
14725015 67 18337663110072350794
|
| 269 |
+
15324884 4 17841692047151865444
|
| 270 |
+
15420108 30 17622146285133522472
|
| 271 |
+
17492 54 18047783613108665484
|
| 272 |
+
1813 80 18409172099368016531
|
| 273 |
+
1979834 28 17989489632069954430
|
| 274 |
+
21223535 225 18266723699145590381
|
| 275 |
+
21285901 2 18412264999981330487
|
| 276 |
+
23559900 14 18264204880750485619
|
| 277 |
+
24893992 56 18114465575351642993
|
| 278 |
+
3103668 31 17970055648876363549
|
| 279 |
+
3380486 77 18113902658407754002
|
| 280 |
+
338550 245 18057882648869365079
|
| 281 |
+
4066623 53 18114452406259370533
|
| 282 |
+
427121 178 10735880568720007408
|
| 283 |
+
460360 51 18116170998736237521
|
| 284 |
+
463206 1 17916302917559140527
|
| 285 |
+
50009960 94 17753867692026172123
|
| 286 |
+
513532 50 17773890859481384982
|
| 287 |
+
563151 248 12462998858907941038
|
| 288 |
+
57527293 21 18120667833958843914
|
| 289 |
+
613672 6 18336275577843032170
|
| 290 |
+
6443956 14 18342181080976206715
|
| 291 |
+
|
| 292 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 293 |
+
635.14
|
| 294 |
+
11.65
|
| 295 |
+
4.93
|
| 296 |
+
1.68
|
| 297 |
+
19.35
|
| 298 |
+
2.34
|
| 299 |
+
0.09
|
| 300 |
+
-12.51
|
| 301 |
+
-1.29
|
| 302 |
+
-2.85
|
| 303 |
+
1.44
|
| 304 |
+
-1.54
|
| 305 |
+
-0.39
|
| 306 |
+
0.62
|
| 307 |
+
|
| 308 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>
|
| 309 |
+
1418.307
|
| 310 |
+
|
| 311 |
+
> <PUBCHEM_SHAPE_VOLUME>
|
| 312 |
+
337.5
|
| 313 |
+
|
| 314 |
+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 0 0 0 0 0 0
|
| 16 |
+
2.7551 -0.1714 -0.1490 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
-5.6035 -0.1930 -0.4181 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
2.3522 2.2253 -0.0690 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
3.2352 1.1382 -0.1834 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
-3.1688 -1.0320 0.5075 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
-3.7008 0.3123 1.5088 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
-1.9824 1.8412 0.4202 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
-3.8376 0.2475 -1.5558 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
-4.3979 1.5772 -0.5408 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
0.3042 2.8621 0.1685 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
-5.5018 -1.2812 -0.4801 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
-6.2834 0.1301 -1.2126 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
-6.0627 0.0555 0.5440 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
2.7427 3.2390 -0.0978 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
4.2982 1.3344 -0.2991 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
4.5154 -0.8779 -0.3559 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
1 5 1 0 0 0 0
|
| 33 |
+
1 11 1 0 0 0 0
|
| 34 |
+
2 12 1 0 0 0 0
|
| 35 |
+
2 27 1 0 0 0 0
|
| 36 |
+
3 11 2 0 0 0 0
|
| 37 |
+
4 5 1 0 0 0 0
|
| 38 |
+
4 7 2 0 0 0 0
|
| 39 |
+
4 10 1 0 0 0 0
|
| 40 |
+
5 8 2 0 0 0 0
|
| 41 |
+
6 8 1 0 0 0 0
|
| 42 |
+
6 9 1 0 0 0 0
|
| 43 |
+
6 16 1 0 0 0 0
|
| 44 |
+
6 17 1 0 0 0 0
|
| 45 |
+
7 11 1 0 0 0 0
|
| 46 |
+
7 12 1 0 0 0 0
|
| 47 |
+
8 18 1 0 0 0 0
|
| 48 |
+
9 13 1 0 0 0 0
|
| 49 |
+
9 19 1 0 0 0 0
|
| 50 |
+
9 20 1 0 0 0 0
|
| 51 |
+
10 14 2 0 0 0 0
|
| 52 |
+
10 21 1 0 0 0 0
|
| 53 |
+
12 15 2 0 0 0 0
|
| 54 |
+
13 22 1 0 0 0 0
|
| 55 |
+
13 23 1 0 0 0 0
|
| 56 |
+
13 24 1 0 0 0 0
|
| 57 |
+
14 15 1 0 0 0 0
|
| 58 |
+
14 25 1 0 0 0 0
|
| 59 |
+
15 26 1 0 0 0 0
|
| 60 |
+
M END
|
| 61 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 62 |
+
5281559
|
| 63 |
+
|
| 64 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 65 |
+
0.6
|
| 66 |
+
|
| 67 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 68 |
+
1
|
| 69 |
+
5
|
| 70 |
+
3
|
| 71 |
+
4
|
| 72 |
+
2
|
| 73 |
+
|
| 74 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 75 |
+
18
|
| 76 |
+
1 -0.23
|
| 77 |
+
10 -0.15
|
| 78 |
+
11 0.63
|
| 79 |
+
12 0.08
|
| 80 |
+
14 -0.15
|
| 81 |
+
15 -0.15
|
| 82 |
+
18 0.15
|
| 83 |
+
2 -0.53
|
| 84 |
+
21 0.15
|
| 85 |
+
25 0.15
|
| 86 |
+
26 0.15
|
| 87 |
+
27 0.45
|
| 88 |
+
3 -0.57
|
| 89 |
+
4 0.03
|
| 90 |
+
5 0.05
|
| 91 |
+
6 0.14
|
| 92 |
+
7 0.09
|
| 93 |
+
8 -0.29
|
| 94 |
+
|
| 95 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 96 |
+
2.2
|
| 97 |
+
|
| 98 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 99 |
+
5
|
| 100 |
+
1 13 hydrophobe
|
| 101 |
+
1 2 donor
|
| 102 |
+
1 3 acceptor
|
| 103 |
+
5 1 4 5 7 11 rings
|
| 104 |
+
6 4 7 10 12 14 15 rings
|
| 105 |
+
|
| 106 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 107 |
+
15
|
| 108 |
+
|
| 109 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 110 |
+
0
|
| 111 |
+
|
| 112 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 113 |
+
0
|
| 114 |
+
|
| 115 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 116 |
+
1
|
| 117 |
+
|
| 118 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 119 |
+
0
|
| 120 |
+
|
| 121 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 122 |
+
0
|
| 123 |
+
|
| 124 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 125 |
+
1
|
| 126 |
+
|
| 127 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 128 |
+
4
|
| 129 |
+
|
| 130 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 131 |
+
0050971700000001
|
| 132 |
+
|
| 133 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 134 |
+
31.3581
|
| 135 |
+
|
| 136 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 137 |
+
25.459
|
| 138 |
+
|
| 139 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 140 |
+
10219947 1 18409173203127288232
|
| 141 |
+
10693767 8 18130225934935441742
|
| 142 |
+
10967382 1 18410859871360372144
|
| 143 |
+
11471102 20 18410011035293170293
|
| 144 |
+
12654215 9 18334292041786140964
|
| 145 |
+
12730499 353 18260552221550348587
|
| 146 |
+
13380535 76 18408323319383445963
|
| 147 |
+
13836976 161 18411981381931951471
|
| 148 |
+
13862211 1 18338517413996845266
|
| 149 |
+
14251717 144 18411981351650791711
|
| 150 |
+
14415576 193 18334296470203482389
|
| 151 |
+
14576447 43 18200863059435435687
|
| 152 |
+
14897335 6 18341048635164749504
|
| 153 |
+
14911166 2 18410583876867322502
|
| 154 |
+
14993402 34 18412271635726862724
|
| 155 |
+
15442244 35 17980202981036838921
|
| 156 |
+
15477762 27 18341331098163240887
|
| 157 |
+
16945 1 18338811017580761744
|
| 158 |
+
18186145 218 18342470265113381921
|
| 159 |
+
193761 8 17979078507159020850
|
| 160 |
+
200 152 18201998820481603625
|
| 161 |
+
20606313 2 18410012139052409516
|
| 162 |
+
20645477 70 18411700972112515111
|
| 163 |
+
21639500 275 18411128160782384837
|
| 164 |
+
221490 88 18337398244045169339
|
| 165 |
+
22289505 5 18262788554902230941
|
| 166 |
+
2334 1 18194971974379781354
|
| 167 |
+
23402539 116 18130504128508865564
|
| 168 |
+
23402655 69 18341891888149162501
|
| 169 |
+
23557571 272 14261363435514009249
|
| 170 |
+
23558518 356 17611461230680724634
|
| 171 |
+
25 1 18408038528633771997
|
| 172 |
+
2748010 2 18193853741052865562
|
| 173 |
+
29717793 49 17775001259479257141
|
| 174 |
+
3060560 45 18411417314880903214
|
| 175 |
+
3071541 37 18334861618815843934
|
| 176 |
+
33824 294 18408884044570019187
|
| 177 |
+
4072396 5 18261938683583841256
|
| 178 |
+
528886 8 18411136974165922640
|
| 179 |
+
602551 16 15123212395505314813
|
| 180 |
+
7364860 26 18412826850148882250
|
| 181 |
+
81539 233 18259703414978055967
|
| 182 |
+
8272917 22 18341899533301465791
|
| 183 |
+
|
| 184 |
+
> <PUBCHEM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-12172504163D
|
| 3 |
+
|
| 4 |
+
42 43 0 1 0 0 0 0 0999 V2000
|
| 5 |
+
1.3111 -0.7818 0.6237 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 6 |
+
0.9503 1.5128 0.8434 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 7 |
+
5.3109 -0.2136 -0.1152 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 8 |
+
4.0695 -2.7367 -0.7847 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 9 |
+
3.4041 2.0029 -0.4785 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 10 |
+
0.0183 -3.1922 0.3496 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
0.3851 4.1202 0.0639 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 12 |
+
-4.0983 -3.3268 -0.1505 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
-5.7460 -1.7490 -0.1589 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
3.9332 -0.3514 -0.4665 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 15 |
+
3.4587 -1.7241 0.0107 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 16 |
+
3.1266 0.7708 0.1867 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 17 |
+
1.9368 -1.8419 -0.1015 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 18 |
+
1.6244 0.5035 0.0924 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 19 |
+
1.4281 -3.1582 0.4776 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
-0.3046 1.8553 0.4204 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
-1.2993 0.8820 0.3827 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
-0.5832 3.1625 0.0312 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
-2.5828 1.2189 -0.0474 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
-1.8667 3.4993 -0.3987 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
-2.8663 2.5276 -0.4382 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
-3.6258 0.2060 -0.0878 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
-3.4177 -1.1293 -0.1124 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
-4.5663 -2.0568 -0.1425 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
3.8835 -0.2763 -1.5598 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
3.7822 -1.8815 1.0470 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
3.4317 0.8992 1.2320 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
1.6128 -1.7853 -1.1497 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 33 |
+
1.3029 0.5566 -0.9585 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 34 |
+
1.6698 -3.2490 1.5418 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
1.8427 -4.0203 -0.0527 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
5.7929 -0.9475 -0.5336 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
3.7823 -2.6096 -1.7051 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
3.1379 1.9100 -1.4091 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 39 |
+
-0.3390 -2.4391 0.8502 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 40 |
+
-1.0710 -0.1184 0.7334 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 41 |
+
-2.1011 4.5149 -0.7064 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 42 |
+
-3.8605 2.8086 -0.7776 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 43 |
+
-4.6454 0.5859 -0.1009 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 44 |
+
0.0076 4.9629 -0.2416 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 45 |
+
-2.4284 -1.5711 -0.1265 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 46 |
+
-4.8247 -3.9859 -0.1708 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 47 |
+
1 13 1 0 0 0 0
|
| 48 |
+
1 14 1 0 0 0 0
|
| 49 |
+
2 14 1 0 0 0 0
|
| 50 |
+
2 16 1 0 0 0 0
|
| 51 |
+
3 10 1 0 0 0 0
|
| 52 |
+
3 32 1 0 0 0 0
|
| 53 |
+
4 11 1 0 0 0 0
|
| 54 |
+
4 33 1 0 0 0 0
|
| 55 |
+
5 12 1 0 0 0 0
|
| 56 |
+
5 34 1 0 0 0 0
|
| 57 |
+
6 15 1 0 0 0 0
|
| 58 |
+
6 35 1 0 0 0 0
|
| 59 |
+
7 18 1 0 0 0 0
|
| 60 |
+
7 40 1 0 0 0 0
|
| 61 |
+
8 24 1 0 0 0 0
|
| 62 |
+
8 42 1 0 0 0 0
|
| 63 |
+
9 24 2 0 0 0 0
|
| 64 |
+
10 11 1 0 0 0 0
|
| 65 |
+
10 12 1 0 0 0 0
|
| 66 |
+
10 25 1 0 0 0 0
|
| 67 |
+
11 13 1 0 0 0 0
|
| 68 |
+
11 26 1 0 0 0 0
|
| 69 |
+
12 14 1 0 0 0 0
|
| 70 |
+
12 27 1 0 0 0 0
|
| 71 |
+
13 15 1 0 0 0 0
|
| 72 |
+
13 28 1 0 0 0 0
|
| 73 |
+
14 29 1 0 0 0 0
|
| 74 |
+
15 30 1 0 0 0 0
|
| 75 |
+
15 31 1 0 0 0 0
|
| 76 |
+
16 17 1 0 0 0 0
|
| 77 |
+
16 18 2 0 0 0 0
|
| 78 |
+
17 19 2 0 0 0 0
|
| 79 |
+
17 36 1 0 0 0 0
|
| 80 |
+
18 20 1 0 0 0 0
|
| 81 |
+
19 21 1 0 0 0 0
|
| 82 |
+
19 22 1 0 0 0 0
|
| 83 |
+
20 21 2 0 0 0 0
|
| 84 |
+
20 37 1 0 0 0 0
|
| 85 |
+
21 38 1 0 0 0 0
|
| 86 |
+
22 23 2 0 0 0 0
|
| 87 |
+
22 39 1 0 0 0 0
|
| 88 |
+
23 24 1 0 0 0 0
|
| 89 |
+
23 41 1 0 0 0 0
|
| 90 |
+
M END
|
| 91 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 92 |
+
5281759
|
| 93 |
+
|
| 94 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 95 |
+
0.8
|
| 96 |
+
|
| 97 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 98 |
+
1
|
| 99 |
+
135
|
| 100 |
+
32
|
| 101 |
+
171
|
| 102 |
+
156
|
| 103 |
+
145
|
| 104 |
+
24
|
| 105 |
+
158
|
| 106 |
+
110
|
| 107 |
+
129
|
| 108 |
+
115
|
| 109 |
+
5
|
| 110 |
+
152
|
| 111 |
+
14
|
| 112 |
+
154
|
| 113 |
+
59
|
| 114 |
+
50
|
| 115 |
+
31
|
| 116 |
+
99
|
| 117 |
+
17
|
| 118 |
+
147
|
| 119 |
+
53
|
| 120 |
+
155
|
| 121 |
+
40
|
| 122 |
+
91
|
| 123 |
+
69
|
| 124 |
+
56
|
| 125 |
+
8
|
| 126 |
+
100
|
| 127 |
+
36
|
| 128 |
+
54
|
| 129 |
+
116
|
| 130 |
+
150
|
| 131 |
+
10
|
| 132 |
+
35
|
| 133 |
+
165
|
| 134 |
+
139
|
| 135 |
+
21
|
| 136 |
+
168
|
| 137 |
+
84
|
| 138 |
+
121
|
| 139 |
+
162
|
| 140 |
+
87
|
| 141 |
+
102
|
| 142 |
+
2
|
| 143 |
+
146
|
| 144 |
+
38
|
| 145 |
+
103
|
| 146 |
+
133
|
| 147 |
+
15
|
| 148 |
+
128
|
| 149 |
+
112
|
| 150 |
+
76
|
| 151 |
+
120
|
| 152 |
+
83
|
| 153 |
+
3
|
| 154 |
+
82
|
| 155 |
+
88
|
| 156 |
+
137
|
| 157 |
+
161
|
| 158 |
+
92
|
| 159 |
+
118
|
| 160 |
+
142
|
| 161 |
+
30
|
| 162 |
+
160
|
| 163 |
+
106
|
| 164 |
+
127
|
| 165 |
+
126
|
| 166 |
+
132
|
| 167 |
+
164
|
| 168 |
+
119
|
| 169 |
+
109
|
| 170 |
+
11
|
| 171 |
+
52
|
| 172 |
+
138
|
| 173 |
+
67
|
| 174 |
+
122
|
| 175 |
+
136
|
| 176 |
+
85
|
| 177 |
+
101
|
| 178 |
+
134
|
| 179 |
+
25
|
| 180 |
+
73
|
| 181 |
+
159
|
| 182 |
+
97
|
| 183 |
+
19
|
| 184 |
+
68
|
| 185 |
+
143
|
| 186 |
+
114
|
| 187 |
+
172
|
| 188 |
+
130
|
| 189 |
+
66
|
| 190 |
+
64
|
| 191 |
+
48
|
| 192 |
+
173
|
| 193 |
+
16
|
| 194 |
+
141
|
| 195 |
+
123
|
| 196 |
+
167
|
| 197 |
+
43
|
| 198 |
+
4
|
| 199 |
+
95
|
| 200 |
+
89
|
| 201 |
+
166
|
| 202 |
+
105
|
| 203 |
+
163
|
| 204 |
+
81
|
| 205 |
+
28
|
| 206 |
+
42
|
| 207 |
+
6
|
| 208 |
+
124
|
| 209 |
+
117
|
| 210 |
+
96
|
| 211 |
+
7
|
| 212 |
+
140
|
| 213 |
+
113
|
| 214 |
+
70
|
| 215 |
+
57
|
| 216 |
+
78
|
| 217 |
+
169
|
| 218 |
+
93
|
| 219 |
+
51
|
| 220 |
+
13
|
| 221 |
+
72
|
| 222 |
+
80
|
| 223 |
+
37
|
| 224 |
+
174
|
| 225 |
+
45
|
| 226 |
+
65
|
| 227 |
+
98
|
| 228 |
+
62
|
| 229 |
+
61
|
| 230 |
+
20
|
| 231 |
+
148
|
| 232 |
+
170
|
| 233 |
+
23
|
| 234 |
+
26
|
| 235 |
+
60
|
| 236 |
+
55
|
| 237 |
+
86
|
| 238 |
+
58
|
| 239 |
+
94
|
| 240 |
+
39
|
| 241 |
+
104
|
| 242 |
+
157
|
| 243 |
+
34
|
| 244 |
+
41
|
| 245 |
+
44
|
| 246 |
+
18
|
| 247 |
+
144
|
| 248 |
+
74
|
| 249 |
+
49
|
| 250 |
+
151
|
| 251 |
+
46
|
| 252 |
+
29
|
| 253 |
+
107
|
| 254 |
+
75
|
| 255 |
+
131
|
| 256 |
+
71
|
| 257 |
+
47
|
| 258 |
+
12
|
| 259 |
+
108
|
| 260 |
+
77
|
| 261 |
+
90
|
| 262 |
+
153
|
| 263 |
+
125
|
| 264 |
+
22
|
| 265 |
+
149
|
| 266 |
+
33
|
| 267 |
+
79
|
| 268 |
+
63
|
| 269 |
+
9
|
| 270 |
+
111
|
| 271 |
+
27
|
| 272 |
+
|
| 273 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 274 |
+
35
|
| 275 |
+
1 -0.56
|
| 276 |
+
10 0.28
|
| 277 |
+
11 0.28
|
| 278 |
+
12 0.28
|
| 279 |
+
13 0.28
|
| 280 |
+
14 0.56
|
| 281 |
+
15 0.28
|
| 282 |
+
16 0.08
|
| 283 |
+
17 -0.15
|
| 284 |
+
18 0.08
|
| 285 |
+
19 0.03
|
| 286 |
+
2 -0.36
|
| 287 |
+
20 -0.15
|
| 288 |
+
21 -0.15
|
| 289 |
+
22 -0.18
|
| 290 |
+
23 -0.14
|
| 291 |
+
24 0.71
|
| 292 |
+
3 -0.68
|
| 293 |
+
32 0.4
|
| 294 |
+
33 0.4
|
| 295 |
+
34 0.4
|
| 296 |
+
35 0.4
|
| 297 |
+
36 0.15
|
| 298 |
+
37 0.15
|
| 299 |
+
38 0.15
|
| 300 |
+
39 0.15
|
| 301 |
+
4 -0.68
|
| 302 |
+
40 0.45
|
| 303 |
+
41 0.15
|
| 304 |
+
42 0.5
|
| 305 |
+
5 -0.68
|
| 306 |
+
6 -0.68
|
| 307 |
+
7 -0.53
|
| 308 |
+
8 -0.65
|
| 309 |
+
9 -0.57
|
| 310 |
+
|
| 311 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 312 |
+
6.2
|
| 313 |
+
|
| 314 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 315 |
+
16
|
| 316 |
+
1 1 acceptor
|
| 317 |
+
1 2 acceptor
|
| 318 |
+
1 3 acceptor
|
| 319 |
+
1 3 donor
|
| 320 |
+
1 4 acceptor
|
| 321 |
+
1 4 donor
|
| 322 |
+
1 5 acceptor
|
| 323 |
+
1 5 donor
|
| 324 |
+
1 6 acceptor
|
| 325 |
+
1 6 donor
|
| 326 |
+
1 7 donor
|
| 327 |
+
1 8 acceptor
|
| 328 |
+
1 9 acceptor
|
| 329 |
+
3 8 9 24 anion
|
| 330 |
+
6 1 10 11 12 13 14 rings
|
| 331 |
+
6 16 17 18 19 20 21 rings
|
| 332 |
+
|
| 333 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 334 |
+
24
|
| 335 |
+
|
| 336 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 337 |
+
5
|
| 338 |
+
|
| 339 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 340 |
+
0
|
| 341 |
+
|
| 342 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 343 |
+
1
|
| 344 |
+
|
| 345 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 346 |
+
0
|
| 347 |
+
|
| 348 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 349 |
+
0
|
| 350 |
+
|
| 351 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 352 |
+
1
|
| 353 |
+
|
| 354 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 355 |
+
3
|
| 356 |
+
|
| 357 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 358 |
+
005097DF00000001
|
| 359 |
+
|
| 360 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 361 |
+
74.0056
|
| 362 |
+
|
| 363 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 364 |
+
81.319
|
| 365 |
+
|
| 366 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 367 |
+
10616163 171 18339642213900975583
|
| 368 |
+
108634 29 18336838575531515346
|
| 369 |
+
12553582 1 18337660988932934523
|
| 370 |
+
12596599 1 17773335459943637891
|
| 371 |
+
13140716 1 18341605958695319096
|
| 372 |
+
13402501 40 18264208178890295171
|
| 373 |
+
13631057 29 18413388718097475624
|
| 374 |
+
138480 1 15240602385651997769
|
| 375 |
+
13989917 61 17545602718315732523
|
| 376 |
+
14178342 30 18048579435914536546
|
| 377 |
+
14790565 3 17112695354773983165
|
| 378 |
+
14863182 85 17687466080448753829
|
| 379 |
+
15352361 1 18411698820423576959
|
| 380 |
+
17492 89 18339360752057573926
|
| 381 |
+
19141452 34 18341620274581095265
|
| 382 |
+
19591789 44 18339359763797779682
|
| 383 |
+
20645477 70 17902778993382832227
|
| 384 |
+
221490 88 18341051813957285800
|
| 385 |
+
22393880 68 18194405489995661030
|
| 386 |
+
23379529 103 18200886054194979654
|
| 387 |
+
23559900 14 18195235629843733704
|
| 388 |
+
2871803 45 18409725175423914727
|
| 389 |
+
3014063 31 18410571829442268171
|
| 390 |
+
329604 57 18335703866271559310
|
| 391 |
+
3421961 26 18196370544992087849
|
| 392 |
+
46194498 28 17532363365639200765
|
| 393 |
+
463206 1 18265337381626832315
|
| 394 |
+
5309563 4 18339078315308752303
|
| 395 |
+
6443956 14 18336825415972545581
|
| 396 |
+
9709674 26 18053382102356391742
|
| 397 |
+
|
| 398 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 399 |
+
441.08
|
| 400 |
+
9.44
|
| 401 |
+
5.09
|
| 402 |
+
0.71
|
| 403 |
+
0.77
|
| 404 |
+
0.55
|
| 405 |
+
-0.01
|
| 406 |
+
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 0 0 0 0 0 0 0 0
|
| 15 |
+
2.6484 -1.3247 -0.9083 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
2.6183 -1.3611 0.8564 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
0.1621 -0.6695 -0.9387 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
0.1535 -0.7209 0.8419 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
4.4006 0.4646 -0.8448 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
4.3699 0.4266 0.9294 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
4.9196 -0.9919 0.0208 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
-0.3495 2.0669 0.0027 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
-2.7423 1.6512 0.0291 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
-1.8112 -1.3708 -0.0226 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
1 8 2 0 0 0 0
|
| 26 |
+
2 3 1 0 0 0 0
|
| 27 |
+
2 4 1 0 0 0 0
|
| 28 |
+
2 9 1 0 0 0 0
|
| 29 |
+
2 10 1 0 0 0 0
|
| 30 |
+
3 5 1 0 0 0 0
|
| 31 |
+
3 11 1 0 0 0 0
|
| 32 |
+
3 12 1 0 0 0 0
|
| 33 |
+
4 6 1 0 0 0 0
|
| 34 |
+
4 13 1 0 0 0 0
|
| 35 |
+
4 14 1 0 0 0 0
|
| 36 |
+
5 15 1 0 0 0 0
|
| 37 |
+
5 16 1 0 0 0 0
|
| 38 |
+
5 17 1 0 0 0 0
|
| 39 |
+
6 7 2 0 0 0 0
|
| 40 |
+
6 18 1 0 0 0 0
|
| 41 |
+
7 8 1 0 0 0 0
|
| 42 |
+
7 19 1 0 0 0 0
|
| 43 |
+
8 20 1 0 0 0 0
|
| 44 |
+
M END
|
| 45 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 46 |
+
5362616
|
| 47 |
+
|
| 48 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 49 |
+
0.6
|
| 50 |
+
|
| 51 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 52 |
+
1
|
| 53 |
+
19
|
| 54 |
+
31
|
| 55 |
+
35
|
| 56 |
+
2
|
| 57 |
+
13
|
| 58 |
+
27
|
| 59 |
+
34
|
| 60 |
+
38
|
| 61 |
+
3
|
| 62 |
+
39
|
| 63 |
+
32
|
| 64 |
+
9
|
| 65 |
+
6
|
| 66 |
+
4
|
| 67 |
+
24
|
| 68 |
+
25
|
| 69 |
+
37
|
| 70 |
+
16
|
| 71 |
+
30
|
| 72 |
+
36
|
| 73 |
+
28
|
| 74 |
+
17
|
| 75 |
+
5
|
| 76 |
+
21
|
| 77 |
+
11
|
| 78 |
+
33
|
| 79 |
+
20
|
| 80 |
+
14
|
| 81 |
+
23
|
| 82 |
+
15
|
| 83 |
+
22
|
| 84 |
+
18
|
| 85 |
+
10
|
| 86 |
+
26
|
| 87 |
+
7
|
| 88 |
+
8
|
| 89 |
+
29
|
| 90 |
+
12
|
| 91 |
+
|
| 92 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 93 |
+
8
|
| 94 |
+
1 -0.57
|
| 95 |
+
18 0.15
|
| 96 |
+
19 0.15
|
| 97 |
+
20 0.06
|
| 98 |
+
4 0.14
|
| 99 |
+
6 -0.29
|
| 100 |
+
7 -0.14
|
| 101 |
+
8 0.5
|
| 102 |
+
|
| 103 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 104 |
+
4
|
| 105 |
+
|
| 106 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 107 |
+
3
|
| 108 |
+
1 1 acceptor
|
| 109 |
+
1 5 hydrophobe
|
| 110 |
+
4 2 3 4 6 hydrophobe
|
| 111 |
+
|
| 112 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 113 |
+
8
|
| 114 |
+
|
| 115 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 116 |
+
0
|
| 117 |
+
|
| 118 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 119 |
+
0
|
| 120 |
+
|
| 121 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 122 |
+
1
|
| 123 |
+
|
| 124 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 125 |
+
0
|
| 126 |
+
|
| 127 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 128 |
+
0
|
| 129 |
+
|
| 130 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 131 |
+
1
|
| 132 |
+
|
| 133 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 134 |
+
1
|
| 135 |
+
|
| 136 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 137 |
+
0051D3B800000001
|
| 138 |
+
|
| 139 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 140 |
+
4.6867
|
| 141 |
+
|
| 142 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 143 |
+
15.223
|
| 144 |
+
|
| 145 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 146 |
+
11062470 55 12612752415108055942
|
| 147 |
+
12932764 1 15769481037755428972
|
| 148 |
+
14325111 11 18410856517101573252
|
| 149 |
+
177051 138 18412545396958218478
|
| 150 |
+
20211469 26 18272366482031928045
|
| 151 |
+
21293036 1 16081089294149953874
|
| 152 |
+
22485316 2 18412539907689307783
|
| 153 |
+
5460574 1 9151164359938702796
|
| 154 |
+
|
| 155 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 156 |
+
158.77
|
| 157 |
+
7.02
|
| 158 |
+
1.02
|
| 159 |
+
0.61
|
| 160 |
+
2.55
|
| 161 |
+
0.08
|
| 162 |
+
0
|
| 163 |
+
-2
|
| 164 |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734 -1.0123 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
2.3859 0.8142 1.3462 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
-2.4158 1.1793 0.6761 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
-0.4944 -2.2292 -1.1575 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
-1.0091 -2.6346 0.4735 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
0.8738 -1.3477 1.4378 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
1.4148 -2.6354 0.3823 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
1.7642 -1.0068 -1.5236 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
-1.2620 -0.0198 2.1049 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
-2.0994 -0.2389 -2.1480 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
4.2245 1.2884 -0.7187 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
3.1168 0.9305 -2.0508 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
2.7805 2.2959 -0.9777 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
1.5645 1.5125 1.5350 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
3.3240 1.3290 1.5846 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
2.3216 -0.0168 2.0525 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
-2.8759 2.0190 1.1761 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
1 8 1 0 0 0 0
|
| 31 |
+
1 11 1 0 0 0 0
|
| 32 |
+
2 3 1 0 0 0 0
|
| 33 |
+
2 4 1 0 0 0 0
|
| 34 |
+
2 12 1 0 0 0 0
|
| 35 |
+
2 13 1 0 0 0 0
|
| 36 |
+
3 5 1 0 0 0 0
|
| 37 |
+
3 14 1 0 0 0 0
|
| 38 |
+
3 15 1 0 0 0 0
|
| 39 |
+
4 7 1 0 0 0 0
|
| 40 |
+
4 8 2 0 0 0 0
|
| 41 |
+
5 6 2 0 0 0 0
|
| 42 |
+
5 16 1 0 0 0 0
|
| 43 |
+
6 9 1 0 0 0 0
|
| 44 |
+
6 10 1 0 0 0 0
|
| 45 |
+
7 11 2 0 0 0 0
|
| 46 |
+
7 17 1 0 0 0 0
|
| 47 |
+
8 18 1 0 0 0 0
|
| 48 |
+
9 19 1 0 0 0 0
|
| 49 |
+
9 20 1 0 0 0 0
|
| 50 |
+
9 21 1 0 0 0 0
|
| 51 |
+
10 22 1 0 0 0 0
|
| 52 |
+
10 23 1 0 0 0 0
|
| 53 |
+
10 24 1 0 0 0 0
|
| 54 |
+
11 25 1 0 0 0 0
|
| 55 |
+
M END
|
| 56 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 57 |
+
68316
|
| 58 |
+
|
| 59 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 60 |
+
0.6
|
| 61 |
+
|
| 62 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 63 |
+
2
|
| 64 |
+
9
|
| 65 |
+
6
|
| 66 |
+
10
|
| 67 |
+
4
|
| 68 |
+
7
|
| 69 |
+
16
|
| 70 |
+
8
|
| 71 |
+
19
|
| 72 |
+
13
|
| 73 |
+
3
|
| 74 |
+
15
|
| 75 |
+
20
|
| 76 |
+
1
|
| 77 |
+
21
|
| 78 |
+
14
|
| 79 |
+
17
|
| 80 |
+
12
|
| 81 |
+
5
|
| 82 |
+
22
|
| 83 |
+
11
|
| 84 |
+
18
|
| 85 |
+
|
| 86 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 87 |
+
15
|
| 88 |
+
1 -0.28
|
| 89 |
+
10 0.14
|
| 90 |
+
11 -0.01
|
| 91 |
+
16 0.15
|
| 92 |
+
17 0.15
|
| 93 |
+
18 0.15
|
| 94 |
+
2 0.18
|
| 95 |
+
25 0.15
|
| 96 |
+
3 0.14
|
| 97 |
+
4 -0.18
|
| 98 |
+
5 -0.29
|
| 99 |
+
6 -0.28
|
| 100 |
+
7 -0.15
|
| 101 |
+
8 -0.01
|
| 102 |
+
9 0.14
|
| 103 |
+
|
| 104 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 105 |
+
3
|
| 106 |
+
|
| 107 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 108 |
+
3
|
| 109 |
+
1 1 acceptor
|
| 110 |
+
3 6 9 10 hydrophobe
|
| 111 |
+
5 1 4 7 8 11 rings
|
| 112 |
+
|
| 113 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 114 |
+
11
|
| 115 |
+
|
| 116 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 117 |
+
0
|
| 118 |
+
|
| 119 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 120 |
+
0
|
| 121 |
+
|
| 122 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 123 |
+
0
|
| 124 |
+
|
| 125 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 126 |
+
0
|
| 127 |
+
|
| 128 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 129 |
+
0
|
| 130 |
+
|
| 131 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 132 |
+
1
|
| 133 |
+
|
| 134 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 135 |
+
1
|
| 136 |
+
|
| 137 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 138 |
+
00010ADC00000002
|
| 139 |
+
|
| 140 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 141 |
+
6.9813
|
| 142 |
+
|
| 143 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 144 |
+
15.223
|
| 145 |
+
|
| 146 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 147 |
+
100427 49 16825595297743993278
|
| 148 |
+
10857977 72 16444215044206657419
|
| 149 |
+
12897270 3 16917343757691971806
|
| 150 |
+
13618510 140 18334862705617000580
|
| 151 |
+
13693222 7 18410855468886894956
|
| 152 |
+
13764800 53 18337121162503082403
|
| 153 |
+
14390081 3 18272927219739594785
|
| 154 |
+
15276787 5 15792833539179038328
|
| 155 |
+
15775835 57 18271811189667819164
|
| 156 |
+
17357990 137 17128469601214631171
|
| 157 |
+
18522851 268 15554444128135969388
|
| 158 |
+
20361792 2 9943805586273020338
|
| 159 |
+
20653085 51 18340497681039213646
|
| 160 |
+
21028194 46 18412824698486389410
|
| 161 |
+
21524375 3 18411417293427457678
|
| 162 |
+
22802520 49 17703526462016371862
|
| 163 |
+
230 275 18409443653107449458
|
| 164 |
+
305870 269 18336536145350884346
|
| 165 |
+
369184 2 16081082693022590251
|
| 166 |
+
549884 4 17775289330892634072
|
| 167 |
+
81228 2 17908143531299115722
|
| 168 |
+
|
| 169 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 170 |
+
220.51
|
| 171 |
+
4.79
|
| 172 |
+
1.71
|
| 173 |
+
1.2
|
| 174 |
+
1.49
|
| 175 |
+
0.53
|
| 176 |
+
-0.09
|
| 177 |
+
-2.58
|
| 178 |
+
0.65
|
| 179 |
+
0.03
|
| 180 |
+
-0.05
|
| 181 |
+
0.16
|
| 182 |
+
-0.31
|
| 183 |
+
-0.2
|
| 184 |
+
|
| 185 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>
|
| 186 |
+
440.468
|
| 187 |
+
|
| 188 |
+
> <PUBCHEM_SHAPE_VOLUME>
|
| 189 |
+
133.2
|
| 190 |
+
|
| 191 |
+
> <PUBCHEM_COORDINATE_TYPE>
|
| 192 |
+
2
|
| 193 |
+
5
|
| 194 |
+
10
|
| 195 |
+
|
| 196 |
+
$$$$
|
COM/pubchem_clean_sdf/CID_7009658.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| 10 |
+
-1.0874 3.7094 0.2293 N 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
-2.4485 -0.7351 0.2357 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 12 |
+
-3.8812 -0.6908 -0.3376 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
-0.3980 2.4499 -0.0537 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 14 |
+
1.0450 2.5154 0.4676 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
1.9525 1.5033 -0.1916 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
-1.1806 1.3507 0.6584 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
2.1823 0.1966 0.2651 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
-3.9074 -0.9297 -1.8497 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
-4.6296 0.6003 0.0077 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
3.0785 -0.3749 -0.6408 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
2.6679 1.7319 -1.3213 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
-1.6956 -2.0318 -0.0487 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
1.7308 -0.5777 1.3523 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
3.5476 -1.6871 -0.5133 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
2.1916 -1.8918 1.4926 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
3.0859 -2.4360 0.5730 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
-2.5165 -0.6827 1.3298 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
-4.4379 -1.5204 0.1196 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
-0.4046 2.2948 -1.1387 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
1.4681 3.5102 0.2672 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
1.0832 2.3894 1.5573 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
-1.4884 0.4830 -1.2126 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 33 |
+
-3.3850 -0.1367 -2.3945 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 34 |
+
-4.9402 -0.9557 -2.2148 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
-3.4462 -1.8865 -2.1137 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
-4.1881 1.4714 -0.4875 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
-5.6764 0.5341 -0.3079 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
-4.6177 0.7776 1.0881 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 39 |
+
2.7615 2.5950 -1.9656 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 40 |
+
3.9773 0.4484 -2.3792 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 41 |
+
-2.0205 3.6871 -0.1814 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 42 |
+
-0.5972 4.4782 -0.2266 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 43 |
+
1.0396 -0.1709 2.0839 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 44 |
+
4.2437 -2.1117 -1.2289 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 45 |
+
1.8470 -2.4934 2.3296 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 46 |
+
3.4306 -3.4589 0.7011 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 47 |
+
-0.0731 -2.7247 -0.8757 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 48 |
+
1 12 2 0 0 0 0
|
| 49 |
+
2 18 1 0 0 0 0
|
| 50 |
+
2 43 1 0 0 0 0
|
| 51 |
+
3 18 2 0 0 0 0
|
| 52 |
+
4 7 1 0 0 0 0
|
| 53 |
+
4 12 1 0 0 0 0
|
| 54 |
+
4 28 1 0 0 0 0
|
| 55 |
+
5 16 1 0 0 0 0
|
| 56 |
+
5 17 1 0 0 0 0
|
| 57 |
+
5 36 1 0 0 0 0
|
| 58 |
+
6 9 1 0 0 0 0
|
| 59 |
+
6 37 1 0 0 0 0
|
| 60 |
+
6 38 1 0 0 0 0
|
| 61 |
+
7 8 1 0 0 0 0
|
| 62 |
+
7 18 1 0 0 0 0
|
| 63 |
+
7 23 1 0 0 0 0
|
| 64 |
+
8 14 1 0 0 0 0
|
| 65 |
+
8 15 1 0 0 0 0
|
| 66 |
+
8 24 1 0 0 0 0
|
| 67 |
+
9 10 1 0 0 0 0
|
| 68 |
+
9 12 1 0 0 0 0
|
| 69 |
+
9 25 1 0 0 0 0
|
| 70 |
+
10 11 1 0 0 0 0
|
| 71 |
+
10 26 1 0 0 0 0
|
| 72 |
+
10 27 1 0 0 0 0
|
| 73 |
+
11 13 1 0 0 0 0
|
| 74 |
+
11 17 2 0 0 0 0
|
| 75 |
+
13 16 1 0 0 0 0
|
| 76 |
+
13 19 2 0 0 0 0
|
| 77 |
+
14 29 1 0 0 0 0
|
| 78 |
+
14 30 1 0 0 0 0
|
| 79 |
+
14 31 1 0 0 0 0
|
| 80 |
+
15 32 1 0 0 0 0
|
| 81 |
+
15 33 1 0 0 0 0
|
| 82 |
+
15 34 1 0 0 0 0
|
| 83 |
+
16 20 2 0 0 0 0
|
| 84 |
+
17 35 1 0 0 0 0
|
| 85 |
+
19 21 1 0 0 0 0
|
| 86 |
+
19 39 1 0 0 0 0
|
| 87 |
+
20 22 1 0 0 0 0
|
| 88 |
+
20 40 1 0 0 0 0
|
| 89 |
+
21 22 2 0 0 0 0
|
| 90 |
+
21 41 1 0 0 0 0
|
| 91 |
+
22 42 1 0 0 0 0
|
| 92 |
+
M END
|
| 93 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 94 |
+
7009658
|
| 95 |
+
|
| 96 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 97 |
+
0.8
|
| 98 |
+
|
| 99 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 100 |
+
1
|
| 101 |
+
208
|
| 102 |
+
152
|
| 103 |
+
122
|
| 104 |
+
86
|
| 105 |
+
11
|
| 106 |
+
84
|
| 107 |
+
62
|
| 108 |
+
205
|
| 109 |
+
118
|
| 110 |
+
70
|
| 111 |
+
43
|
| 112 |
+
69
|
| 113 |
+
193
|
| 114 |
+
156
|
| 115 |
+
23
|
| 116 |
+
99
|
| 117 |
+
112
|
| 118 |
+
32
|
| 119 |
+
192
|
| 120 |
+
100
|
| 121 |
+
150
|
| 122 |
+
33
|
| 123 |
+
167
|
| 124 |
+
52
|
| 125 |
+
39
|
| 126 |
+
42
|
| 127 |
+
17
|
| 128 |
+
121
|
| 129 |
+
135
|
| 130 |
+
174
|
| 131 |
+
145
|
| 132 |
+
143
|
| 133 |
+
190
|
| 134 |
+
141
|
| 135 |
+
83
|
| 136 |
+
102
|
| 137 |
+
109
|
| 138 |
+
133
|
| 139 |
+
207
|
| 140 |
+
46
|
| 141 |
+
120
|
| 142 |
+
49
|
| 143 |
+
198
|
| 144 |
+
104
|
| 145 |
+
91
|
| 146 |
+
166
|
| 147 |
+
58
|
| 148 |
+
28
|
| 149 |
+
172
|
| 150 |
+
200
|
| 151 |
+
180
|
| 152 |
+
216
|
| 153 |
+
146
|
| 154 |
+
27
|
| 155 |
+
94
|
| 156 |
+
119
|
| 157 |
+
115
|
| 158 |
+
149
|
| 159 |
+
214
|
| 160 |
+
188
|
| 161 |
+
106
|
| 162 |
+
37
|
| 163 |
+
77
|
| 164 |
+
68
|
| 165 |
+
85
|
| 166 |
+
154
|
| 167 |
+
65
|
| 168 |
+
4
|
| 169 |
+
148
|
| 170 |
+
87
|
| 171 |
+
61
|
| 172 |
+
57
|
| 173 |
+
35
|
| 174 |
+
168
|
| 175 |
+
8
|
| 176 |
+
178
|
| 177 |
+
213
|
| 178 |
+
171
|
| 179 |
+
111
|
| 180 |
+
67
|
| 181 |
+
79
|
| 182 |
+
105
|
| 183 |
+
116
|
| 184 |
+
44
|
| 185 |
+
211
|
| 186 |
+
164
|
| 187 |
+
25
|
| 188 |
+
51
|
| 189 |
+
175
|
| 190 |
+
170
|
| 191 |
+
194
|
| 192 |
+
64
|
| 193 |
+
209
|
| 194 |
+
212
|
| 195 |
+
165
|
| 196 |
+
199
|
| 197 |
+
162
|
| 198 |
+
204
|
| 199 |
+
14
|
| 200 |
+
131
|
| 201 |
+
139
|
| 202 |
+
137
|
| 203 |
+
182
|
| 204 |
+
155
|
| 205 |
+
80
|
| 206 |
+
30
|
| 207 |
+
59
|
| 208 |
+
206
|
| 209 |
+
173
|
| 210 |
+
128
|
| 211 |
+
187
|
| 212 |
+
114
|
| 213 |
+
185
|
| 214 |
+
125
|
| 215 |
+
144
|
| 216 |
+
13
|
| 217 |
+
142
|
| 218 |
+
107
|
| 219 |
+
26
|
| 220 |
+
103
|
| 221 |
+
50
|
| 222 |
+
195
|
| 223 |
+
22
|
| 224 |
+
92
|
| 225 |
+
40
|
| 226 |
+
169
|
| 227 |
+
202
|
| 228 |
+
179
|
| 229 |
+
81
|
| 230 |
+
95
|
| 231 |
+
60
|
| 232 |
+
96
|
| 233 |
+
210
|
| 234 |
+
18
|
| 235 |
+
159
|
| 236 |
+
181
|
| 237 |
+
3
|
| 238 |
+
203
|
| 239 |
+
19
|
| 240 |
+
7
|
| 241 |
+
160
|
| 242 |
+
73
|
| 243 |
+
158
|
| 244 |
+
127
|
| 245 |
+
47
|
| 246 |
+
90
|
| 247 |
+
10
|
| 248 |
+
108
|
| 249 |
+
75
|
| 250 |
+
215
|
| 251 |
+
157
|
| 252 |
+
74
|
| 253 |
+
72
|
| 254 |
+
20
|
| 255 |
+
183
|
| 256 |
+
76
|
| 257 |
+
36
|
| 258 |
+
71
|
| 259 |
+
66
|
| 260 |
+
101
|
| 261 |
+
130
|
| 262 |
+
88
|
| 263 |
+
117
|
| 264 |
+
186
|
| 265 |
+
2
|
| 266 |
+
5
|
| 267 |
+
6
|
| 268 |
+
132
|
| 269 |
+
184
|
| 270 |
+
34
|
| 271 |
+
196
|
| 272 |
+
21
|
| 273 |
+
177
|
| 274 |
+
41
|
| 275 |
+
151
|
| 276 |
+
24
|
| 277 |
+
38
|
| 278 |
+
113
|
| 279 |
+
153
|
| 280 |
+
191
|
| 281 |
+
9
|
| 282 |
+
176
|
| 283 |
+
45
|
| 284 |
+
97
|
| 285 |
+
98
|
| 286 |
+
89
|
| 287 |
+
29
|
| 288 |
+
140
|
| 289 |
+
15
|
| 290 |
+
82
|
| 291 |
+
138
|
| 292 |
+
16
|
| 293 |
+
93
|
| 294 |
+
136
|
| 295 |
+
124
|
| 296 |
+
55
|
| 297 |
+
161
|
| 298 |
+
48
|
| 299 |
+
163
|
| 300 |
+
129
|
| 301 |
+
56
|
| 302 |
+
78
|
| 303 |
+
201
|
| 304 |
+
110
|
| 305 |
+
134
|
| 306 |
+
126
|
| 307 |
+
31
|
| 308 |
+
123
|
| 309 |
+
12
|
| 310 |
+
63
|
| 311 |
+
189
|
| 312 |
+
197
|
| 313 |
+
54
|
| 314 |
+
147
|
| 315 |
+
53
|
| 316 |
+
|
| 317 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 318 |
+
28
|
| 319 |
+
1 -0.57
|
| 320 |
+
10 0.18
|
| 321 |
+
11 -0.18
|
| 322 |
+
12 0.57
|
| 323 |
+
16 -0.15
|
| 324 |
+
17 -0.3
|
| 325 |
+
18 0.66
|
| 326 |
+
19 -0.15
|
| 327 |
+
2 -0.65
|
| 328 |
+
20 -0.15
|
| 329 |
+
21 -0.15
|
| 330 |
+
22 -0.15
|
| 331 |
+
28 0.37
|
| 332 |
+
3 -0.57
|
| 333 |
+
35 0.15
|
| 334 |
+
36 0.27
|
| 335 |
+
37 0.36
|
| 336 |
+
38 0.36
|
| 337 |
+
39 0.15
|
| 338 |
+
4 -0.73
|
| 339 |
+
40 0.15
|
| 340 |
+
41 0.15
|
| 341 |
+
42 0.15
|
| 342 |
+
43 0.5
|
| 343 |
+
5 0.03
|
| 344 |
+
6 -0.99
|
| 345 |
+
7 0.36
|
| 346 |
+
9 0.33
|
| 347 |
+
|
| 348 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 349 |
+
7
|
| 350 |
+
|
| 351 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 352 |
+
12
|
| 353 |
+
1 1 acceptor
|
| 354 |
+
1 2 acceptor
|
| 355 |
+
1 3 acceptor
|
| 356 |
+
1 4 donor
|
| 357 |
+
1 5 cation
|
| 358 |
+
1 5 donor
|
| 359 |
+
1 6 cation
|
| 360 |
+
1 6 donor
|
| 361 |
+
3 2 3 18 anion
|
| 362 |
+
3 8 14 15 hydrophobe
|
| 363 |
+
5 5 11 13 16 17 rings
|
| 364 |
+
6 13 16 19 20 21 22 rings
|
| 365 |
+
|
| 366 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 367 |
+
22
|
| 368 |
+
|
| 369 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 370 |
+
2
|
| 371 |
+
|
| 372 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 373 |
+
0
|
| 374 |
+
|
| 375 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 376 |
+
0
|
| 377 |
+
|
| 378 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 379 |
+
0
|
| 380 |
+
|
| 381 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 382 |
+
0
|
| 383 |
+
|
| 384 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 385 |
+
1
|
| 386 |
+
|
| 387 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 388 |
+
2
|
| 389 |
+
|
| 390 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 391 |
+
006AF57A00000001
|
| 392 |
+
|
| 393 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 394 |
+
34.0869
|
| 395 |
+
|
| 396 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 397 |
+
61.049
|
| 398 |
+
|
| 399 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 400 |
+
10062212 137 18059850680309347767
|
| 401 |
+
104564 63 18268148651979318485
|
| 402 |
+
11578080 2 18044070411986928140
|
| 403 |
+
12553582 1 18411706495044669481
|
| 404 |
+
12788726 201 18129675105616924001
|
| 405 |
+
13140716 1 18336539503619924402
|
| 406 |
+
14178342 30 17980748665073992009
|
| 407 |
+
16728300 4 14002393950333518075
|
| 408 |
+
16752209 62 18268986501678692617
|
| 409 |
+
192875 21 18264476313191896247
|
| 410 |
+
20626108 58 17916849335887293583
|
| 411 |
+
21315764 21 17605810591644684607
|
| 412 |
+
21634736 98 18334870406962607286
|
| 413 |
+
23557571 272 18130222649938651992
|
| 414 |
+
23559900 14 18342173427460887112
|
| 415 |
+
238 59 17895482530492901298
|
| 416 |
+
3052486 1 17905053551579814646
|
| 417 |
+
3286 77 15123518003286115254
|
| 418 |
+
338550 245 18050294665538200813
|
| 419 |
+
34934 24 18269835470499665972
|
| 420 |
+
90525 40 17904776483223575800
|
| 421 |
+
|
| 422 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 423 |
+
420.2
|
| 424 |
+
7.18
|
| 425 |
+
3.54
|
| 426 |
+
1.38
|
| 427 |
+
4.12
|
| 428 |
+
0.97
|
| 429 |
+
0.07
|
| 430 |
+
-2.78
|
| 431 |
+
2.17
|
| 432 |
+
-0.25
|
| 433 |
+
-0.48
|
| 434 |
+
-0.24
|
| 435 |
+
-0.04
|
| 436 |
+
-1.26
|
| 437 |
+
|
| 438 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>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.2188 2.1497 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
6.0010 -10.1498 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
9.4638 4.1295 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
4.2690 -9.1498 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
11.1841 5.1495 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
4.2690 -6.1498 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
12.9276 4.1696 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
5.1350 -11.6498 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
10.3124 5.6394 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
4.2690 -9.1498 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
7.7203 5.1094 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
2.5369 -10.1498 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
2.5369 -12.1498 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
7.6971 7.1093 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
9.4175 8.1293 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
5.1350 -13.6498 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
11.1494 8.1493 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
8.5458 8.6192 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
9.3944 10.1291 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
11.1148 11.1491 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 33 |
+
12.8583 10.1692 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 34 |
+
12.8931 11.2629 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
11.3171 13.3152 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
12.8244 13.8496 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
14.7756 12.8940 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
8.6342 -2.4496 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 39 |
+
7.7580 -3.9944 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 40 |
+
7.7701 -2.9529 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 41 |
+
8.6303 -1.4496 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 42 |
+
8.6581 -4.5187 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 43 |
+
9.5461 -2.9529 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 44 |
+
8.6706 -5.6037 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 45 |
+
9.5581 -3.9944 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 46 |
+
7.7624 -0.9529 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 47 |
+
6.8081 -4.5187 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 48 |
+
7.7423 0.0885 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 49 |
+
6.9021 -2.4562 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 50 |
+
9.5383 -0.9392 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 51 |
+
8.6383 0.6197 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 52 |
+
7.7331 -6.1498 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 53 |
+
9.5424 0.1024 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 54 |
+
9.6183 -2.2721 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 55 |
+
6.7956 -5.6037 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 56 |
+
6.8939 -3.4911 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 57 |
+
6.8983 -1.4562 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 58 |
+
9.6158 -1.6194 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 59 |
+
6.7884 0.6055 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 60 |
+
8.6424 1.7047 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 61 |
+
6.7674 1.6903 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 62 |
+
9.6706 -5.5960 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 63 |
+
9.1773 -6.4658 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 64 |
+
7.7007 2.2436 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 65 |
+
9.4985 1.1297 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 66 |
+
6.2542 2.5485 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 67 |
+
5.7676 1.6749 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 68 |
+
6.8671 -7.6498 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 69 |
+
6.8671 -8.6498 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 70 |
+
10.3471 2.6396 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 71 |
+
6.0010 -9.1498 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 72 |
+
5.1350 -7.6498 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 73 |
+
5.1350 -8.6498 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 74 |
+
10.3355 3.6396 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 75 |
+
11.1957 4.1495 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 76 |
+
4.2690 -7.1498 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 77 |
+
12.0790 2.6597 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 78 |
+
12.0675 3.6596 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 79 |
+
5.1350 -10.6498 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 80 |
+
9.4522 5.1295 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 81 |
+
4.2690 -10.1498 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 82 |
+
8.5805 5.6194 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 83 |
+
3.4030 -10.6498 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 84 |
+
4.2690 -12.1498 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 85 |
+
3.4030 -11.6498 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 86 |
+
8.5689 6.6193 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 87 |
+
10.3008 6.6394 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 88 |
+
9.4291 7.1293 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 89 |
+
4.2690 -13.1498 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 90 |
+
11.1610 7.1494 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 91 |
+
10.2777 8.6392 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 92 |
+
7.6856 8.1092 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 93 |
+
10.2661 9.6392 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 94 |
+
6.8138 8.5992 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 95 |
+
11.1263 10.1492 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 96 |
+
12.0096 8.6593 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 97 |
+
11.9981 9.6592 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 98 |
+
11.9749 11.6591 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
| 99 |
+
12.0680 12.6547 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 100 |
+
13.0436 12.8739 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
| 101 |
+
13.5536 12.0138 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 102 |
+
13.9038 13.3839 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 103 |
+
8.5045 -3.3807 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 104 |
+
9.3974 -4.9380 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 105 |
+
10.1581 -3.0519 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 106 |
+
9.7484 -2.3668 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 107 |
+
9.7739 -4.5757 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 108 |
+
10.1677 -3.8813 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 109 |
+
6.6058 -3.9327 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 110 |
+
6.1961 -4.6178 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 111 |
+
7.0162 -0.3534 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 112 |
+
6.2911 -2.3509 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 113 |
+
6.6923 -3.0396 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 114 |
+
9.7451 -1.5237 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 115 |
+
10.1496 -0.8355 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 116 |
+
7.1956 -6.4587 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 117 |
+
9.7533 0.6854 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 118 |
+
9.7283 -2.8823 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 119 |
+
10.2284 -2.1621 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 120 |
+
9.5083 -1.6620 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 121 |
+
6.2616 -5.2885 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 122 |
+
7.2060 -2.9554 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 123 |
+
6.3582 -3.1790 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 124 |
+
6.5818 -4.0268 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 125 |
+
6.3601 -1.1483 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 126 |
+
9.5105 -2.2304 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 127 |
+
10.2268 -1.7247 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 128 |
+
9.7211 -1.0084 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 129 |
+
6.1756 0.6998 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 130 |
+
6.5906 0.0179 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 131 |
+
9.2529 1.5963 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 132 |
+
8.8538 2.2876 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 133 |
+
10.2516 -5.3794 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 134 |
+
9.5582 -4.9862 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 135 |
+
8.6428 -6.7799 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 136 |
+
9.4914 -7.0003 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 137 |
+
9.7118 -6.1517 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 138 |
+
8.0962 2.7211 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 139 |
+
7.2980 2.7150 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 140 |
+
10.7392 -0.6538 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 141 |
+
5.3912 -5.7828 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 142 |
+
6.7862 2.8667 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 143 |
+
5.9359 3.0806 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 144 |
+
5.7220 2.2302 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 145 |
+
5.7580 2.2948 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 146 |
+
5.1476 1.6653 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 147 |
+
5.7771 1.0549 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 148 |
+
7.4040 -7.9598 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 149 |
+
10.7972 -6.4533 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 150 |
+
6.8671 -9.2698 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 151 |
+
10.3542 2.0197 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 152 |
+
5.4641 -9.4598 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 153 |
+
5.1350 -7.0298 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 154 |
+
4.5981 -8.3398 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 155 |
+
10.3283 4.2595 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 156 |
+
7.7331 -9.7698 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 157 |
+
11.7290 4.4657 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 158 |
+
3.6584 -7.0421 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 159 |
+
4.0569 -7.7324 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 160 |
+
12.2978 2.0795 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 161 |
+
12.6883 2.7744 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 162 |
+
12.6079 3.3558 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 163 |
+
3.7320 -8.8398 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 164 |
+
5.1350 -10.0298 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 165 |
+
8.9189 4.8133 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 166 |
+
11.7175 5.4657 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 167 |
+
3.7320 -5.8398 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 168 |
+
3.7320 -9.8398 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 169 |
+
13.4681 3.8658 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 170 |
+
8.0400 5.9232 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 171 |
+
3.4030 -10.0298 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 172 |
+
4.8059 -12.4598 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 173 |
+
3.4030 -12.2698 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 174 |
+
8.5617 7.2393 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 175 |
+
10.8413 6.3356 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 176 |
+
8.8886 7.4331 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 177 |
+
3.7320 -8.8398 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 178 |
+
3.6584 -13.0421 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 179 |
+
4.0569 -13.7324 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 180 |
+
7.1798 5.4132 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 181 |
+
2.0000 -10.4598 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 182 |
+
11.4772 6.6160 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 183 |
+
11.6943 7.4655 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 184 |
+
10.8448 7.6827 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 185 |
+
2.5369 -12.7698 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 186 |
+
5.1350 -14.2698 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 187 |
+
10.2849 8.0193 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 188 |
+
9.7328 9.3230 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 189 |
+
7.1176 9.1397 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 190 |
+
6.2733 8.9030 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 191 |
+
6.5101 8.0587 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 192 |
+
11.6596 10.4653 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 193 |
+
12.2284 8.0792 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 194 |
+
12.6189 8.7740 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 195 |
+
12.5386 9.3554 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 196 |
+
9.3872 10.7491 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 197 |
+
13.3987 9.8654 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 198 |
+
12.0145 11.0403 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 199 |
+
12.2215 13.2554 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 200 |
+
13.9738 11.5578 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 201 |
+
14.0510 12.3840 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 202 |
+
14.2968 13.8634 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 203 |
+
13.4998 13.8542 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 204 |
+
11.4390 13.9231 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 205 |
+
13.2804 14.2698 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 206 |
+
15.3089 13.2102 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 207 |
+
48 1 1 1 0 0 0
|
| 208 |
+
64 1 1 1 0 0 0
|
| 209 |
+
49 2 1 6 0 0 0
|
| 210 |
+
2136 1 0 0 0 0
|
| 211 |
+
51 3 1 1 0 0 0
|
| 212 |
+
3137 1 0 0 0 0
|
| 213 |
+
4 58 1 0 0 0 0
|
| 214 |
+
4145 1 0 0 0 0
|
| 215 |
+
5 61 1 0 0 0 0
|
| 216 |
+
66 5 1 1 0 0 0
|
| 217 |
+
6 61 2 0 0 0 0
|
| 218 |
+
7 64 1 0 0 0 0
|
| 219 |
+
7 68 1 0 0 0 0
|
| 220 |
+
65 8 1 6 0 0 0
|
| 221 |
+
8152 1 0 0 0 0
|
| 222 |
+
9 66 1 0 0 0 0
|
| 223 |
+
9 73 1 0 0 0 0
|
| 224 |
+
67 10 1 1 0 0 0
|
| 225 |
+
75 10 1 6 0 0 0
|
| 226 |
+
70 11 1 6 0 0 0
|
| 227 |
+
76 11 1 1 0 0 0
|
| 228 |
+
69 12 1 6 0 0 0
|
| 229 |
+
12159 1 0 0 0 0
|
| 230 |
+
71 13 1 1 0 0 0
|
| 231 |
+
13162 1 0 0 0 0
|
| 232 |
+
14 72 1 0 0 0 0
|
| 233 |
+
14163 1 0 0 0 0
|
| 234 |
+
74 15 1 1 0 0 0
|
| 235 |
+
15165 1 0 0 0 0
|
| 236 |
+
16 75 1 0 0 0 0
|
| 237 |
+
16 80 1 0 0 0 0
|
| 238 |
+
17 76 1 0 0 0 0
|
| 239 |
+
17 83 1 0 0 0 0
|
| 240 |
+
77 18 1 1 0 0 0
|
| 241 |
+
18173 1 0 0 0 0
|
| 242 |
+
78 19 1 6 0 0 0
|
| 243 |
+
19176 1 0 0 0 0
|
| 244 |
+
79 20 1 6 0 0 0
|
| 245 |
+
20177 1 0 0 0 0
|
| 246 |
+
81 21 1 1 0 0 0
|
| 247 |
+
21181 1 0 0 0 0
|
| 248 |
+
82 22 1 6 0 0 0
|
| 249 |
+
22 88 1 0 0 0 0
|
| 250 |
+
84 23 1 1 0 0 0
|
| 251 |
+
87 23 1 1 0 0 0
|
| 252 |
+
24 85 1 0 0 0 0
|
| 253 |
+
24182 1 0 0 0 0
|
| 254 |
+
25 87 1 0 0 0 0
|
| 255 |
+
25 92 1 0 0 0 0
|
| 256 |
+
26 88 2 0 0 0 0
|
| 257 |
+
89 27 1 6 0 0 0
|
| 258 |
+
27192 1 0 0 0 0
|
| 259 |
+
91 28 1 1 0 0 0
|
| 260 |
+
94 28 1 1 0 0 0
|
| 261 |
+
93 29 1 6 0 0 0
|
| 262 |
+
29193 1 0 0 0 0
|
| 263 |
+
30 94 1 0 0 0 0
|
| 264 |
+
30 97 1 0 0 0 0
|
| 265 |
+
95 31 1 6 0 0 0
|
| 266 |
+
31200 1 0 0 0 0
|
| 267 |
+
96 32 1 6 0 0 0
|
| 268 |
+
32201 1 0 0 0 0
|
| 269 |
+
33 98 1 0 0 0 0
|
| 270 |
+
33202 1 0 0 0 0
|
| 271 |
+
34 36 1 0 0 0 0
|
| 272 |
+
34 37 1 0 0 0 0
|
| 273 |
+
34 39 1 0 0 0 0
|
| 274 |
+
34 50 1 1 0 0 0
|
| 275 |
+
35 36 1 0 0 0 0
|
| 276 |
+
35 38 1 0 0 0 0
|
| 277 |
+
35 43 1 0 0 0 0
|
| 278 |
+
35 52 1 1 0 0 0
|
| 279 |
+
36 45 1 0 0 0 0
|
| 280 |
+
36 99 1 6 0 0 0
|
| 281 |
+
37 42 1 0 0 0 0
|
| 282 |
+
37 46 1 0 0 0 0
|
| 283 |
+
37 54 1 6 0 0 0
|
| 284 |
+
38 40 1 0 0 0 0
|
| 285 |
+
38 41 1 0 0 0 0
|
| 286 |
+
38100 1 6 0 0 0
|
| 287 |
+
39 41 1 0 0 0 0
|
| 288 |
+
39101 1 0 0 0 0
|
| 289 |
+
39102 1 0 0 0 0
|
| 290 |
+
40 48 1 0 0 0 0
|
| 291 |
+
40 58 1 0 0 0 0
|
| 292 |
+
40 59 1 6 0 0 0
|
| 293 |
+
41103 1 0 0 0 0
|
| 294 |
+
41104 1 0 0 0 0
|
| 295 |
+
42 44 1 0 0 0 0
|
| 296 |
+
42 53 2 0 0 0 0
|
| 297 |
+
43 51 1 0 0 0 0
|
| 298 |
+
43105 1 0 0 0 0
|
| 299 |
+
43106 1 0 0 0 0
|
| 300 |
+
44 47 1 0 0 0 0
|
| 301 |
+
44 55 1 0 0 0 0
|
| 302 |
+
44107 1 1 0 0 0
|
| 303 |
+
45 53 1 0 0 0 0
|
| 304 |
+
45108 1 0 0 0 0
|
| 305 |
+
45109 1 0 0 0 0
|
| 306 |
+
46 49 1 0 0 0 0
|
| 307 |
+
46110 1 0 0 0 0
|
| 308 |
+
46111 1 0 0 0 0
|
| 309 |
+
47 49 1 0 0 0 0
|
| 310 |
+
47 56 1 0 0 0 0
|
| 311 |
+
47 61 1 1 0 0 0
|
| 312 |
+
48 51 1 0 0 0 0
|
| 313 |
+
48112 1 0 0 0 0
|
| 314 |
+
49113 1 0 0 0 0
|
| 315 |
+
50114 1 0 0 0 0
|
| 316 |
+
50115 1 0 0 0 0
|
| 317 |
+
50116 1 0 0 0 0
|
| 318 |
+
51117 1 0 0 0 0
|
| 319 |
+
52118 1 0 0 0 0
|
| 320 |
+
52119 1 0 0 0 0
|
| 321 |
+
52120 1 0 0 0 0
|
| 322 |
+
53121 1 0 0 0 0
|
| 323 |
+
54122 1 0 0 0 0
|
| 324 |
+
54123 1 0 0 0 0
|
| 325 |
+
54124 1 0 0 0 0
|
| 326 |
+
55 57 1 0 0 0 0
|
| 327 |
+
55125 1 0 0 0 0
|
| 328 |
+
55126 1 0 0 0 0
|
| 329 |
+
56 60 1 0 0 0 0
|
| 330 |
+
56127 1 0 0 0 0
|
| 331 |
+
56128 1 0 0 0 0
|
| 332 |
+
57 60 1 0 0 0 0
|
| 333 |
+
57 62 1 0 0 0 0
|
| 334 |
+
57 63 1 0 0 0 0
|
| 335 |
+
58129 1 0 0 0 0
|
| 336 |
+
58130 1 0 0 0 0
|
| 337 |
+
59131 1 0 0 0 0
|
| 338 |
+
59132 1 0 0 0 0
|
| 339 |
+
59133 1 0 0 0 0
|
| 340 |
+
60134 1 0 0 0 0
|
| 341 |
+
60135 1 0 0 0 0
|
| 342 |
+
62138 1 0 0 0 0
|
| 343 |
+
62139 1 0 0 0 0
|
| 344 |
+
62140 1 0 0 0 0
|
| 345 |
+
63141 1 0 0 0 0
|
| 346 |
+
63142 1 0 0 0 0
|
| 347 |
+
63143 1 0 0 0 0
|
| 348 |
+
64 65 1 0 0 0 0
|
| 349 |
+
64144 1 0 0 0 0
|
| 350 |
+
65 67 1 0 0 0 0
|
| 351 |
+
65146 1 0 0 0 0
|
| 352 |
+
66 70 1 0 0 0 0
|
| 353 |
+
66147 1 0 0 0 0
|
| 354 |
+
67 69 1 0 0 0 0
|
| 355 |
+
67148 1 0 0 0 0
|
| 356 |
+
68 69 1 0 0 0 0
|
| 357 |
+
68 72 1 1 0 0 0
|
| 358 |
+
68149 1 0 0 0 0
|
| 359 |
+
69150 1 0 0 0 0
|
| 360 |
+
70 71 1 0 0 0 0
|
| 361 |
+
70151 1 0 0 0 0
|
| 362 |
+
71 74 1 0 0 0 0
|
| 363 |
+
71153 1 0 0 0 0
|
| 364 |
+
72154 1 0 0 0 0
|
| 365 |
+
72155 1 0 0 0 0
|
| 366 |
+
73 74 1 0 0 0 0
|
| 367 |
+
73156 1 0 0 0 0
|
| 368 |
+
73157 1 0 0 0 0
|
| 369 |
+
74158 1 0 0 0 0
|
| 370 |
+
75 77 1 0 0 0 0
|
| 371 |
+
75160 1 0 0 0 0
|
| 372 |
+
76 78 1 0 0 0 0
|
| 373 |
+
76161 1 0 0 0 0
|
| 374 |
+
77 79 1 0 0 0 0
|
| 375 |
+
77164 1 0 0 0 0
|
| 376 |
+
78 82 1 0 0 0 0
|
| 377 |
+
78166 1 0 0 0 0
|
| 378 |
+
79 81 1 0 0 0 0
|
| 379 |
+
79167 1 0 0 0 0
|
| 380 |
+
80 81 1 0 0 0 0
|
| 381 |
+
80 85 1 6 0 0 0
|
| 382 |
+
80168 1 0 0 0 0
|
| 383 |
+
81169 1 0 0 0 0
|
| 384 |
+
82 84 1 0 0 0 0
|
| 385 |
+
82170 1 0 0 0 0
|
| 386 |
+
83 84 1 0 0 0 0
|
| 387 |
+
83 86 1 6 0 0 0
|
| 388 |
+
83171 1 0 0 0 0
|
| 389 |
+
84172 1 0 0 0 0
|
| 390 |
+
85174 1 0 0 0 0
|
| 391 |
+
85175 1 0 0 0 0
|
| 392 |
+
86178 1 0 0 0 0
|
| 393 |
+
86179 1 0 0 0 0
|
| 394 |
+
86180 1 0 0 0 0
|
| 395 |
+
87 89 1 0 0 0 0
|
| 396 |
+
87183 1 0 0 0 0
|
| 397 |
+
88 90 1 0 0 0 0
|
| 398 |
+
89 91 1 0 0 0 0
|
| 399 |
+
89184 1 0 0 0 0
|
| 400 |
+
90185 1 0 0 0 0
|
| 401 |
+
90186 1 0 0 0 0
|
| 402 |
+
90187 1 0 0 0 0
|
| 403 |
+
91 93 1 0 0 0 0
|
| 404 |
+
91188 1 0 0 0 0
|
| 405 |
+
92 93 1 0 0 0 0
|
| 406 |
+
92189 1 0 0 0 0
|
| 407 |
+
92190 1 0 0 0 0
|
| 408 |
+
93191 1 0 0 0 0
|
| 409 |
+
94 95 1 0 0 0 0
|
| 410 |
+
94194 1 0 0 0 0
|
| 411 |
+
95 96 1 0 0 0 0
|
| 412 |
+
95195 1 0 0 0 0
|
| 413 |
+
96 97 1 0 0 0 0
|
| 414 |
+
96 98 1 0 0 0 0
|
| 415 |
+
97196 1 0 0 0 0
|
| 416 |
+
97197 1 0 0 0 0
|
| 417 |
+
98198 1 0 0 0 0
|
| 418 |
+
98199 1 0 0 0 0
|
| 419 |
+
M END
|
| 420 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 421 |
+
70698224
|
| 422 |
+
|
| 423 |
+
> <PUBCHEM_COMPOUND_CANONICALIZED>
|
| 424 |
+
1
|
| 425 |
+
|
| 426 |
+
> <PUBCHEM_CACTVS_COMPLEXITY>
|
| 427 |
+
2820
|
| 428 |
+
|
| 429 |
+
> <PUBCHEM_CACTVS_HBOND_ACCEPTOR>
|
| 430 |
+
33
|
| 431 |
+
|
| 432 |
+
> <PUBCHEM_CACTVS_HBOND_DONOR>
|
| 433 |
+
18
|
| 434 |
+
|
| 435 |
+
> <PUBCHEM_CACTVS_ROTATABLE_BOND>
|
| 436 |
+
19
|
| 437 |
+
|
| 438 |
+
> <PUBCHEM_CACTVS_SUBSKEYS>
|
| 439 |
+
AAADcfB8PgAAAAAAAAAAAAAAAAAAASAAAAA0aNGiQAAAAADAAAAAGgAACAAAD1SwgAMCCAAABgCIAiDSCAAAAAAgAAAACAEAAAgREBYAAQAiQAAFoAAPAAPI6PyPgAAAAAAAAADAAAYAADCAAAAAAAAAAA==
|
| 440 |
+
|
| 441 |
+
> <PUBCHEM_IUPAC_OPENEYE_NAME>
|
| 442 |
+
[(2S,3R,4S,5S)-3-[(2S,3R,4S,5S,6S)-4-acetoxy-5-[(2S,3R,4S,5R)-4-[(2S,3R,4R)-3,4-dihydroxy-4-(hydroxymethyl)tetrahydrofuran-2-yl]oxy-3,5-dihydroxy-tetrahydropyran-2-yl]oxy-3-hydroxy-6-methyl-tetrahydropyran-2-yl]oxy-4,5-dihydroxy-tetrahydropyran-2-yl] (4aR,5R,6aR,6aS,6bR,8aR,9S,10R,11S,12aR,14bS)-10-[(2R,3R,4S,5R,6R)-3,5-dihydroxy-6-(hydroxymethyl)-4-[(2S,3R,4S,5S,6R)-3,4,5-trihydroxy-6-(hydroxymethyl)tetrahydropyran-2-yl]oxy-tetrahydropyran-2-yl]oxy-5,11-dihydroxy-9-(hydroxymethyl)-2,2,6a,6b,9,12a-hexamethyl-1,3,4,5,6,6a,7,8,8a,10,11,12,13,14b-tetradecahydropicene-4a-carboxylate
|
| 443 |
+
|
| 444 |
+
> <PUBCHEM_IUPAC_CAS_NAME>
|
| 445 |
+
(4aR,5R,6aR,6aS,6bR,8aR,9S,10R,11S,12aR,14bS)-10-[[(2R,3R,4S,5R,6R)-3,5-dihydroxy-6-(hydroxymethyl)-4-[[(2S,3R,4S,5S,6R)-3,4,5-trihydroxy-6-(hydroxymethyl)-2-oxanyl]oxy]-2-oxanyl]oxy]-5,11-dihydroxy-9-(hydroxymethyl)-2,2,6a,6b,9,12a-hexamethyl-1,3,4,5,6,6a,7,8,8a,10,11,12,13,14b-tetradecahydropicene-4a-carboxylic acid [(2S,3R,4S,5S)-3-[[(2S,3R,4S,5S,6S)-4-acetyloxy-5-[[(2S,3R,4S,5R)-4-[[(2S,3R,4R)-3,4-dihydroxy-4-(hydroxymethyl)-2-oxolanyl]oxy]-3,5-dihydroxy-2-oxanyl]oxy]-3-hydroxy-6-methyl-2-oxanyl]oxy]-4,5-dihydroxy-2-oxanyl] ester
|
| 446 |
+
|
| 447 |
+
> <PUBCHEM_IUPAC_NAME_MARKUP>
|
| 448 |
+
[(2<I>S</I>,3<I>R</I>,4<I>S</I>,5<I>S</I>)-3-[(2<I>S</I>,3<I>R</I>,4<I>S</I>,5<I>S</I>,6<I>S</I>)-4-acetyloxy-5-[(2<I>S</I>,3<I>R</I>,4<I>S</I>,5<I>R</I>)-4-[(2<I>S</I>,3<I>R</I>,4<I>R</I>)-3,4-dihydroxy-4-(hydroxymethyl)oxolan-2-yl]oxy-3,5-dihydroxyoxan-2-yl]oxy-3-hydroxy-6-methyloxan-2-yl]oxy-4,5-dihydroxyoxan-2-yl] (4<I>a</I><I>R</I>,5<I>R</I>,6<I>a</I><I>R</I>,6<I>a</I><I>S</I>,6<I>b</I><I>R</I>,8<I>a</I><I>R</I>,9<I>S</I>,10<I>R</I>,11<I>S</I>,12<I>a</I><I>R</I>,14<I>b</I><I>S</I>)-10-[(2<I>R</I>,3<I>R</I>,4<I>S</I>,5<I>R</I>,6<I>R</I>)-3,5-dihydroxy-6-(hydroxymethyl)-4-[(2<I>S</I>,3<I>R</I>,4<I>S</I>,5<I>S</I>,6<I>R</I>)-3,4,5-trihydroxy-6-(hydroxymethyl)oxan-2-yl]oxyoxan-2-yl]oxy-5,11-dihydroxy-9-(hydroxymethyl)-2,2,6<I>a</I>,6<I>b</I>,9,12<I>a</I>-hexamethyl-1,3,4,5,6,6<I>a</I>,7,8,8<I>a</I>,10,11,12,13,14<I>b</I>-tetradecahydropicene-4<I>a</I>-carboxylate
|
| 449 |
+
|
| 450 |
+
> <PUBCHEM_IUPAC_NAME>
|
| 451 |
+
[(2S,3R,4S,5S)-3-[(2S,3R,4S,5S,6S)-4-acetyloxy-5-[(2S,3R,4S,5R)-4-[(2S,3R,4R)-3,4-dihydroxy-4-(hydroxymethyl)oxolan-2-yl]oxy-3,5-dihydroxyoxan-2-yl]oxy-3-hydroxy-6-methyloxan-2-yl]oxy-4,5-dihydroxyoxan-2-yl] (4aR,5R,6aR,6aS,6bR,8aR,9S,10R,11S,12aR,14bS)-10-[(2R,3R,4S,5R,6R)-3,5-dihydroxy-6-(hydroxymethyl)-4-[(2S,3R,4S,5S,6R)-3,4,5-trihydroxy-6-(hydroxymethyl)oxan-2-yl]oxyoxan-2-yl]oxy-5,11-dihydroxy-9-(hydroxymethyl)-2,2,6a,6b,9,12a-hexamethyl-1,3,4,5,6,6a,7,8,8a,10,11,12,13,14b-tetradecahydropicene-4a-carboxylate
|
| 452 |
+
|
| 453 |
+
> <PUBCHEM_IUPAC_SYSTEMATIC_NAME>
|
| 454 |
+
[(2S,3R,4S,5S)-3-[(2S,3R,4S,5S,6S)-4-acetyloxy-5-[(2S,3R,4S,5R)-4-[(2S,3R,4R)-4-(hydroxymethyl)-3,4-bis(oxidanyl)oxolan-2-yl]oxy-3,5-bis(oxidanyl)oxan-2-yl]oxy-6-methyl-3-oxidanyl-oxan-2-yl]oxy-4,5-bis(oxidanyl)oxan-2-yl] (4aR,5R,6aR,6aS,6bR,8aR,9S,10R,11S,12aR,14bS)-9-(hydroxymethyl)-10-[(2R,3R,4S,5R,6R)-6-(hydroxymethyl)-4-[(2S,3R,4S,5S,6R)-6-(hydroxymethyl)-3,4,5-tris(oxidanyl)oxan-2-yl]oxy-3,5-bis(oxidanyl)oxan-2-yl]oxy-2,2,6a,6b,9,12a-hexamethyl-5,11-bis(oxidanyl)-1,3,4,5,6,6a,7,8,8a,10,11,12,13,14b-tetradecahydropicene-4a-carboxylate
|
| 455 |
+
|
| 456 |
+
> <PUBCHEM_IUPAC_TRADITIONAL_NAME>
|
| 457 |
+
(4aR,5R,6aR,6aS,6bR,8aR,9S,10R,11S,12aR,14bS)-10-[(2R,3R,4S,5R,6R)-3,5-dihydroxy-6-methylol-4-[(2S,3R,4S,5S,6R)-3,4,5-trihydroxy-6-methylol-tetrahydropyran-2-yl]oxy-tetrahydropyran-2-yl]oxy-5,11-dihydroxy-2,2,6a,6b,9,12a-hexamethyl-9-methylol-1,3,4,5,6,6a,7,8,8a,10,11,12,13,14b-tetradecahydropicene-4a-carboxylic acid [(2S,3R,4S,5S)-3-[(2S,3R,4S,5S,6S)-4-acetoxy-5-[(2S,3R,4S,5R)-4-[(2S,3R,4R)-3,4-dihydroxy-4-methylol-tetrahydrofuran-2-yl]oxy-3,5-dihydroxy-tetrahydropyran-2-yl]oxy-3-hydroxy-6-methyl-tetrahydropyran-2-yl]oxy-4,5-dihydroxy-tetrahydropyran-2-yl] ester
|
| 458 |
+
|
| 459 |
+
> <PUBCHEM_IUPAC_INCHI>
|
| 460 |
+
InChI=1S/C65H104O33/c1-25-45(93-52-42(80)46(31(73)21-86-52)94-57-50(83)64(85,23-69)24-88-57)48(90-26(2)70)44(82)54(89-25)96-49-37(75)30(72)20-87-56(49)98-58(84)65-14-13-59(3,4)15-28(65)27-9-10-35-60(5)16-29(71)51(61(6,22-68)34(60)11-12-62(35,7)63(27,8)17-36(65)74)97-55-43(81)47(39(77)33(19-67)92-55)95-53-41(79)40(78)38(76)32(18-66)91-53/h9,25,28-57,66-69,71-83,85H,10-24H2,1-8H3/t25-,28-,29-,30-,31+,32+,33+,34+,35+,36+,37-,38+,39+,40-,41+,42+,43+,44+,45-,46-,47-,48-,49+,50-,51-,52-,53-,54-,55-,56-,57-,60-,61+,62+,63+,64+,65+/m0/s1
|
| 461 |
+
|
| 462 |
+
> <PUBCHEM_IUPAC_INCHIKEY>
|
| 463 |
+
QIHODHJJXXXEHU-NJPKDRQOSA-N
|
| 464 |
+
|
| 465 |
+
> <PUBCHEM_XLOGP3_AA>
|
| 466 |
+
-3.5
|
| 467 |
+
|
| 468 |
+
> <PUBCHEM_EXACT_MASS>
|
| 469 |
+
1412.6459858
|
| 470 |
+
|
| 471 |
+
> <PUBCHEM_MOLECULAR_FORMULA>
|
| 472 |
+
C65H104O33
|
| 473 |
+
|
| 474 |
+
> <PUBCHEM_MOLECULAR_WEIGHT>
|
| 475 |
+
1413.5
|
| 476 |
+
|
| 477 |
+
> <PUBCHEM_SMILES>
|
| 478 |
+
C[C@H]1[C@@H]([C@H]([C@H]([C@@H](O1)O[C@@H]2[C@H]([C@H](CO[C@H]2OC(=O)[C@]34CCC(C[C@H]3C5=CC[C@H]6[C@]([C@@]5(C[C@H]4O)C)(CC[C@@H]7[C@@]6(C[C@@H]([C@@H]([C@]7(C)CO)O[C@H]8[C@@H]([C@H]([C@@H]([C@H](O8)CO)O)O[C@H]9[C@@H]([C@H]([C@@H]([C@H](O9)CO)O)O)O)O)O)C)C)(C)C)O)O)O)OC(=O)C)O[C@H]1[C@@H]([C@H]([C@@H](CO1)O)O[C@H]1[C@@H]([C@](CO1)(CO)O)O)O
|
| 479 |
+
|
| 480 |
+
> <PUBCHEM_CONNECTIVITY_SMILES>
|
| 481 |
+
CC1C(C(C(C(O1)OC2C(C(COC2OC(=O)C34CCC(CC3C5=CCC6C(C5(CC4O)C)(CCC7C6(CC(C(C7(C)CO)OC8C(C(C(C(O8)CO)O)OC9C(C(C(C(O9)CO)O)O)O)O)O)C)C)(C)C)O)O)O)OC(=O)C)OC1C(C(C(CO1)O)OC1C(C(CO1)(CO)O)O)O
|
| 482 |
+
|
| 483 |
+
> <PUBCHEM_CACTVS_TPSA>
|
| 484 |
+
518
|
| 485 |
+
|
| 486 |
+
> <PUBCHEM_MONOISOTOPIC_WEIGHT>
|
| 487 |
+
1412.6459858
|
| 488 |
+
|
| 489 |
+
> <PUBCHEM_TOTAL_CHARGE>
|
| 490 |
+
0
|
| 491 |
+
|
| 492 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 493 |
+
98
|
| 494 |
+
|
| 495 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 496 |
+
37
|
| 497 |
+
|
| 498 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 499 |
+
0
|
| 500 |
+
|
| 501 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 502 |
+
0
|
| 503 |
+
|
| 504 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 505 |
+
0
|
| 506 |
+
|
| 507 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 508 |
+
0
|
| 509 |
+
|
| 510 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 511 |
+
1
|
| 512 |
+
|
| 513 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 514 |
+
-1
|
| 515 |
+
|
| 516 |
+
> <PUBCHEM_COORDINATE_TYPE>
|
| 517 |
+
1
|
| 518 |
+
5
|
| 519 |
+
255
|
| 520 |
+
|
| 521 |
+
> <PUBCHEM_BONDANNOTATIONS>
|
| 522 |
+
48 1 5
|
| 523 |
+
64 1 5
|
| 524 |
+
67 10 5
|
| 525 |
+
75 10 6
|
| 526 |
+
70 11 6
|
| 527 |
+
76 11 5
|
| 528 |
+
69 12 6
|
| 529 |
+
71 13 5
|
| 530 |
+
74 15 5
|
| 531 |
+
77 18 5
|
| 532 |
+
78 19 6
|
| 533 |
+
49 2 6
|
| 534 |
+
79 20 6
|
| 535 |
+
81 21 5
|
| 536 |
+
82 22 6
|
| 537 |
+
84 23 5
|
| 538 |
+
87 23 5
|
| 539 |
+
89 27 6
|
| 540 |
+
91 28 5
|
| 541 |
+
94 28 5
|
| 542 |
+
93 29 6
|
| 543 |
+
51 3 5
|
| 544 |
+
95 31 6
|
| 545 |
+
96 32 6
|
| 546 |
+
34 50 5
|
| 547 |
+
35 52 5
|
| 548 |
+
36 99 6
|
| 549 |
+
37 54 6
|
| 550 |
+
38 100 6
|
| 551 |
+
40 59 6
|
| 552 |
+
44 107 5
|
| 553 |
+
47 61 5
|
| 554 |
+
66 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.0072 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 7 |
+
0.5071 3.1205 0.1304 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 8 |
+
-2.9069 0.0896 -0.0221 N 0 0 0 0 0 0 0 0 0 0 0 0
|
| 9 |
+
-1.7609 -0.6079 0.0559 N 0 0 0 0 0 0 0 0 0 0 0 0
|
| 10 |
+
6.8466 -0.3723 -0.1031 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
5.4231 -0.5887 -0.6235 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 12 |
+
-0.8225 0.3451 0.0960 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
0.5666 -0.0080 0.1831 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
7.4407 -1.6691 0.4509 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
7.7381 0.1903 -1.2081 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
-1.3727 1.6430 0.0435 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
3.2564 -0.6917 0.3518 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
-2.7294 1.4420 -0.0328 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
1.1705 -0.1607 1.4311 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
1.3122 -0.1983 -0.9804 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
2.5199 -0.5036 1.5157 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
2.6616 -0.5412 -0.8959 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
-4.1327 -0.5697 -0.0830 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
-5.3071 0.1694 -0.1627 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
-4.1675 -1.9589 -0.0669 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
-0.7229 2.9194 0.0616 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
-6.5342 -0.4905 -0.2269 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
-5.3948 -2.6187 -0.1312 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
-6.5781 -1.8844 -0.2113 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
6.8106 0.3503 0.7223 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
5.0760 0.3685 -1.0352 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
5.4208 -1.3426 -1.4202 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 33 |
+
8.4593 -1.5029 0.8175 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 34 |
+
7.4812 -2.4473 -0.3189 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 35 |
+
6.8472 -2.0507 1.2880 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 36 |
+
8.7515 0.3729 -0.8351 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 37 |
+
7.3440 1.1418 -1.5803 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 38 |
+
7.8083 -0.5020 -2.0541 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 39 |
+
-3.5315 2.1636 -0.0911 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 40 |
+
0.6036 -0.0155 2.3478 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 41 |
+
0.8545 -0.0886 -1.9609 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 42 |
+
2.9866 -0.6211 2.4895 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 43 |
+
3.1981 -0.7081 -1.8248 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 44 |
+
-5.3411 1.2527 -0.1792 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 45 |
+
-3.2701 -2.5683 -0.0060 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 46 |
+
-7.4563 0.0802 -0.2893 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 47 |
+
-5.4298 -3.7042 -0.1192 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 48 |
+
-7.5336 -2.3982 -0.2614 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 49 |
+
-1.1251 4.8341 0.0064 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 50 |
+
1 7 1 0 0 0 0
|
| 51 |
+
1 13 1 0 0 0 0
|
| 52 |
+
2 22 1 0 0 0 0
|
| 53 |
+
2 45 1 0 0 0 0
|
| 54 |
+
3 22 2 0 0 0 0
|
| 55 |
+
4 5 1 0 0 0 0
|
| 56 |
+
4 14 1 0 0 0 0
|
| 57 |
+
4 19 1 0 0 0 0
|
| 58 |
+
5 8 2 0 0 0 0
|
| 59 |
+
6 7 1 0 0 0 0
|
| 60 |
+
6 10 1 0 0 0 0
|
| 61 |
+
6 11 1 0 0 0 0
|
| 62 |
+
6 26 1 0 0 0 0
|
| 63 |
+
7 27 1 0 0 0 0
|
| 64 |
+
7 28 1 0 0 0 0
|
| 65 |
+
8 9 1 0 0 0 0
|
| 66 |
+
8 12 1 0 0 0 0
|
| 67 |
+
9 15 2 0 0 0 0
|
| 68 |
+
9 16 1 0 0 0 0
|
| 69 |
+
10 29 1 0 0 0 0
|
| 70 |
+
10 30 1 0 0 0 0
|
| 71 |
+
10 31 1 0 0 0 0
|
| 72 |
+
11 32 1 0 0 0 0
|
| 73 |
+
11 33 1 0 0 0 0
|
| 74 |
+
11 34 1 0 0 0 0
|
| 75 |
+
12 14 2 0 0 0 0
|
| 76 |
+
12 22 1 0 0 0 0
|
| 77 |
+
13 17 2 0 0 0 0
|
| 78 |
+
13 18 1 0 0 0 0
|
| 79 |
+
14 35 1 0 0 0 0
|
| 80 |
+
15 17 1 0 0 0 0
|
| 81 |
+
15 36 1 0 0 0 0
|
| 82 |
+
16 18 2 0 0 0 0
|
| 83 |
+
16 37 1 0 0 0 0
|
| 84 |
+
17 38 1 0 0 0 0
|
| 85 |
+
18 39 1 0 0 0 0
|
| 86 |
+
19 20 2 0 0 0 0
|
| 87 |
+
19 21 1 0 0 0 0
|
| 88 |
+
20 23 1 0 0 0 0
|
| 89 |
+
20 40 1 0 0 0 0
|
| 90 |
+
21 24 2 0 0 0 0
|
| 91 |
+
21 41 1 0 0 0 0
|
| 92 |
+
23 25 2 0 0 0 0
|
| 93 |
+
23 42 1 0 0 0 0
|
| 94 |
+
24 25 1 0 0 0 0
|
| 95 |
+
24 43 1 0 0 0 0
|
| 96 |
+
25 44 1 0 0 0 0
|
| 97 |
+
M END
|
| 98 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 99 |
+
977145
|
| 100 |
+
|
| 101 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 102 |
+
0.8
|
| 103 |
+
|
| 104 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 105 |
+
1
|
| 106 |
+
9
|
| 107 |
+
8
|
| 108 |
+
7
|
| 109 |
+
6
|
| 110 |
+
12
|
| 111 |
+
15
|
| 112 |
+
4
|
| 113 |
+
16
|
| 114 |
+
3
|
| 115 |
+
11
|
| 116 |
+
5
|
| 117 |
+
10
|
| 118 |
+
13
|
| 119 |
+
2
|
| 120 |
+
14
|
| 121 |
+
|
| 122 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 123 |
+
33
|
| 124 |
+
1 -0.36
|
| 125 |
+
12 -0.09
|
| 126 |
+
13 0.08
|
| 127 |
+
14 -0.3
|
| 128 |
+
15 -0.15
|
| 129 |
+
16 -0.15
|
| 130 |
+
17 -0.15
|
| 131 |
+
18 -0.15
|
| 132 |
+
19 -0.02
|
| 133 |
+
2 -0.65
|
| 134 |
+
20 -0.15
|
| 135 |
+
21 -0.15
|
| 136 |
+
22 0.81
|
| 137 |
+
23 -0.15
|
| 138 |
+
24 -0.15
|
| 139 |
+
25 -0.15
|
| 140 |
+
3 -0.57
|
| 141 |
+
35 0.15
|
| 142 |
+
36 0.15
|
| 143 |
+
37 0.15
|
| 144 |
+
38 0.15
|
| 145 |
+
39 0.15
|
| 146 |
+
4 0.59
|
| 147 |
+
40 0.15
|
| 148 |
+
41 0.15
|
| 149 |
+
42 0.15
|
| 150 |
+
43 0.15
|
| 151 |
+
44 0.15
|
| 152 |
+
45 0.5
|
| 153 |
+
5 -0.71
|
| 154 |
+
7 0.28
|
| 155 |
+
8 0.23
|
| 156 |
+
9 0.05
|
| 157 |
+
|
| 158 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 159 |
+
6
|
| 160 |
+
|
| 161 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 162 |
+
9
|
| 163 |
+
1 1 acceptor
|
| 164 |
+
1 2 acceptor
|
| 165 |
+
1 3 acceptor
|
| 166 |
+
1 5 acceptor
|
| 167 |
+
3 2 3 22 anion
|
| 168 |
+
3 6 10 11 hydrophobe
|
| 169 |
+
5 4 5 8 12 14 rings
|
| 170 |
+
6 19 20 21 23 24 25 rings
|
| 171 |
+
6 9 13 15 16 17 18 rings
|
| 172 |
+
|
| 173 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 174 |
+
25
|
| 175 |
+
|
| 176 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 177 |
+
0
|
| 178 |
+
|
| 179 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 180 |
+
0
|
| 181 |
+
|
| 182 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 183 |
+
0
|
| 184 |
+
|
| 185 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 186 |
+
0
|
| 187 |
+
|
| 188 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 189 |
+
0
|
| 190 |
+
|
| 191 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 192 |
+
1
|
| 193 |
+
|
| 194 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 195 |
+
1
|
| 196 |
+
|
| 197 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 198 |
+
000EE8F900000001
|
| 199 |
+
|
| 200 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 201 |
+
71.4263
|
| 202 |
+
|
| 203 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 204 |
+
45.73
|
| 205 |
+
|
| 206 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 207 |
+
10050765 1 18122626046698510078
|
| 208 |
+
10411042 1 18411135883624108809
|
| 209 |
+
10595046 47 18334296419222881506
|
| 210 |
+
11315181 36 18342461452415380291
|
| 211 |
+
11524674 6 16559029406769829343
|
| 212 |
+
11578080 2 17460002207075710397
|
| 213 |
+
11963148 33 18341886403176291398
|
| 214 |
+
12166972 35 17821730554914579788
|
| 215 |
+
12236239 1 17821727200101833858
|
| 216 |
+
12516196 113 18410853287149146635
|
| 217 |
+
12553582 1 18336811062213162275
|
| 218 |
+
12741549 16 17418370277120561361
|
| 219 |
+
12788726 201 18188767250102436385
|
| 220 |
+
13288520 33 18411418419383869111
|
| 221 |
+
13631057 29 18408882906588295640
|
| 222 |
+
13673619 4 17918273164616530112
|
| 223 |
+
13690498 29 18187076287535169415
|
| 224 |
+
13740256 8 18410292549462585299
|
| 225 |
+
13782708 43 17846496998596015734
|
| 226 |
+
14068700 675 18260829306379711292
|
| 227 |
+
14556957 393 17676500418686952036
|
| 228 |
+
14767858 380 18040437706993052314
|
| 229 |
+
15021287 119 13758347877902228003
|
| 230 |
+
16087824 20 18266177241814272477
|
| 231 |
+
18006028 8 18411980269493178039
|
| 232 |
+
18222031 100 18341040900524573091
|
| 233 |
+
18335252 98 18059860563356364334
|
| 234 |
+
18681886 176 18334291015304749146
|
| 235 |
+
19427546 20 18261955133446455893
|
| 236 |
+
20281389 69 10159695790063083758
|
| 237 |
+
21033648 29 17203032029455264883
|
| 238 |
+
21150785 3 17894912945131862926
|
| 239 |
+
21267235 1 18409450328167408323
|
| 240 |
+
21304303 172 18202004301166335505
|
| 241 |
+
21344244 246 18044663241647766340
|
| 242 |
+
21403212 168 11599732748433944389
|
| 243 |
+
21796203 349 18049192087403892539
|
| 244 |
+
22224240 67 15913323602576924294
|
| 245 |
+
2297311 6 18341896277035760264
|
| 246 |
+
23035841 295 18409448085324204147
|
| 247 |
+
23402539 116 18409446968606015190
|
| 248 |
+
23522609 53 18195557881050321504
|
| 249 |
+
23557571 272 18200876171200547653
|
| 250 |
+
23559900 14 18267296720348491857
|
| 251 |
+
249057 25 18041008302526422148
|
| 252 |
+
283562 15 18335703780361514753
|
| 253 |
+
3004659 81 18040992973007297007
|
| 254 |
+
3009799 131 14418132924652701230
|
| 255 |
+
335352 9 18410005530305542677
|
| 256 |
+
34797466 226 17846786222247284948
|
| 257 |
+
3633792 109 17095518448953302346
|
| 258 |
+
4325135 7 18334296474688191438
|
| 259 |
+
484989 97 17387145367126918195
|
| 260 |
+
5283156 175 18260266326488060538
|
| 261 |
+
56616090 46 8142083165490107824
|
| 262 |
+
5969126 39 18341888576423532773
|
| 263 |
+
|
| 264 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 265 |
+
486.92
|
| 266 |
+
18.9
|
| 267 |
+
2.79
|
| 268 |
+
0.96
|
| 269 |
+
17.85
|
| 270 |
+
2.98
|
| 271 |
+
0.13
|
| 272 |
+
-13.37
|
| 273 |
+
-3.51
|
| 274 |
+
-3.17
|
| 275 |
+
0.06
|
| 276 |
+
1.12
|
| 277 |
+
-0.12
|
| 278 |
+
-0.57
|
| 279 |
+
|
| 280 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>
|
| 281 |
+
1054.679
|
| 282 |
+
|
| 283 |
+
> <PUBCHEM_SHAPE_VOLUME>
|
| 284 |
+
268.2
|
| 285 |
+
|
| 286 |
+
> <PUBCHEM_COORDINATE_TYPE>
|
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 0 0 0 0 0 0 0 0 0 0 0
|
| 6 |
+
-4.1884 1.1844 0.4422 O 0 0 0 0 0 0 0 0 0 0 0 0
|
| 7 |
+
2.2571 -0.5262 0.3090 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 8 |
+
3.4155 0.3773 -0.1268 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 9 |
+
0.8954 0.1767 0.2810 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 10 |
+
4.7718 -0.3291 -0.1310 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
-0.2648 -0.7281 0.7128 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 12 |
+
5.8829 0.6076 -0.5810 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
-1.6093 -0.0640 0.6162 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
-2.5857 -0.4961 -0.1930 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
-3.8816 0.2076 -0.2199 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
2.4510 -0.8958 1.3234 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
2.2209 -1.4044 -0.3472 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
3.4614 1.2464 0.5413 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
3.2075 0.7629 -1.1327 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
0.9308 1.0581 0.9338 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
0.7072 0.5461 -0.7352 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
4.7366 -1.1960 -0.8007 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
4.9979 -0.7033 0.8740 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
-0.1108 -1.0417 1.7525 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
-0.2490 -1.6435 0.1079 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
5.7002 0.9742 -1.5961 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
5.9630 1.4708 0.0874 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
6.8441 0.0842 -0.5767 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
-1.7644 0.8017 1.2554 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 30 |
+
-2.4493 -1.3595 -0.8351 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 31 |
+
-5.5722 0.0208 -1.1661 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 32 |
+
1 11 1 0 0 0 0
|
| 33 |
+
1 27 1 0 0 0 0
|
| 34 |
+
2 11 2 0 0 0 0
|
| 35 |
+
3 4 1 0 0 0 0
|
| 36 |
+
3 5 1 0 0 0 0
|
| 37 |
+
3 12 1 0 0 0 0
|
| 38 |
+
3 13 1 0 0 0 0
|
| 39 |
+
4 6 1 0 0 0 0
|
| 40 |
+
4 14 1 0 0 0 0
|
| 41 |
+
4 15 1 0 0 0 0
|
| 42 |
+
5 7 1 0 0 0 0
|
| 43 |
+
5 16 1 0 0 0 0
|
| 44 |
+
5 17 1 0 0 0 0
|
| 45 |
+
6 8 1 0 0 0 0
|
| 46 |
+
6 18 1 0 0 0 0
|
| 47 |
+
6 19 1 0 0 0 0
|
| 48 |
+
7 9 1 0 0 0 0
|
| 49 |
+
7 20 1 0 0 0 0
|
| 50 |
+
7 21 1 0 0 0 0
|
| 51 |
+
8 22 1 0 0 0 0
|
| 52 |
+
8 23 1 0 0 0 0
|
| 53 |
+
8 24 1 0 0 0 0
|
| 54 |
+
9 10 2 3 0 0 0
|
| 55 |
+
9 25 1 0 0 0 0
|
| 56 |
+
10 11 1 0 0 0 0
|
| 57 |
+
10 26 1 0 0 0 0
|
| 58 |
+
M END
|
| 59 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 60 |
+
97730
|
| 61 |
+
|
| 62 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 63 |
+
0.6
|
| 64 |
+
|
| 65 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 66 |
+
1
|
| 67 |
+
65
|
| 68 |
+
112
|
| 69 |
+
73
|
| 70 |
+
97
|
| 71 |
+
70
|
| 72 |
+
36
|
| 73 |
+
4
|
| 74 |
+
83
|
| 75 |
+
44
|
| 76 |
+
103
|
| 77 |
+
86
|
| 78 |
+
3
|
| 79 |
+
117
|
| 80 |
+
18
|
| 81 |
+
89
|
| 82 |
+
106
|
| 83 |
+
115
|
| 84 |
+
34
|
| 85 |
+
116
|
| 86 |
+
62
|
| 87 |
+
51
|
| 88 |
+
118
|
| 89 |
+
69
|
| 90 |
+
96
|
| 91 |
+
71
|
| 92 |
+
53
|
| 93 |
+
11
|
| 94 |
+
27
|
| 95 |
+
52
|
| 96 |
+
108
|
| 97 |
+
100
|
| 98 |
+
6
|
| 99 |
+
54
|
| 100 |
+
98
|
| 101 |
+
20
|
| 102 |
+
75
|
| 103 |
+
107
|
| 104 |
+
2
|
| 105 |
+
47
|
| 106 |
+
13
|
| 107 |
+
101
|
| 108 |
+
87
|
| 109 |
+
111
|
| 110 |
+
61
|
| 111 |
+
56
|
| 112 |
+
114
|
| 113 |
+
12
|
| 114 |
+
110
|
| 115 |
+
48
|
| 116 |
+
102
|
| 117 |
+
77
|
| 118 |
+
5
|
| 119 |
+
32
|
| 120 |
+
28
|
| 121 |
+
33
|
| 122 |
+
80
|
| 123 |
+
37
|
| 124 |
+
104
|
| 125 |
+
78
|
| 126 |
+
26
|
| 127 |
+
42
|
| 128 |
+
99
|
| 129 |
+
45
|
| 130 |
+
38
|
| 131 |
+
22
|
| 132 |
+
10
|
| 133 |
+
57
|
| 134 |
+
17
|
| 135 |
+
67
|
| 136 |
+
59
|
| 137 |
+
29
|
| 138 |
+
21
|
| 139 |
+
113
|
| 140 |
+
72
|
| 141 |
+
85
|
| 142 |
+
14
|
| 143 |
+
64
|
| 144 |
+
90
|
| 145 |
+
30
|
| 146 |
+
46
|
| 147 |
+
74
|
| 148 |
+
76
|
| 149 |
+
19
|
| 150 |
+
15
|
| 151 |
+
79
|
| 152 |
+
8
|
| 153 |
+
43
|
| 154 |
+
93
|
| 155 |
+
58
|
| 156 |
+
41
|
| 157 |
+
55
|
| 158 |
+
31
|
| 159 |
+
95
|
| 160 |
+
68
|
| 161 |
+
35
|
| 162 |
+
94
|
| 163 |
+
60
|
| 164 |
+
9
|
| 165 |
+
105
|
| 166 |
+
16
|
| 167 |
+
92
|
| 168 |
+
82
|
| 169 |
+
88
|
| 170 |
+
91
|
| 171 |
+
23
|
| 172 |
+
84
|
| 173 |
+
40
|
| 174 |
+
7
|
| 175 |
+
50
|
| 176 |
+
66
|
| 177 |
+
109
|
| 178 |
+
24
|
| 179 |
+
25
|
| 180 |
+
39
|
| 181 |
+
49
|
| 182 |
+
81
|
| 183 |
+
63
|
| 184 |
+
|
| 185 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 186 |
+
9
|
| 187 |
+
1 -0.65
|
| 188 |
+
10 -0.14
|
| 189 |
+
11 0.71
|
| 190 |
+
2 -0.57
|
| 191 |
+
25 0.15
|
| 192 |
+
26 0.15
|
| 193 |
+
27 0.5
|
| 194 |
+
7 0.14
|
| 195 |
+
9 -0.29
|
| 196 |
+
|
| 197 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 198 |
+
6
|
| 199 |
+
|
| 200 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 201 |
+
6
|
| 202 |
+
1 1 acceptor
|
| 203 |
+
1 2 acceptor
|
| 204 |
+
1 8 hydrophobe
|
| 205 |
+
3 1 2 11 anion
|
| 206 |
+
3 3 4 6 hydrophobe
|
| 207 |
+
3 5 7 9 hydrophobe
|
| 208 |
+
|
| 209 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 210 |
+
11
|
| 211 |
+
|
| 212 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 213 |
+
0
|
| 214 |
+
|
| 215 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 216 |
+
0
|
| 217 |
+
|
| 218 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 219 |
+
0
|
| 220 |
+
|
| 221 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 222 |
+
1
|
| 223 |
+
|
| 224 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 225 |
+
0
|
| 226 |
+
|
| 227 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 228 |
+
1
|
| 229 |
+
|
| 230 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 231 |
+
1
|
| 232 |
+
|
| 233 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 234 |
+
00017DC200000001
|
| 235 |
+
|
| 236 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 237 |
+
4.0412
|
| 238 |
+
|
| 239 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 240 |
+
30.514
|
| 241 |
+
|
| 242 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 243 |
+
100836 57 17240771687667142948
|
| 244 |
+
11062470 55 18187085053009408786
|
| 245 |
+
11401426 45 18335138713411137858
|
| 246 |
+
114248 4 17775565351271285114
|
| 247 |
+
13690532 89 14477245959648592210
|
| 248 |
+
14123238 8 18259703402071996606
|
| 249 |
+
1420 363 13686301292345384284
|
| 250 |
+
14251718 22 17489586783802683652
|
| 251 |
+
14252887 29 9511472134454730944
|
| 252 |
+
14455015 7 13686303491089039076
|
| 253 |
+
15501527 16 16877949364560703620
|
| 254 |
+
15501527 24 18272932743410402748
|
| 255 |
+
17834072 33 17632574989661238684
|
| 256 |
+
17834076 25 18187366532444513018
|
| 257 |
+
18342897 14 14201396088504392886
|
| 258 |
+
187816 3 17988926677710328554
|
| 259 |
+
20300324 65 18201720639317690665
|
| 260 |
+
20432913 95 10592049067729629172
|
| 261 |
+
20645477 56 16443065019342087970
|
| 262 |
+
20645477 70 18338800005760115430
|
| 263 |
+
20719005 15 11887956545223064912
|
| 264 |
+
20767249 13 13686296872433698312
|
| 265 |
+
20767249 213 16515404087992606454
|
| 266 |
+
20828058 44 10737290142669163617
|
| 267 |
+
21119208 17 17989487424508855642
|
| 268 |
+
22485316 2 16702019764411480998
|
| 269 |
+
23402539 116 18131348592141279852
|
| 270 |
+
23402655 69 18412261701193193908
|
| 271 |
+
366044 4 17821447967214265610
|
| 272 |
+
42 15 8358260345581882954
|
| 273 |
+
42788 4 18408042914227852304
|
| 274 |
+
449060 50 15791734096344624754
|
| 275 |
+
49783359 22 9151173134298653104
|
| 276 |
+
|
| 277 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 278 |
+
214.64
|
| 279 |
+
12.78
|
| 280 |
+
0.89
|
| 281 |
+
0.83
|
| 282 |
+
6.64
|
| 283 |
+
0.03
|
| 284 |
+
0.05
|
| 285 |
+
-3.91
|
| 286 |
+
2.1
|
| 287 |
+
0.15
|
| 288 |
+
-0.06
|
| 289 |
+
-0.71
|
| 290 |
+
-0.05
|
| 291 |
+
-0.18
|
| 292 |
+
|
| 293 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>
|
| 294 |
+
392.908
|
| 295 |
+
|
| 296 |
+
> <PUBCHEM_SHAPE_VOLUME>
|
| 297 |
+
136.2
|
| 298 |
+
|
| 299 |
+
> <PUBCHEM_COORDINATE_TYPE>
|
| 300 |
+
2
|
| 301 |
+
5
|
| 302 |
+
10
|
| 303 |
+
|
| 304 |
+
$$$$
|
COM/pubchem_clean_sdf/CID_995.sdf
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
995
|
| 2 |
+
-OEChem-12172504593D
|
| 3 |
+
|
| 4 |
+
24 26 0 0 0 0 0 0 0999 V2000
|
| 5 |
+
-0.7199 -0.3930 -0.0006 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 6 |
+
0.7199 -0.3930 -0.0004 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 7 |
+
-1.4123 0.8461 -0.0003 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 8 |
+
1.4123 0.8461 -0.0002 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 9 |
+
-0.6957 2.0453 -0.0001 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 10 |
+
0.6954 2.0453 -0.0001 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 11 |
+
-1.5154 -1.5662 -0.0003 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 12 |
+
1.5154 -1.5661 -0.0003 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 13 |
+
-2.8173 0.8802 0.0004 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 14 |
+
2.8173 0.8802 0.0003 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 15 |
+
-2.9121 -1.5182 0.0002 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 16 |
+
2.9122 -1.5181 0.0003 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 17 |
+
-3.5631 -0.2943 0.0007 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 18 |
+
3.5633 -0.2943 0.0005 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 19 |
+
-1.2140 3.0024 0.0002 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 20 |
+
1.2138 3.0025 0.0002 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 21 |
+
-1.0604 -2.5534 -0.0004 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 22 |
+
1.0605 -2.5533 -0.0004 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 23 |
+
-3.3475 1.8309 0.0009 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 24 |
+
3.3474 1.8310 0.0006 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 25 |
+
-3.4858 -2.4405 0.0003 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 26 |
+
3.4858 -2.4404 0.0006 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 27 |
+
-4.6480 -0.2517 0.0012 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 28 |
+
4.6481 -0.2517 0.0009 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 29 |
+
1 2 1 0 0 0 0
|
| 30 |
+
1 3 1 0 0 0 0
|
| 31 |
+
1 7 2 0 0 0 0
|
| 32 |
+
2 4 1 0 0 0 0
|
| 33 |
+
2 8 2 0 0 0 0
|
| 34 |
+
3 5 1 0 0 0 0
|
| 35 |
+
3 9 2 0 0 0 0
|
| 36 |
+
4 6 1 0 0 0 0
|
| 37 |
+
4 10 2 0 0 0 0
|
| 38 |
+
5 6 2 0 0 0 0
|
| 39 |
+
5 15 1 0 0 0 0
|
| 40 |
+
6 16 1 0 0 0 0
|
| 41 |
+
7 11 1 0 0 0 0
|
| 42 |
+
7 17 1 0 0 0 0
|
| 43 |
+
8 12 1 0 0 0 0
|
| 44 |
+
8 18 1 0 0 0 0
|
| 45 |
+
9 13 1 0 0 0 0
|
| 46 |
+
9 19 1 0 0 0 0
|
| 47 |
+
10 14 1 0 0 0 0
|
| 48 |
+
10 20 1 0 0 0 0
|
| 49 |
+
11 13 2 0 0 0 0
|
| 50 |
+
11 21 1 0 0 0 0
|
| 51 |
+
12 14 2 0 0 0 0
|
| 52 |
+
12 22 1 0 0 0 0
|
| 53 |
+
13 23 1 0 0 0 0
|
| 54 |
+
14 24 1 0 0 0 0
|
| 55 |
+
M END
|
| 56 |
+
> <PUBCHEM_COMPOUND_CID>
|
| 57 |
+
995
|
| 58 |
+
|
| 59 |
+
> <PUBCHEM_CONFORMER_RMSD>
|
| 60 |
+
0.4
|
| 61 |
+
|
| 62 |
+
> <PUBCHEM_CONFORMER_DIVERSEORDER>
|
| 63 |
+
1
|
| 64 |
+
|
| 65 |
+
> <PUBCHEM_MMFF94_PARTIAL_CHARGES>
|
| 66 |
+
20
|
| 67 |
+
10 -0.15
|
| 68 |
+
11 -0.15
|
| 69 |
+
12 -0.15
|
| 70 |
+
13 -0.15
|
| 71 |
+
14 -0.15
|
| 72 |
+
15 0.15
|
| 73 |
+
16 0.15
|
| 74 |
+
17 0.15
|
| 75 |
+
18 0.15
|
| 76 |
+
19 0.15
|
| 77 |
+
20 0.15
|
| 78 |
+
21 0.15
|
| 79 |
+
22 0.15
|
| 80 |
+
23 0.15
|
| 81 |
+
24 0.15
|
| 82 |
+
5 -0.15
|
| 83 |
+
6 -0.15
|
| 84 |
+
7 -0.15
|
| 85 |
+
8 -0.15
|
| 86 |
+
9 -0.15
|
| 87 |
+
|
| 88 |
+
> <PUBCHEM_EFFECTIVE_ROTOR_COUNT>
|
| 89 |
+
0
|
| 90 |
+
|
| 91 |
+
> <PUBCHEM_PHARMACOPHORE_FEATURES>
|
| 92 |
+
3
|
| 93 |
+
6 1 2 3 4 5 6 rings
|
| 94 |
+
6 1 3 7 9 11 13 rings
|
| 95 |
+
6 2 4 8 10 12 14 rings
|
| 96 |
+
|
| 97 |
+
> <PUBCHEM_HEAVY_ATOM_COUNT>
|
| 98 |
+
14
|
| 99 |
+
|
| 100 |
+
> <PUBCHEM_ATOM_DEF_STEREO_COUNT>
|
| 101 |
+
0
|
| 102 |
+
|
| 103 |
+
> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>
|
| 104 |
+
0
|
| 105 |
+
|
| 106 |
+
> <PUBCHEM_BOND_DEF_STEREO_COUNT>
|
| 107 |
+
0
|
| 108 |
+
|
| 109 |
+
> <PUBCHEM_BOND_UDEF_STEREO_COUNT>
|
| 110 |
+
0
|
| 111 |
+
|
| 112 |
+
> <PUBCHEM_ISOTOPIC_ATOM_COUNT>
|
| 113 |
+
0
|
| 114 |
+
|
| 115 |
+
> <PUBCHEM_COMPONENT_COUNT>
|
| 116 |
+
1
|
| 117 |
+
|
| 118 |
+
> <PUBCHEM_CACTVS_TAUTO_COUNT>
|
| 119 |
+
1
|
| 120 |
+
|
| 121 |
+
> <PUBCHEM_CONFORMER_ID>
|
| 122 |
+
000003E300000001
|
| 123 |
+
|
| 124 |
+
> <PUBCHEM_MMFF94_ENERGY>
|
| 125 |
+
47.5035
|
| 126 |
+
|
| 127 |
+
> <PUBCHEM_FEATURE_SELFOVERLAP>
|
| 128 |
+
15.272
|
| 129 |
+
|
| 130 |
+
> <PUBCHEM_SHAPE_FINGERPRINT>
|
| 131 |
+
10608611 8 18410851066377001248
|
| 132 |
+
10618630 7 18410012126272690902
|
| 133 |
+
10967382 1 18266740362262521350
|
| 134 |
+
11132069 177 18411694383400399088
|
| 135 |
+
11471102 20 18410288138198707205
|
| 136 |
+
11769659 78 18410851062081787110
|
| 137 |
+
12032990 46 18410579482709804387
|
| 138 |
+
12382932 28 18413388722070585810
|
| 139 |
+
13140716 1 18338797814566515994
|
| 140 |
+
13221675 6 18410575088958189126
|
| 141 |
+
14144814 61 18411419505377507939
|
| 142 |
+
14325111 11 18410855460133572960
|
| 143 |
+
15196674 1 18410855464423168070
|
| 144 |
+
15375462 189 18259987041680751843
|
| 145 |
+
15442244 35 18266741268743421946
|
| 146 |
+
15536298 74 18343584070713961960
|
| 147 |
+
16945 1 18410856563935016704
|
| 148 |
+
17844478 74 17967821535188661677
|
| 149 |
+
17990270 104 18337107985437832011
|
| 150 |
+
200 152 18059846294984052343
|
| 151 |
+
20201158 50 18409165523741613155
|
| 152 |
+
20510252 161 18128816348132687288
|
| 153 |
+
20645477 70 18119520192674802143
|
| 154 |
+
20871998 184 18201998776872444047
|
| 155 |
+
21267235 1 18410583885051503654
|
| 156 |
+
21501502 16 18410858754373417536
|
| 157 |
+
21501925 9 18410845586204180730
|
| 158 |
+
22721475 48 18410859862469666181
|
| 159 |
+
2334 1 18410293631171890658
|
| 160 |
+
23402539 116 18342163436823267559
|
| 161 |
+
23463225 33 18409730659891196076
|
| 162 |
+
23552423 10 18262521519040767773
|
| 163 |
+
23559900 14 18268705014276126362
|
| 164 |
+
2748010 2 18411133653760407950
|
| 165 |
+
3312278 4 18410014333759300008
|
| 166 |
+
335352 9 18122626050370485341
|
| 167 |
+
34934 24 18410845568818485602
|
| 168 |
+
5104073 3 18410856559650392034
|
| 169 |
+
528886 8 18411695500033958194
|
| 170 |
+
53812653 166 18271239534053104976
|
| 171 |
+
63268167 104 18410859884171460185
|
| 172 |
+
7364860 26 18197779005953929200
|
| 173 |
+
8809292 202 18260834820890872355
|
| 174 |
+
9709674 26 18411704283242598158
|
| 175 |
+
|
| 176 |
+
> <PUBCHEM_SHAPE_MULTIPOLES>
|
| 177 |
+
288.11
|
| 178 |
+
5.53
|
| 179 |
+
2.14
|
| 180 |
+
0.62
|
| 181 |
+
0
|
| 182 |
+
0.35
|
| 183 |
+
0
|
| 184 |
+
-1.54
|
| 185 |
+
0
|
| 186 |
+
0
|
| 187 |
+
0
|
| 188 |
+
0
|
| 189 |
+
0
|
| 190 |
+
0
|
| 191 |
+
|
| 192 |
+
> <PUBCHEM_SHAPE_SELFOVERLAP>
|
| 193 |
+
652.127
|
| 194 |
+
|
| 195 |
+
> <PUBCHEM_SHAPE_VOLUME>
|
| 196 |
+
138.9
|
| 197 |
+
|
| 198 |
+
> <PUBCHEM_COORDINATE_TYPE>
|
| 199 |
+
2
|
| 200 |
+
5
|
| 201 |
+
10
|
| 202 |
+
|
| 203 |
+
$$$$
|
COM/smiles.py
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import os
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
import pandas as pd
|
| 10 |
+
from rdkit import Chem
|
| 11 |
+
from tqdm import tqdm
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
SDF_DIR = Path("/mnt/disk1/yanganqi/QQCM/COM/pubchem_clean_sdf")
|
| 15 |
+
MOL2_DIR = Path("/mnt/disk1/yanganqi/QQCM/COM/tcmsp_mol2")
|
| 16 |
+
ALT_SDF_ROOT = Path("/mnt/disk1/yanganqi/QQCM/清窍聪明汤结构-mol2-sdf")
|
| 17 |
+
OUT_CSV = Path("/mnt/disk1/yanganqi/QQCM/COM/compound_smiles.csv")
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def extract_mol_id(filename: str) -> str | None:
|
| 21 |
+
if filename.endswith(".sdf"):
|
| 22 |
+
return filename.replace("CID_", "").replace(".sdf", "")
|
| 23 |
+
if filename.endswith(".mol2"):
|
| 24 |
+
return filename.replace(".mol2", "")
|
| 25 |
+
return None
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def sdf_to_smiles(file_path: Path) -> str | None:
|
| 29 |
+
try:
|
| 30 |
+
supplier = Chem.SDMolSupplier(str(file_path))
|
| 31 |
+
mol = supplier[0] if supplier and len(supplier) > 0 else None
|
| 32 |
+
if mol is not None:
|
| 33 |
+
return Chem.MolToSmiles(mol, canonical=True)
|
| 34 |
+
except Exception:
|
| 35 |
+
return None
|
| 36 |
+
return None
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
def mol2_to_smiles(file_path: Path) -> str | None:
|
| 40 |
+
try:
|
| 41 |
+
mol = Chem.MolFromMol2File(str(file_path))
|
| 42 |
+
if mol is not None:
|
| 43 |
+
return Chem.MolToSmiles(mol, canonical=True)
|
| 44 |
+
except Exception:
|
| 45 |
+
pass
|
| 46 |
+
try:
|
| 47 |
+
mol = Chem.MolFromMol2File(
|
| 48 |
+
str(file_path),
|
| 49 |
+
sanitize=False,
|
| 50 |
+
removeHs=False,
|
| 51 |
+
cleanupSubstructures=False,
|
| 52 |
+
)
|
| 53 |
+
if mol is not None:
|
| 54 |
+
return Chem.MolToSmiles(mol, canonical=True)
|
| 55 |
+
except Exception:
|
| 56 |
+
return None
|
| 57 |
+
return None
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def build_alt_sdf_lookup(root: Path) -> dict[str, Path]:
|
| 61 |
+
lookup: dict[str, Path] = {}
|
| 62 |
+
for path in root.rglob("*.sdf"):
|
| 63 |
+
lookup.setdefault(path.stem, path)
|
| 64 |
+
return lookup
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
def main() -> None:
|
| 68 |
+
results: list[dict[str, str | None]] = []
|
| 69 |
+
alt_sdf_lookup = build_alt_sdf_lookup(ALT_SDF_ROOT)
|
| 70 |
+
|
| 71 |
+
print("=== Processing SDF files ===")
|
| 72 |
+
sdf_files = sorted(f for f in os.listdir(SDF_DIR) if f.endswith(".sdf"))
|
| 73 |
+
for filename in tqdm(sdf_files):
|
| 74 |
+
path = SDF_DIR / filename
|
| 75 |
+
smiles = sdf_to_smiles(path)
|
| 76 |
+
results.append(
|
| 77 |
+
{
|
| 78 |
+
"file_name": filename,
|
| 79 |
+
"mol_id": extract_mol_id(filename),
|
| 80 |
+
"source": "pubchem_sdf",
|
| 81 |
+
"parse_source": "pubchem_sdf",
|
| 82 |
+
"fallback_path": "",
|
| 83 |
+
"smiles": smiles,
|
| 84 |
+
}
|
| 85 |
+
)
|
| 86 |
+
|
| 87 |
+
print("=== Processing MOL2 files ===")
|
| 88 |
+
mol2_files = sorted(f for f in os.listdir(MOL2_DIR) if f.endswith(".mol2"))
|
| 89 |
+
for filename in tqdm(mol2_files):
|
| 90 |
+
path = MOL2_DIR / filename
|
| 91 |
+
stem = path.stem
|
| 92 |
+
|
| 93 |
+
smiles = mol2_to_smiles(path)
|
| 94 |
+
parse_source = "tcmsp_mol2"
|
| 95 |
+
fallback_path = ""
|
| 96 |
+
|
| 97 |
+
if smiles is None and stem in alt_sdf_lookup:
|
| 98 |
+
fallback = alt_sdf_lookup[stem]
|
| 99 |
+
smiles = sdf_to_smiles(fallback)
|
| 100 |
+
if smiles is not None:
|
| 101 |
+
parse_source = "fallback_sdf"
|
| 102 |
+
fallback_path = str(fallback)
|
| 103 |
+
|
| 104 |
+
results.append(
|
| 105 |
+
{
|
| 106 |
+
"file_name": filename,
|
| 107 |
+
"mol_id": extract_mol_id(filename),
|
| 108 |
+
"source": "tcmsp_mol2",
|
| 109 |
+
"parse_source": parse_source,
|
| 110 |
+
"fallback_path": fallback_path,
|
| 111 |
+
"smiles": smiles,
|
| 112 |
+
}
|
| 113 |
+
)
|
| 114 |
+
|
| 115 |
+
df = pd.DataFrame(results)
|
| 116 |
+
df["status"] = df["smiles"].apply(lambda value: "success" if pd.notna(value) else "fail")
|
| 117 |
+
df_clean = df.dropna(subset=["smiles"]).copy()
|
| 118 |
+
OUT_CSV.parent.mkdir(parents=True, exist_ok=True)
|
| 119 |
+
df_clean.to_csv(OUT_CSV, index=False)
|
| 120 |
+
|
| 121 |
+
print("=== Done ===")
|
| 122 |
+
print(f"Total files: {len(df)}")
|
| 123 |
+
print(f"Success: {len(df_clean)}")
|
| 124 |
+
print(f"Failed: {len(df) - len(df_clean)}")
|
| 125 |
+
print(f"Saved to: {OUT_CSV}")
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
if __name__ == "__main__":
|
| 129 |
+
main()
|
COM/tcmsp_molecule_cache.json
ADDED
|
@@ -0,0 +1,982 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"MOL000020": {
|
| 3 |
+
"molecule_name": "12-senecioyl-2E,8E,10E-atractylentriol",
|
| 4 |
+
"pubchem_cid": null,
|
| 5 |
+
"inchikey": "UJHAKGDWVZIMIT-PKPRIEKHSA-N"
|
| 6 |
+
},
|
| 7 |
+
"MOL000021": {
|
| 8 |
+
"molecule_name": "14-acetyl-12-senecioyl-2E,8E,10E-atractylentriol",
|
| 9 |
+
"pubchem_cid": null,
|
| 10 |
+
"inchikey": "CQDVFBMTEZFKKY-JAPNHWDDSA-N"
|
| 11 |
+
},
|
| 12 |
+
"MOL000063": {
|
| 13 |
+
"molecule_name": "ATRACTYLODES MACROCEPHALA",
|
| 14 |
+
"pubchem_cid": null,
|
| 15 |
+
"inchikey": "RBJDJJGMGHKQMI-XHDLGADSSA-N"
|
| 16 |
+
},
|
| 17 |
+
"MOL002103": {
|
| 18 |
+
"molecule_name": "Senkyunolide-P",
|
| 19 |
+
"pubchem_cid": null,
|
| 20 |
+
"inchikey": "YTEUTQUNVHWZOR-QRCREAMCSA-N"
|
| 21 |
+
},
|
| 22 |
+
"MOL002104": {
|
| 23 |
+
"molecule_name": "Senkyunolide-Q",
|
| 24 |
+
"pubchem_cid": null,
|
| 25 |
+
"inchikey": "RWIPTYNGENPFSY-XHIIAXIUSA-N"
|
| 26 |
+
},
|
| 27 |
+
"MOL002105": {
|
| 28 |
+
"molecule_name": "Senkyunolide-R",
|
| 29 |
+
"pubchem_cid": null,
|
| 30 |
+
"inchikey": "XJGANEFDEDYAJS-JCTALTNQSA-N"
|
| 31 |
+
},
|
| 32 |
+
"MOL002109": {
|
| 33 |
+
"molecule_name": "Z-6,8',7,3'-diligustilide",
|
| 34 |
+
"pubchem_cid": null,
|
| 35 |
+
"inchikey": "TYSOMZQRYGBSKN-YAPPBANESA-N"
|
| 36 |
+
},
|
| 37 |
+
"MOL002113": {
|
| 38 |
+
"molecule_name": "1,2,3,4,4a,7-Hexahydro-l,6-dimethyl-4-(1-methylethyl)-naphthalene",
|
| 39 |
+
"pubchem_cid": null,
|
| 40 |
+
"inchikey": "QGTMZWLJWLJTMR-QWRGUYRKSA-N"
|
| 41 |
+
},
|
| 42 |
+
"MOL002120": {
|
| 43 |
+
"molecule_name": "betea-CUBEBENE",
|
| 44 |
+
"pubchem_cid": null,
|
| 45 |
+
"inchikey": "FSRZGYRCMPZNJF-WHMVFVPBSA-N"
|
| 46 |
+
},
|
| 47 |
+
"MOL002148": {
|
| 48 |
+
"molecule_name": "senkyunolide-L",
|
| 49 |
+
"pubchem_cid": null,
|
| 50 |
+
"inchikey": "QHFASJHNXWAWLY-UMEXKXKESA-N"
|
| 51 |
+
},
|
| 52 |
+
"MOL002149": {
|
| 53 |
+
"molecule_name": "senkyunolide-S",
|
| 54 |
+
"pubchem_cid": null,
|
| 55 |
+
"inchikey": "JSKJROCDTVECQV-QCKLWGPPSA-N"
|
| 56 |
+
},
|
| 57 |
+
"MOL002157": {
|
| 58 |
+
"molecule_name": "wallichilide",
|
| 59 |
+
"pubchem_cid": null,
|
| 60 |
+
"inchikey": "HADAHVQGKBBPPW-NLQWGDCSSA-N"
|
| 61 |
+
},
|
| 62 |
+
"MOL002158": {
|
| 63 |
+
"molecule_name": "xiongterpene",
|
| 64 |
+
"pubchem_cid": null,
|
| 65 |
+
"inchikey": "QAYVEFZSZYSYBD-XHBCAYJASA-N"
|
| 66 |
+
},
|
| 67 |
+
"MOL002161": {
|
| 68 |
+
"molecule_name": "1-beta-ethylacrylate-7-aldehyde-beta-carboline",
|
| 69 |
+
"pubchem_cid": null,
|
| 70 |
+
"inchikey": "TZJFCLWSCRFISB-AATRIKPKSA-N"
|
| 71 |
+
},
|
| 72 |
+
"MOL002174": {
|
| 73 |
+
"molecule_name": "3,4-epoxy-2,2,7,7-tetramethyl-octane",
|
| 74 |
+
"pubchem_cid": null,
|
| 75 |
+
"inchikey": "DLDNTHNKSBEZOP-UWVGGRQHSA-N"
|
| 76 |
+
},
|
| 77 |
+
"MOL002192": {
|
| 78 |
+
"molecule_name": "Coniferylfcrulate",
|
| 79 |
+
"pubchem_cid": null,
|
| 80 |
+
"inchikey": "KBDUETQRLBKGIO-YZQQHVNFSA-N"
|
| 81 |
+
},
|
| 82 |
+
"MOL002199": {
|
| 83 |
+
"molecule_name": "L-valyl-L-valinc-achydride",
|
| 84 |
+
"pubchem_cid": null,
|
| 85 |
+
"inchikey": "PZGDEPNVLRIFJK-PHIMTYICSA-N"
|
| 86 |
+
},
|
| 87 |
+
"MOL003786": {
|
| 88 |
+
"molecule_name": "patchoulane",
|
| 89 |
+
"pubchem_cid": null,
|
| 90 |
+
"inchikey": "MVZZUMCHPFHUOS-JYKNGBAOSA-N"
|
| 91 |
+
},
|
| 92 |
+
"MOL004583": {
|
| 93 |
+
"molecule_name": "11α-methoxysaikosaponin f",
|
| 94 |
+
"pubchem_cid": null,
|
| 95 |
+
"inchikey": "KHTRWTUPAYLLGF-TWLPTHGSSA-N"
|
| 96 |
+
},
|
| 97 |
+
"MOL004584": {
|
| 98 |
+
"molecule_name": "11α-methoxysaikosaponin f_qt",
|
| 99 |
+
"pubchem_cid": null,
|
| 100 |
+
"inchikey": "RGJRQXQMGJGIRS-OIRSGZIJSA-N"
|
| 101 |
+
},
|
| 102 |
+
"MOL004593": {
|
| 103 |
+
"molecule_name": "3'-O-Acetylsaikosaponin D",
|
| 104 |
+
"pubchem_cid": null,
|
| 105 |
+
"inchikey": "HAUJZZHHHIUYEJ-FFDHUUMZSA-N"
|
| 106 |
+
},
|
| 107 |
+
"MOL004594": {
|
| 108 |
+
"molecule_name": "3'-O-Acetylsaikosaponin D_qt",
|
| 109 |
+
"pubchem_cid": null,
|
| 110 |
+
"inchikey": "IUBQSOTVBGNWDI-FEKRRCKGSA-N"
|
| 111 |
+
},
|
| 112 |
+
"MOL004595": {
|
| 113 |
+
"molecule_name": "3',6'-O,O-diacetylsaikosaponin b2",
|
| 114 |
+
"pubchem_cid": null,
|
| 115 |
+
"inchikey": "CDDRXFDOMKMHDM-OFTYOGEASA-N"
|
| 116 |
+
},
|
| 117 |
+
"MOL004596": {
|
| 118 |
+
"molecule_name": "3',6'-O,O-diacetylsaikosaponin b2_qt",
|
| 119 |
+
"pubchem_cid": null,
|
| 120 |
+
"inchikey": "QGNVMEXLLPGQEV-SGNGXGSVSA-N"
|
| 121 |
+
},
|
| 122 |
+
"MOL004597": {
|
| 123 |
+
"molecule_name": "3'-O-acetylsaikosaponin b2",
|
| 124 |
+
"pubchem_cid": null,
|
| 125 |
+
"inchikey": "YDFMMJXZMVPVPK-DOPZFFBISA-N"
|
| 126 |
+
},
|
| 127 |
+
"MOL004640": {
|
| 128 |
+
"molecule_name": "Saikosaponin f",
|
| 129 |
+
"pubchem_cid": null,
|
| 130 |
+
"inchikey": "SXILFEBNQCRWAL-XQIHJWINSA-N"
|
| 131 |
+
},
|
| 132 |
+
"MOL004642": {
|
| 133 |
+
"molecule_name": "Saikosaponin t",
|
| 134 |
+
"pubchem_cid": null,
|
| 135 |
+
"inchikey": "FBSZDWUAVUDYAK-LJGOHGGTSA-N"
|
| 136 |
+
},
|
| 137 |
+
"MOL004643": {
|
| 138 |
+
"molecule_name": "Saikosaponin t_qt",
|
| 139 |
+
"pubchem_cid": null,
|
| 140 |
+
"inchikey": "XPHRBPSKCYUOJQ-MDSZXBLQSA-N"
|
| 141 |
+
},
|
| 142 |
+
"MOL004648": {
|
| 143 |
+
"molecule_name": "Troxerutin",
|
| 144 |
+
"pubchem_cid": null,
|
| 145 |
+
"inchikey": "KMPBUGGPUQOWMJ-KPTLPGMMSA-N"
|
| 146 |
+
},
|
| 147 |
+
"MOL004658": {
|
| 148 |
+
"molecule_name": "cedrenol",
|
| 149 |
+
"pubchem_cid": null,
|
| 150 |
+
"inchikey": "QHKUQGORMJHBGX-FMKNKJFCSA-N"
|
| 151 |
+
},
|
| 152 |
+
"MOL004659": {
|
| 153 |
+
"molecule_name": "chikusaikoside II",
|
| 154 |
+
"pubchem_cid": null,
|
| 155 |
+
"inchikey": "ZDKCXSMMRXSSDE-BWSKJMAVSA-N"
|
| 156 |
+
},
|
| 157 |
+
"MOL004660": {
|
| 158 |
+
"molecule_name": "chikusaikoside II_qt",
|
| 159 |
+
"pubchem_cid": null,
|
| 160 |
+
"inchikey": "IUBQSOTVBGNWDI-ARNBRCFBSA-N"
|
| 161 |
+
},
|
| 162 |
+
"MOL004673": {
|
| 163 |
+
"molecule_name": "kaempferitrin",
|
| 164 |
+
"pubchem_cid": null,
|
| 165 |
+
"inchikey": "PUPKKEQDLNREIM-NUEHWCDRSA-N"
|
| 166 |
+
},
|
| 167 |
+
"MOL004675": {
|
| 168 |
+
"molecule_name": "kaempferol-7-O-rhamnoside",
|
| 169 |
+
"pubchem_cid": null,
|
| 170 |
+
"inchikey": "HQNOUCSPWAGQND-WGQLFCHCSA-N"
|
| 171 |
+
},
|
| 172 |
+
"MOL004695": {
|
| 173 |
+
"molecule_name": "saikosaponin b2",
|
| 174 |
+
"pubchem_cid": null,
|
| 175 |
+
"inchikey": "WRYJYFCCMSVEPQ-PMLPLAPUSA-N"
|
| 176 |
+
},
|
| 177 |
+
"MOL004696": {
|
| 178 |
+
"molecule_name": "saikosaponin b2_qt",
|
| 179 |
+
"pubchem_cid": null,
|
| 180 |
+
"inchikey": "QGNVMEXLLPGQEV-RMTVMKBDSA-N"
|
| 181 |
+
},
|
| 182 |
+
"MOL004698": {
|
| 183 |
+
"molecule_name": "saikosaponin b3_qt",
|
| 184 |
+
"pubchem_cid": null,
|
| 185 |
+
"inchikey": "YMMLKFUCZLZCEN-BEXKOTIGSA-N"
|
| 186 |
+
},
|
| 187 |
+
"MOL004700": {
|
| 188 |
+
"molecule_name": "saikosaponin b4_qt",
|
| 189 |
+
"pubchem_cid": null,
|
| 190 |
+
"inchikey": "YMMLKFUCZLZCEN-VRKPLGNKSA-N"
|
| 191 |
+
},
|
| 192 |
+
"MOL004701": {
|
| 193 |
+
"molecule_name": "saikosaponin c",
|
| 194 |
+
"pubchem_cid": null,
|
| 195 |
+
"inchikey": "ZDKCXSMMRXSSDE-XIEMZPBDSA-N"
|
| 196 |
+
},
|
| 197 |
+
"MOL004702": {
|
| 198 |
+
"molecule_name": "saikosaponin c_qt",
|
| 199 |
+
"pubchem_cid": null,
|
| 200 |
+
"inchikey": "IUBQSOTVBGNWDI-AFZHBIBGSA-N"
|
| 201 |
+
},
|
| 202 |
+
"MOL004704": {
|
| 203 |
+
"molecule_name": "saikosaponin e_qt",
|
| 204 |
+
"pubchem_cid": null,
|
| 205 |
+
"inchikey": "IUXCCCANLLMMGX-LQURIMJTSA-N"
|
| 206 |
+
},
|
| 207 |
+
"MOL004719": {
|
| 208 |
+
"molecule_name": "α-spinasteryl glucoside",
|
| 209 |
+
"pubchem_cid": null,
|
| 210 |
+
"inchikey": "ITYGLICZKGWOPA-VNVRYBNOSA-N"
|
| 211 |
+
},
|
| 212 |
+
"MOL004796": {
|
| 213 |
+
"molecule_name": "soya-cerebroside i",
|
| 214 |
+
"pubchem_cid": null,
|
| 215 |
+
"inchikey": "HOMYIYLRRDTKAA-HYVYTRKLSA-N"
|
| 216 |
+
},
|
| 217 |
+
"MOL005995": {
|
| 218 |
+
"molecule_name": "2'-O-acetylPlatycodin D2",
|
| 219 |
+
"pubchem_cid": null,
|
| 220 |
+
"inchikey": "APTNOIWSCDBIAS-XZJIMPIJSA-N"
|
| 221 |
+
},
|
| 222 |
+
"MOL005996": {
|
| 223 |
+
"molecule_name": "2-O-methyl-3―O-β-D-glucopyranosyl platycogenate A",
|
| 224 |
+
"pubchem_cid": null,
|
| 225 |
+
"inchikey": "UKYWGTXQBHFTLO-VBILTHLYSA-N"
|
| 226 |
+
},
|
| 227 |
+
"MOL005997": {
|
| 228 |
+
"molecule_name": "2'-O-Polygalacin D",
|
| 229 |
+
"pubchem_cid": null,
|
| 230 |
+
"inchikey": "XCIXBVYBOFUFBT-FFCBTFQCSA-N"
|
| 231 |
+
},
|
| 232 |
+
"MOL005998": {
|
| 233 |
+
"molecule_name": "2'-O-polygalacin D2",
|
| 234 |
+
"pubchem_cid": null,
|
| 235 |
+
"inchikey": "XCAQUOMNSTZRRN-AOJJTYRZSA-N"
|
| 236 |
+
},
|
| 237 |
+
"MOL006008": {
|
| 238 |
+
"molecule_name": "3'-O-acetylPlatycodin D2",
|
| 239 |
+
"pubchem_cid": null,
|
| 240 |
+
"inchikey": "VYEWIRJHCKDWGT-GNXJYREKSA-N"
|
| 241 |
+
},
|
| 242 |
+
"MOL006011": {
|
| 243 |
+
"molecule_name": "3-O-a-D-glucopyranosylplatycodigenin methyl ester_qt",
|
| 244 |
+
"pubchem_cid": null,
|
| 245 |
+
"inchikey": "HPKJCCRTIBWLDB-BTDVMUJESA-N"
|
| 246 |
+
},
|
| 247 |
+
"MOL006015": {
|
| 248 |
+
"molecule_name": "3-O-laminaribiosylplatycodigenin methyl ester_qt",
|
| 249 |
+
"pubchem_cid": null,
|
| 250 |
+
"inchikey": "JVAZEHXCTTXFOW-NSHASWTQSA-N"
|
| 251 |
+
},
|
| 252 |
+
"MOL006016": {
|
| 253 |
+
"molecule_name": "3'-O-polygalacin D",
|
| 254 |
+
"pubchem_cid": null,
|
| 255 |
+
"inchikey": "HNBOQFJTMSJXHO-DPGAKMESSA-N"
|
| 256 |
+
},
|
| 257 |
+
"MOL006017": {
|
| 258 |
+
"molecule_name": "3-O-β-D-glucopyranosyl platycodigenin methyl ester",
|
| 259 |
+
"pubchem_cid": null,
|
| 260 |
+
"inchikey": "MUVOHCCQVMWBML-QOOOXMPTSA-N"
|
| 261 |
+
},
|
| 262 |
+
"MOL006021": {
|
| 263 |
+
"molecule_name": "16-oxo-platycodin D",
|
| 264 |
+
"pubchem_cid": null,
|
| 265 |
+
"inchikey": "UMVWSBWUXRNDSW-QHJKIDDOSA-N"
|
| 266 |
+
},
|
| 267 |
+
"MOL006023": {
|
| 268 |
+
"molecule_name": "α-Spinasterol-β-D-glucoside_qt",
|
| 269 |
+
"pubchem_cid": null,
|
| 270 |
+
"inchikey": "JZVFJDZBLUFKCA-JJERAKMWSA-N"
|
| 271 |
+
},
|
| 272 |
+
"MOL006025": {
|
| 273 |
+
"molecule_name": "Deapio-Platycodin-D3",
|
| 274 |
+
"pubchem_cid": null,
|
| 275 |
+
"inchikey": "ZOHHWTLULQJCBI-PRCGWVMNSA-N"
|
| 276 |
+
},
|
| 277 |
+
"MOL006026": {
|
| 278 |
+
"molecule_name": "dimethyl 2-O-methyl-3-O-a-D-glucopyranosyl platycogenate A",
|
| 279 |
+
"pubchem_cid": null,
|
| 280 |
+
"inchikey": "FWAUBWMZNFOEIR-JYKPZXKCSA-N"
|
| 281 |
+
},
|
| 282 |
+
"MOL006027": {
|
| 283 |
+
"molecule_name": "dimethyl 3-O-a-D-glucopyranosylplatycogenate A",
|
| 284 |
+
"pubchem_cid": null,
|
| 285 |
+
"inchikey": "NNSORRYIPHQLSB-NTQCXQKZSA-N"
|
| 286 |
+
},
|
| 287 |
+
"MOL006028": {
|
| 288 |
+
"molecule_name": "dimethyl 3-O-β-D-glucopyranosylplatycogenate A",
|
| 289 |
+
"pubchem_cid": null,
|
| 290 |
+
"inchikey": "JOIOQBOISQEPFW-DVHNYREESA-N"
|
| 291 |
+
},
|
| 292 |
+
"MOL006029": {
|
| 293 |
+
"molecule_name": "dimethyl platyconate A",
|
| 294 |
+
"pubchem_cid": null,
|
| 295 |
+
"inchikey": "HAEFCIYWHDNJEP-MFRFTJIQSA-N"
|
| 296 |
+
},
|
| 297 |
+
"MOL006032": {
|
| 298 |
+
"molecule_name": "Inulin",
|
| 299 |
+
"pubchem_cid": null,
|
| 300 |
+
"inchikey": "OSKXBONZAJPQOS-ZZBZBTPLSA-N"
|
| 301 |
+
},
|
| 302 |
+
"MOL006036": {
|
| 303 |
+
"molecule_name": "lobetyolinin",
|
| 304 |
+
"pubchem_cid": null,
|
| 305 |
+
"inchikey": "PUXLGOBRZKHYCM-QSBYCKDHSA-N"
|
| 306 |
+
},
|
| 307 |
+
"MOL006038": {
|
| 308 |
+
"molecule_name": "Methy 2-O-methylPlatyconate A",
|
| 309 |
+
"pubchem_cid": null,
|
| 310 |
+
"inchikey": "COOGWQXKVXAOIS-RDGDBFRBSA-N"
|
| 311 |
+
},
|
| 312 |
+
"MOL006040": {
|
| 313 |
+
"molecule_name": "methyl 3-O-β-D-glucopyranosyl polygalacate",
|
| 314 |
+
"pubchem_cid": null,
|
| 315 |
+
"inchikey": "ZRFXBWYDLDSWMT-ZHHBUSDVSA-N"
|
| 316 |
+
},
|
| 317 |
+
"MOL006041": {
|
| 318 |
+
"molecule_name": "methyl 3-O-β-D-glucopyranosyl polygalacate _qt",
|
| 319 |
+
"pubchem_cid": null,
|
| 320 |
+
"inchikey": "BZCDBFSKNLHOIM-YZAIHXJHSA-N"
|
| 321 |
+
},
|
| 322 |
+
"MOL006042": {
|
| 323 |
+
"molecule_name": "methyl 3-O-β-laminaribiosyl polygalacate",
|
| 324 |
+
"pubchem_cid": null,
|
| 325 |
+
"inchikey": "QCQFLGHHUKFHFC-QWYOFSQTSA-N"
|
| 326 |
+
},
|
| 327 |
+
"MOL006043": {
|
| 328 |
+
"molecule_name": "methyl platyconate- A",
|
| 329 |
+
"pubchem_cid": null,
|
| 330 |
+
"inchikey": "HCHBHKSHTTXUJW-KNPIUDGBSA-N"
|
| 331 |
+
},
|
| 332 |
+
"MOL006045": {
|
| 333 |
+
"molecule_name": "methyl3-O-a-D-Glucopyranosylpolygalacate",
|
| 334 |
+
"pubchem_cid": null,
|
| 335 |
+
"inchikey": "ZRFXBWYDLDSWMT-ONZOMLGJSA-N"
|
| 336 |
+
},
|
| 337 |
+
"MOL006051": {
|
| 338 |
+
"molecule_name": "Platycodin-D3",
|
| 339 |
+
"pubchem_cid": null,
|
| 340 |
+
"inchikey": "VUAOIQIKFBDGRO-UMLGGWAYSA-N"
|
| 341 |
+
},
|
| 342 |
+
"MOL006053": {
|
| 343 |
+
"molecule_name": "Platycogenic acid B",
|
| 344 |
+
"pubchem_cid": null,
|
| 345 |
+
"inchikey": "CINLWRUNZZXUFO-IWOQXUKVSA-N"
|
| 346 |
+
},
|
| 347 |
+
"MOL006054": {
|
| 348 |
+
"molecule_name": "Platycogenic acid C",
|
| 349 |
+
"pubchem_cid": null,
|
| 350 |
+
"inchikey": "PUQCPGQZNMJWAM-IZXFLCJISA-N"
|
| 351 |
+
},
|
| 352 |
+
"MOL006055": {
|
| 353 |
+
"molecule_name": "platyconate A",
|
| 354 |
+
"pubchem_cid": null,
|
| 355 |
+
"inchikey": "MZLLDZZPBOVUMO-CGZXKFFZSA-N"
|
| 356 |
+
},
|
| 357 |
+
"MOL006056": {
|
| 358 |
+
"molecule_name": "platyconate A_qt",
|
| 359 |
+
"pubchem_cid": null,
|
| 360 |
+
"inchikey": "FJZNVZINAUUQFE-CJQXTVDTSA-N"
|
| 361 |
+
},
|
| 362 |
+
"MOL006057": {
|
| 363 |
+
"molecule_name": "Platyconic acid-A Lactone",
|
| 364 |
+
"pubchem_cid": null,
|
| 365 |
+
"inchikey": "CYSOAALDPDAJLO-SWIUNZOZSA-N"
|
| 366 |
+
},
|
| 367 |
+
"MOL006059": {
|
| 368 |
+
"molecule_name": "platycoside B",
|
| 369 |
+
"pubchem_cid": null,
|
| 370 |
+
"inchikey": "JOJCIJBZQDILRP-CURORLJWSA-N"
|
| 371 |
+
},
|
| 372 |
+
"MOL006060": {
|
| 373 |
+
"molecule_name": "platycoside C",
|
| 374 |
+
"pubchem_cid": null,
|
| 375 |
+
"inchikey": "OEPJZECWWCBQKX-CKPJEDTFSA-N"
|
| 376 |
+
},
|
| 377 |
+
"MOL006061": {
|
| 378 |
+
"molecule_name": "platycoside F",
|
| 379 |
+
"pubchem_cid": null,
|
| 380 |
+
"inchikey": "QVBNKTJZIONJCZ-GSIVNDDYSA-N"
|
| 381 |
+
},
|
| 382 |
+
"MOL006062": {
|
| 383 |
+
"molecule_name": "platycoside G1",
|
| 384 |
+
"pubchem_cid": null,
|
| 385 |
+
"inchikey": "LSILYZWAAWNHSX-MNJMQIRGSA-N"
|
| 386 |
+
},
|
| 387 |
+
"MOL006063": {
|
| 388 |
+
"molecule_name": "platycoside G3",
|
| 389 |
+
"pubchem_cid": null,
|
| 390 |
+
"inchikey": "WSRYXAYCDIPZHY-PWQXMOBWSA-N"
|
| 391 |
+
},
|
| 392 |
+
"MOL006064": {
|
| 393 |
+
"molecule_name": "Platyeoside D",
|
| 394 |
+
"pubchem_cid": null,
|
| 395 |
+
"inchikey": "DUKDHDYTFLVXNN-RLYCVWKYSA-N"
|
| 396 |
+
},
|
| 397 |
+
"MOL006065": {
|
| 398 |
+
"molecule_name": "Platyeoside E",
|
| 399 |
+
"pubchem_cid": null,
|
| 400 |
+
"inchikey": "KNIUNCDJKFUNCH-WHXQAWDESA-N"
|
| 401 |
+
},
|
| 402 |
+
"MOL006067": {
|
| 403 |
+
"molecule_name": "Polygalacin D",
|
| 404 |
+
"pubchem_cid": null,
|
| 405 |
+
"inchikey": "AEKGKMGQTMOBKE-ZKJDZDKISA-N"
|
| 406 |
+
},
|
| 407 |
+
"MOL006068": {
|
| 408 |
+
"molecule_name": "polygalacin D2",
|
| 409 |
+
"pubchem_cid": null,
|
| 410 |
+
"inchikey": "UVXWCFIBYDCGIM-QVTDREJLSA-N"
|
| 411 |
+
},
|
| 412 |
+
"MOL006069": {
|
| 413 |
+
"molecule_name": "stigmastenol",
|
| 414 |
+
"pubchem_cid": null,
|
| 415 |
+
"inchikey": "JZVFJDZBLUFKCA-DDUXDJDNSA-N"
|
| 416 |
+
},
|
| 417 |
+
"MOL006073": {
|
| 418 |
+
"molecule_name": "Platycodin C",
|
| 419 |
+
"pubchem_cid": null,
|
| 420 |
+
"inchikey": "RRVUELQLNXGHFX-XRAVELTNSA-N"
|
| 421 |
+
},
|
| 422 |
+
"MOL006074": {
|
| 423 |
+
"molecule_name": "Platycodin D",
|
| 424 |
+
"pubchem_cid": null,
|
| 425 |
+
"inchikey": "CYBWUNOAQPMRBA-TYZWVTTDSA-N"
|
| 426 |
+
},
|
| 427 |
+
"MOL006076": {
|
| 428 |
+
"molecule_name": "(deapio platycodin E",
|
| 429 |
+
"pubchem_cid": null,
|
| 430 |
+
"inchikey": "BWHDJMVOVMSAKY-LDYBCBPOSA-N"
|
| 431 |
+
},
|
| 432 |
+
"MOL006440": {
|
| 433 |
+
"molecule_name": "bicycloelemene",
|
| 434 |
+
"pubchem_cid": null,
|
| 435 |
+
"inchikey": "ZQODGIAJYWHYRF-IUODEOHRSA-N"
|
| 436 |
+
},
|
| 437 |
+
"MOL006933": {
|
| 438 |
+
"molecule_name": "1,2,3,4,6-penta-o-galloyl-β-d-glucose",
|
| 439 |
+
"pubchem_cid": null,
|
| 440 |
+
"inchikey": "STYWZBSDQCXNQL-SHKFCUBHSA-N"
|
| 441 |
+
},
|
| 442 |
+
"MOL007264": {
|
| 443 |
+
"molecule_name": "agnuside",
|
| 444 |
+
"pubchem_cid": null,
|
| 445 |
+
"inchikey": "GLACGTLACKLUJX-LZYISAHRSA-N"
|
| 446 |
+
},
|
| 447 |
+
"MOL008454": {
|
| 448 |
+
"molecule_name": "27-nor-olean-3-hydroxy-28→13 oate",
|
| 449 |
+
"pubchem_cid": null,
|
| 450 |
+
"inchikey": "BXYSGLMDXBBDOL-WSBLJOJISA-N"
|
| 451 |
+
},
|
| 452 |
+
"MOL008455": {
|
| 453 |
+
"molecule_name": "3-oxo-22α-hydroxyurs-12-en-27,28-dioc acid",
|
| 454 |
+
"pubchem_cid": null,
|
| 455 |
+
"inchikey": "RPXSBKCBVIXIPJ-PTYZCCDKSA-N"
|
| 456 |
+
},
|
| 457 |
+
"MOL008460": {
|
| 458 |
+
"molecule_name": "geissoschizinc acid",
|
| 459 |
+
"pubchem_cid": null,
|
| 460 |
+
"inchikey": "DNMSTPNPBFQCQT-DRSRZMHUSA-N"
|
| 461 |
+
},
|
| 462 |
+
"MOL008461": {
|
| 463 |
+
"molecule_name": "Strictosamide",
|
| 464 |
+
"pubchem_cid": null,
|
| 465 |
+
"inchikey": "XIJHUCJMCYANRT-NFAGCCGUSA-N"
|
| 466 |
+
},
|
| 467 |
+
"MOL008466": {
|
| 468 |
+
"molecule_name": "Dihydrocorynantheine",
|
| 469 |
+
"pubchem_cid": null,
|
| 470 |
+
"inchikey": "KMUIILKVUZQMBB-HJBNTWKZSA-N"
|
| 471 |
+
},
|
| 472 |
+
"MOL008467": {
|
| 473 |
+
"molecule_name": "Rhynchophylline A",
|
| 474 |
+
"pubchem_cid": null,
|
| 475 |
+
"inchikey": "OYVQHNYDVIGUMC-BDMISDERSA-N"
|
| 476 |
+
},
|
| 477 |
+
"MOL008472": {
|
| 478 |
+
"molecule_name": "hirsutasideA",
|
| 479 |
+
"pubchem_cid": null,
|
| 480 |
+
"inchikey": "OUARSBNFCUFSPM-MQGCXBLESA-N"
|
| 481 |
+
},
|
| 482 |
+
"MOL008476": {
|
| 483 |
+
"molecule_name": "hirsutasideB",
|
| 484 |
+
"pubchem_cid": null,
|
| 485 |
+
"inchikey": "DQDSYLGBUPMCOI-JTDSTZFVSA-N"
|
| 486 |
+
},
|
| 487 |
+
"MOL008481": {
|
| 488 |
+
"molecule_name": "(1'R,3S,4a'S,5a'S,10a'R)-1'-methyl-2-oxo-1',4a',5',5a',7',8',10',10a'-octahydrospiro[indoline-3,6'-pyrano[3,4-f]indolizine]-4'-carboxylic acid",
|
| 489 |
+
"pubchem_cid": null,
|
| 490 |
+
"inchikey": "BLXUPISDXRFTCK-AEENPMSCSA-N"
|
| 491 |
+
},
|
| 492 |
+
"MOL008482": {
|
| 493 |
+
"molecule_name": "(2S,12bR)-methyl 2-((E)-1-oxobut-2-en-2-yl)-1,2,6,7,12,12b-hexahydroindolo[2,3-a]quinolizine-3-carboxylate",
|
| 494 |
+
"pubchem_cid": null,
|
| 495 |
+
"inchikey": "NTVLUSJWJRSPSM-DMXKJVHASA-N"
|
| 496 |
+
},
|
| 497 |
+
"MOL008483": {
|
| 498 |
+
"molecule_name": "vincoside lactam",
|
| 499 |
+
"pubchem_cid": null,
|
| 500 |
+
"inchikey": "NGOYWLLGEVYBQC-IVSVCGITSA-N"
|
| 501 |
+
},
|
| 502 |
+
"MOL008484": {
|
| 503 |
+
"molecule_name": "vincoside lactam_qt",
|
| 504 |
+
"pubchem_cid": null,
|
| 505 |
+
"inchikey": "IVJIXCAPLHCVJR-MSHZMWCUSA-N"
|
| 506 |
+
},
|
| 507 |
+
"MOL008485": {
|
| 508 |
+
"molecule_name": "hirsutasideC",
|
| 509 |
+
"pubchem_cid": null,
|
| 510 |
+
"inchikey": "WQFRJGIVQDNCHU-PALIPESOSA-N"
|
| 511 |
+
},
|
| 512 |
+
"MOL008487": {
|
| 513 |
+
"molecule_name": "hirsutine",
|
| 514 |
+
"pubchem_cid": null,
|
| 515 |
+
"inchikey": "MBEGNFWVZNYVJY-OALUTQOASA-N"
|
| 516 |
+
},
|
| 517 |
+
"MOL008491": {
|
| 518 |
+
"molecule_name": "ncariasideA",
|
| 519 |
+
"pubchem_cid": null,
|
| 520 |
+
"inchikey": "FKWFAJDMRXGMHH-DRSSIKSNSA-N"
|
| 521 |
+
},
|
| 522 |
+
"MOL008492": {
|
| 523 |
+
"molecule_name": "ncariasideA_qt",
|
| 524 |
+
"pubchem_cid": null,
|
| 525 |
+
"inchikey": "RAINNBAPYGMDQQ-WSZDRQRWSA-N"
|
| 526 |
+
},
|
| 527 |
+
"MOL011902": {
|
| 528 |
+
"molecule_name": "10-O-vanilloyaucubin",
|
| 529 |
+
"pubchem_cid": null,
|
| 530 |
+
"inchikey": "VTYVNBXSLBXSGD-KMGYIESZSA-N"
|
| 531 |
+
},
|
| 532 |
+
"MOL011916": {
|
| 533 |
+
"molecule_name": "dehydroabietan",
|
| 534 |
+
"pubchem_cid": null,
|
| 535 |
+
"inchikey": "QUUCYKKMFLJLFS-QUCCMNQESA-N"
|
| 536 |
+
},
|
| 537 |
+
"MOL011917": {
|
| 538 |
+
"molecule_name": "eurostoside",
|
| 539 |
+
"pubchem_cid": null,
|
| 540 |
+
"inchikey": "DQTBTFHCLVMGBP-OYIVTISPSA-N"
|
| 541 |
+
},
|
| 542 |
+
"MOL011918": {
|
| 543 |
+
"molecule_name": "eurostoside_qt",
|
| 544 |
+
"pubchem_cid": null,
|
| 545 |
+
"inchikey": "VFVLWMIDXSTCCX-AVGIDWKGSA-N"
|
| 546 |
+
},
|
| 547 |
+
"MOL011920": {
|
| 548 |
+
"molecule_name": "nishindaside",
|
| 549 |
+
"pubchem_cid": null,
|
| 550 |
+
"inchikey": "RPIYNUXBYSWXNA-XUAUNYRQSA-N"
|
| 551 |
+
},
|
| 552 |
+
"MOL011921": {
|
| 553 |
+
"molecule_name": "nishindaside_qt",
|
| 554 |
+
"pubchem_cid": null,
|
| 555 |
+
"inchikey": "BDADQVDMTLGUFJ-GHYKFQNRSA-N"
|
| 556 |
+
},
|
| 557 |
+
"MOL011985": {
|
| 558 |
+
"molecule_name": "12beta-hydroxylcimigenol,3-o-alpha-l-arabinopyranoside",
|
| 559 |
+
"pubchem_cid": null,
|
| 560 |
+
"inchikey": "JKPGINPCCVKTKQ-QJWNILDVSA-N"
|
| 561 |
+
},
|
| 562 |
+
"MOL011986": {
|
| 563 |
+
"molecule_name": "12beta-hydroxylcimigenol,3-o-alpha-l-arabinopyranoside_qt",
|
| 564 |
+
"pubchem_cid": null,
|
| 565 |
+
"inchikey": "SNXDCBQJYXHIML-NDCUCHEZSA-N"
|
| 566 |
+
},
|
| 567 |
+
"MOL011987": {
|
| 568 |
+
"molecule_name": "15-O-acetylacerinol",
|
| 569 |
+
"pubchem_cid": null,
|
| 570 |
+
"inchikey": "VYMNMIQVCLBCOX-OGBCOCKKSA-N"
|
| 571 |
+
},
|
| 572 |
+
"MOL011988": {
|
| 573 |
+
"molecule_name": "16alpha,24alpha-dihydroxy-12beta-acetoxy-25,26,27-trinor-16,24-cyclocycloartan-23-one,3beta-o-alpha-l-arabinopyranoside",
|
| 574 |
+
"pubchem_cid": null,
|
| 575 |
+
"inchikey": "SCTXJEJDJUTKFD-AGGUNMRMSA-N"
|
| 576 |
+
},
|
| 577 |
+
"MOL011991": {
|
| 578 |
+
"molecule_name": "23-epi-26-deoxyactein_qt",
|
| 579 |
+
"pubchem_cid": null,
|
| 580 |
+
"inchikey": "VCIBRLVNDREMIX-BOSVTSOVSA-N"
|
| 581 |
+
},
|
| 582 |
+
"MOL011992": {
|
| 583 |
+
"molecule_name": "23-o-acetylcimigenol-3-o-beta-d-xylopyranoside",
|
| 584 |
+
"pubchem_cid": null,
|
| 585 |
+
"inchikey": "IHEJMZHKJYHVFF-SETCBTCISA-N"
|
| 586 |
+
},
|
| 587 |
+
"MOL011993": {
|
| 588 |
+
"molecule_name": "23-o-acetylcimigenol-3-o-beta-d-xylopyranoside_qt",
|
| 589 |
+
"pubchem_cid": null,
|
| 590 |
+
"inchikey": "XEVRMEYBJMMBCW-NSNQGDSQSA-N"
|
| 591 |
+
},
|
| 592 |
+
"MOL011996": {
|
| 593 |
+
"molecule_name": "24-O-acetyl-7,8-didehydrocimigenol-3-β-D-xyloside",
|
| 594 |
+
"pubchem_cid": null,
|
| 595 |
+
"inchikey": "FTUCJLKRCLNNPB-BGNMHEOSSA-N"
|
| 596 |
+
},
|
| 597 |
+
"MOL011997": {
|
| 598 |
+
"molecule_name": "24-O-acetyl-7,8-didehydrocimigenol-3-β-D-xyloside_qt",
|
| 599 |
+
"pubchem_cid": null,
|
| 600 |
+
"inchikey": "CBAJIQRIFAYWPF-RTRVOUKGSA-N"
|
| 601 |
+
},
|
| 602 |
+
"MOL011998": {
|
| 603 |
+
"molecule_name": "24-epi-7,8-didehydrocimigenol",
|
| 604 |
+
"pubchem_cid": null,
|
| 605 |
+
"inchikey": "VFWGQUZLHBLDFF-XOICUKHFSA-N"
|
| 606 |
+
},
|
| 607 |
+
"MOL012001": {
|
| 608 |
+
"molecule_name": "24-hydroxy-12beta-acetoxy-25,26,27-trinorcycloartan-16,23-dione,3beta-o-alpha-l-arabinopyranoside_qt",
|
| 609 |
+
"pubchem_cid": null,
|
| 610 |
+
"inchikey": "ZYNULAQSTFKHDR-GZMVAEKOSA-N"
|
| 611 |
+
},
|
| 612 |
+
"MOL012002": {
|
| 613 |
+
"molecule_name": "24-o-acetylcimigenol-3-o-beta-d-xylopyranoside",
|
| 614 |
+
"pubchem_cid": null,
|
| 615 |
+
"inchikey": "PJGMIZSCETWMLA-VRORHKCNSA-N"
|
| 616 |
+
},
|
| 617 |
+
"MOL012003": {
|
| 618 |
+
"molecule_name": "24-o-acetylcimigenol-3-o-beta-d-xylopyranoside_qt",
|
| 619 |
+
"pubchem_cid": null,
|
| 620 |
+
"inchikey": "MIMKLMXQMQRSGH-KCROYOCYSA-N"
|
| 621 |
+
},
|
| 622 |
+
"MOL012004": {
|
| 623 |
+
"molecule_name": "24R-O-acetyl-7,8-didehydrocimigenol-3-β-D-araloside",
|
| 624 |
+
"pubchem_cid": null,
|
| 625 |
+
"inchikey": "FTUCJLKRCLNNPB-MMLFAFPNSA-N"
|
| 626 |
+
},
|
| 627 |
+
"MOL012005": {
|
| 628 |
+
"molecule_name": "25-O-acetyl-7,8-didehydrocimigenol-3-O-α-L-araloside",
|
| 629 |
+
"pubchem_cid": null,
|
| 630 |
+
"inchikey": "OZEXWSOYHYUSFA-OZPRHGARSA-N"
|
| 631 |
+
},
|
| 632 |
+
"MOL012006": {
|
| 633 |
+
"molecule_name": "25-O-acetyl-7,8-didehydrocimigenol-3-β-D-xyloside_qt",
|
| 634 |
+
"pubchem_cid": null,
|
| 635 |
+
"inchikey": "VWKXWHFAFDZMEM-PHXNDIFASA-N"
|
| 636 |
+
},
|
| 637 |
+
"MOL012007": {
|
| 638 |
+
"molecule_name": "25-O-acetyl-7,8-didehydrocimigenol-3-β-D-xyloside",
|
| 639 |
+
"pubchem_cid": null,
|
| 640 |
+
"inchikey": "OZEXWSOYHYUSFA-HOZFOGPVSA-N"
|
| 641 |
+
},
|
| 642 |
+
"MOL012008": {
|
| 643 |
+
"molecule_name": "25-o-acetylcimigenol-3-o-beta-d-galactoyranoside",
|
| 644 |
+
"pubchem_cid": null,
|
| 645 |
+
"inchikey": "NCPUFUMYGPQEOY-QKNQUOMBSA-N"
|
| 646 |
+
},
|
| 647 |
+
"MOL012009": {
|
| 648 |
+
"molecule_name": "25-o-acetylcimigenol-3-o-beta-d-galactoyranoside_qt",
|
| 649 |
+
"pubchem_cid": null,
|
| 650 |
+
"inchikey": "CDYZCRTUEJYWRD-HDTNCDNJSA-N"
|
| 651 |
+
},
|
| 652 |
+
"MOL012010": {
|
| 653 |
+
"molecule_name": "25-o-acetylcimigenol-3-o-beta-d-glc(1-2)beta-d-xylopyranoside",
|
| 654 |
+
"pubchem_cid": null,
|
| 655 |
+
"inchikey": "XWZIOEXOWFDMDQ-SAWCPLCOSA-N"
|
| 656 |
+
},
|
| 657 |
+
"MOL012011": {
|
| 658 |
+
"molecule_name": "25-o-acetylcimigenol-3-o-beta-d-glc(1-2)beta-d-xylopyranoside_qt",
|
| 659 |
+
"pubchem_cid": null,
|
| 660 |
+
"inchikey": "CDYZCRTUEJYWRD-VZMQSBQJSA-N"
|
| 661 |
+
},
|
| 662 |
+
"MOL012013": {
|
| 663 |
+
"molecule_name": "25-o-anhydrocimigenol-3-beta-d-xylopyranoside",
|
| 664 |
+
"pubchem_cid": null,
|
| 665 |
+
"inchikey": "CVBALRXHSITZGC-OZBHKYTJSA-N"
|
| 666 |
+
},
|
| 667 |
+
"MOL012014": {
|
| 668 |
+
"molecule_name": "25-o-anhydrocimigenol-3-beta-d-xylopyranoside_qt",
|
| 669 |
+
"pubchem_cid": null,
|
| 670 |
+
"inchikey": "UNNXMCWXOOFOBL-ITMRLYHTSA-N"
|
| 671 |
+
},
|
| 672 |
+
"MOL012017": {
|
| 673 |
+
"molecule_name": "3'-O-acetyl-24-epi-7,8-didehydrocimigenol-3-O-β-D-xyloside",
|
| 674 |
+
"pubchem_cid": null,
|
| 675 |
+
"inchikey": "KYMSQSAJEIUXLI-XZUIAJJNSA-N"
|
| 676 |
+
},
|
| 677 |
+
"MOL012018": {
|
| 678 |
+
"molecule_name": "3-keto-24-epi-7,8-didehydrocimi genol",
|
| 679 |
+
"pubchem_cid": null,
|
| 680 |
+
"inchikey": "ZFTRSHQMBROXDO-NOHULBSZSA-N"
|
| 681 |
+
},
|
| 682 |
+
"MOL012020": {
|
| 683 |
+
"molecule_name": "7,8-Didehydro-27-deoxyactein",
|
| 684 |
+
"pubchem_cid": null,
|
| 685 |
+
"inchikey": "PBKJAWKRZRAQQO-VXCHRHRNSA-N"
|
| 686 |
+
},
|
| 687 |
+
"MOL012021": {
|
| 688 |
+
"molecule_name": "7,8-Didehydro-27-deoxyactein_qt",
|
| 689 |
+
"pubchem_cid": null,
|
| 690 |
+
"inchikey": "QHPCLXDNVSKVBS-MZGUHYLPSA-N"
|
| 691 |
+
},
|
| 692 |
+
"MOL012022": {
|
| 693 |
+
"molecule_name": "7,8-didehydrocimigenol-3-O-β-D-xyloside",
|
| 694 |
+
"pubchem_cid": null,
|
| 695 |
+
"inchikey": "LTVCFOSNIVVOBK-HWJOGLTNSA-N"
|
| 696 |
+
},
|
| 697 |
+
"MOL012023": {
|
| 698 |
+
"molecule_name": "7,8-didehydrocimigenol",
|
| 699 |
+
"pubchem_cid": null,
|
| 700 |
+
"inchikey": "VFWGQUZLHBLDFF-IDVSBMGUSA-N"
|
| 701 |
+
},
|
| 702 |
+
"MOL012024": {
|
| 703 |
+
"molecule_name": "Cimiside C",
|
| 704 |
+
"pubchem_cid": null,
|
| 705 |
+
"inchikey": "OXPXIQPEHBLBIX-VLPKVGATSA-N"
|
| 706 |
+
},
|
| 707 |
+
"MOL012025": {
|
| 708 |
+
"molecule_name": "Cimiside D_qt",
|
| 709 |
+
"pubchem_cid": null,
|
| 710 |
+
"inchikey": "MIMKLMXQMQRSGH-QVOSQKLLSA-N"
|
| 711 |
+
},
|
| 712 |
+
"MOL012026": {
|
| 713 |
+
"molecule_name": "Cimiside D",
|
| 714 |
+
"pubchem_cid": null,
|
| 715 |
+
"inchikey": "OXPXIQPEHBLBIX-SZGFBFDQSA-N"
|
| 716 |
+
},
|
| 717 |
+
"MOL012027": {
|
| 718 |
+
"molecule_name": "Ferulic acid-β-D-glucoside",
|
| 719 |
+
"pubchem_cid": null,
|
| 720 |
+
"inchikey": "RFTKPXQZIVKVOP-JEBSLARPSA-N"
|
| 721 |
+
},
|
| 722 |
+
"MOL012028": {
|
| 723 |
+
"molecule_name": "Heracleifolinoside A",
|
| 724 |
+
"pubchem_cid": null,
|
| 725 |
+
"inchikey": "CFSFUHRYGXZTRB-VEFBTSBPSA-N"
|
| 726 |
+
},
|
| 727 |
+
"MOL012029": {
|
| 728 |
+
"molecule_name": "Heracleifolinoside A_qt",
|
| 729 |
+
"pubchem_cid": null,
|
| 730 |
+
"inchikey": "DSNWILOQQITKLD-JATDUVHISA-N"
|
| 731 |
+
},
|
| 732 |
+
"MOL012030": {
|
| 733 |
+
"molecule_name": "Heracleifolinoside B",
|
| 734 |
+
"pubchem_cid": null,
|
| 735 |
+
"inchikey": "YENFLXIKOHFCHC-OFVAYUFVSA-N"
|
| 736 |
+
},
|
| 737 |
+
"MOL012031": {
|
| 738 |
+
"molecule_name": "Heracleifolinoside B_qt",
|
| 739 |
+
"pubchem_cid": null,
|
| 740 |
+
"inchikey": "AMAPEKGVRJETFL-KOEMMVIZSA-N"
|
| 741 |
+
},
|
| 742 |
+
"MOL012032": {
|
| 743 |
+
"molecule_name": "Heracleifolinoside C",
|
| 744 |
+
"pubchem_cid": null,
|
| 745 |
+
"inchikey": "KJCKZAQMQAILFR-QHMUVIOQSA-N"
|
| 746 |
+
},
|
| 747 |
+
"MOL012033": {
|
| 748 |
+
"molecule_name": "Heracleifolinoside C_qt",
|
| 749 |
+
"pubchem_cid": null,
|
| 750 |
+
"inchikey": "GOCQULZDEDWVAH-JBXJQQGPSA-N"
|
| 751 |
+
},
|
| 752 |
+
"MOL012034": {
|
| 753 |
+
"molecule_name": "Heracleifolinoside D",
|
| 754 |
+
"pubchem_cid": null,
|
| 755 |
+
"inchikey": "KJCKZAQMQAILFR-JQYREFHESA-N"
|
| 756 |
+
},
|
| 757 |
+
"MOL012035": {
|
| 758 |
+
"molecule_name": "Heracleifolinoside D_qt",
|
| 759 |
+
"pubchem_cid": null,
|
| 760 |
+
"inchikey": "GOCQULZDEDWVAH-VIDROCLBSA-N"
|
| 761 |
+
},
|
| 762 |
+
"MOL012036": {
|
| 763 |
+
"molecule_name": "Heracleifolinoside E",
|
| 764 |
+
"pubchem_cid": null,
|
| 765 |
+
"inchikey": "RBUZWPNVGWCJLM-FCUBRPAMSA-N"
|
| 766 |
+
},
|
| 767 |
+
"MOL012037": {
|
| 768 |
+
"molecule_name": "Heracleifolinoside E_qt",
|
| 769 |
+
"pubchem_cid": null,
|
| 770 |
+
"inchikey": "CBAJIQRIFAYWPF-PZPNFBFWSA-N"
|
| 771 |
+
},
|
| 772 |
+
"MOL012038": {
|
| 773 |
+
"molecule_name": "Heracleifolinoside F",
|
| 774 |
+
"pubchem_cid": null,
|
| 775 |
+
"inchikey": "IIFRTPCRHMMTBL-ACRKQEFKSA-N"
|
| 776 |
+
},
|
| 777 |
+
"MOL012040": {
|
| 778 |
+
"molecule_name": "Norkhelloside",
|
| 779 |
+
"pubchem_cid": null,
|
| 780 |
+
"inchikey": "SLDPOLMOOLHBHG-NNGXJGAPSA-N"
|
| 781 |
+
},
|
| 782 |
+
"MOL012043": {
|
| 783 |
+
"molecule_name": "actein",
|
| 784 |
+
"pubchem_cid": null,
|
| 785 |
+
"inchikey": "NEWMWGLPJQHSSQ-RJGJBPQYSA-N"
|
| 786 |
+
},
|
| 787 |
+
"MOL012044": {
|
| 788 |
+
"molecule_name": "actein_qt",
|
| 789 |
+
"pubchem_cid": null,
|
| 790 |
+
"inchikey": "NRWLZMLCGSBEEU-NDXXMWTNSA-N"
|
| 791 |
+
},
|
| 792 |
+
"MOL012046": {
|
| 793 |
+
"molecule_name": "cimicifoetiside a_qt",
|
| 794 |
+
"pubchem_cid": null,
|
| 795 |
+
"inchikey": "VFGFLFUZBWFWBG-UWQHYHIQSA-N"
|
| 796 |
+
},
|
| 797 |
+
"MOL012048": {
|
| 798 |
+
"molecule_name": "cimicifoetiside b_qt",
|
| 799 |
+
"pubchem_cid": null,
|
| 800 |
+
"inchikey": "KPRQGSVYQBYXFG-CESWMMFFSA-N"
|
| 801 |
+
},
|
| 802 |
+
"MOL012050": {
|
| 803 |
+
"molecule_name": "cimicifugadine_qt",
|
| 804 |
+
"pubchem_cid": null,
|
| 805 |
+
"inchikey": "OSXZEFXFJVMEMB-CVVJGQQJSA-N"
|
| 806 |
+
},
|
| 807 |
+
"MOL012051": {
|
| 808 |
+
"molecule_name": "cimicifugamide",
|
| 809 |
+
"pubchem_cid": null,
|
| 810 |
+
"inchikey": "UYSRWDYTMGBBHP-AWZJQMQPSA-N"
|
| 811 |
+
},
|
| 812 |
+
"MOL012055": {
|
| 813 |
+
"molecule_name": "cimicifugoside_qt",
|
| 814 |
+
"pubchem_cid": null,
|
| 815 |
+
"inchikey": "IGPRVRMPUFGMJK-WAKIXATBSA-N"
|
| 816 |
+
},
|
| 817 |
+
"MOL012057": {
|
| 818 |
+
"molecule_name": "cimicifugoside h-1_qt",
|
| 819 |
+
"pubchem_cid": null,
|
| 820 |
+
"inchikey": "CNBHUROFMYCHGI-QVYOYURASA-N"
|
| 821 |
+
},
|
| 822 |
+
"MOL012062": {
|
| 823 |
+
"molecule_name": "cimigenol",
|
| 824 |
+
"pubchem_cid": null,
|
| 825 |
+
"inchikey": "CNBHUROFMYCHGI-JNLKVZKNSA-N"
|
| 826 |
+
},
|
| 827 |
+
"MOL012064": {
|
| 828 |
+
"molecule_name": "cimilactone a_qt",
|
| 829 |
+
"pubchem_cid": null,
|
| 830 |
+
"inchikey": "RPOZCCBNIDBVCM-MVNOCMLKSA-N"
|
| 831 |
+
},
|
| 832 |
+
"MOL012065": {
|
| 833 |
+
"molecule_name": "cimilactone b",
|
| 834 |
+
"pubchem_cid": null,
|
| 835 |
+
"inchikey": "CGINNTBXSXMOJN-ZYKXCFAOSA-N"
|
| 836 |
+
},
|
| 837 |
+
"MOL012066": {
|
| 838 |
+
"molecule_name": "cimilactone b_qt",
|
| 839 |
+
"pubchem_cid": null,
|
| 840 |
+
"inchikey": "KMXSPYNQCGHGFE-ZQTINJORSA-N"
|
| 841 |
+
},
|
| 842 |
+
"MOL012068": {
|
| 843 |
+
"molecule_name": "cimiside e_qt",
|
| 844 |
+
"pubchem_cid": null,
|
| 845 |
+
"inchikey": "UNNXMCWXOOFOBL-DPHNASBOSA-N"
|
| 846 |
+
},
|
| 847 |
+
"MOL012069": {
|
| 848 |
+
"molecule_name": "dahurinol",
|
| 849 |
+
"pubchem_cid": null,
|
| 850 |
+
"inchikey": "TVFYDIBVHPZYML-KIYHMFKKSA-N"
|
| 851 |
+
},
|
| 852 |
+
"MOL012070": {
|
| 853 |
+
"molecule_name": "demethoxycimicifugamide",
|
| 854 |
+
"pubchem_cid": null,
|
| 855 |
+
"inchikey": "JDPZMMGKJNMRBW-VWTJKYIPSA-N"
|
| 856 |
+
},
|
| 857 |
+
"MOL012071": {
|
| 858 |
+
"molecule_name": "heracleifolinol",
|
| 859 |
+
"pubchem_cid": null,
|
| 860 |
+
"inchikey": "MRPSSAZAIPQONH-ZIAHQOKISA-N"
|
| 861 |
+
},
|
| 862 |
+
"MOL012072": {
|
| 863 |
+
"molecule_name": "methylcimicifugoside",
|
| 864 |
+
"pubchem_cid": null,
|
| 865 |
+
"inchikey": "VRTVTAZDTQOYIV-JHUVUUDFSA-N"
|
| 866 |
+
},
|
| 867 |
+
"MOL012073": {
|
| 868 |
+
"molecule_name": "methylcimicifugoside_qt",
|
| 869 |
+
"pubchem_cid": null,
|
| 870 |
+
"inchikey": "JTCDMIIJLPDDMY-XYMRVCAYSA-N"
|
| 871 |
+
},
|
| 872 |
+
"MOL012074": {
|
| 873 |
+
"molecule_name": "neocimiside",
|
| 874 |
+
"pubchem_cid": null,
|
| 875 |
+
"inchikey": "XAOFACFLIBLCBM-VZHISVAHSA-N"
|
| 876 |
+
},
|
| 877 |
+
"MOL012075": {
|
| 878 |
+
"molecule_name": "neocimiside_qt",
|
| 879 |
+
"pubchem_cid": null,
|
| 880 |
+
"inchikey": "NYANQAGYZSJBHG-KKLAEPBJSA-N"
|
| 881 |
+
},
|
| 882 |
+
"MOL012079": {
|
| 883 |
+
"molecule_name": "(+)-Isolariciresinol-3α-O-β-D-glucopyranoside",
|
| 884 |
+
"pubchem_cid": null,
|
| 885 |
+
"inchikey": "AHYOMNWKYGMYMB-UIUUCFMXSA-N"
|
| 886 |
+
},
|
| 887 |
+
"MOL012080": {
|
| 888 |
+
"molecule_name": "(20r,24r)-24,25-epoxy-3-beta-(beta-d-xylopyranosyloxy)-9,19-cyclolanost-7-ene-16,23-dione",
|
| 889 |
+
"pubchem_cid": null,
|
| 890 |
+
"inchikey": "CIWPQNCJXSWMAA-KVJLKYKVSA-N"
|
| 891 |
+
},
|
| 892 |
+
"MOL012081": {
|
| 893 |
+
"molecule_name": "(20r,24r)-24,25-epoxy-3-beta-(beta-d-xylopyranosyloxy)-9,19-cyclolanost-7-ene-16,23-dione_qt",
|
| 894 |
+
"pubchem_cid": null,
|
| 895 |
+
"inchikey": "APRWBGWWVVNIQV-RFBARVTQSA-N"
|
| 896 |
+
},
|
| 897 |
+
"MOL012084": {
|
| 898 |
+
"molecule_name": "12beta-hydroxycimigenol_qt",
|
| 899 |
+
"pubchem_cid": null,
|
| 900 |
+
"inchikey": "DKDMHMDHFPGYQQ-AADMIQHESA-N"
|
| 901 |
+
},
|
| 902 |
+
"MOL012272": {
|
| 903 |
+
"molecule_name": "2,3-isopropylidene cyasterone",
|
| 904 |
+
"pubchem_cid": null,
|
| 905 |
+
"inchikey": "CMPNZMGFQLFLPL-BHDYMLLCSA-N"
|
| 906 |
+
},
|
| 907 |
+
"MOL012273": {
|
| 908 |
+
"molecule_name": "2,3-isopropylidene isocyasterone",
|
| 909 |
+
"pubchem_cid": null,
|
| 910 |
+
"inchikey": "CMPNZMGFQLFLPL-UVNCJLQCSA-N"
|
| 911 |
+
},
|
| 912 |
+
"MOL012274": {
|
| 913 |
+
"molecule_name": "24-hydroxycyasterone",
|
| 914 |
+
"pubchem_cid": null,
|
| 915 |
+
"inchikey": "ZKNPXOVFUBFLFN-OLSSSOIOSA-N"
|
| 916 |
+
},
|
| 917 |
+
"MOL012275": {
|
| 918 |
+
"molecule_name": "3-O-β-D-glucopyranosyl oleanolic acid",
|
| 919 |
+
"pubchem_cid": null,
|
| 920 |
+
"inchikey": "SUBRIHQSNKDWRA-BHJPAMRYSA-N"
|
| 921 |
+
},
|
| 922 |
+
"MOL012276": {
|
| 923 |
+
"molecule_name": "3-O-β-D-glucopyranosyl oleanolic acid_qt",
|
| 924 |
+
"pubchem_cid": null,
|
| 925 |
+
"inchikey": "PGOYMURMZNDHNS-RZSLQCPVSA-N"
|
| 926 |
+
},
|
| 927 |
+
"MOL012278": {
|
| 928 |
+
"molecule_name": "3-O-[methyl-β-D-glucopyranosiduronate]-28-O-β-D-glucopyranosyl oleanolic acid",
|
| 929 |
+
"pubchem_cid": null,
|
| 930 |
+
"inchikey": "XPORLJWHBRUXGD-ILGNVRIYSA-N"
|
| 931 |
+
},
|
| 932 |
+
"MOL012279": {
|
| 933 |
+
"molecule_name": "3-O-[α-L-rhamnopyranosyl-(1→3)-(n-butyl-β-D-glucopyranosiduronate}-28-O-β-D-glucopyranosyl oleanolic acid",
|
| 934 |
+
"pubchem_cid": null,
|
| 935 |
+
"inchikey": "DJDBOOVMGAJQKE-NLAGFPPRSA-N"
|
| 936 |
+
},
|
| 937 |
+
"MOL012280": {
|
| 938 |
+
"molecule_name": "3-O-[α-L-rhamnopyranosyl-(1→3)β-D-glucopyranosiduronic acid] oleanolic acid",
|
| 939 |
+
"pubchem_cid": null,
|
| 940 |
+
"inchikey": "LPYIVZGDBXCTCF-AENQYWGPSA-N"
|
| 941 |
+
},
|
| 942 |
+
"MOL012281": {
|
| 943 |
+
"molecule_name": "3-O-[α-L-rhamnopyranosyl-(1→3)β-D-glucopyranosiduronic acid]-28-O-β-D-glucopyranosyl oleanolic acid",
|
| 944 |
+
"pubchem_cid": null,
|
| 945 |
+
"inchikey": "LBHYRBPEXITYTN-QRYGDGRDSA-N"
|
| 946 |
+
},
|
| 947 |
+
"MOL012282": {
|
| 948 |
+
"molecule_name": "3-O-[β-D-glucopyranosiduronic acid]-28-O-β-D-glucopyranosyl oleanolic acid",
|
| 949 |
+
"pubchem_cid": null,
|
| 950 |
+
"inchikey": "YOSRLTNUOCHBEA-QNLOBHRVSA-N"
|
| 951 |
+
},
|
| 952 |
+
"MOL012283": {
|
| 953 |
+
"molecule_name": "3-O-[β-D-glucopyranosyl-(1→2)-α-L-rhamnopyranosyl-(1→3)β-D-glucopyranosiduronic acid]-28-O-β-D-glucopyranosyl oleanolic acid",
|
| 954 |
+
"pubchem_cid": null,
|
| 955 |
+
"inchikey": "FYCOSNQJVPTNMC-MUBLKGEJSA-N"
|
| 956 |
+
},
|
| 957 |
+
"MOL012284": {
|
| 958 |
+
"molecule_name": "4-((1-ethoxy-2-hydroxy)ethyl)phenol",
|
| 959 |
+
"pubchem_cid": null,
|
| 960 |
+
"inchikey": "CNXHWMGGFYJBAY-SNVBAGLBSA-N"
|
| 961 |
+
},
|
| 962 |
+
"MOL012291": {
|
| 963 |
+
"molecule_name": "isocyasterone",
|
| 964 |
+
"pubchem_cid": null,
|
| 965 |
+
"inchikey": "NEFYSBQJYCICOG-PUSFATKHSA-N"
|
| 966 |
+
},
|
| 967 |
+
"MOL012296": {
|
| 968 |
+
"molecule_name": "precyasterone",
|
| 969 |
+
"pubchem_cid": null,
|
| 970 |
+
"inchikey": "RPCTUYZLPGGPJD-MXPWABCXSA-N"
|
| 971 |
+
},
|
| 972 |
+
"MOL012298": {
|
| 973 |
+
"molecule_name": "Rubrosterone",
|
| 974 |
+
"pubchem_cid": null,
|
| 975 |
+
"inchikey": "OMQCWEJQYPUGJG-CUUHPRRLSA-N"
|
| 976 |
+
},
|
| 977 |
+
"MOL012299": {
|
| 978 |
+
"molecule_name": "Sengosterone",
|
| 979 |
+
"pubchem_cid": null,
|
| 980 |
+
"inchikey": "YQCOGGGDJXBMBU-OCKLSOLZSA-N"
|
| 981 |
+
}
|
| 982 |
+
}
|
KG/train_compgcn_mol_instance_similarity.py
ADDED
|
@@ -0,0 +1,742 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import argparse
|
| 5 |
+
import csv
|
| 6 |
+
import json
|
| 7 |
+
import math
|
| 8 |
+
import random
|
| 9 |
+
from collections import Counter, defaultdict
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
|
| 12 |
+
import numpy as np
|
| 13 |
+
import torch
|
| 14 |
+
import torch.nn as nn
|
| 15 |
+
import torch.nn.functional as F
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
csv.field_size_limit(1 << 30)
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def parse_args() -> argparse.Namespace:
|
| 22 |
+
parser = argparse.ArgumentParser(
|
| 23 |
+
description=(
|
| 24 |
+
"Train a CompGCN-style encoder on the QQCM compound subgraph and export "
|
| 25 |
+
"mol_id-instance embeddings plus a cosine similarity matrix."
|
| 26 |
+
)
|
| 27 |
+
)
|
| 28 |
+
parser.add_argument(
|
| 29 |
+
"--graph-dir",
|
| 30 |
+
type=Path,
|
| 31 |
+
default=Path("/mnt/disk1/yanganqi/QQCM/KG/qqcm_compound_subgraph"),
|
| 32 |
+
help="Directory containing nodes.tsv, edges.tsv and helper_tables from the compound subgraph export.",
|
| 33 |
+
)
|
| 34 |
+
parser.add_argument(
|
| 35 |
+
"--mol-instances-path",
|
| 36 |
+
type=Path,
|
| 37 |
+
default=Path("/mnt/disk1/yanganqi/QQCM/KG/qqcm_compound_subgraph/helper_tables/qqcm_mol_id_instances.tsv"),
|
| 38 |
+
help="One row per mol_id instance. These rows are expanded into separate training nodes.",
|
| 39 |
+
)
|
| 40 |
+
parser.add_argument(
|
| 41 |
+
"--out-dir",
|
| 42 |
+
type=Path,
|
| 43 |
+
default=Path("/mnt/disk1/yanganqi/QQCM/KG/qqcm_compound_subgraph_compgcn"),
|
| 44 |
+
help="Directory where embeddings, similarity outputs and summaries will be written.",
|
| 45 |
+
)
|
| 46 |
+
parser.add_argument("--seed", type=int, default=42)
|
| 47 |
+
parser.add_argument("--hidden-dim", type=int, default=64)
|
| 48 |
+
parser.add_argument("--num-layers", type=int, default=2)
|
| 49 |
+
parser.add_argument("--dropout", type=float, default=0.10)
|
| 50 |
+
parser.add_argument("--epochs", type=int, default=4)
|
| 51 |
+
parser.add_argument("--lr", type=float, default=3e-3)
|
| 52 |
+
parser.add_argument("--weight-decay", type=float, default=1e-5)
|
| 53 |
+
parser.add_argument("--grad-clip", type=float, default=5.0)
|
| 54 |
+
parser.add_argument(
|
| 55 |
+
"--prop-edge-sample-size",
|
| 56 |
+
type=int,
|
| 57 |
+
default=800_000,
|
| 58 |
+
help="How many propagation edges to sample per epoch. 0 means use the full propagation graph in training.",
|
| 59 |
+
)
|
| 60 |
+
parser.add_argument(
|
| 61 |
+
"--train-edge-sample-size",
|
| 62 |
+
type=int,
|
| 63 |
+
default=200_000,
|
| 64 |
+
help="How many positive forward edges to sample per epoch for link prediction.",
|
| 65 |
+
)
|
| 66 |
+
parser.add_argument(
|
| 67 |
+
"--message-chunk-size",
|
| 68 |
+
type=int,
|
| 69 |
+
default=250_000,
|
| 70 |
+
help="Chunk size used when aggregating messages over large edge sets.",
|
| 71 |
+
)
|
| 72 |
+
parser.add_argument(
|
| 73 |
+
"--sim-batch-size",
|
| 74 |
+
type=int,
|
| 75 |
+
default=1024,
|
| 76 |
+
help="Reserved for future batched similarity export. Current implementation computes the full matrix directly.",
|
| 77 |
+
)
|
| 78 |
+
parser.add_argument(
|
| 79 |
+
"--device",
|
| 80 |
+
choices=("auto", "cuda", "cpu"),
|
| 81 |
+
default="auto",
|
| 82 |
+
help="Training device. 'auto' prefers CUDA when available.",
|
| 83 |
+
)
|
| 84 |
+
return parser.parse_args()
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
def set_seed(seed: int) -> None:
|
| 88 |
+
random.seed(seed)
|
| 89 |
+
np.random.seed(seed)
|
| 90 |
+
torch.manual_seed(seed)
|
| 91 |
+
if torch.cuda.is_available():
|
| 92 |
+
torch.cuda.manual_seed_all(seed)
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
def select_device(device_arg: str) -> torch.device:
|
| 96 |
+
if device_arg == "cpu":
|
| 97 |
+
return torch.device("cpu")
|
| 98 |
+
if device_arg == "cuda":
|
| 99 |
+
if not torch.cuda.is_available():
|
| 100 |
+
raise RuntimeError("CUDA was requested but is not available.")
|
| 101 |
+
return torch.device("cuda")
|
| 102 |
+
return torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def normalize_node_type(raw: str) -> str:
|
| 106 |
+
value = str(raw).strip().lower()
|
| 107 |
+
if value in {"cui", "doid", "mesh", "icd11"}:
|
| 108 |
+
return "disease"
|
| 109 |
+
return value
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
def write_tsv(path: Path, fieldnames: list[str], rows: list[dict]) -> None:
|
| 113 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 114 |
+
tmp_path = path.with_name(f"{path.name}.tmp")
|
| 115 |
+
with tmp_path.open("w", encoding="utf-8", newline="") as handle:
|
| 116 |
+
writer = csv.DictWriter(handle, fieldnames=fieldnames, delimiter="\t")
|
| 117 |
+
writer.writeheader()
|
| 118 |
+
writer.writerows(rows)
|
| 119 |
+
tmp_path.replace(path)
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
def write_text(path: Path, content: str) -> None:
|
| 123 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 124 |
+
tmp_path = path.with_name(f"{path.name}.tmp")
|
| 125 |
+
tmp_path.write_text(content, encoding="utf-8")
|
| 126 |
+
tmp_path.replace(path)
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def load_graph_nodes(nodes_path: Path) -> tuple[list[str], dict[str, str], dict[str, str]]:
|
| 130 |
+
node_order: list[str] = []
|
| 131 |
+
node_types: dict[str, str] = {}
|
| 132 |
+
node_names: dict[str, str] = {}
|
| 133 |
+
|
| 134 |
+
with nodes_path.open("r", encoding="utf-8", newline="") as handle:
|
| 135 |
+
reader = csv.DictReader(handle, delimiter="\t")
|
| 136 |
+
for row in reader:
|
| 137 |
+
node_id = row["node_id"]
|
| 138 |
+
node_order.append(node_id)
|
| 139 |
+
node_types[node_id] = normalize_node_type(row["node_type"])
|
| 140 |
+
node_names[node_id] = row["name"] or node_id
|
| 141 |
+
|
| 142 |
+
return node_order, node_types, node_names
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
def load_mol_instances(path: Path) -> list[dict]:
|
| 146 |
+
with path.open("r", encoding="utf-8", newline="") as handle:
|
| 147 |
+
return sorted(list(csv.DictReader(handle, delimiter="\t")), key=lambda row: row["mol_id"])
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
def build_entity_metadata(
|
| 151 |
+
base_node_order: list[str],
|
| 152 |
+
node_types: dict[str, str],
|
| 153 |
+
node_names: dict[str, str],
|
| 154 |
+
mol_rows: list[dict],
|
| 155 |
+
) -> tuple[list[str], dict[str, int], list[str], np.ndarray, dict[int, np.ndarray], list[str]]:
|
| 156 |
+
entity_ids = list(base_node_order)
|
| 157 |
+
entity_names = [node_names[node_id] for node_id in base_node_order]
|
| 158 |
+
entity_type_names = [node_types[node_id] for node_id in base_node_order]
|
| 159 |
+
|
| 160 |
+
for row in mol_rows:
|
| 161 |
+
entity_ids.append(row["mol_instance_id"])
|
| 162 |
+
entity_names.append(row["mol_id"])
|
| 163 |
+
entity_type_names.append("mol_instance")
|
| 164 |
+
|
| 165 |
+
entity2id = {node_id: idx for idx, node_id in enumerate(entity_ids)}
|
| 166 |
+
|
| 167 |
+
type_name_to_id: dict[str, int] = {}
|
| 168 |
+
entity_type_ids = np.empty(len(entity_ids), dtype=np.int16)
|
| 169 |
+
for idx, type_name in enumerate(entity_type_names):
|
| 170 |
+
type_id = type_name_to_id.setdefault(type_name, len(type_name_to_id))
|
| 171 |
+
entity_type_ids[idx] = type_id
|
| 172 |
+
|
| 173 |
+
entity_indices_by_type_id = {
|
| 174 |
+
type_id: np.flatnonzero(entity_type_ids == type_id).astype(np.int32)
|
| 175 |
+
for type_id in range(len(type_name_to_id))
|
| 176 |
+
}
|
| 177 |
+
type_id_to_name = [type_name for type_name, _type_id in sorted(type_name_to_id.items(), key=lambda item: item[1])]
|
| 178 |
+
|
| 179 |
+
return entity_ids, entity2id, entity_names, entity_type_ids, entity_indices_by_type_id, type_id_to_name
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
def count_forward_edges_from_summary(graph_dir: Path, edges_path: Path) -> int:
|
| 183 |
+
summary_path = graph_dir / "summary.json"
|
| 184 |
+
if summary_path.exists():
|
| 185 |
+
summary = json.loads(summary_path.read_text(encoding="utf-8"))
|
| 186 |
+
edge_count = summary.get("subgraph_edge_count")
|
| 187 |
+
if isinstance(edge_count, int) and edge_count > 0:
|
| 188 |
+
return edge_count
|
| 189 |
+
|
| 190 |
+
with edges_path.open("r", encoding="utf-8", newline="") as handle:
|
| 191 |
+
return max(sum(1 for _ in handle) - 1, 0)
|
| 192 |
+
|
| 193 |
+
|
| 194 |
+
def build_forward_graph_arrays(
|
| 195 |
+
edges_path: Path,
|
| 196 |
+
entity2id: dict[str, int],
|
| 197 |
+
mol_rows: list[dict],
|
| 198 |
+
expected_base_edge_count: int,
|
| 199 |
+
) -> tuple[np.ndarray, np.ndarray, np.ndarray, list[str], Counter, Counter]:
|
| 200 |
+
extra_edge_count = sum(len([hid for hid in row["herb_node_ids"].split("|") if hid]) + 1 for row in mol_rows)
|
| 201 |
+
total_edge_count = expected_base_edge_count + extra_edge_count
|
| 202 |
+
|
| 203 |
+
src = np.empty(total_edge_count, dtype=np.int32)
|
| 204 |
+
dst = np.empty(total_edge_count, dtype=np.int32)
|
| 205 |
+
rel = np.empty(total_edge_count, dtype=np.int16)
|
| 206 |
+
|
| 207 |
+
relation_names: list[str] = []
|
| 208 |
+
relation2id: dict[str, int] = {}
|
| 209 |
+
relation_counts: Counter = Counter()
|
| 210 |
+
mol_relation_counts: Counter = Counter()
|
| 211 |
+
|
| 212 |
+
def relation_id(name: str) -> int:
|
| 213 |
+
rel_id = relation2id.get(name)
|
| 214 |
+
if rel_id is None:
|
| 215 |
+
rel_id = len(relation_names)
|
| 216 |
+
relation2id[name] = rel_id
|
| 217 |
+
relation_names.append(name)
|
| 218 |
+
return rel_id
|
| 219 |
+
|
| 220 |
+
cursor = 0
|
| 221 |
+
with edges_path.open("r", encoding="utf-8", newline="") as handle:
|
| 222 |
+
header = handle.readline()
|
| 223 |
+
if not header:
|
| 224 |
+
raise RuntimeError(f"Empty edge file: {edges_path}")
|
| 225 |
+
|
| 226 |
+
for line in handle:
|
| 227 |
+
source_id, target_id, relation, _source_table, _evidence, _attributes_json = line.rstrip("\n").split("\t", 5)
|
| 228 |
+
src[cursor] = entity2id[source_id]
|
| 229 |
+
dst[cursor] = entity2id[target_id]
|
| 230 |
+
rel[cursor] = relation_id(relation)
|
| 231 |
+
relation_counts[relation] += 1
|
| 232 |
+
cursor += 1
|
| 233 |
+
|
| 234 |
+
for row in mol_rows:
|
| 235 |
+
mol_instance_id = row["mol_instance_id"]
|
| 236 |
+
compound_node_id = row["compound_node_id"]
|
| 237 |
+
herb_node_ids = [hid for hid in row["herb_node_ids"].split("|") if hid]
|
| 238 |
+
|
| 239 |
+
for herb_node_id in herb_node_ids:
|
| 240 |
+
src[cursor] = entity2id[herb_node_id]
|
| 241 |
+
dst[cursor] = entity2id[mol_instance_id]
|
| 242 |
+
rel_name = "contains_mol_instance"
|
| 243 |
+
rel[cursor] = relation_id(rel_name)
|
| 244 |
+
relation_counts[rel_name] += 1
|
| 245 |
+
mol_relation_counts[rel_name] += 1
|
| 246 |
+
cursor += 1
|
| 247 |
+
|
| 248 |
+
src[cursor] = entity2id[mol_instance_id]
|
| 249 |
+
dst[cursor] = entity2id[compound_node_id]
|
| 250 |
+
rel_name = "maps_to_compound"
|
| 251 |
+
rel[cursor] = relation_id(rel_name)
|
| 252 |
+
relation_counts[rel_name] += 1
|
| 253 |
+
mol_relation_counts[rel_name] += 1
|
| 254 |
+
cursor += 1
|
| 255 |
+
|
| 256 |
+
if cursor != total_edge_count:
|
| 257 |
+
raise RuntimeError(f"Forward edge cursor mismatch: expected {total_edge_count}, got {cursor}")
|
| 258 |
+
|
| 259 |
+
return src, dst, rel, relation_names, relation_counts, mol_relation_counts
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
def build_propagation_arrays(
|
| 263 |
+
forward_src: np.ndarray,
|
| 264 |
+
forward_dst: np.ndarray,
|
| 265 |
+
forward_rel: np.ndarray,
|
| 266 |
+
num_forward_relations: int,
|
| 267 |
+
num_entities: int,
|
| 268 |
+
) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, list[str]]:
|
| 269 |
+
prop_src = np.concatenate([forward_src, forward_dst]).astype(np.int32, copy=False)
|
| 270 |
+
prop_dst = np.concatenate([forward_dst, forward_src]).astype(np.int32, copy=False)
|
| 271 |
+
prop_rel = np.concatenate([forward_rel, forward_rel + num_forward_relations]).astype(np.int16, copy=False)
|
| 272 |
+
|
| 273 |
+
deg = np.bincount(prop_dst, minlength=num_entities).astype(np.float32)
|
| 274 |
+
deg[deg == 0.0] = 1.0
|
| 275 |
+
prop_norm = (1.0 / deg[prop_dst]).astype(np.float32)
|
| 276 |
+
|
| 277 |
+
return prop_src, prop_dst, prop_rel, prop_norm, [f"inv:{idx}" for idx in range(num_forward_relations)]
|
| 278 |
+
|
| 279 |
+
|
| 280 |
+
def build_relation_buckets(rel_ids: np.ndarray, num_relations: int) -> dict[int, np.ndarray]:
|
| 281 |
+
return {
|
| 282 |
+
rel_id: np.flatnonzero(rel_ids == rel_id).astype(np.int32)
|
| 283 |
+
for rel_id in range(num_relations)
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
|
| 287 |
+
def sample_relation_balanced_indices(
|
| 288 |
+
relation_buckets: dict[int, np.ndarray],
|
| 289 |
+
sample_size: int,
|
| 290 |
+
rng: np.random.Generator,
|
| 291 |
+
) -> np.ndarray:
|
| 292 |
+
all_indices = np.concatenate(list(relation_buckets.values())) if relation_buckets else np.empty(0, dtype=np.int32)
|
| 293 |
+
if sample_size <= 0 or sample_size >= len(all_indices):
|
| 294 |
+
return all_indices
|
| 295 |
+
|
| 296 |
+
relation_ids = sorted(relation_buckets)
|
| 297 |
+
per_relation = max(sample_size // max(len(relation_ids), 1), 1)
|
| 298 |
+
sampled: list[np.ndarray] = []
|
| 299 |
+
|
| 300 |
+
for rel_id in relation_ids:
|
| 301 |
+
pool = relation_buckets[rel_id]
|
| 302 |
+
if len(pool) <= per_relation:
|
| 303 |
+
sampled.append(pool)
|
| 304 |
+
else:
|
| 305 |
+
picked = rng.choice(pool, size=per_relation, replace=False).astype(np.int32)
|
| 306 |
+
sampled.append(picked)
|
| 307 |
+
|
| 308 |
+
sampled_indices = np.concatenate(sampled) if sampled else np.empty(0, dtype=np.int32)
|
| 309 |
+
if len(sampled_indices) >= sample_size:
|
| 310 |
+
return sampled_indices[:sample_size]
|
| 311 |
+
|
| 312 |
+
remaining_needed = sample_size - len(sampled_indices)
|
| 313 |
+
if remaining_needed > 0 and len(all_indices) > 0:
|
| 314 |
+
# The top-up phase allows duplicates. That keeps sampling cheap even for very large relations.
|
| 315 |
+
extra = rng.choice(all_indices, size=remaining_needed, replace=True).astype(np.int32)
|
| 316 |
+
sampled_indices = np.concatenate([sampled_indices, extra]).astype(np.int32)
|
| 317 |
+
|
| 318 |
+
return sampled_indices
|
| 319 |
+
|
| 320 |
+
|
| 321 |
+
def sample_uniform_indices(total_size: int, sample_size: int, rng: np.random.Generator) -> np.ndarray | None:
|
| 322 |
+
if sample_size <= 0 or sample_size >= total_size:
|
| 323 |
+
return None
|
| 324 |
+
return np.sort(rng.choice(total_size, size=sample_size, replace=False).astype(np.int32))
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
def sample_typed_negative_nodes(
|
| 328 |
+
positive_node_ids: np.ndarray,
|
| 329 |
+
entity_type_ids: np.ndarray,
|
| 330 |
+
entity_indices_by_type_id: dict[int, np.ndarray],
|
| 331 |
+
rng: np.random.Generator,
|
| 332 |
+
) -> np.ndarray:
|
| 333 |
+
negative = np.empty_like(positive_node_ids, dtype=np.int32)
|
| 334 |
+
positive_type_ids = entity_type_ids[positive_node_ids]
|
| 335 |
+
for type_id in np.unique(positive_type_ids):
|
| 336 |
+
mask = positive_type_ids == type_id
|
| 337 |
+
pool = entity_indices_by_type_id[int(type_id)]
|
| 338 |
+
negative[mask] = rng.choice(pool, size=int(mask.sum()), replace=True).astype(np.int32)
|
| 339 |
+
return negative
|
| 340 |
+
|
| 341 |
+
|
| 342 |
+
class CompGCNLayer(nn.Module):
|
| 343 |
+
def __init__(self, hidden_dim: int, dropout: float) -> None:
|
| 344 |
+
super().__init__()
|
| 345 |
+
self.msg_linear = nn.Linear(hidden_dim, hidden_dim, bias=False)
|
| 346 |
+
self.self_linear = nn.Linear(hidden_dim, hidden_dim, bias=True)
|
| 347 |
+
self.rel_linear = nn.Linear(hidden_dim, hidden_dim, bias=False)
|
| 348 |
+
self.dropout = nn.Dropout(dropout)
|
| 349 |
+
|
| 350 |
+
def forward(
|
| 351 |
+
self,
|
| 352 |
+
x: torch.Tensor,
|
| 353 |
+
rel_embed: torch.Tensor,
|
| 354 |
+
edge_src: np.ndarray,
|
| 355 |
+
edge_dst: np.ndarray,
|
| 356 |
+
edge_rel: np.ndarray,
|
| 357 |
+
edge_norm: np.ndarray,
|
| 358 |
+
device: torch.device,
|
| 359 |
+
chunk_size: int,
|
| 360 |
+
sample_indices: np.ndarray | None = None,
|
| 361 |
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
| 362 |
+
out = self.self_linear(x)
|
| 363 |
+
|
| 364 |
+
total_edges = len(edge_src) if sample_indices is None else len(sample_indices)
|
| 365 |
+
for start in range(0, total_edges, chunk_size):
|
| 366 |
+
end = min(start + chunk_size, total_edges)
|
| 367 |
+
if sample_indices is None:
|
| 368 |
+
src_chunk_np = edge_src[start:end]
|
| 369 |
+
dst_chunk_np = edge_dst[start:end]
|
| 370 |
+
rel_chunk_np = edge_rel[start:end]
|
| 371 |
+
norm_chunk_np = edge_norm[start:end]
|
| 372 |
+
else:
|
| 373 |
+
sampled = sample_indices[start:end]
|
| 374 |
+
src_chunk_np = edge_src[sampled]
|
| 375 |
+
dst_chunk_np = edge_dst[sampled]
|
| 376 |
+
rel_chunk_np = edge_rel[sampled]
|
| 377 |
+
norm_chunk_np = edge_norm[sampled]
|
| 378 |
+
|
| 379 |
+
src_chunk = torch.as_tensor(src_chunk_np, dtype=torch.long, device=device)
|
| 380 |
+
dst_chunk = torch.as_tensor(dst_chunk_np, dtype=torch.long, device=device)
|
| 381 |
+
rel_chunk = torch.as_tensor(rel_chunk_np.astype(np.int64, copy=False), dtype=torch.long, device=device)
|
| 382 |
+
norm_chunk = torch.as_tensor(norm_chunk_np, dtype=torch.float32, device=device)
|
| 383 |
+
|
| 384 |
+
msg = x.index_select(0, src_chunk) * rel_embed.index_select(0, rel_chunk)
|
| 385 |
+
msg = self.msg_linear(msg)
|
| 386 |
+
msg = msg * norm_chunk.unsqueeze(1)
|
| 387 |
+
out.index_add_(0, dst_chunk, msg)
|
| 388 |
+
|
| 389 |
+
out = F.relu(out)
|
| 390 |
+
out = self.dropout(out)
|
| 391 |
+
rel_out = F.relu(self.rel_linear(rel_embed))
|
| 392 |
+
return out, rel_out
|
| 393 |
+
|
| 394 |
+
|
| 395 |
+
class CompGCNModel(nn.Module):
|
| 396 |
+
def __init__(self, num_entities: int, num_relations: int, hidden_dim: int, num_layers: int, dropout: float) -> None:
|
| 397 |
+
super().__init__()
|
| 398 |
+
self.entity_embed = nn.Parameter(torch.empty(num_entities, hidden_dim))
|
| 399 |
+
self.relation_embed = nn.Parameter(torch.empty(num_relations, hidden_dim))
|
| 400 |
+
self.layers = nn.ModuleList([CompGCNLayer(hidden_dim, dropout) for _ in range(num_layers)])
|
| 401 |
+
self.reset_parameters()
|
| 402 |
+
|
| 403 |
+
def reset_parameters(self) -> None:
|
| 404 |
+
nn.init.xavier_uniform_(self.entity_embed)
|
| 405 |
+
nn.init.xavier_uniform_(self.relation_embed)
|
| 406 |
+
for layer in self.layers:
|
| 407 |
+
nn.init.xavier_uniform_(layer.msg_linear.weight)
|
| 408 |
+
nn.init.xavier_uniform_(layer.self_linear.weight)
|
| 409 |
+
nn.init.zeros_(layer.self_linear.bias)
|
| 410 |
+
nn.init.xavier_uniform_(layer.rel_linear.weight)
|
| 411 |
+
|
| 412 |
+
def encode(
|
| 413 |
+
self,
|
| 414 |
+
edge_src: np.ndarray,
|
| 415 |
+
edge_dst: np.ndarray,
|
| 416 |
+
edge_rel: np.ndarray,
|
| 417 |
+
edge_norm: np.ndarray,
|
| 418 |
+
device: torch.device,
|
| 419 |
+
chunk_size: int,
|
| 420 |
+
sample_indices: np.ndarray | None = None,
|
| 421 |
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
| 422 |
+
x = self.entity_embed
|
| 423 |
+
rel_embed = self.relation_embed
|
| 424 |
+
for layer in self.layers:
|
| 425 |
+
x, rel_embed = layer(
|
| 426 |
+
x=x,
|
| 427 |
+
rel_embed=rel_embed,
|
| 428 |
+
edge_src=edge_src,
|
| 429 |
+
edge_dst=edge_dst,
|
| 430 |
+
edge_rel=edge_rel,
|
| 431 |
+
edge_norm=edge_norm,
|
| 432 |
+
device=device,
|
| 433 |
+
chunk_size=chunk_size,
|
| 434 |
+
sample_indices=sample_indices,
|
| 435 |
+
)
|
| 436 |
+
return x, rel_embed
|
| 437 |
+
|
| 438 |
+
|
| 439 |
+
def score_triples(
|
| 440 |
+
entity_embed: torch.Tensor,
|
| 441 |
+
relation_embed: torch.Tensor,
|
| 442 |
+
src_idx: np.ndarray,
|
| 443 |
+
rel_idx: np.ndarray,
|
| 444 |
+
dst_idx: np.ndarray,
|
| 445 |
+
device: torch.device,
|
| 446 |
+
) -> torch.Tensor:
|
| 447 |
+
src = torch.as_tensor(src_idx.astype(np.int64, copy=False), dtype=torch.long, device=device)
|
| 448 |
+
rel = torch.as_tensor(rel_idx.astype(np.int64, copy=False), dtype=torch.long, device=device)
|
| 449 |
+
dst = torch.as_tensor(dst_idx.astype(np.int64, copy=False), dtype=torch.long, device=device)
|
| 450 |
+
return (entity_embed.index_select(0, src) * relation_embed.index_select(0, rel) * entity_embed.index_select(0, dst)).sum(dim=1)
|
| 451 |
+
|
| 452 |
+
|
| 453 |
+
def build_output_explanation(summary: dict) -> str:
|
| 454 |
+
graph_name = Path(summary["graph_dir"]).name
|
| 455 |
+
return f"""# QQCM CompGCN Outputs
|
| 456 |
+
|
| 457 |
+
本目录是基于 `{graph_name}` 训练得到的 `mol_id` 实例向量结果。
|
| 458 |
+
|
| 459 |
+
## 训练图构造
|
| 460 |
+
|
| 461 |
+
- 原始输入图来自 `{graph_name}/nodes.tsv` 与 `{graph_name}/edges.tsv`。
|
| 462 |
+
- 为了把多个 `mol_id` 落到同一 `InChIKey` 的情况拆开,脚本额外引入了 `mol_instance` 节点。
|
| 463 |
+
- 每个 `mol_instance` 节点对应一个唯一 `mol_id`,并通过两类边接回原子图:
|
| 464 |
+
- `contains_mol_instance`: `herb -> mol_instance`
|
| 465 |
+
- `maps_to_compound`: `mol_instance -> compound`
|
| 466 |
+
|
| 467 |
+
## 输出说明
|
| 468 |
+
|
| 469 |
+
- `mol_instance_embeddings.tsv`
|
| 470 |
+
- 一行一个 `mol_id` 实例向量。
|
| 471 |
+
- 后续如需按 QQCM 原始化合物做分析,应优先使用这张表。
|
| 472 |
+
|
| 473 |
+
- `mol_instance_similarity.csv`
|
| 474 |
+
- 以 `mol_id` 为行列标签的余弦相似度矩阵。
|
| 475 |
+
|
| 476 |
+
- `relation_coverage.tsv`
|
| 477 |
+
- 训练图中的关系及边数量统计。
|
| 478 |
+
|
| 479 |
+
- `summary.json`
|
| 480 |
+
- 训练配置、图规模和输出规模汇总。
|
| 481 |
+
|
| 482 |
+
## 当前结果摘要
|
| 483 |
+
|
| 484 |
+
- 训练设备: {summary['device']}
|
| 485 |
+
- 训练图节点数: {summary['num_entities']}
|
| 486 |
+
- 训练图边数: {summary['num_forward_edges']}
|
| 487 |
+
- `mol_instance` 节点数: {summary['num_mol_instances']}
|
| 488 |
+
- 关系数: {summary['num_forward_relations']}
|
| 489 |
+
- 嵌入维度: {summary['hidden_dim']}
|
| 490 |
+
- 训练轮数: {summary['epochs']}
|
| 491 |
+
"""
|
| 492 |
+
|
| 493 |
+
|
| 494 |
+
def main() -> None:
|
| 495 |
+
args = parse_args()
|
| 496 |
+
set_seed(args.seed)
|
| 497 |
+
rng = np.random.default_rng(args.seed)
|
| 498 |
+
|
| 499 |
+
device = select_device(args.device)
|
| 500 |
+
graph_dir = args.graph_dir
|
| 501 |
+
nodes_path = graph_dir / "nodes.tsv"
|
| 502 |
+
edges_path = graph_dir / "edges.tsv"
|
| 503 |
+
out_dir = args.out_dir
|
| 504 |
+
helper_dir = out_dir / "helper_tables"
|
| 505 |
+
helper_dir.mkdir(parents=True, exist_ok=True)
|
| 506 |
+
|
| 507 |
+
base_node_order, node_types, node_names = load_graph_nodes(nodes_path)
|
| 508 |
+
mol_rows = load_mol_instances(args.mol_instances_path)
|
| 509 |
+
entity_ids, entity2id, entity_names, entity_type_ids, entity_indices_by_type_id, type_id_to_name = build_entity_metadata(
|
| 510 |
+
base_node_order=base_node_order,
|
| 511 |
+
node_types=node_types,
|
| 512 |
+
node_names=node_names,
|
| 513 |
+
mol_rows=mol_rows,
|
| 514 |
+
)
|
| 515 |
+
|
| 516 |
+
expected_base_edge_count = count_forward_edges_from_summary(graph_dir=graph_dir, edges_path=edges_path)
|
| 517 |
+
forward_src, forward_dst, forward_rel, relation_names, relation_counts, mol_relation_counts = build_forward_graph_arrays(
|
| 518 |
+
edges_path=edges_path,
|
| 519 |
+
entity2id=entity2id,
|
| 520 |
+
mol_rows=mol_rows,
|
| 521 |
+
expected_base_edge_count=expected_base_edge_count,
|
| 522 |
+
)
|
| 523 |
+
|
| 524 |
+
num_entities = len(entity_ids)
|
| 525 |
+
num_forward_edges = len(forward_src)
|
| 526 |
+
num_forward_relations = len(relation_names)
|
| 527 |
+
prop_src, prop_dst, prop_rel, prop_norm, inverse_relation_names = build_propagation_arrays(
|
| 528 |
+
forward_src=forward_src,
|
| 529 |
+
forward_dst=forward_dst,
|
| 530 |
+
forward_rel=forward_rel,
|
| 531 |
+
num_forward_relations=num_forward_relations,
|
| 532 |
+
num_entities=num_entities,
|
| 533 |
+
)
|
| 534 |
+
|
| 535 |
+
train_relation_buckets = build_relation_buckets(forward_rel, num_forward_relations)
|
| 536 |
+
|
| 537 |
+
model = CompGCNModel(
|
| 538 |
+
num_entities=num_entities,
|
| 539 |
+
num_relations=num_forward_relations * 2,
|
| 540 |
+
hidden_dim=args.hidden_dim,
|
| 541 |
+
num_layers=args.num_layers,
|
| 542 |
+
dropout=args.dropout,
|
| 543 |
+
).to(device)
|
| 544 |
+
optimizer = torch.optim.AdamW(model.parameters(), lr=args.lr, weight_decay=args.weight_decay)
|
| 545 |
+
|
| 546 |
+
train_losses: list[float] = []
|
| 547 |
+
epoch_logs: list[dict] = []
|
| 548 |
+
|
| 549 |
+
print(f"Device: {device}")
|
| 550 |
+
print(f"Entities: {num_entities} | Forward edges: {num_forward_edges} | Relations: {num_forward_relations}")
|
| 551 |
+
print(f"Mol instances: {len(mol_rows)}")
|
| 552 |
+
|
| 553 |
+
for epoch in range(1, args.epochs + 1):
|
| 554 |
+
model.train()
|
| 555 |
+
optimizer.zero_grad(set_to_none=True)
|
| 556 |
+
|
| 557 |
+
prop_sample_indices = sample_uniform_indices(
|
| 558 |
+
total_size=len(prop_src),
|
| 559 |
+
sample_size=args.prop_edge_sample_size,
|
| 560 |
+
rng=rng,
|
| 561 |
+
)
|
| 562 |
+
train_sample_indices = sample_relation_balanced_indices(
|
| 563 |
+
relation_buckets=train_relation_buckets,
|
| 564 |
+
sample_size=args.train_edge_sample_size,
|
| 565 |
+
rng=rng,
|
| 566 |
+
)
|
| 567 |
+
|
| 568 |
+
entity_embed, relation_embed = model.encode(
|
| 569 |
+
edge_src=prop_src,
|
| 570 |
+
edge_dst=prop_dst,
|
| 571 |
+
edge_rel=prop_rel,
|
| 572 |
+
edge_norm=prop_norm,
|
| 573 |
+
device=device,
|
| 574 |
+
chunk_size=args.message_chunk_size,
|
| 575 |
+
sample_indices=prop_sample_indices,
|
| 576 |
+
)
|
| 577 |
+
|
| 578 |
+
pos_src = forward_src[train_sample_indices]
|
| 579 |
+
pos_dst = forward_dst[train_sample_indices]
|
| 580 |
+
pos_rel = forward_rel[train_sample_indices]
|
| 581 |
+
|
| 582 |
+
corrupt_src_mask = rng.random(len(train_sample_indices)) < 0.5
|
| 583 |
+
neg_src = pos_src.copy()
|
| 584 |
+
neg_dst = pos_dst.copy()
|
| 585 |
+
if corrupt_src_mask.any():
|
| 586 |
+
neg_src[corrupt_src_mask] = sample_typed_negative_nodes(
|
| 587 |
+
positive_node_ids=pos_src[corrupt_src_mask],
|
| 588 |
+
entity_type_ids=entity_type_ids,
|
| 589 |
+
entity_indices_by_type_id=entity_indices_by_type_id,
|
| 590 |
+
rng=rng,
|
| 591 |
+
)
|
| 592 |
+
if (~corrupt_src_mask).any():
|
| 593 |
+
neg_dst[~corrupt_src_mask] = sample_typed_negative_nodes(
|
| 594 |
+
positive_node_ids=pos_dst[~corrupt_src_mask],
|
| 595 |
+
entity_type_ids=entity_type_ids,
|
| 596 |
+
entity_indices_by_type_id=entity_indices_by_type_id,
|
| 597 |
+
rng=rng,
|
| 598 |
+
)
|
| 599 |
+
|
| 600 |
+
pos_score = score_triples(entity_embed, relation_embed, pos_src, pos_rel, pos_dst, device)
|
| 601 |
+
neg_score = score_triples(entity_embed, relation_embed, neg_src, pos_rel, neg_dst, device)
|
| 602 |
+
|
| 603 |
+
loss = F.binary_cross_entropy_with_logits(pos_score, torch.ones_like(pos_score))
|
| 604 |
+
loss = loss + F.binary_cross_entropy_with_logits(neg_score, torch.zeros_like(neg_score))
|
| 605 |
+
loss.backward()
|
| 606 |
+
|
| 607 |
+
if args.grad_clip > 0:
|
| 608 |
+
torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=args.grad_clip)
|
| 609 |
+
optimizer.step()
|
| 610 |
+
|
| 611 |
+
pos_mean = float(torch.sigmoid(pos_score.detach()).mean().cpu())
|
| 612 |
+
neg_mean = float(torch.sigmoid(neg_score.detach()).mean().cpu())
|
| 613 |
+
loss_value = float(loss.detach().cpu())
|
| 614 |
+
train_losses.append(loss_value)
|
| 615 |
+
epoch_log = {
|
| 616 |
+
"epoch": epoch,
|
| 617 |
+
"loss": loss_value,
|
| 618 |
+
"pos_score_mean": pos_mean,
|
| 619 |
+
"neg_score_mean": neg_mean,
|
| 620 |
+
"prop_edges_used": int(len(prop_src) if prop_sample_indices is None else len(prop_sample_indices)),
|
| 621 |
+
"train_edges_used": int(len(train_sample_indices)),
|
| 622 |
+
}
|
| 623 |
+
epoch_logs.append(epoch_log)
|
| 624 |
+
print(
|
| 625 |
+
f"Epoch {epoch:02d}/{args.epochs} | loss {loss_value:.4f} | "
|
| 626 |
+
f"pos {pos_mean:.4f} | neg {neg_mean:.4f} | "
|
| 627 |
+
f"prop_edges {epoch_log['prop_edges_used']} | train_edges {epoch_log['train_edges_used']}"
|
| 628 |
+
)
|
| 629 |
+
|
| 630 |
+
model.eval()
|
| 631 |
+
with torch.no_grad():
|
| 632 |
+
final_entity_embed, final_relation_embed = model.encode(
|
| 633 |
+
edge_src=prop_src,
|
| 634 |
+
edge_dst=prop_dst,
|
| 635 |
+
edge_rel=prop_rel,
|
| 636 |
+
edge_norm=prop_norm,
|
| 637 |
+
device=device,
|
| 638 |
+
chunk_size=args.message_chunk_size,
|
| 639 |
+
sample_indices=None,
|
| 640 |
+
)
|
| 641 |
+
|
| 642 |
+
mol_entity_indices = np.array([entity2id[row["mol_instance_id"]] for row in mol_rows], dtype=np.int32)
|
| 643 |
+
mol_embeddings = final_entity_embed.index_select(
|
| 644 |
+
0, torch.as_tensor(mol_entity_indices.astype(np.int64, copy=False), dtype=torch.long, device=device)
|
| 645 |
+
).detach().cpu()
|
| 646 |
+
mol_embeddings_norm = F.normalize(mol_embeddings, p=2, dim=1)
|
| 647 |
+
similarity_matrix = torch.matmul(mol_embeddings_norm, mol_embeddings_norm.T).cpu().numpy().astype(np.float32)
|
| 648 |
+
|
| 649 |
+
embedding_columns = [f"dim_{idx:03d}" for idx in range(args.hidden_dim)]
|
| 650 |
+
embedding_rows: list[dict] = []
|
| 651 |
+
mol_embeddings_np = mol_embeddings.numpy()
|
| 652 |
+
for row, vector in zip(mol_rows, mol_embeddings_np):
|
| 653 |
+
record = dict(row)
|
| 654 |
+
for idx, value in enumerate(vector):
|
| 655 |
+
record[embedding_columns[idx]] = f"{float(value):.8f}"
|
| 656 |
+
embedding_rows.append(record)
|
| 657 |
+
|
| 658 |
+
embedding_fields = list(mol_rows[0].keys()) + embedding_columns if mol_rows else embedding_columns
|
| 659 |
+
write_tsv(out_dir / "mol_instance_embeddings.tsv", embedding_fields, embedding_rows)
|
| 660 |
+
|
| 661 |
+
similarity_path = out_dir / "mol_instance_similarity.csv"
|
| 662 |
+
with similarity_path.open("w", encoding="utf-8", newline="") as handle:
|
| 663 |
+
writer = csv.writer(handle)
|
| 664 |
+
mol_ids = [row["mol_id"] for row in mol_rows]
|
| 665 |
+
writer.writerow(["mol_id", *mol_ids])
|
| 666 |
+
for mol_id, sim_row in zip(mol_ids, similarity_matrix):
|
| 667 |
+
writer.writerow([mol_id, *[f"{float(value):.6f}" for value in sim_row]])
|
| 668 |
+
|
| 669 |
+
relation_rows = []
|
| 670 |
+
for rel_name in relation_names:
|
| 671 |
+
relation_rows.append(
|
| 672 |
+
{
|
| 673 |
+
"relation": rel_name,
|
| 674 |
+
"edge_count": relation_counts[rel_name],
|
| 675 |
+
"is_added_mol_relation": str(rel_name in mol_relation_counts).lower(),
|
| 676 |
+
}
|
| 677 |
+
)
|
| 678 |
+
write_tsv(out_dir / "relation_coverage.tsv", ["relation", "edge_count", "is_added_mol_relation"], relation_rows)
|
| 679 |
+
|
| 680 |
+
run_config = {
|
| 681 |
+
"graph_dir": str(graph_dir),
|
| 682 |
+
"mol_instances_path": str(args.mol_instances_path),
|
| 683 |
+
"out_dir": str(out_dir),
|
| 684 |
+
"seed": args.seed,
|
| 685 |
+
"hidden_dim": args.hidden_dim,
|
| 686 |
+
"num_layers": args.num_layers,
|
| 687 |
+
"dropout": args.dropout,
|
| 688 |
+
"epochs": args.epochs,
|
| 689 |
+
"lr": args.lr,
|
| 690 |
+
"weight_decay": args.weight_decay,
|
| 691 |
+
"grad_clip": args.grad_clip,
|
| 692 |
+
"prop_edge_sample_size": args.prop_edge_sample_size,
|
| 693 |
+
"train_edge_sample_size": args.train_edge_sample_size,
|
| 694 |
+
"message_chunk_size": args.message_chunk_size,
|
| 695 |
+
"device": str(device),
|
| 696 |
+
}
|
| 697 |
+
write_text(out_dir / "run_config.json", json.dumps(run_config, ensure_ascii=False, indent=2))
|
| 698 |
+
|
| 699 |
+
summary = {
|
| 700 |
+
"graph_dir": str(graph_dir),
|
| 701 |
+
"mol_instances_path": str(args.mol_instances_path),
|
| 702 |
+
"device": str(device),
|
| 703 |
+
"num_entities": num_entities,
|
| 704 |
+
"num_forward_edges": int(num_forward_edges),
|
| 705 |
+
"num_propagation_edges": int(len(prop_src)),
|
| 706 |
+
"num_forward_relations": num_forward_relations,
|
| 707 |
+
"forward_relation_names": relation_names,
|
| 708 |
+
"num_mol_instances": len(mol_rows),
|
| 709 |
+
"num_base_subgraph_nodes": len(base_node_order),
|
| 710 |
+
"hidden_dim": args.hidden_dim,
|
| 711 |
+
"num_layers": args.num_layers,
|
| 712 |
+
"epochs": args.epochs,
|
| 713 |
+
"final_train_loss": train_losses[-1] if train_losses else None,
|
| 714 |
+
"epoch_logs": epoch_logs,
|
| 715 |
+
"output_embedding_rows": len(embedding_rows),
|
| 716 |
+
"output_similarity_shape": [int(similarity_matrix.shape[0]), int(similarity_matrix.shape[1])],
|
| 717 |
+
"relation_counts": dict(sorted(relation_counts.items())),
|
| 718 |
+
"mol_relation_counts": dict(sorted(mol_relation_counts.items())),
|
| 719 |
+
"node_type_counts": {
|
| 720 |
+
type_id_to_name[type_id]: int(len(pool))
|
| 721 |
+
for type_id, pool in entity_indices_by_type_id.items()
|
| 722 |
+
},
|
| 723 |
+
"notes": [
|
| 724 |
+
"Embeddings are exported for mol_instance nodes, not deduplicated InChIKey compound nodes.",
|
| 725 |
+
"Multiple mol_ids that map to the same InChIKey remain separate rows in both embeddings and similarity outputs.",
|
| 726 |
+
"The encoder uses a CompGCN-style relation-composition message passing layer with sampled propagation during training and full-graph inference at export time.",
|
| 727 |
+
],
|
| 728 |
+
}
|
| 729 |
+
write_text(out_dir / "summary.json", json.dumps(summary, ensure_ascii=False, indent=2))
|
| 730 |
+
write_text(out_dir / "OUTPUT_EXPLANATION.md", build_output_explanation(summary))
|
| 731 |
+
|
| 732 |
+
print("CompGCN mol-instance training completed.")
|
| 733 |
+
print(f"Output directory: {out_dir}")
|
| 734 |
+
print(f"Embeddings: {out_dir / 'mol_instance_embeddings.tsv'}")
|
| 735 |
+
print(f"Similarity matrix: {out_dir / 'mol_instance_similarity.csv'}")
|
| 736 |
+
print(f"Summary: {out_dir / 'summary.json'}")
|
| 737 |
+
print()
|
| 738 |
+
print(json.dumps(summary, ensure_ascii=False, indent=2))
|
| 739 |
+
|
| 740 |
+
|
| 741 |
+
if __name__ == "__main__":
|
| 742 |
+
main()
|
LLM/build_pubchem_drug_text_table.py
ADDED
|
@@ -0,0 +1,1086 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import argparse
|
| 7 |
+
import csv
|
| 8 |
+
import json
|
| 9 |
+
import os
|
| 10 |
+
import re
|
| 11 |
+
import threading
|
| 12 |
+
import time
|
| 13 |
+
from concurrent.futures import ThreadPoolExecutor, as_completed
|
| 14 |
+
from pathlib import Path
|
| 15 |
+
from typing import Any
|
| 16 |
+
|
| 17 |
+
import requests
|
| 18 |
+
from tqdm import tqdm
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
COM_ROOT = Path("/mnt/disk1/yanganqi/QQCM/COM")
|
| 22 |
+
DEFAULT_SMILES_CSV = COM_ROOT / "compound_smiles.csv"
|
| 23 |
+
DEFAULT_INCHIKEY_CSV = COM_ROOT / "compound_inchikey.csv"
|
| 24 |
+
DEFAULT_OUTPUT_CSV = Path("/mnt/disk1/yanganqi/QQCM/LLM/pubchem_drug_texts.csv")
|
| 25 |
+
DEFAULT_CACHE_DIR = Path("/mnt/disk1/yanganqi/QQCM/LLM/pubchem_cache")
|
| 26 |
+
|
| 27 |
+
PUG_REST_BASE = "https://pubchem.ncbi.nlm.nih.gov/rest/pug"
|
| 28 |
+
PUG_VIEW_BASE = "https://pubchem.ncbi.nlm.nih.gov/rest/pug_view/data/compound"
|
| 29 |
+
CACHE_VERSION = 2
|
| 30 |
+
TRANSIENT_STATUS_CODES = {429, 500, 502, 503, 504}
|
| 31 |
+
|
| 32 |
+
TOP_LEVEL_HEADINGS = (
|
| 33 |
+
"Drug and Medication Information",
|
| 34 |
+
"Pharmacology and Biochemistry",
|
| 35 |
+
"Toxicity",
|
| 36 |
+
)
|
| 37 |
+
|
| 38 |
+
RECORD_DESCRIPTION_HEADING = "Record Description"
|
| 39 |
+
ASSOCIATED_DISEASE_HEADING = "Associated Disorders and Diseases"
|
| 40 |
+
|
| 41 |
+
INDICATION_HEADINGS = (
|
| 42 |
+
"Drug Indication",
|
| 43 |
+
"Associated Disorders and Diseases",
|
| 44 |
+
"Disease and References",
|
| 45 |
+
)
|
| 46 |
+
|
| 47 |
+
TREATMENT_HEADINGS = (
|
| 48 |
+
"Therapeutic Uses",
|
| 49 |
+
"Pharmacodynamics",
|
| 50 |
+
"Mechanism of Action",
|
| 51 |
+
)
|
| 52 |
+
|
| 53 |
+
SAFETY_HEADINGS = (
|
| 54 |
+
"Drug Warnings",
|
| 55 |
+
"Black Box Warning",
|
| 56 |
+
"Toxicity Summary",
|
| 57 |
+
"Adverse Effects",
|
| 58 |
+
"Hepatotoxicity",
|
| 59 |
+
"Drug Induced Liver Injury",
|
| 60 |
+
"Effects During Pregnancy and Lactation",
|
| 61 |
+
"Absorption, Distribution and Excretion",
|
| 62 |
+
"Protein Binding",
|
| 63 |
+
"Metabolism/Metabolites",
|
| 64 |
+
"Biological Half-Life",
|
| 65 |
+
)
|
| 66 |
+
|
| 67 |
+
THREAD_LOCAL = threading.local()
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
def parse_args() -> argparse.Namespace:
|
| 71 |
+
parser = argparse.ArgumentParser(
|
| 72 |
+
description=(
|
| 73 |
+
"Build a PubChem text CSV with description and fetch status columns "
|
| 74 |
+
"for compound embedding."
|
| 75 |
+
)
|
| 76 |
+
)
|
| 77 |
+
parser.add_argument(
|
| 78 |
+
"--smiles-csv",
|
| 79 |
+
type=Path,
|
| 80 |
+
default=DEFAULT_SMILES_CSV,
|
| 81 |
+
help="Path to compound_smiles.csv",
|
| 82 |
+
)
|
| 83 |
+
parser.add_argument(
|
| 84 |
+
"--inchikey-csv",
|
| 85 |
+
type=Path,
|
| 86 |
+
default=DEFAULT_INCHIKEY_CSV,
|
| 87 |
+
help="Path to compound_inchikey.csv",
|
| 88 |
+
)
|
| 89 |
+
parser.add_argument(
|
| 90 |
+
"--output",
|
| 91 |
+
type=Path,
|
| 92 |
+
default=DEFAULT_OUTPUT_CSV,
|
| 93 |
+
help="Output CSV path",
|
| 94 |
+
)
|
| 95 |
+
parser.add_argument(
|
| 96 |
+
"--cache-dir",
|
| 97 |
+
type=Path,
|
| 98 |
+
default=DEFAULT_CACHE_DIR,
|
| 99 |
+
help="Directory for CID lookup and section text caches",
|
| 100 |
+
)
|
| 101 |
+
parser.add_argument(
|
| 102 |
+
"--workers",
|
| 103 |
+
type=int,
|
| 104 |
+
default=4,
|
| 105 |
+
help="Concurrent worker count for PubChem requests",
|
| 106 |
+
)
|
| 107 |
+
parser.add_argument(
|
| 108 |
+
"--timeout",
|
| 109 |
+
type=float,
|
| 110 |
+
default=30.0,
|
| 111 |
+
help="Per-request timeout in seconds",
|
| 112 |
+
)
|
| 113 |
+
parser.add_argument(
|
| 114 |
+
"--retries",
|
| 115 |
+
type=int,
|
| 116 |
+
default=4,
|
| 117 |
+
help="Retry count for transient PubChem failures",
|
| 118 |
+
)
|
| 119 |
+
parser.add_argument(
|
| 120 |
+
"--retry-backoff",
|
| 121 |
+
type=float,
|
| 122 |
+
default=1.5,
|
| 123 |
+
help="Exponential backoff factor between retries",
|
| 124 |
+
)
|
| 125 |
+
parser.add_argument(
|
| 126 |
+
"--max-bucket-chars",
|
| 127 |
+
type=int,
|
| 128 |
+
default=4000,
|
| 129 |
+
help="Maximum characters retained for each of indication/treatment/safety",
|
| 130 |
+
)
|
| 131 |
+
parser.add_argument(
|
| 132 |
+
"--max-total-chars",
|
| 133 |
+
type=int,
|
| 134 |
+
default=12000,
|
| 135 |
+
help="Maximum characters retained for the full text_description column",
|
| 136 |
+
)
|
| 137 |
+
parser.add_argument(
|
| 138 |
+
"--limit",
|
| 139 |
+
type=int,
|
| 140 |
+
default=None,
|
| 141 |
+
help="Only process the first N compounds for testing",
|
| 142 |
+
)
|
| 143 |
+
parser.add_argument(
|
| 144 |
+
"--include-record-description-fallback",
|
| 145 |
+
action="store_true",
|
| 146 |
+
help=(
|
| 147 |
+
"When indication/treatment/safety are all empty, append PubChem "
|
| 148 |
+
"Record Description as a fallback."
|
| 149 |
+
),
|
| 150 |
+
)
|
| 151 |
+
parser.add_argument(
|
| 152 |
+
"--offline-cache-only",
|
| 153 |
+
action="store_true",
|
| 154 |
+
help=(
|
| 155 |
+
"Build the CSV using only existing local cache files. "
|
| 156 |
+
"No PubChem network requests will be made."
|
| 157 |
+
),
|
| 158 |
+
)
|
| 159 |
+
return parser.parse_args()
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
def get_session() -> requests.Session:
|
| 163 |
+
session = getattr(THREAD_LOCAL, "session", None)
|
| 164 |
+
if session is None:
|
| 165 |
+
session = requests.Session()
|
| 166 |
+
session.headers.update(
|
| 167 |
+
{
|
| 168 |
+
"User-Agent": (
|
| 169 |
+
"QQCM PubChem text builder/1.0 "
|
| 170 |
+
"(contact: local batch script)"
|
| 171 |
+
)
|
| 172 |
+
}
|
| 173 |
+
)
|
| 174 |
+
THREAD_LOCAL.session = session
|
| 175 |
+
return session
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
def request_json_with_meta(
|
| 179 |
+
url: str,
|
| 180 |
+
*,
|
| 181 |
+
method: str = "GET",
|
| 182 |
+
params: dict[str, Any] | None = None,
|
| 183 |
+
data: dict[str, Any] | None = None,
|
| 184 |
+
timeout: float,
|
| 185 |
+
retries: int,
|
| 186 |
+
retry_backoff: float,
|
| 187 |
+
) -> dict[str, Any]:
|
| 188 |
+
session = get_session()
|
| 189 |
+
last_detail = "unknown error"
|
| 190 |
+
|
| 191 |
+
for attempt in range(retries + 1):
|
| 192 |
+
try:
|
| 193 |
+
response = session.request(
|
| 194 |
+
method,
|
| 195 |
+
url,
|
| 196 |
+
params=params,
|
| 197 |
+
data=data,
|
| 198 |
+
timeout=timeout,
|
| 199 |
+
)
|
| 200 |
+
if response.status_code == 404:
|
| 201 |
+
return {
|
| 202 |
+
"status": "not_found",
|
| 203 |
+
"payload": None,
|
| 204 |
+
"detail": "http_404",
|
| 205 |
+
}
|
| 206 |
+
if response.status_code in TRANSIENT_STATUS_CODES:
|
| 207 |
+
last_detail = f"http_{response.status_code}"
|
| 208 |
+
if attempt >= retries:
|
| 209 |
+
return {
|
| 210 |
+
"status": "transient_error",
|
| 211 |
+
"payload": None,
|
| 212 |
+
"detail": last_detail,
|
| 213 |
+
}
|
| 214 |
+
sleep_seconds = retry_backoff ** attempt
|
| 215 |
+
time.sleep(sleep_seconds)
|
| 216 |
+
continue
|
| 217 |
+
response.raise_for_status()
|
| 218 |
+
return {
|
| 219 |
+
"status": "ok",
|
| 220 |
+
"payload": response.json(),
|
| 221 |
+
"detail": f"http_{response.status_code}",
|
| 222 |
+
}
|
| 223 |
+
except Exception as exc:
|
| 224 |
+
last_detail = f"{type(exc).__name__}: {exc}"
|
| 225 |
+
if attempt >= retries:
|
| 226 |
+
return {
|
| 227 |
+
"status": "error",
|
| 228 |
+
"payload": None,
|
| 229 |
+
"detail": last_detail,
|
| 230 |
+
}
|
| 231 |
+
sleep_seconds = retry_backoff ** attempt
|
| 232 |
+
time.sleep(sleep_seconds)
|
| 233 |
+
|
| 234 |
+
return {
|
| 235 |
+
"status": "error",
|
| 236 |
+
"payload": None,
|
| 237 |
+
"detail": last_detail,
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
def request_json(
|
| 242 |
+
url: str,
|
| 243 |
+
*,
|
| 244 |
+
method: str = "GET",
|
| 245 |
+
params: dict[str, Any] | None = None,
|
| 246 |
+
data: dict[str, Any] | None = None,
|
| 247 |
+
timeout: float,
|
| 248 |
+
retries: int,
|
| 249 |
+
retry_backoff: float,
|
| 250 |
+
) -> dict[str, Any] | None:
|
| 251 |
+
result = request_json_with_meta(
|
| 252 |
+
url,
|
| 253 |
+
method=method,
|
| 254 |
+
params=params,
|
| 255 |
+
data=data,
|
| 256 |
+
timeout=timeout,
|
| 257 |
+
retries=retries,
|
| 258 |
+
retry_backoff=retry_backoff,
|
| 259 |
+
)
|
| 260 |
+
if result["status"] == "ok":
|
| 261 |
+
return result["payload"]
|
| 262 |
+
if result["status"] == "not_found":
|
| 263 |
+
return None
|
| 264 |
+
raise RuntimeError(f"Failed request for {url}: {result['detail']}")
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
def load_manifest(
|
| 268 |
+
smiles_csv: Path,
|
| 269 |
+
inchikey_csv: Path,
|
| 270 |
+
) -> list[dict[str, str]]:
|
| 271 |
+
manifest: dict[str, dict[str, str]] = {}
|
| 272 |
+
|
| 273 |
+
with smiles_csv.open("r", encoding="utf-8-sig", newline="") as handle:
|
| 274 |
+
reader = csv.DictReader(handle)
|
| 275 |
+
for row in reader:
|
| 276 |
+
file_name = (row.get("file_name") or "").strip()
|
| 277 |
+
if not file_name:
|
| 278 |
+
continue
|
| 279 |
+
compound_name = Path(file_name).stem
|
| 280 |
+
manifest[compound_name] = {
|
| 281 |
+
"compound_name": compound_name,
|
| 282 |
+
"file_name": file_name,
|
| 283 |
+
"smiles": (row.get("smiles") or "").strip(),
|
| 284 |
+
"inchikey": "",
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
with inchikey_csv.open("r", encoding="utf-8-sig", newline="") as handle:
|
| 288 |
+
reader = csv.DictReader(handle)
|
| 289 |
+
for row in reader:
|
| 290 |
+
file_name = (row.get("file_name") or "").strip()
|
| 291 |
+
if not file_name:
|
| 292 |
+
continue
|
| 293 |
+
compound_name = Path(file_name).stem
|
| 294 |
+
entry = manifest.setdefault(
|
| 295 |
+
compound_name,
|
| 296 |
+
{
|
| 297 |
+
"compound_name": compound_name,
|
| 298 |
+
"file_name": file_name,
|
| 299 |
+
"smiles": "",
|
| 300 |
+
"inchikey": "",
|
| 301 |
+
},
|
| 302 |
+
)
|
| 303 |
+
entry["inchikey"] = (row.get("inchikey") or "").strip()
|
| 304 |
+
|
| 305 |
+
return list(manifest.values())
|
| 306 |
+
|
| 307 |
+
|
| 308 |
+
def direct_cid_from_name(compound_name: str) -> int | None:
|
| 309 |
+
match = re.fullmatch(r"CID_(\d+)", compound_name)
|
| 310 |
+
if not match:
|
| 311 |
+
return None
|
| 312 |
+
return int(match.group(1))
|
| 313 |
+
|
| 314 |
+
|
| 315 |
+
def cache_path(root: Path, namespace: str, key: str) -> Path:
|
| 316 |
+
return root / namespace / f"{key}.json"
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
def read_json_cache(path: Path) -> dict[str, Any] | None:
|
| 320 |
+
if not path.exists():
|
| 321 |
+
return None
|
| 322 |
+
try:
|
| 323 |
+
payload = json.loads(path.read_text(encoding="utf-8"))
|
| 324 |
+
if payload.get("cache_version") != CACHE_VERSION:
|
| 325 |
+
return None
|
| 326 |
+
return payload
|
| 327 |
+
except Exception:
|
| 328 |
+
return None
|
| 329 |
+
|
| 330 |
+
|
| 331 |
+
def write_json_cache(path: Path, payload: dict[str, Any]) -> None:
|
| 332 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 333 |
+
tmp_path = path.with_suffix(f"{path.suffix}.{os.getpid()}.{threading.get_ident()}.tmp")
|
| 334 |
+
payload = {"cache_version": CACHE_VERSION, **payload}
|
| 335 |
+
tmp_path.write_text(
|
| 336 |
+
json.dumps(payload, ensure_ascii=False, indent=2),
|
| 337 |
+
encoding="utf-8",
|
| 338 |
+
)
|
| 339 |
+
os.replace(tmp_path, path)
|
| 340 |
+
|
| 341 |
+
|
| 342 |
+
def lookup_cids_by_smiles(smiles: str, args: argparse.Namespace) -> dict[str, Any]:
|
| 343 |
+
result = request_json_with_meta(
|
| 344 |
+
f"{PUG_REST_BASE}/compound/smiles/cids/JSON",
|
| 345 |
+
method="POST",
|
| 346 |
+
data={"smiles": smiles},
|
| 347 |
+
timeout=args.timeout,
|
| 348 |
+
retries=args.retries,
|
| 349 |
+
retry_backoff=args.retry_backoff,
|
| 350 |
+
)
|
| 351 |
+
payload = result.get("payload") or {}
|
| 352 |
+
cid_candidates = [
|
| 353 |
+
int(cid)
|
| 354 |
+
for cid in payload.get("IdentifierList", {}).get("CID", [])
|
| 355 |
+
]
|
| 356 |
+
detail = result["detail"]
|
| 357 |
+
if result["status"] == "ok" and not cid_candidates:
|
| 358 |
+
detail = "http_200_empty"
|
| 359 |
+
return {
|
| 360 |
+
"source": "smiles",
|
| 361 |
+
"status": result["status"],
|
| 362 |
+
"detail": detail,
|
| 363 |
+
"cid_candidates": cid_candidates,
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
|
| 367 |
+
def lookup_cids_by_inchikey(
|
| 368 |
+
inchikey: str,
|
| 369 |
+
args: argparse.Namespace,
|
| 370 |
+
) -> dict[str, Any]:
|
| 371 |
+
result = request_json_with_meta(
|
| 372 |
+
f"{PUG_REST_BASE}/compound/inchikey/{inchikey}/cids/JSON",
|
| 373 |
+
timeout=args.timeout,
|
| 374 |
+
retries=args.retries,
|
| 375 |
+
retry_backoff=args.retry_backoff,
|
| 376 |
+
)
|
| 377 |
+
payload = result.get("payload") or {}
|
| 378 |
+
cid_candidates = [
|
| 379 |
+
int(cid)
|
| 380 |
+
for cid in payload.get("IdentifierList", {}).get("CID", [])
|
| 381 |
+
]
|
| 382 |
+
detail = result["detail"]
|
| 383 |
+
if result["status"] == "ok" and not cid_candidates:
|
| 384 |
+
detail = "http_200_empty"
|
| 385 |
+
return {
|
| 386 |
+
"source": "inchikey",
|
| 387 |
+
"status": result["status"],
|
| 388 |
+
"detail": detail,
|
| 389 |
+
"cid_candidates": cid_candidates,
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
|
| 393 |
+
def bucket_texts_have_content(bucket_texts: dict[str, str]) -> bool:
|
| 394 |
+
return any(
|
| 395 |
+
(bucket_texts.get(key) or "").strip()
|
| 396 |
+
for key in ("indication", "treatment", "safety", "fallback")
|
| 397 |
+
)
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
def normalize_lookup_cache(
|
| 401 |
+
payload: dict[str, Any],
|
| 402 |
+
*,
|
| 403 |
+
allow_legacy_empty: bool,
|
| 404 |
+
) -> dict[str, Any] | None:
|
| 405 |
+
normalized = {
|
| 406 |
+
"compound_name": str(payload.get("compound_name") or ""),
|
| 407 |
+
"lookup_source": str(payload.get("lookup_source") or ""),
|
| 408 |
+
"cid_candidates": [int(cid) for cid in payload.get("cid_candidates", [])],
|
| 409 |
+
}
|
| 410 |
+
lookup_status = str(payload.get("lookup_status") or "").strip()
|
| 411 |
+
lookup_detail = str(payload.get("lookup_detail") or "").strip()
|
| 412 |
+
|
| 413 |
+
if lookup_status:
|
| 414 |
+
normalized["lookup_status"] = lookup_status
|
| 415 |
+
normalized["lookup_detail"] = lookup_detail
|
| 416 |
+
return normalized
|
| 417 |
+
|
| 418 |
+
if normalized["cid_candidates"]:
|
| 419 |
+
normalized["lookup_status"] = "ok"
|
| 420 |
+
normalized["lookup_detail"] = ""
|
| 421 |
+
return normalized
|
| 422 |
+
|
| 423 |
+
if allow_legacy_empty:
|
| 424 |
+
normalized["lookup_status"] = "legacy_empty_cache_unknown"
|
| 425 |
+
normalized["lookup_detail"] = (
|
| 426 |
+
"legacy empty cid_lookup cache without status metadata"
|
| 427 |
+
)
|
| 428 |
+
return normalized
|
| 429 |
+
|
| 430 |
+
return None
|
| 431 |
+
|
| 432 |
+
|
| 433 |
+
def normalize_bucket_payload(
|
| 434 |
+
payload: dict[str, Any],
|
| 435 |
+
*,
|
| 436 |
+
allow_legacy_empty: bool,
|
| 437 |
+
) -> dict[str, Any] | None:
|
| 438 |
+
bucket_texts = payload.get("bucket_texts") or {}
|
| 439 |
+
normalized_bucket_texts = {
|
| 440 |
+
"indication": str(bucket_texts.get("indication") or ""),
|
| 441 |
+
"treatment": str(bucket_texts.get("treatment") or ""),
|
| 442 |
+
"safety": str(bucket_texts.get("safety") or ""),
|
| 443 |
+
"fallback": str(bucket_texts.get("fallback") or ""),
|
| 444 |
+
}
|
| 445 |
+
filled_count, total_chars = score_bucket_texts(normalized_bucket_texts)
|
| 446 |
+
normalized = {
|
| 447 |
+
"cid": payload.get("cid"),
|
| 448 |
+
"bucket_texts": normalized_bucket_texts,
|
| 449 |
+
"filled_bucket_count": filled_count,
|
| 450 |
+
"total_chars": total_chars,
|
| 451 |
+
}
|
| 452 |
+
text_status = str(payload.get("text_status") or "").strip()
|
| 453 |
+
status_detail = str(payload.get("status_detail") or "").strip()
|
| 454 |
+
|
| 455 |
+
if text_status:
|
| 456 |
+
normalized["text_status"] = text_status
|
| 457 |
+
normalized["status_detail"] = status_detail
|
| 458 |
+
return normalized
|
| 459 |
+
|
| 460 |
+
if bucket_texts_have_content(normalized_bucket_texts):
|
| 461 |
+
normalized["text_status"] = "ok"
|
| 462 |
+
normalized["status_detail"] = ""
|
| 463 |
+
return normalized
|
| 464 |
+
|
| 465 |
+
if allow_legacy_empty:
|
| 466 |
+
normalized["text_status"] = "legacy_empty_cache_unknown"
|
| 467 |
+
normalized["status_detail"] = (
|
| 468 |
+
"legacy empty cid_text cache without status metadata"
|
| 469 |
+
)
|
| 470 |
+
return normalized
|
| 471 |
+
|
| 472 |
+
return None
|
| 473 |
+
|
| 474 |
+
|
| 475 |
+
def summarize_lookup_attempts(attempts: list[dict[str, Any]]) -> tuple[str, str]:
|
| 476 |
+
if not attempts:
|
| 477 |
+
return "lookup_inputs_missing", "no smiles or inchikey available"
|
| 478 |
+
|
| 479 |
+
transient_details = [
|
| 480 |
+
f"{item['source']}:{item['detail']}"
|
| 481 |
+
for item in attempts
|
| 482 |
+
if item["status"] == "transient_error"
|
| 483 |
+
]
|
| 484 |
+
if transient_details:
|
| 485 |
+
return "cid_lookup_transient_error", "; ".join(transient_details)
|
| 486 |
+
|
| 487 |
+
error_details = [
|
| 488 |
+
f"{item['source']}:{item['detail']}"
|
| 489 |
+
for item in attempts
|
| 490 |
+
if item["status"] == "error"
|
| 491 |
+
]
|
| 492 |
+
if error_details:
|
| 493 |
+
return "cid_lookup_error", "; ".join(error_details)
|
| 494 |
+
|
| 495 |
+
miss_details = [
|
| 496 |
+
f"{item['source']}:{item['detail']}"
|
| 497 |
+
for item in attempts
|
| 498 |
+
]
|
| 499 |
+
return "cid_lookup_no_match", "; ".join(miss_details)
|
| 500 |
+
|
| 501 |
+
|
| 502 |
+
def resolve_candidates(
|
| 503 |
+
record: dict[str, str],
|
| 504 |
+
args: argparse.Namespace,
|
| 505 |
+
) -> dict[str, Any]:
|
| 506 |
+
direct_cid = direct_cid_from_name(record["compound_name"])
|
| 507 |
+
if direct_cid is not None:
|
| 508 |
+
return {
|
| 509 |
+
"compound_name": record["compound_name"],
|
| 510 |
+
"lookup_source": "filename_cid",
|
| 511 |
+
"lookup_status": "ok",
|
| 512 |
+
"lookup_detail": "",
|
| 513 |
+
"cid_candidates": [direct_cid],
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
key = record["compound_name"]
|
| 517 |
+
path = cache_path(args.cache_dir, "cid_lookup", key)
|
| 518 |
+
cached = read_json_cache(path)
|
| 519 |
+
if cached is not None:
|
| 520 |
+
normalized = normalize_lookup_cache(
|
| 521 |
+
cached,
|
| 522 |
+
allow_legacy_empty=args.offline_cache_only,
|
| 523 |
+
)
|
| 524 |
+
if normalized is not None:
|
| 525 |
+
return normalized
|
| 526 |
+
|
| 527 |
+
if args.offline_cache_only:
|
| 528 |
+
return {
|
| 529 |
+
"compound_name": record["compound_name"],
|
| 530 |
+
"lookup_source": "offline_cache_miss",
|
| 531 |
+
"lookup_status": "offline_cache_miss",
|
| 532 |
+
"lookup_detail": "cid lookup cache missing in offline mode",
|
| 533 |
+
"cid_candidates": [],
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
attempts: list[dict[str, Any]] = []
|
| 537 |
+
|
| 538 |
+
smiles = record.get("smiles", "")
|
| 539 |
+
if smiles:
|
| 540 |
+
smiles_result = lookup_cids_by_smiles(smiles, args)
|
| 541 |
+
attempts.append(smiles_result)
|
| 542 |
+
if smiles_result["cid_candidates"]:
|
| 543 |
+
payload = {
|
| 544 |
+
"compound_name": record["compound_name"],
|
| 545 |
+
"lookup_source": "smiles",
|
| 546 |
+
"lookup_status": "ok",
|
| 547 |
+
"lookup_detail": "",
|
| 548 |
+
"cid_candidates": smiles_result["cid_candidates"],
|
| 549 |
+
}
|
| 550 |
+
write_json_cache(path, payload)
|
| 551 |
+
return payload
|
| 552 |
+
|
| 553 |
+
inchikey = record.get("inchikey", "")
|
| 554 |
+
if inchikey:
|
| 555 |
+
inchikey_result = lookup_cids_by_inchikey(inchikey, args)
|
| 556 |
+
attempts.append(inchikey_result)
|
| 557 |
+
if inchikey_result["cid_candidates"]:
|
| 558 |
+
payload = {
|
| 559 |
+
"compound_name": record["compound_name"],
|
| 560 |
+
"lookup_source": "inchikey",
|
| 561 |
+
"lookup_status": "ok",
|
| 562 |
+
"lookup_detail": "",
|
| 563 |
+
"cid_candidates": inchikey_result["cid_candidates"],
|
| 564 |
+
}
|
| 565 |
+
write_json_cache(path, payload)
|
| 566 |
+
return payload
|
| 567 |
+
|
| 568 |
+
lookup_status, lookup_detail = summarize_lookup_attempts(attempts)
|
| 569 |
+
|
| 570 |
+
payload = {
|
| 571 |
+
"compound_name": record["compound_name"],
|
| 572 |
+
"lookup_source": attempts[-1]["source"] if attempts else "unresolved",
|
| 573 |
+
"lookup_status": lookup_status,
|
| 574 |
+
"lookup_detail": lookup_detail,
|
| 575 |
+
"cid_candidates": [],
|
| 576 |
+
}
|
| 577 |
+
if lookup_status in {"cid_lookup_no_match", "lookup_inputs_missing"}:
|
| 578 |
+
write_json_cache(path, payload)
|
| 579 |
+
return payload
|
| 580 |
+
|
| 581 |
+
|
| 582 |
+
def fetch_section_by_heading(
|
| 583 |
+
cid: int,
|
| 584 |
+
heading: str,
|
| 585 |
+
args: argparse.Namespace,
|
| 586 |
+
) -> dict[str, Any]:
|
| 587 |
+
result = request_json_with_meta(
|
| 588 |
+
f"{PUG_VIEW_BASE}/{cid}/JSON",
|
| 589 |
+
params={"heading": heading},
|
| 590 |
+
timeout=args.timeout,
|
| 591 |
+
retries=args.retries,
|
| 592 |
+
retry_backoff=args.retry_backoff,
|
| 593 |
+
)
|
| 594 |
+
if result["status"] != "ok":
|
| 595 |
+
return {
|
| 596 |
+
"heading": heading,
|
| 597 |
+
"status": result["status"],
|
| 598 |
+
"detail": result["detail"],
|
| 599 |
+
"section": None,
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
payload = result.get("payload") or {}
|
| 603 |
+
sections = payload.get("Record", {}).get("Section", [])
|
| 604 |
+
section = sections[0] if sections else None
|
| 605 |
+
if section is None:
|
| 606 |
+
return {
|
| 607 |
+
"heading": heading,
|
| 608 |
+
"status": "not_found",
|
| 609 |
+
"detail": "no_section",
|
| 610 |
+
"section": None,
|
| 611 |
+
}
|
| 612 |
+
|
| 613 |
+
return {
|
| 614 |
+
"heading": heading,
|
| 615 |
+
"status": "ok",
|
| 616 |
+
"detail": "",
|
| 617 |
+
"section": section,
|
| 618 |
+
}
|
| 619 |
+
|
| 620 |
+
|
| 621 |
+
def find_sections_by_heading(
|
| 622 |
+
section: dict[str, Any] | None,
|
| 623 |
+
target_heading: str,
|
| 624 |
+
) -> list[dict[str, Any]]:
|
| 625 |
+
if not section:
|
| 626 |
+
return []
|
| 627 |
+
|
| 628 |
+
matches: list[dict[str, Any]] = []
|
| 629 |
+
|
| 630 |
+
def walk(node: dict[str, Any]) -> None:
|
| 631 |
+
if node.get("TOCHeading") == target_heading:
|
| 632 |
+
matches.append(node)
|
| 633 |
+
for child in node.get("Section", []) or []:
|
| 634 |
+
walk(child)
|
| 635 |
+
|
| 636 |
+
walk(section)
|
| 637 |
+
return matches
|
| 638 |
+
|
| 639 |
+
|
| 640 |
+
def value_to_strings(value: Any) -> list[str]:
|
| 641 |
+
texts: list[str] = []
|
| 642 |
+
|
| 643 |
+
if isinstance(value, dict):
|
| 644 |
+
if "ExternalTableName" in value:
|
| 645 |
+
return []
|
| 646 |
+
if "StringWithMarkup" in value:
|
| 647 |
+
for item in value.get("StringWithMarkup", []) or []:
|
| 648 |
+
text = (item or {}).get("String")
|
| 649 |
+
if isinstance(text, str) and text.strip():
|
| 650 |
+
texts.append(text)
|
| 651 |
+
return texts
|
| 652 |
+
if "String" in value and isinstance(value.get("String"), str):
|
| 653 |
+
text = value["String"].strip()
|
| 654 |
+
if text:
|
| 655 |
+
texts.append(text)
|
| 656 |
+
return texts
|
| 657 |
+
if "Number" in value:
|
| 658 |
+
number = str(value["Number"]).strip()
|
| 659 |
+
unit = str(value.get("Unit", "")).strip()
|
| 660 |
+
texts.append(f"{number} {unit}".strip())
|
| 661 |
+
return texts
|
| 662 |
+
for child in value.values():
|
| 663 |
+
texts.extend(value_to_strings(child))
|
| 664 |
+
return texts
|
| 665 |
+
|
| 666 |
+
if isinstance(value, list):
|
| 667 |
+
for item in value:
|
| 668 |
+
texts.extend(value_to_strings(item))
|
| 669 |
+
return texts
|
| 670 |
+
|
| 671 |
+
if isinstance(value, str):
|
| 672 |
+
stripped = value.strip()
|
| 673 |
+
if stripped:
|
| 674 |
+
texts.append(stripped)
|
| 675 |
+
|
| 676 |
+
return texts
|
| 677 |
+
|
| 678 |
+
|
| 679 |
+
def clean_pubchem_text(text: str) -> str:
|
| 680 |
+
text = text.replace("\r", " ").replace("\n", " ")
|
| 681 |
+
text = text.replace("\u200b", " ")
|
| 682 |
+
text = re.sub(r"\*\*(.*?)\*\*", r"\1", text)
|
| 683 |
+
text = re.sub(r"_(.*?)_", r"\1", text)
|
| 684 |
+
text = re.sub(r"\s+", " ", text)
|
| 685 |
+
return text.strip()
|
| 686 |
+
|
| 687 |
+
|
| 688 |
+
def is_low_value_text(text: str) -> bool:
|
| 689 |
+
if re.fullmatch(r"PubMed:\s*[\d,\s;/-]+", text, flags=re.IGNORECASE):
|
| 690 |
+
return True
|
| 691 |
+
if re.fullmatch(r"PMID:\s*[\d,\s;/-]+", text, flags=re.IGNORECASE):
|
| 692 |
+
return True
|
| 693 |
+
return False
|
| 694 |
+
|
| 695 |
+
|
| 696 |
+
def extract_text_from_section(section: dict[str, Any]) -> list[str]:
|
| 697 |
+
texts: list[str] = []
|
| 698 |
+
seen: set[str] = set()
|
| 699 |
+
|
| 700 |
+
def walk(node: dict[str, Any]) -> None:
|
| 701 |
+
for info in node.get("Information", []) or []:
|
| 702 |
+
if info.get("URL"):
|
| 703 |
+
continue
|
| 704 |
+
raw_value = info.get("Value")
|
| 705 |
+
for text in value_to_strings(raw_value):
|
| 706 |
+
cleaned = clean_pubchem_text(text)
|
| 707 |
+
if cleaned and not is_low_value_text(cleaned) and cleaned not in seen:
|
| 708 |
+
seen.add(cleaned)
|
| 709 |
+
texts.append(cleaned)
|
| 710 |
+
for child in node.get("Section", []) or []:
|
| 711 |
+
walk(child)
|
| 712 |
+
|
| 713 |
+
walk(section)
|
| 714 |
+
return texts
|
| 715 |
+
|
| 716 |
+
|
| 717 |
+
def truncate_text(text: str, max_chars: int) -> str:
|
| 718 |
+
if max_chars <= 0 or len(text) <= max_chars:
|
| 719 |
+
return text
|
| 720 |
+
|
| 721 |
+
clipped = text[:max_chars].rstrip()
|
| 722 |
+
split_at = max(
|
| 723 |
+
clipped.rfind(". "),
|
| 724 |
+
clipped.rfind("; "),
|
| 725 |
+
clipped.rfind(": "),
|
| 726 |
+
)
|
| 727 |
+
if split_at >= int(max_chars * 0.6):
|
| 728 |
+
clipped = clipped[: split_at + 1].rstrip()
|
| 729 |
+
return f"{clipped} ..."
|
| 730 |
+
|
| 731 |
+
|
| 732 |
+
def collect_heading_text(
|
| 733 |
+
sections_by_heading: dict[str, dict[str, Any]],
|
| 734 |
+
headings: tuple[str, ...],
|
| 735 |
+
max_chars: int,
|
| 736 |
+
) -> str:
|
| 737 |
+
fragments: list[str] = []
|
| 738 |
+
seen: set[str] = set()
|
| 739 |
+
|
| 740 |
+
for root_section in sections_by_heading.values():
|
| 741 |
+
for heading in headings:
|
| 742 |
+
for section in find_sections_by_heading(root_section, heading):
|
| 743 |
+
for text in extract_text_from_section(section):
|
| 744 |
+
if text not in seen:
|
| 745 |
+
seen.add(text)
|
| 746 |
+
fragments.append(text)
|
| 747 |
+
|
| 748 |
+
return truncate_text(" ".join(fragments), max_chars)
|
| 749 |
+
|
| 750 |
+
|
| 751 |
+
def score_bucket_texts(bucket_texts: dict[str, str]) -> tuple[int, int]:
|
| 752 |
+
filled_count = sum(1 for value in bucket_texts.values() if value)
|
| 753 |
+
total_chars = sum(len(value) for value in bucket_texts.values())
|
| 754 |
+
return filled_count, total_chars
|
| 755 |
+
|
| 756 |
+
|
| 757 |
+
def empty_bucket_payload(
|
| 758 |
+
cid: int | None,
|
| 759 |
+
*,
|
| 760 |
+
text_status: str = "no_relevant_text",
|
| 761 |
+
status_detail: str = "",
|
| 762 |
+
) -> dict[str, Any]:
|
| 763 |
+
bucket_texts = {
|
| 764 |
+
"indication": "",
|
| 765 |
+
"treatment": "",
|
| 766 |
+
"safety": "",
|
| 767 |
+
"fallback": "",
|
| 768 |
+
}
|
| 769 |
+
filled_count, total_chars = score_bucket_texts(bucket_texts)
|
| 770 |
+
return {
|
| 771 |
+
"cid": cid,
|
| 772 |
+
"bucket_texts": bucket_texts,
|
| 773 |
+
"filled_bucket_count": filled_count,
|
| 774 |
+
"total_chars": total_chars,
|
| 775 |
+
"text_status": text_status,
|
| 776 |
+
"status_detail": status_detail,
|
| 777 |
+
}
|
| 778 |
+
|
| 779 |
+
|
| 780 |
+
def fetch_bucket_texts_for_cid(cid: int, args: argparse.Namespace) -> dict[str, Any]:
|
| 781 |
+
path = cache_path(args.cache_dir, "cid_text", str(cid))
|
| 782 |
+
cached = read_json_cache(path)
|
| 783 |
+
if cached is not None:
|
| 784 |
+
normalized = normalize_bucket_payload(
|
| 785 |
+
cached,
|
| 786 |
+
allow_legacy_empty=args.offline_cache_only,
|
| 787 |
+
)
|
| 788 |
+
if normalized is not None:
|
| 789 |
+
return normalized
|
| 790 |
+
|
| 791 |
+
if args.offline_cache_only:
|
| 792 |
+
return empty_bucket_payload(
|
| 793 |
+
cid,
|
| 794 |
+
text_status="offline_cache_miss",
|
| 795 |
+
status_detail="cid text cache missing in offline mode",
|
| 796 |
+
)
|
| 797 |
+
|
| 798 |
+
fetched_sections: dict[str, dict[str, Any]] = {}
|
| 799 |
+
fetch_failures: list[dict[str, Any]] = []
|
| 800 |
+
for heading in TOP_LEVEL_HEADINGS:
|
| 801 |
+
result = fetch_section_by_heading(cid, heading, args)
|
| 802 |
+
if result["status"] == "ok" and result["section"] is not None:
|
| 803 |
+
fetched_sections[heading] = result["section"]
|
| 804 |
+
elif result["status"] in {"transient_error", "error"}:
|
| 805 |
+
fetch_failures.append(result)
|
| 806 |
+
|
| 807 |
+
bucket_texts = {
|
| 808 |
+
"indication": collect_heading_text(
|
| 809 |
+
fetched_sections,
|
| 810 |
+
INDICATION_HEADINGS[:1],
|
| 811 |
+
args.max_bucket_chars,
|
| 812 |
+
),
|
| 813 |
+
"treatment": collect_heading_text(
|
| 814 |
+
fetched_sections,
|
| 815 |
+
TREATMENT_HEADINGS,
|
| 816 |
+
args.max_bucket_chars,
|
| 817 |
+
),
|
| 818 |
+
"safety": collect_heading_text(
|
| 819 |
+
fetched_sections,
|
| 820 |
+
SAFETY_HEADINGS,
|
| 821 |
+
args.max_bucket_chars,
|
| 822 |
+
),
|
| 823 |
+
}
|
| 824 |
+
|
| 825 |
+
if not bucket_texts["indication"]:
|
| 826 |
+
disease_result = fetch_section_by_heading(
|
| 827 |
+
cid,
|
| 828 |
+
ASSOCIATED_DISEASE_HEADING,
|
| 829 |
+
args,
|
| 830 |
+
)
|
| 831 |
+
if (
|
| 832 |
+
disease_result["status"] == "ok"
|
| 833 |
+
and disease_result["section"] is not None
|
| 834 |
+
):
|
| 835 |
+
bucket_texts["indication"] = collect_heading_text(
|
| 836 |
+
{ASSOCIATED_DISEASE_HEADING: disease_result["section"]},
|
| 837 |
+
INDICATION_HEADINGS[1:],
|
| 838 |
+
args.max_bucket_chars,
|
| 839 |
+
)
|
| 840 |
+
elif disease_result["status"] in {"transient_error", "error"}:
|
| 841 |
+
fetch_failures.append(disease_result)
|
| 842 |
+
|
| 843 |
+
if (
|
| 844 |
+
args.include_record_description_fallback
|
| 845 |
+
and not any(bucket_texts.values())
|
| 846 |
+
):
|
| 847 |
+
record_description = fetch_section_by_heading(
|
| 848 |
+
cid,
|
| 849 |
+
RECORD_DESCRIPTION_HEADING,
|
| 850 |
+
args,
|
| 851 |
+
)
|
| 852 |
+
fallback_text = ""
|
| 853 |
+
if (
|
| 854 |
+
record_description["status"] == "ok"
|
| 855 |
+
and record_description["section"] is not None
|
| 856 |
+
):
|
| 857 |
+
fallback_text = collect_heading_text(
|
| 858 |
+
{RECORD_DESCRIPTION_HEADING: record_description["section"]},
|
| 859 |
+
(RECORD_DESCRIPTION_HEADING,),
|
| 860 |
+
args.max_bucket_chars,
|
| 861 |
+
)
|
| 862 |
+
elif record_description["status"] in {"transient_error", "error"}:
|
| 863 |
+
fetch_failures.append(record_description)
|
| 864 |
+
bucket_texts["fallback"] = fallback_text
|
| 865 |
+
else:
|
| 866 |
+
bucket_texts["fallback"] = ""
|
| 867 |
+
|
| 868 |
+
if bucket_texts_have_content(bucket_texts):
|
| 869 |
+
text_status = "ok"
|
| 870 |
+
status_detail = ""
|
| 871 |
+
elif any(item["status"] == "transient_error" for item in fetch_failures):
|
| 872 |
+
text_status = "pubchem_transient_error"
|
| 873 |
+
status_detail = "; ".join(
|
| 874 |
+
f"{item['heading']}:{item['detail']}"
|
| 875 |
+
for item in fetch_failures
|
| 876 |
+
if item["status"] == "transient_error"
|
| 877 |
+
)
|
| 878 |
+
elif fetch_failures:
|
| 879 |
+
text_status = "pubchem_fetch_error"
|
| 880 |
+
status_detail = "; ".join(
|
| 881 |
+
f"{item['heading']}:{item['detail']}"
|
| 882 |
+
for item in fetch_failures
|
| 883 |
+
)
|
| 884 |
+
else:
|
| 885 |
+
text_status = "no_relevant_text"
|
| 886 |
+
status_detail = "all target headings empty or 404"
|
| 887 |
+
|
| 888 |
+
filled_count, total_chars = score_bucket_texts(bucket_texts)
|
| 889 |
+
payload = {
|
| 890 |
+
"cid": cid,
|
| 891 |
+
"bucket_texts": bucket_texts,
|
| 892 |
+
"filled_bucket_count": filled_count,
|
| 893 |
+
"total_chars": total_chars,
|
| 894 |
+
"text_status": text_status,
|
| 895 |
+
"status_detail": status_detail,
|
| 896 |
+
}
|
| 897 |
+
if text_status in {"ok", "no_relevant_text"}:
|
| 898 |
+
write_json_cache(path, payload)
|
| 899 |
+
return payload
|
| 900 |
+
|
| 901 |
+
|
| 902 |
+
def format_description(bucket_texts: dict[str, str], max_total_chars: int) -> str:
|
| 903 |
+
parts: list[str] = []
|
| 904 |
+
|
| 905 |
+
indication = bucket_texts.get("indication", "").strip()
|
| 906 |
+
treatment = bucket_texts.get("treatment", "").strip()
|
| 907 |
+
safety = bucket_texts.get("safety", "").strip()
|
| 908 |
+
fallback = bucket_texts.get("fallback", "").strip()
|
| 909 |
+
|
| 910 |
+
if indication:
|
| 911 |
+
parts.append(f"Indication: {indication}")
|
| 912 |
+
if treatment:
|
| 913 |
+
parts.append(f"Treatment: {treatment}")
|
| 914 |
+
if safety:
|
| 915 |
+
parts.append(f"Safety: {safety}")
|
| 916 |
+
if fallback and not parts:
|
| 917 |
+
parts.append(f"General Description: {fallback}")
|
| 918 |
+
|
| 919 |
+
return truncate_text("\n".join(parts), max_total_chars)
|
| 920 |
+
|
| 921 |
+
|
| 922 |
+
def pick_best_cid(
|
| 923 |
+
candidate_cids: list[int],
|
| 924 |
+
args: argparse.Namespace,
|
| 925 |
+
) -> dict[str, Any]:
|
| 926 |
+
if not candidate_cids:
|
| 927 |
+
return empty_bucket_payload(
|
| 928 |
+
None,
|
| 929 |
+
text_status="cid_lookup_no_match",
|
| 930 |
+
status_detail="no CID candidates available",
|
| 931 |
+
)
|
| 932 |
+
|
| 933 |
+
best_ok_payload: dict[str, Any] | None = None
|
| 934 |
+
best_score: tuple[int, int] = (-1, -1)
|
| 935 |
+
best_uncertain_payload: dict[str, Any] | None = None
|
| 936 |
+
best_uncertain_rank = 999
|
| 937 |
+
no_text_payload: dict[str, Any] | None = None
|
| 938 |
+
uncertain_ranks = {
|
| 939 |
+
"pubchem_transient_error": 0,
|
| 940 |
+
"offline_cache_miss": 1,
|
| 941 |
+
"legacy_empty_cache_unknown": 2,
|
| 942 |
+
"pubchem_fetch_error": 3,
|
| 943 |
+
}
|
| 944 |
+
|
| 945 |
+
for cid in candidate_cids:
|
| 946 |
+
payload = fetch_bucket_texts_for_cid(cid, args)
|
| 947 |
+
status = str(payload.get("text_status") or "")
|
| 948 |
+
score = (
|
| 949 |
+
int(payload.get("filled_bucket_count", 0)),
|
| 950 |
+
int(payload.get("total_chars", 0)),
|
| 951 |
+
)
|
| 952 |
+
if status == "ok" and score > best_score:
|
| 953 |
+
best_score = score
|
| 954 |
+
best_ok_payload = payload
|
| 955 |
+
elif status == "no_relevant_text" and no_text_payload is None:
|
| 956 |
+
no_text_payload = payload
|
| 957 |
+
elif status in uncertain_ranks:
|
| 958 |
+
rank = uncertain_ranks[status]
|
| 959 |
+
if rank < best_uncertain_rank:
|
| 960 |
+
best_uncertain_rank = rank
|
| 961 |
+
best_uncertain_payload = payload
|
| 962 |
+
|
| 963 |
+
if best_ok_payload is not None:
|
| 964 |
+
return {
|
| 965 |
+
"cid": best_ok_payload["cid"],
|
| 966 |
+
"bucket_texts": best_ok_payload["bucket_texts"],
|
| 967 |
+
"filled_bucket_count": best_ok_payload["filled_bucket_count"],
|
| 968 |
+
"total_chars": best_ok_payload["total_chars"],
|
| 969 |
+
"text_status": best_ok_payload["text_status"],
|
| 970 |
+
"status_detail": best_ok_payload["status_detail"],
|
| 971 |
+
}
|
| 972 |
+
|
| 973 |
+
if best_uncertain_payload is not None:
|
| 974 |
+
return best_uncertain_payload
|
| 975 |
+
|
| 976 |
+
if no_text_payload is not None:
|
| 977 |
+
return no_text_payload
|
| 978 |
+
|
| 979 |
+
return empty_bucket_payload(None)
|
| 980 |
+
|
| 981 |
+
|
| 982 |
+
def process_record(
|
| 983 |
+
record: dict[str, str],
|
| 984 |
+
args: argparse.Namespace,
|
| 985 |
+
) -> dict[str, str]:
|
| 986 |
+
candidates = resolve_candidates(record, args)
|
| 987 |
+
selected_cids = candidates.get("cid_candidates", [])
|
| 988 |
+
selected = pick_best_cid(selected_cids, args)
|
| 989 |
+
pubchem_cid = ""
|
| 990 |
+
if selected.get("cid") is not None:
|
| 991 |
+
pubchem_cid = str(selected["cid"])
|
| 992 |
+
|
| 993 |
+
text_description = ""
|
| 994 |
+
text_status = ""
|
| 995 |
+
status_detail = ""
|
| 996 |
+
|
| 997 |
+
if selected_cids:
|
| 998 |
+
text_description = format_description(
|
| 999 |
+
selected["bucket_texts"],
|
| 1000 |
+
args.max_total_chars,
|
| 1001 |
+
)
|
| 1002 |
+
text_status = str(selected.get("text_status") or "")
|
| 1003 |
+
status_detail = str(selected.get("status_detail") or "")
|
| 1004 |
+
else:
|
| 1005 |
+
text_status = str(candidates.get("lookup_status") or "cid_lookup_no_match")
|
| 1006 |
+
status_detail = str(candidates.get("lookup_detail") or "")
|
| 1007 |
+
|
| 1008 |
+
return {
|
| 1009 |
+
"compound_name": record["compound_name"],
|
| 1010 |
+
"text_description": text_description,
|
| 1011 |
+
"text_status": text_status or ("ok" if text_description else "no_relevant_text"),
|
| 1012 |
+
"status_detail": status_detail,
|
| 1013 |
+
"pubchem_cid": pubchem_cid,
|
| 1014 |
+
}
|
| 1015 |
+
|
| 1016 |
+
|
| 1017 |
+
def write_output_csv(path: Path, rows: list[dict[str, str]]) -> None:
|
| 1018 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 1019 |
+
with path.open("w", encoding="utf-8-sig", newline="") as handle:
|
| 1020 |
+
writer = csv.DictWriter(
|
| 1021 |
+
handle,
|
| 1022 |
+
fieldnames=[
|
| 1023 |
+
"compound_name",
|
| 1024 |
+
"text_description",
|
| 1025 |
+
"text_status",
|
| 1026 |
+
"status_detail",
|
| 1027 |
+
"pubchem_cid",
|
| 1028 |
+
],
|
| 1029 |
+
)
|
| 1030 |
+
writer.writeheader()
|
| 1031 |
+
writer.writerows(rows)
|
| 1032 |
+
|
| 1033 |
+
|
| 1034 |
+
def main() -> None:
|
| 1035 |
+
args = parse_args()
|
| 1036 |
+
args.workers = max(1, args.workers)
|
| 1037 |
+
|
| 1038 |
+
manifest = load_manifest(args.smiles_csv, args.inchikey_csv)
|
| 1039 |
+
if args.limit is not None:
|
| 1040 |
+
manifest = manifest[: args.limit]
|
| 1041 |
+
|
| 1042 |
+
rows_by_name: dict[str, dict[str, str]] = {}
|
| 1043 |
+
with ThreadPoolExecutor(max_workers=args.workers) as executor:
|
| 1044 |
+
future_to_name = {
|
| 1045 |
+
executor.submit(process_record, record, args): record["compound_name"]
|
| 1046 |
+
for record in manifest
|
| 1047 |
+
}
|
| 1048 |
+
for future in tqdm(
|
| 1049 |
+
as_completed(future_to_name),
|
| 1050 |
+
total=len(future_to_name),
|
| 1051 |
+
desc="Building PubChem text table",
|
| 1052 |
+
):
|
| 1053 |
+
compound_name = future_to_name[future]
|
| 1054 |
+
try:
|
| 1055 |
+
rows_by_name[compound_name] = future.result()
|
| 1056 |
+
except Exception as exc:
|
| 1057 |
+
rows_by_name[compound_name] = {
|
| 1058 |
+
"compound_name": compound_name,
|
| 1059 |
+
"text_description": "",
|
| 1060 |
+
"text_status": "processing_error",
|
| 1061 |
+
"status_detail": str(exc),
|
| 1062 |
+
"pubchem_cid": "",
|
| 1063 |
+
}
|
| 1064 |
+
print(f"[WARN] {compound_name}: {exc}")
|
| 1065 |
+
|
| 1066 |
+
ordered_rows = [rows_by_name[record["compound_name"]] for record in manifest]
|
| 1067 |
+
write_output_csv(args.output, ordered_rows)
|
| 1068 |
+
|
| 1069 |
+
nonempty = sum(1 for row in ordered_rows if row["text_description"].strip())
|
| 1070 |
+
status_counts: dict[str, int] = {}
|
| 1071 |
+
for row in ordered_rows:
|
| 1072 |
+
status = row["text_status"]
|
| 1073 |
+
status_counts[status] = status_counts.get(status, 0) + 1
|
| 1074 |
+
|
| 1075 |
+
print("=== Done ===")
|
| 1076 |
+
print(f"Total compounds: {len(ordered_rows)}")
|
| 1077 |
+
print(f"Non-empty descriptions: {nonempty}")
|
| 1078 |
+
print(f"Empty descriptions: {len(ordered_rows) - nonempty}")
|
| 1079 |
+
print("Status counts:")
|
| 1080 |
+
for status in sorted(status_counts):
|
| 1081 |
+
print(f" {status}: {status_counts[status]}")
|
| 1082 |
+
print(f"Saved to: {args.output}")
|
| 1083 |
+
|
| 1084 |
+
|
| 1085 |
+
if __name__ == "__main__":
|
| 1086 |
+
main()
|
LLM/calc_pubchem_text_embedding_similarity.py
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import argparse
|
| 7 |
+
import csv
|
| 8 |
+
import json
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
from typing import Any
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
import numpy as np
|
| 14 |
+
except ImportError as exc:
|
| 15 |
+
raise SystemExit(
|
| 16 |
+
"numpy is required for this script. Re-run with "
|
| 17 |
+
"/home/yanganqi/miniconda3/envs/knn_env/bin/python."
|
| 18 |
+
) from exc
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
DEFAULT_TEXT_CSV = Path(
|
| 22 |
+
"/mnt/disk1/yanganqi/QQCM/LLM/pubchem_drug_text_export/pubchem_drug_texts.csv"
|
| 23 |
+
)
|
| 24 |
+
DEFAULT_EMBEDDING_DIR = Path(
|
| 25 |
+
"/mnt/disk1/yanganqi/QQCM/LLM/pubchem_drug_embedding_export"
|
| 26 |
+
)
|
| 27 |
+
DEFAULT_EMBEDDING_CSV = DEFAULT_EMBEDDING_DIR / "pubchem_drug_text_embeddings.csv"
|
| 28 |
+
DEFAULT_ALL_EMBEDDINGS_TSV = DEFAULT_EMBEDDING_DIR / "pubchem_drug_all_compound_embeddings.tsv"
|
| 29 |
+
DEFAULT_SIMILARITY_CSV = DEFAULT_EMBEDDING_DIR / "pubchem_drug_text_cosine_similarity.csv"
|
| 30 |
+
DEFAULT_SUMMARY_JSON = DEFAULT_EMBEDDING_DIR / "summary.json"
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def parse_args() -> argparse.Namespace:
|
| 34 |
+
parser = argparse.ArgumentParser(
|
| 35 |
+
description=(
|
| 36 |
+
"Build a full all-compound embedding table and cosine similarity matrix "
|
| 37 |
+
"from PubChem drug text embeddings. Compounds without text embeddings are "
|
| 38 |
+
"zero-filled so every structure-file stem is included."
|
| 39 |
+
)
|
| 40 |
+
)
|
| 41 |
+
parser.add_argument("--text-csv", type=Path, default=DEFAULT_TEXT_CSV)
|
| 42 |
+
parser.add_argument("--embedding-csv", type=Path, default=DEFAULT_EMBEDDING_CSV)
|
| 43 |
+
parser.add_argument("--all-embeddings-output", type=Path, default=DEFAULT_ALL_EMBEDDINGS_TSV)
|
| 44 |
+
parser.add_argument("--similarity-output", type=Path, default=DEFAULT_SIMILARITY_CSV)
|
| 45 |
+
parser.add_argument("--summary-output", type=Path, default=DEFAULT_SUMMARY_JSON)
|
| 46 |
+
return parser.parse_args()
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def normalize_row(row: dict[str, Any]) -> dict[str, str]:
|
| 50 |
+
normalized: dict[str, str] = {}
|
| 51 |
+
for key, value in row.items():
|
| 52 |
+
clean_key = key.lstrip("\ufeff") if key is not None else ""
|
| 53 |
+
normalized[clean_key] = "" if value is None else str(value)
|
| 54 |
+
return normalized
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def read_csv_rows(path: Path) -> tuple[list[str], list[dict[str, str]]]:
|
| 58 |
+
with path.open("r", encoding="utf-8-sig", newline="") as handle:
|
| 59 |
+
reader = csv.DictReader(handle)
|
| 60 |
+
fieldnames = list(reader.fieldnames or [])
|
| 61 |
+
rows = [normalize_row(row) for row in reader]
|
| 62 |
+
return fieldnames, rows
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
def load_embedding_map(path: Path) -> tuple[dict[str, dict[str, Any]], int]:
|
| 66 |
+
fieldnames, rows = read_csv_rows(path)
|
| 67 |
+
embedding_fields = [field for field in fieldnames if field.startswith("emb_")]
|
| 68 |
+
if not embedding_fields:
|
| 69 |
+
raise SystemExit(f"No embedding columns found in {path}")
|
| 70 |
+
|
| 71 |
+
embedding_map: dict[str, dict[str, Any]] = {}
|
| 72 |
+
for row in rows:
|
| 73 |
+
compound_name = (row.get("compound_name") or "").strip()
|
| 74 |
+
if not compound_name:
|
| 75 |
+
continue
|
| 76 |
+
embedding = np.asarray(
|
| 77 |
+
[float(row[field]) for field in embedding_fields],
|
| 78 |
+
dtype=np.float32,
|
| 79 |
+
)
|
| 80 |
+
embedding_map[compound_name] = {
|
| 81 |
+
"embedding": embedding,
|
| 82 |
+
"provider": (row.get("embedding_provider") or "").strip(),
|
| 83 |
+
"model": (row.get("embedding_model") or "").strip(),
|
| 84 |
+
}
|
| 85 |
+
return embedding_map, len(embedding_fields)
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def build_full_embedding_table(
|
| 89 |
+
text_rows: list[dict[str, str]],
|
| 90 |
+
embedding_map: dict[str, dict[str, Any]],
|
| 91 |
+
embedding_dim: int,
|
| 92 |
+
) -> tuple[list[dict[str, str]], np.ndarray, dict[str, Any]]:
|
| 93 |
+
matrix = np.zeros((len(text_rows), embedding_dim), dtype=np.float32)
|
| 94 |
+
all_rows: list[dict[str, str]] = []
|
| 95 |
+
|
| 96 |
+
compounds_with_text = 0
|
| 97 |
+
compounds_with_embedding = 0
|
| 98 |
+
zero_filled_missing_text = 0
|
| 99 |
+
zero_filled_missing_embedding = 0
|
| 100 |
+
providers: set[str] = set()
|
| 101 |
+
models: set[str] = set()
|
| 102 |
+
|
| 103 |
+
for index, row in enumerate(text_rows):
|
| 104 |
+
compound_name = (row.get("compound_name") or "").strip()
|
| 105 |
+
text_description = (row.get("text_description") or "").strip()
|
| 106 |
+
text_status = (row.get("text_status") or "").strip()
|
| 107 |
+
pubchem_cid = (row.get("pubchem_cid") or "").strip()
|
| 108 |
+
has_text = bool(text_description)
|
| 109 |
+
if has_text:
|
| 110 |
+
compounds_with_text += 1
|
| 111 |
+
|
| 112 |
+
embedding_record = embedding_map.get(compound_name)
|
| 113 |
+
if embedding_record is not None:
|
| 114 |
+
matrix[index] = embedding_record["embedding"]
|
| 115 |
+
compounds_with_embedding += 1
|
| 116 |
+
providers.add(embedding_record["provider"])
|
| 117 |
+
models.add(embedding_record["model"])
|
| 118 |
+
vector_source = "text_embedding"
|
| 119 |
+
embedding_available = "true"
|
| 120 |
+
zero_filled = "false"
|
| 121 |
+
else:
|
| 122 |
+
if has_text:
|
| 123 |
+
zero_filled_missing_embedding += 1
|
| 124 |
+
vector_source = "zero_fill_missing_embedding"
|
| 125 |
+
else:
|
| 126 |
+
zero_filled_missing_text += 1
|
| 127 |
+
vector_source = "zero_fill_missing_text"
|
| 128 |
+
embedding_available = "false"
|
| 129 |
+
zero_filled = "true"
|
| 130 |
+
|
| 131 |
+
all_rows.append(
|
| 132 |
+
{
|
| 133 |
+
"compound_name": compound_name,
|
| 134 |
+
"text_status": text_status,
|
| 135 |
+
"pubchem_cid": pubchem_cid,
|
| 136 |
+
"has_text": str(has_text).lower(),
|
| 137 |
+
"embedding_available": embedding_available,
|
| 138 |
+
"zero_filled": zero_filled,
|
| 139 |
+
"vector_source": vector_source,
|
| 140 |
+
}
|
| 141 |
+
)
|
| 142 |
+
|
| 143 |
+
summary = {
|
| 144 |
+
"total_compounds": len(text_rows),
|
| 145 |
+
"compounds_with_text": compounds_with_text,
|
| 146 |
+
"compounds_with_embedding": compounds_with_embedding,
|
| 147 |
+
"zero_filled_missing_text": zero_filled_missing_text,
|
| 148 |
+
"zero_filled_missing_embedding": zero_filled_missing_embedding,
|
| 149 |
+
"embedding_dim": embedding_dim,
|
| 150 |
+
"embedding_providers": sorted(item for item in providers if item),
|
| 151 |
+
"embedding_models": sorted(item for item in models if item),
|
| 152 |
+
}
|
| 153 |
+
return all_rows, matrix, summary
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
def write_all_embeddings(path: Path, rows: list[dict[str, str]], matrix: np.ndarray) -> None:
|
| 157 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 158 |
+
fieldnames = list(rows[0].keys()) + [f"emb_{idx}" for idx in range(matrix.shape[1])]
|
| 159 |
+
with path.open("w", encoding="utf-8", newline="") as handle:
|
| 160 |
+
writer = csv.DictWriter(handle, fieldnames=fieldnames, delimiter="\t")
|
| 161 |
+
writer.writeheader()
|
| 162 |
+
for row, vector in zip(rows, matrix):
|
| 163 |
+
record = dict(row)
|
| 164 |
+
for idx, value in enumerate(vector):
|
| 165 |
+
record[f"emb_{idx}"] = f"{float(value):.8f}"
|
| 166 |
+
writer.writerow(record)
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
def cosine_similarity_matrix(matrix: np.ndarray) -> np.ndarray:
|
| 170 |
+
norms = np.linalg.norm(matrix, axis=1)
|
| 171 |
+
normalized = np.zeros_like(matrix, dtype=np.float32)
|
| 172 |
+
nonzero_mask = norms > 0
|
| 173 |
+
normalized[nonzero_mask] = matrix[nonzero_mask] / norms[nonzero_mask, None]
|
| 174 |
+
similarity = normalized @ normalized.T
|
| 175 |
+
np.clip(similarity, -1.0, 1.0, out=similarity)
|
| 176 |
+
return similarity.astype(np.float32, copy=False)
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
def write_similarity_csv(path: Path, compound_names: list[str], similarity: np.ndarray) -> None:
|
| 180 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 181 |
+
with path.open("w", encoding="utf-8-sig", newline="") as handle:
|
| 182 |
+
writer = csv.writer(handle)
|
| 183 |
+
writer.writerow(["compound_name", *compound_names])
|
| 184 |
+
for compound_name, sim_row in zip(compound_names, similarity):
|
| 185 |
+
writer.writerow([compound_name, *[f"{float(value):.6f}" for value in sim_row]])
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
def write_summary(path: Path, payload: dict[str, Any]) -> None:
|
| 189 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 190 |
+
path.write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def main() -> None:
|
| 194 |
+
args = parse_args()
|
| 195 |
+
_, text_rows = read_csv_rows(args.text_csv)
|
| 196 |
+
embedding_map, embedding_dim = load_embedding_map(args.embedding_csv)
|
| 197 |
+
|
| 198 |
+
all_rows, matrix, summary = build_full_embedding_table(
|
| 199 |
+
text_rows=text_rows,
|
| 200 |
+
embedding_map=embedding_map,
|
| 201 |
+
embedding_dim=embedding_dim,
|
| 202 |
+
)
|
| 203 |
+
write_all_embeddings(args.all_embeddings_output, all_rows, matrix)
|
| 204 |
+
|
| 205 |
+
compound_names = [row["compound_name"] for row in all_rows]
|
| 206 |
+
similarity = cosine_similarity_matrix(matrix)
|
| 207 |
+
write_similarity_csv(args.similarity_output, compound_names, similarity)
|
| 208 |
+
|
| 209 |
+
summary.update(
|
| 210 |
+
{
|
| 211 |
+
"text_csv": str(args.text_csv),
|
| 212 |
+
"embedding_csv": str(args.embedding_csv),
|
| 213 |
+
"all_embeddings_output": str(args.all_embeddings_output),
|
| 214 |
+
"similarity_output": str(args.similarity_output),
|
| 215 |
+
"similarity_shape": [int(similarity.shape[0]), int(similarity.shape[1])],
|
| 216 |
+
"zero_filled_rows_have_zero_similarity": True,
|
| 217 |
+
"zero_filled_rows_self_similarity": 0.0,
|
| 218 |
+
"compound_names_are_structure_file_stems": True,
|
| 219 |
+
}
|
| 220 |
+
)
|
| 221 |
+
write_summary(args.summary_output, summary)
|
| 222 |
+
|
| 223 |
+
print(json.dumps(summary, ensure_ascii=False))
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
if __name__ == "__main__":
|
| 227 |
+
main()
|
LLM/embed_pubchem_drug_texts.py
ADDED
|
@@ -0,0 +1,555 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import argparse
|
| 7 |
+
import csv
|
| 8 |
+
import getpass
|
| 9 |
+
import json
|
| 10 |
+
import os
|
| 11 |
+
import threading
|
| 12 |
+
import time
|
| 13 |
+
from concurrent.futures import ThreadPoolExecutor, as_completed
|
| 14 |
+
from pathlib import Path
|
| 15 |
+
from typing import Any
|
| 16 |
+
|
| 17 |
+
import requests
|
| 18 |
+
from tqdm import tqdm
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
DEFAULT_INPUT = Path(
|
| 22 |
+
"/mnt/disk1/yanganqi/QQCM/LLM/pubchem_drug_text_export/pubchem_drug_texts.csv"
|
| 23 |
+
)
|
| 24 |
+
DEFAULT_EMBEDDING_DIR = Path(
|
| 25 |
+
"/mnt/disk1/yanganqi/QQCM/LLM/pubchem_drug_embedding_export"
|
| 26 |
+
)
|
| 27 |
+
DEFAULT_OUTPUT = Path(
|
| 28 |
+
"/mnt/disk1/yanganqi/QQCM/LLM/pubchem_drug_embedding_export/pubchem_drug_text_embeddings.csv"
|
| 29 |
+
)
|
| 30 |
+
DEFAULT_CACHE_DIR = Path(
|
| 31 |
+
"/mnt/disk1/yanganqi/QQCM/LLM/pubchem_drug_embedding_export/embedding_cache"
|
| 32 |
+
)
|
| 33 |
+
|
| 34 |
+
DASHSCOPE_EMBEDDING_URL = (
|
| 35 |
+
"https://dashscope.aliyuncs.com/api/v1/services/embeddings/"
|
| 36 |
+
"text-embedding/text-embedding"
|
| 37 |
+
)
|
| 38 |
+
OPENAI_EMBEDDING_URL = "https://api.openai.com/v1/embeddings"
|
| 39 |
+
|
| 40 |
+
THREAD_LOCAL = threading.local()
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def parse_args() -> argparse.Namespace:
|
| 44 |
+
parser = argparse.ArgumentParser(
|
| 45 |
+
description=(
|
| 46 |
+
"Embed non-empty PubChem drug text rows from pubchem_drug_texts.csv "
|
| 47 |
+
"and save them as a wide CSV."
|
| 48 |
+
)
|
| 49 |
+
)
|
| 50 |
+
parser.add_argument(
|
| 51 |
+
"--input",
|
| 52 |
+
type=Path,
|
| 53 |
+
default=DEFAULT_INPUT,
|
| 54 |
+
help="Input CSV path. Default: pubchem_drug_text_export/pubchem_drug_texts.csv",
|
| 55 |
+
)
|
| 56 |
+
parser.add_argument(
|
| 57 |
+
"--output",
|
| 58 |
+
type=Path,
|
| 59 |
+
default=DEFAULT_OUTPUT,
|
| 60 |
+
help="Output CSV path for rows with embeddings.",
|
| 61 |
+
)
|
| 62 |
+
parser.add_argument(
|
| 63 |
+
"--cache-dir",
|
| 64 |
+
type=Path,
|
| 65 |
+
default=DEFAULT_CACHE_DIR,
|
| 66 |
+
help="Directory used to cache per-row embedding responses for resume support.",
|
| 67 |
+
)
|
| 68 |
+
parser.add_argument(
|
| 69 |
+
"--provider",
|
| 70 |
+
choices=("dashscope", "openai"),
|
| 71 |
+
default="dashscope",
|
| 72 |
+
help="Embedding provider. Default: dashscope",
|
| 73 |
+
)
|
| 74 |
+
parser.add_argument(
|
| 75 |
+
"--model",
|
| 76 |
+
default="text-embedding-v4",
|
| 77 |
+
help=(
|
| 78 |
+
"Embedding model name. For example: text-embedding-v4 (DashScope) "
|
| 79 |
+
"or text-embedding-3-small (OpenAI)."
|
| 80 |
+
),
|
| 81 |
+
)
|
| 82 |
+
parser.add_argument(
|
| 83 |
+
"--api-key",
|
| 84 |
+
default=None,
|
| 85 |
+
help="API key. If omitted, use --api-key-env or interactive prompt.",
|
| 86 |
+
)
|
| 87 |
+
parser.add_argument(
|
| 88 |
+
"--api-key-env",
|
| 89 |
+
default=None,
|
| 90 |
+
help="Environment variable name that stores the API key.",
|
| 91 |
+
)
|
| 92 |
+
parser.add_argument(
|
| 93 |
+
"--workers",
|
| 94 |
+
type=int,
|
| 95 |
+
default=6,
|
| 96 |
+
help="Concurrent worker count for embedding requests.",
|
| 97 |
+
)
|
| 98 |
+
parser.add_argument(
|
| 99 |
+
"--timeout",
|
| 100 |
+
type=float,
|
| 101 |
+
default=60.0,
|
| 102 |
+
help="Per-request timeout in seconds.",
|
| 103 |
+
)
|
| 104 |
+
parser.add_argument(
|
| 105 |
+
"--retries",
|
| 106 |
+
type=int,
|
| 107 |
+
default=3,
|
| 108 |
+
help="Retry count for failed embedding requests.",
|
| 109 |
+
)
|
| 110 |
+
parser.add_argument(
|
| 111 |
+
"--retry-backoff",
|
| 112 |
+
type=float,
|
| 113 |
+
default=2.0,
|
| 114 |
+
help="Base for exponential backoff between retries.",
|
| 115 |
+
)
|
| 116 |
+
parser.add_argument(
|
| 117 |
+
"--text-column",
|
| 118 |
+
default="text_description",
|
| 119 |
+
help="Text column to embed. Default: text_description",
|
| 120 |
+
)
|
| 121 |
+
parser.add_argument(
|
| 122 |
+
"--id-column",
|
| 123 |
+
default="compound_name",
|
| 124 |
+
help="ID column used for cache keys. Default: compound_name",
|
| 125 |
+
)
|
| 126 |
+
parser.add_argument(
|
| 127 |
+
"--status-column",
|
| 128 |
+
default="text_status",
|
| 129 |
+
help="Status column used by --require-status-ok. Default: text_status",
|
| 130 |
+
)
|
| 131 |
+
parser.add_argument(
|
| 132 |
+
"--require-status-ok",
|
| 133 |
+
action="store_true",
|
| 134 |
+
help="Only embed rows whose status column equals ok.",
|
| 135 |
+
)
|
| 136 |
+
parser.add_argument(
|
| 137 |
+
"--limit",
|
| 138 |
+
type=int,
|
| 139 |
+
default=None,
|
| 140 |
+
help="Only process the first N eligible rows for testing.",
|
| 141 |
+
)
|
| 142 |
+
parser.add_argument(
|
| 143 |
+
"--max-chars",
|
| 144 |
+
type=int,
|
| 145 |
+
default=None,
|
| 146 |
+
help="If set, truncate each text to at most this many characters before embedding.",
|
| 147 |
+
)
|
| 148 |
+
parser.add_argument(
|
| 149 |
+
"--force-refresh",
|
| 150 |
+
action="store_true",
|
| 151 |
+
help="Ignore existing cache and recompute every embedding.",
|
| 152 |
+
)
|
| 153 |
+
parser.add_argument(
|
| 154 |
+
"--dry-run",
|
| 155 |
+
action="store_true",
|
| 156 |
+
help="Only show row statistics after filtering, without calling the API.",
|
| 157 |
+
)
|
| 158 |
+
return parser.parse_args()
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
def get_session() -> requests.Session:
|
| 162 |
+
session = getattr(THREAD_LOCAL, "session", None)
|
| 163 |
+
if session is None:
|
| 164 |
+
session = requests.Session()
|
| 165 |
+
session.headers.update({"User-Agent": "QQCM PubChem embedding builder/1.0"})
|
| 166 |
+
THREAD_LOCAL.session = session
|
| 167 |
+
return session
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
def read_rows(path: Path) -> tuple[list[str], list[dict[str, str]]]:
|
| 171 |
+
with path.open("r", encoding="utf-8-sig", newline="") as f:
|
| 172 |
+
reader = csv.DictReader(f)
|
| 173 |
+
fieldnames = list(reader.fieldnames or [])
|
| 174 |
+
rows = [normalize_row(row) for row in reader]
|
| 175 |
+
return fieldnames, rows
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
def normalize_row(row: dict[str, Any]) -> dict[str, str]:
|
| 179 |
+
normalized: dict[str, str] = {}
|
| 180 |
+
for key, value in row.items():
|
| 181 |
+
clean_key = key.lstrip("\ufeff") if key is not None else ""
|
| 182 |
+
normalized[clean_key] = "" if value is None else str(value)
|
| 183 |
+
return normalized
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
def resolve_api_key(args: argparse.Namespace) -> str:
|
| 187 |
+
if args.api_key:
|
| 188 |
+
return args.api_key
|
| 189 |
+
if args.api_key_env:
|
| 190 |
+
value = os.getenv(args.api_key_env)
|
| 191 |
+
if value:
|
| 192 |
+
return value
|
| 193 |
+
raise SystemExit(f"Environment variable {args.api_key_env} is empty or missing.")
|
| 194 |
+
default_env = {
|
| 195 |
+
"dashscope": "DASHSCOPE_API_KEY",
|
| 196 |
+
"openai": "OPENAI_API_KEY",
|
| 197 |
+
}.get(args.provider)
|
| 198 |
+
if default_env:
|
| 199 |
+
value = os.getenv(default_env)
|
| 200 |
+
if value:
|
| 201 |
+
return value
|
| 202 |
+
prompt = f"Enter {args.provider} API key: "
|
| 203 |
+
return getpass.getpass(prompt)
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
def filter_rows(
|
| 207 |
+
rows: list[dict[str, str]],
|
| 208 |
+
*,
|
| 209 |
+
text_column: str,
|
| 210 |
+
status_column: str,
|
| 211 |
+
require_status_ok: bool,
|
| 212 |
+
max_chars: int | None,
|
| 213 |
+
limit: int | None,
|
| 214 |
+
) -> list[dict[str, str]]:
|
| 215 |
+
filtered: list[dict[str, str]] = []
|
| 216 |
+
for row in rows:
|
| 217 |
+
text = (row.get(text_column) or "").strip()
|
| 218 |
+
if not text:
|
| 219 |
+
continue
|
| 220 |
+
if require_status_ok and (row.get(status_column) or "").strip() != "ok":
|
| 221 |
+
continue
|
| 222 |
+
clean_row = dict(row)
|
| 223 |
+
if max_chars is not None:
|
| 224 |
+
clean_row[text_column] = text[:max_chars]
|
| 225 |
+
else:
|
| 226 |
+
clean_row[text_column] = text
|
| 227 |
+
filtered.append(clean_row)
|
| 228 |
+
if limit is not None and len(filtered) >= limit:
|
| 229 |
+
break
|
| 230 |
+
return filtered
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
def get_cache_path(cache_dir: Path, provider: str, model: str, row_id: str) -> Path:
|
| 234 |
+
safe_id = "".join(ch if ch.isalnum() or ch in ("-", "_", ".") else "_" for ch in row_id)
|
| 235 |
+
return cache_dir / provider / model / f"{safe_id}.json"
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
def load_cached_embedding(cache_path: Path) -> list[float] | None:
|
| 239 |
+
if not cache_path.exists():
|
| 240 |
+
return None
|
| 241 |
+
with cache_path.open("r", encoding="utf-8") as f:
|
| 242 |
+
payload = json.load(f)
|
| 243 |
+
embedding = payload.get("embedding")
|
| 244 |
+
if not isinstance(embedding, list):
|
| 245 |
+
return None
|
| 246 |
+
return embedding
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
def save_cached_embedding(cache_path: Path, row: dict[str, str], embedding: list[float]) -> None:
|
| 250 |
+
cache_path.parent.mkdir(parents=True, exist_ok=True)
|
| 251 |
+
payload = {
|
| 252 |
+
"id": row.get("compound_name") or row.get("pubchem_cid") or "",
|
| 253 |
+
"provider": row.get("_provider", ""),
|
| 254 |
+
"model": row.get("_model", ""),
|
| 255 |
+
"embedding_dim": len(embedding),
|
| 256 |
+
"embedding": embedding,
|
| 257 |
+
}
|
| 258 |
+
with cache_path.open("w", encoding="utf-8") as f:
|
| 259 |
+
json.dump(payload, f, ensure_ascii=False)
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
def request_embedding(
|
| 263 |
+
*,
|
| 264 |
+
provider: str,
|
| 265 |
+
model: str,
|
| 266 |
+
api_key: str,
|
| 267 |
+
text: str,
|
| 268 |
+
timeout: float,
|
| 269 |
+
retries: int,
|
| 270 |
+
retry_backoff: float,
|
| 271 |
+
) -> list[float]:
|
| 272 |
+
if provider == "dashscope":
|
| 273 |
+
return request_dashscope_embedding(
|
| 274 |
+
model=model,
|
| 275 |
+
api_key=api_key,
|
| 276 |
+
text=text,
|
| 277 |
+
timeout=timeout,
|
| 278 |
+
retries=retries,
|
| 279 |
+
retry_backoff=retry_backoff,
|
| 280 |
+
)
|
| 281 |
+
if provider == "openai":
|
| 282 |
+
return request_openai_embedding(
|
| 283 |
+
model=model,
|
| 284 |
+
api_key=api_key,
|
| 285 |
+
text=text,
|
| 286 |
+
timeout=timeout,
|
| 287 |
+
retries=retries,
|
| 288 |
+
retry_backoff=retry_backoff,
|
| 289 |
+
)
|
| 290 |
+
raise ValueError(f"Unsupported provider: {provider}")
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
def request_dashscope_embedding(
|
| 294 |
+
*,
|
| 295 |
+
model: str,
|
| 296 |
+
api_key: str,
|
| 297 |
+
text: str,
|
| 298 |
+
timeout: float,
|
| 299 |
+
retries: int,
|
| 300 |
+
retry_backoff: float,
|
| 301 |
+
) -> list[float]:
|
| 302 |
+
headers = {
|
| 303 |
+
"Authorization": f"Bearer {api_key}",
|
| 304 |
+
"Content-Type": "application/json",
|
| 305 |
+
}
|
| 306 |
+
payload = {
|
| 307 |
+
"model": model,
|
| 308 |
+
"input": {"texts": [text]},
|
| 309 |
+
"parameters": {"text_type": "document"},
|
| 310 |
+
}
|
| 311 |
+
last_error = "unknown error"
|
| 312 |
+
session = get_session()
|
| 313 |
+
|
| 314 |
+
for attempt in range(retries + 1):
|
| 315 |
+
try:
|
| 316 |
+
response = session.post(
|
| 317 |
+
DASHSCOPE_EMBEDDING_URL,
|
| 318 |
+
headers=headers,
|
| 319 |
+
json=payload,
|
| 320 |
+
timeout=timeout,
|
| 321 |
+
)
|
| 322 |
+
if response.status_code >= 400:
|
| 323 |
+
last_error = f"http_{response.status_code}: {response.text[:300]}"
|
| 324 |
+
if attempt >= retries:
|
| 325 |
+
raise RuntimeError(last_error)
|
| 326 |
+
else:
|
| 327 |
+
data = response.json()
|
| 328 |
+
embeddings = data.get("output", {}).get("embeddings", [])
|
| 329 |
+
if not embeddings:
|
| 330 |
+
raise RuntimeError(f"DashScope response missing embeddings: {data}")
|
| 331 |
+
embedding = embeddings[0].get("embedding")
|
| 332 |
+
if not isinstance(embedding, list):
|
| 333 |
+
raise RuntimeError(f"DashScope response has invalid embedding: {data}")
|
| 334 |
+
return embedding
|
| 335 |
+
except Exception as exc:
|
| 336 |
+
last_error = str(exc)
|
| 337 |
+
if attempt >= retries:
|
| 338 |
+
raise RuntimeError(last_error) from exc
|
| 339 |
+
time.sleep(retry_backoff ** attempt)
|
| 340 |
+
|
| 341 |
+
raise RuntimeError(last_error)
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
def request_openai_embedding(
|
| 345 |
+
*,
|
| 346 |
+
model: str,
|
| 347 |
+
api_key: str,
|
| 348 |
+
text: str,
|
| 349 |
+
timeout: float,
|
| 350 |
+
retries: int,
|
| 351 |
+
retry_backoff: float,
|
| 352 |
+
) -> list[float]:
|
| 353 |
+
headers = {
|
| 354 |
+
"Authorization": f"Bearer {api_key}",
|
| 355 |
+
"Content-Type": "application/json",
|
| 356 |
+
}
|
| 357 |
+
payload = {"model": model, "input": text}
|
| 358 |
+
last_error = "unknown error"
|
| 359 |
+
session = get_session()
|
| 360 |
+
|
| 361 |
+
for attempt in range(retries + 1):
|
| 362 |
+
try:
|
| 363 |
+
response = session.post(
|
| 364 |
+
OPENAI_EMBEDDING_URL,
|
| 365 |
+
headers=headers,
|
| 366 |
+
json=payload,
|
| 367 |
+
timeout=timeout,
|
| 368 |
+
)
|
| 369 |
+
if response.status_code >= 400:
|
| 370 |
+
last_error = f"http_{response.status_code}: {response.text[:300]}"
|
| 371 |
+
if attempt >= retries:
|
| 372 |
+
raise RuntimeError(last_error)
|
| 373 |
+
else:
|
| 374 |
+
data = response.json()
|
| 375 |
+
items = data.get("data", [])
|
| 376 |
+
if not items:
|
| 377 |
+
raise RuntimeError(f"OpenAI response missing data: {data}")
|
| 378 |
+
embedding = items[0].get("embedding")
|
| 379 |
+
if not isinstance(embedding, list):
|
| 380 |
+
raise RuntimeError(f"OpenAI response has invalid embedding: {data}")
|
| 381 |
+
return embedding
|
| 382 |
+
except Exception as exc:
|
| 383 |
+
last_error = str(exc)
|
| 384 |
+
if attempt >= retries:
|
| 385 |
+
raise RuntimeError(last_error) from exc
|
| 386 |
+
time.sleep(retry_backoff ** attempt)
|
| 387 |
+
|
| 388 |
+
raise RuntimeError(last_error)
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
def embed_rows(args: argparse.Namespace, rows: list[dict[str, str]], api_key: str) -> tuple[list[dict[str, Any]], list[dict[str, str]]]:
|
| 392 |
+
results: list[dict[str, Any] | None] = [None] * len(rows)
|
| 393 |
+
failures: list[dict[str, str]] = []
|
| 394 |
+
|
| 395 |
+
def worker(index: int, row: dict[str, str]) -> tuple[int, dict[str, Any]]:
|
| 396 |
+
row_id = (row.get(args.id_column) or f"row_{index}").strip() or f"row_{index}"
|
| 397 |
+
cache_path = get_cache_path(args.cache_dir, args.provider, args.model, row_id)
|
| 398 |
+
embedding = None if args.force_refresh else load_cached_embedding(cache_path)
|
| 399 |
+
if embedding is None:
|
| 400 |
+
embedding = request_embedding(
|
| 401 |
+
provider=args.provider,
|
| 402 |
+
model=args.model,
|
| 403 |
+
api_key=api_key,
|
| 404 |
+
text=row[args.text_column],
|
| 405 |
+
timeout=args.timeout,
|
| 406 |
+
retries=args.retries,
|
| 407 |
+
retry_backoff=args.retry_backoff,
|
| 408 |
+
)
|
| 409 |
+
row_for_cache = dict(row)
|
| 410 |
+
row_for_cache["_provider"] = args.provider
|
| 411 |
+
row_for_cache["_model"] = args.model
|
| 412 |
+
save_cached_embedding(cache_path, row_for_cache, embedding)
|
| 413 |
+
return index, {"row": row, "embedding": embedding}
|
| 414 |
+
|
| 415 |
+
with ThreadPoolExecutor(max_workers=args.workers) as executor:
|
| 416 |
+
future_to_index = {
|
| 417 |
+
executor.submit(worker, index, row): index for index, row in enumerate(rows)
|
| 418 |
+
}
|
| 419 |
+
for future in tqdm(as_completed(future_to_index), total=len(future_to_index), desc="Embedding"):
|
| 420 |
+
index = future_to_index[future]
|
| 421 |
+
row = rows[index]
|
| 422 |
+
row_id = (row.get(args.id_column) or f"row_{index}").strip() or f"row_{index}"
|
| 423 |
+
try:
|
| 424 |
+
_, result = future.result()
|
| 425 |
+
results[index] = result
|
| 426 |
+
except Exception as exc:
|
| 427 |
+
failures.append(
|
| 428 |
+
{
|
| 429 |
+
args.id_column: row_id,
|
| 430 |
+
"error": str(exc),
|
| 431 |
+
}
|
| 432 |
+
)
|
| 433 |
+
|
| 434 |
+
completed = [item for item in results if item is not None]
|
| 435 |
+
return completed, failures
|
| 436 |
+
|
| 437 |
+
|
| 438 |
+
def write_wide_csv(
|
| 439 |
+
output_path: Path,
|
| 440 |
+
base_fieldnames: list[str],
|
| 441 |
+
embedded_rows: list[dict[str, Any]],
|
| 442 |
+
failures: list[dict[str, str]],
|
| 443 |
+
provider: str,
|
| 444 |
+
model: str,
|
| 445 |
+
) -> None:
|
| 446 |
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
| 447 |
+
embedding_dim = 0
|
| 448 |
+
for item in embedded_rows:
|
| 449 |
+
embedding = item["embedding"]
|
| 450 |
+
if embedding:
|
| 451 |
+
embedding_dim = len(embedding)
|
| 452 |
+
break
|
| 453 |
+
|
| 454 |
+
fieldnames = [name.lstrip("\ufeff") for name in base_fieldnames]
|
| 455 |
+
extra_fields = ["embedding_provider", "embedding_model", "embedding_dim"]
|
| 456 |
+
embedding_fields = [f"emb_{i}" for i in range(embedding_dim)]
|
| 457 |
+
|
| 458 |
+
if embedded_rows:
|
| 459 |
+
with output_path.open("w", encoding="utf-8-sig", newline="") as f:
|
| 460 |
+
writer = csv.DictWriter(
|
| 461 |
+
f,
|
| 462 |
+
fieldnames=fieldnames + extra_fields + embedding_fields,
|
| 463 |
+
extrasaction="ignore",
|
| 464 |
+
)
|
| 465 |
+
writer.writeheader()
|
| 466 |
+
for item in embedded_rows:
|
| 467 |
+
row = normalize_row(item["row"])
|
| 468 |
+
embedding = item["embedding"]
|
| 469 |
+
output_row = dict(row)
|
| 470 |
+
output_row["embedding_provider"] = provider
|
| 471 |
+
output_row["embedding_model"] = model
|
| 472 |
+
output_row["embedding_dim"] = len(embedding)
|
| 473 |
+
for index, value in enumerate(embedding):
|
| 474 |
+
output_row[f"emb_{index}"] = value
|
| 475 |
+
writer.writerow(output_row)
|
| 476 |
+
|
| 477 |
+
if failures:
|
| 478 |
+
failure_path = output_path.with_name(f"{output_path.stem}_failures.csv")
|
| 479 |
+
with failure_path.open("w", encoding="utf-8-sig", newline="") as f:
|
| 480 |
+
writer = csv.DictWriter(f, fieldnames=list(failures[0].keys()))
|
| 481 |
+
writer.writeheader()
|
| 482 |
+
writer.writerows(failures)
|
| 483 |
+
|
| 484 |
+
|
| 485 |
+
def summarize_rows(rows: list[dict[str, str]], text_column: str) -> dict[str, int]:
|
| 486 |
+
lengths = [len((row.get(text_column) or "").strip()) for row in rows]
|
| 487 |
+
if not lengths:
|
| 488 |
+
return {"eligible_rows": 0, "min_chars": 0, "max_chars": 0}
|
| 489 |
+
return {
|
| 490 |
+
"eligible_rows": len(rows),
|
| 491 |
+
"min_chars": min(lengths),
|
| 492 |
+
"max_chars": max(lengths),
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
|
| 496 |
+
def main() -> None:
|
| 497 |
+
args = parse_args()
|
| 498 |
+
fieldnames, rows = read_rows(args.input)
|
| 499 |
+
normalized_fieldnames = [name.lstrip("\ufeff") for name in fieldnames]
|
| 500 |
+
if args.text_column not in normalized_fieldnames:
|
| 501 |
+
raise SystemExit(
|
| 502 |
+
f"Column {args.text_column!r} not found. Available columns: {normalized_fieldnames}"
|
| 503 |
+
)
|
| 504 |
+
|
| 505 |
+
filtered_rows = filter_rows(
|
| 506 |
+
rows,
|
| 507 |
+
text_column=args.text_column,
|
| 508 |
+
status_column=args.status_column,
|
| 509 |
+
require_status_ok=args.require_status_ok,
|
| 510 |
+
max_chars=args.max_chars,
|
| 511 |
+
limit=args.limit,
|
| 512 |
+
)
|
| 513 |
+
summary = summarize_rows(filtered_rows, args.text_column)
|
| 514 |
+
print(json.dumps(summary, ensure_ascii=False))
|
| 515 |
+
|
| 516 |
+
if args.dry_run:
|
| 517 |
+
return
|
| 518 |
+
|
| 519 |
+
api_key = resolve_api_key(args)
|
| 520 |
+
embedded_rows, failures = embed_rows(args, filtered_rows, api_key)
|
| 521 |
+
write_wide_csv(
|
| 522 |
+
output_path=args.output,
|
| 523 |
+
base_fieldnames=normalized_fieldnames,
|
| 524 |
+
embedded_rows=embedded_rows,
|
| 525 |
+
failures=failures,
|
| 526 |
+
provider=args.provider,
|
| 527 |
+
model=args.model,
|
| 528 |
+
)
|
| 529 |
+
|
| 530 |
+
if failures:
|
| 531 |
+
print(
|
| 532 |
+
json.dumps(
|
| 533 |
+
{
|
| 534 |
+
"failure_examples": failures[:3],
|
| 535 |
+
},
|
| 536 |
+
ensure_ascii=False,
|
| 537 |
+
)
|
| 538 |
+
)
|
| 539 |
+
if not embedded_rows:
|
| 540 |
+
raise SystemExit("No embeddings were produced.")
|
| 541 |
+
|
| 542 |
+
print(
|
| 543 |
+
json.dumps(
|
| 544 |
+
{
|
| 545 |
+
"output": str(args.output),
|
| 546 |
+
"embedded_rows": len(embedded_rows),
|
| 547 |
+
"failed_rows": len(failures),
|
| 548 |
+
},
|
| 549 |
+
ensure_ascii=False,
|
| 550 |
+
)
|
| 551 |
+
)
|
| 552 |
+
|
| 553 |
+
|
| 554 |
+
if __name__ == "__main__":
|
| 555 |
+
main()
|
LLM/pubchem_drug_texts.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
MS/annotate_ms_structure_resolution.py
ADDED
|
@@ -0,0 +1,644 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import csv
|
| 5 |
+
import io
|
| 6 |
+
import json
|
| 7 |
+
import os
|
| 8 |
+
import re
|
| 9 |
+
import unicodedata
|
| 10 |
+
from collections import Counter, defaultdict
|
| 11 |
+
from pathlib import Path
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
MS_CSV = Path("/mnt/disk1/yanganqi/QQCM/MS/三者并集完整输出.csv")
|
| 15 |
+
OUTPUT_CSV = Path("/mnt/disk1/yanganqi/QQCM/MS/三者并集完整输出_结构标注.csv")
|
| 16 |
+
YAO_CSV = Path("/mnt/disk1/yanganqi/YJT/药典中药汇总.csv")
|
| 17 |
+
AGG_ROOT = Path("/mnt/disk1/yanganqi/YJT/data/原始数据汇总")
|
| 18 |
+
HERB2_SOURCE_BACKFILL_CSV = AGG_ROOT / "HERB2" / "HERB2_source_backfill_rows.csv"
|
| 19 |
+
QQCM_NAME_MAP = Path("/mnt/disk1/yanganqi/QQCM/id_trans/qqcm_pubchem_drugbank_mapping.tsv")
|
| 20 |
+
QQCM_SMILES = Path("/mnt/disk1/yanganqi/QQCM/COM/compound_smiles.csv")
|
| 21 |
+
QQCM_INCHIKEY = Path("/mnt/disk1/yanganqi/QQCM/COM/compound_inchikey.csv")
|
| 22 |
+
QQCM_HELPER_DIR = Path("/mnt/disk1/yanganqi/QQCM/KG/qqcm_compound_subgraph/helper_tables")
|
| 23 |
+
QQCM_MOL_GROUPS = QQCM_HELPER_DIR / "qqcm_compound_multi_mol_id_groups.tsv"
|
| 24 |
+
QQCM_CID_LOOKUP_DIR = Path("/mnt/disk1/yanganqi/QQCM/LLM/pubchem_cache/cid_lookup")
|
| 25 |
+
QQCM_TCMSP_CACHE_JSON = Path("/mnt/disk1/yanganqi/QQCM/COM/tcmsp_molecule_cache.json")
|
| 26 |
+
|
| 27 |
+
READ_ENCODINGS = ("utf-8-sig", "utf-8", "gb18030", "latin1")
|
| 28 |
+
FORMULA_COLUMNS = ("Molecular Formula", "MolecularFormula", "molecularformula", "Formula")
|
| 29 |
+
NAME_COLUMNS = ("Name", "name", "Queried Name", "Queried Identifier", "compound_name")
|
| 30 |
+
IUPAC_COLUMNS = ("IUPAC Name", "IUPACName", "iupacname")
|
| 31 |
+
SMILES_COLUMNS = ("SMILES", "CanonicalSMILES", "smiles", "SMILES.1")
|
| 32 |
+
INCHI_COLUMNS = ("InChI", "inchi")
|
| 33 |
+
INCHIKEY_COLUMNS = ("InChKey", "InChIKey", "inchikey")
|
| 34 |
+
CID_COLUMNS = ("PubChem CID", "pubchemcid", "CID", "cid", "mol_id")
|
| 35 |
+
CAS_COLUMNS = ("CAS", "cas")
|
| 36 |
+
|
| 37 |
+
SHORT_AMBIGUOUS = {
|
| 38 |
+
"ado",
|
| 39 |
+
"ann",
|
| 40 |
+
"beo",
|
| 41 |
+
"bzf",
|
| 42 |
+
"cam",
|
| 43 |
+
"cnh",
|
| 44 |
+
"cpi",
|
| 45 |
+
"cyt",
|
| 46 |
+
"dbh",
|
| 47 |
+
"dfv",
|
| 48 |
+
"dhnq",
|
| 49 |
+
"dle",
|
| 50 |
+
"dmr",
|
| 51 |
+
"dmt",
|
| 52 |
+
"dob",
|
| 53 |
+
"dtr",
|
| 54 |
+
"dty",
|
| 55 |
+
"dur",
|
| 56 |
+
"eb",
|
| 57 |
+
"ehbn",
|
| 58 |
+
"eld",
|
| 59 |
+
"esen",
|
| 60 |
+
"fer",
|
| 61 |
+
"foa",
|
| 62 |
+
"fpr",
|
| 63 |
+
"gbl",
|
| 64 |
+
"gco",
|
| 65 |
+
"gr",
|
| 66 |
+
"gre",
|
| 67 |
+
"gun",
|
| 68 |
+
"hba",
|
| 69 |
+
"hmf",
|
| 70 |
+
"hmo",
|
| 71 |
+
"iea",
|
| 72 |
+
"ies",
|
| 73 |
+
"ipmc",
|
| 74 |
+
"l-",
|
| 75 |
+
"ldp",
|
| 76 |
+
"lof",
|
| 77 |
+
"ltan",
|
| 78 |
+
"mboa",
|
| 79 |
+
"mhp",
|
| 80 |
+
"mipk",
|
| 81 |
+
"mlt",
|
| 82 |
+
"mnn",
|
| 83 |
+
"myf",
|
| 84 |
+
"nfp",
|
| 85 |
+
"nk",
|
| 86 |
+
"noj",
|
| 87 |
+
"ohp",
|
| 88 |
+
"oxl",
|
| 89 |
+
"pac",
|
| 90 |
+
"pea",
|
| 91 |
+
"pha",
|
| 92 |
+
"phb",
|
| 93 |
+
"pip",
|
| 94 |
+
"ppy",
|
| 95 |
+
"prz",
|
| 96 |
+
"ptl",
|
| 97 |
+
"pyc",
|
| 98 |
+
"pyg",
|
| 99 |
+
"rco",
|
| 100 |
+
"rmn",
|
| 101 |
+
"rng",
|
| 102 |
+
"ron",
|
| 103 |
+
"scg",
|
| 104 |
+
"thz",
|
| 105 |
+
"tml",
|
| 106 |
+
"unal",
|
| 107 |
+
"urc",
|
| 108 |
+
"vca",
|
| 109 |
+
"wv",
|
| 110 |
+
"py",
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
def pick(row: dict[str, str], columns: tuple[str, ...]) -> str:
|
| 115 |
+
for column in columns:
|
| 116 |
+
value = row.get(column)
|
| 117 |
+
if value is None:
|
| 118 |
+
continue
|
| 119 |
+
text = str(value).strip()
|
| 120 |
+
if text and text.lower() != "nan":
|
| 121 |
+
return text
|
| 122 |
+
return ""
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
def norm_formula(value: str) -> str:
|
| 126 |
+
return re.sub(r"\s+", "", value or "").upper()
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def normalize_cid(value: str) -> str:
|
| 130 |
+
text = (value or "").strip()
|
| 131 |
+
if not text:
|
| 132 |
+
return ""
|
| 133 |
+
if text.upper().startswith("CID_") and text[4:].isdigit():
|
| 134 |
+
return text[4:]
|
| 135 |
+
if re.fullmatch(r"\d+\.0", text):
|
| 136 |
+
return text[:-2]
|
| 137 |
+
return text
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
def strip_accents(value: str) -> str:
|
| 141 |
+
return "".join(
|
| 142 |
+
ch for ch in unicodedata.normalize("NFKD", value) if not unicodedata.combining(ch)
|
| 143 |
+
)
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
def normalize_name(value: str) -> str:
|
| 147 |
+
text = (value or "").strip()
|
| 148 |
+
if not text:
|
| 149 |
+
return ""
|
| 150 |
+
text = (
|
| 151 |
+
text.replace("\u2019", "'")
|
| 152 |
+
.replace("\u2018", "'")
|
| 153 |
+
.replace("\u201c", '"')
|
| 154 |
+
.replace("\u201d", '"')
|
| 155 |
+
.replace("β", "beta")
|
| 156 |
+
.replace("Β", "beta")
|
| 157 |
+
.replace("α", "alpha")
|
| 158 |
+
.replace("Α", "alpha")
|
| 159 |
+
.replace("γ", "gamma")
|
| 160 |
+
.replace("Γ", "gamma")
|
| 161 |
+
.replace("δ", "delta")
|
| 162 |
+
.replace("Δ", "delta")
|
| 163 |
+
.replace("\u3000", " ")
|
| 164 |
+
)
|
| 165 |
+
text = strip_accents(text)
|
| 166 |
+
text = re.sub(r"[_ ]+qt(?:\s*\d+)?$", "", text, flags=re.IGNORECASE)
|
| 167 |
+
text = re.sub(r"\s+\d+$", "", text)
|
| 168 |
+
text = text.strip(" ;,")
|
| 169 |
+
text = re.sub(r"\s+", " ", text)
|
| 170 |
+
return text.lower()
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
def clean_reference_name(value: str) -> str:
|
| 174 |
+
text = (value or "").strip()
|
| 175 |
+
if not text:
|
| 176 |
+
return ""
|
| 177 |
+
lowered = text.lower()
|
| 178 |
+
for prefix in ("name:", "compound_name:", "compound name:"):
|
| 179 |
+
if lowered.startswith(prefix):
|
| 180 |
+
return text[len(prefix) :].strip()
|
| 181 |
+
if lowered.startswith(("cid:", "smiles:", "inchikey:", "inchi:")):
|
| 182 |
+
return ""
|
| 183 |
+
return text
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
def alnum_name(value: str) -> str:
|
| 187 |
+
return re.sub(r"[^a-z0-9]+", "", normalize_name(value))
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
def is_cas_name(value: str) -> bool:
|
| 191 |
+
return bool(re.fullmatch(r"\d{2,7}-\d{2}-\d", value.strip()))
|
| 192 |
+
|
| 193 |
+
|
| 194 |
+
def is_inchi_literal(value: str) -> bool:
|
| 195 |
+
return value.strip().startswith("InChI=")
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
def is_unresolved_noise(name: str) -> bool:
|
| 199 |
+
n = normalize_name(name)
|
| 200 |
+
if not n:
|
| 201 |
+
return True
|
| 202 |
+
if n in SHORT_AMBIGUOUS:
|
| 203 |
+
return True
|
| 204 |
+
if len(n) <= 2:
|
| 205 |
+
return True
|
| 206 |
+
if "_" in name:
|
| 207 |
+
return True
|
| 208 |
+
if re.fullmatch(r"[A-Z0-9\-]+", name) and len(name) <= 12:
|
| 209 |
+
return True
|
| 210 |
+
if "wln:" in n:
|
| 211 |
+
return True
|
| 212 |
+
if "pubchem cid" in n:
|
| 213 |
+
return True
|
| 214 |
+
return False
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
def open_csv_with_fallback(path: Path, delimiter: str = ","):
|
| 218 |
+
raw = path.read_bytes()
|
| 219 |
+
last_error = None
|
| 220 |
+
for encoding in READ_ENCODINGS:
|
| 221 |
+
try:
|
| 222 |
+
text = raw.decode(encoding)
|
| 223 |
+
handle = io.StringIO(text)
|
| 224 |
+
reader = csv.DictReader(handle, delimiter=delimiter)
|
| 225 |
+
if not reader.fieldnames:
|
| 226 |
+
handle.close()
|
| 227 |
+
continue
|
| 228 |
+
return handle, reader
|
| 229 |
+
except Exception as exc: # pragma: no cover - filesystem/runtime dependent
|
| 230 |
+
last_error = exc
|
| 231 |
+
raise RuntimeError(f"Unable to read {path}") from last_error
|
| 232 |
+
|
| 233 |
+
|
| 234 |
+
def split_aliases(value: str) -> list[str]:
|
| 235 |
+
aliases: list[str] = []
|
| 236 |
+
for item in re.split(r"[;|]+", value or ""):
|
| 237 |
+
cleaned = clean_reference_name(item)
|
| 238 |
+
if cleaned:
|
| 239 |
+
aliases.append(cleaned)
|
| 240 |
+
return aliases
|
| 241 |
+
|
| 242 |
+
|
| 243 |
+
def load_group_cid_map() -> dict[str, str]:
|
| 244 |
+
if not QQCM_MOL_GROUPS.exists():
|
| 245 |
+
return {}
|
| 246 |
+
mapping: dict[str, str] = {}
|
| 247 |
+
with QQCM_MOL_GROUPS.open("r", encoding="utf-8-sig", newline="") as handle:
|
| 248 |
+
reader = csv.DictReader(handle, delimiter="\t")
|
| 249 |
+
for row in reader:
|
| 250 |
+
mol_ids = [item.strip() for item in (row.get("mol_ids") or "").split("|") if item.strip()]
|
| 251 |
+
cid_candidates = [item.removeprefix("CID_") for item in mol_ids if item.startswith("CID_")]
|
| 252 |
+
if not cid_candidates:
|
| 253 |
+
continue
|
| 254 |
+
for mol_id in mol_ids:
|
| 255 |
+
if mol_id.startswith("MOL") and mol_id not in mapping:
|
| 256 |
+
mapping[mol_id] = cid_candidates[0]
|
| 257 |
+
return mapping
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
def load_lookup_cid_map() -> dict[str, str]:
|
| 261 |
+
if not QQCM_CID_LOOKUP_DIR.exists():
|
| 262 |
+
return {}
|
| 263 |
+
mapping: dict[str, str] = {}
|
| 264 |
+
for json_path in sorted(QQCM_CID_LOOKUP_DIR.glob("MOL*.json")):
|
| 265 |
+
try:
|
| 266 |
+
payload = json.loads(json_path.read_text(encoding="utf-8"))
|
| 267 |
+
except Exception:
|
| 268 |
+
continue
|
| 269 |
+
candidates = payload.get("cid_candidates") or []
|
| 270 |
+
if not candidates:
|
| 271 |
+
continue
|
| 272 |
+
cid_text = normalize_cid(str(candidates[0]))
|
| 273 |
+
if cid_text and cid_text != "0":
|
| 274 |
+
mapping[json_path.stem] = cid_text
|
| 275 |
+
return mapping
|
| 276 |
+
|
| 277 |
+
|
| 278 |
+
def load_tcmsp_cache() -> dict[str, dict[str, object]]:
|
| 279 |
+
if not QQCM_TCMSP_CACHE_JSON.exists():
|
| 280 |
+
return {}
|
| 281 |
+
try:
|
| 282 |
+
return json.loads(QQCM_TCMSP_CACHE_JSON.read_text(encoding="utf-8"))
|
| 283 |
+
except Exception:
|
| 284 |
+
return {}
|
| 285 |
+
|
| 286 |
+
|
| 287 |
+
def resolve_qqcm_pubchem_cid(
|
| 288 |
+
file_name: str,
|
| 289 |
+
lookup_cids: dict[str, str],
|
| 290 |
+
group_cids: dict[str, str],
|
| 291 |
+
tcmsp_cache: dict[str, dict[str, object]],
|
| 292 |
+
) -> str:
|
| 293 |
+
stem = file_name.rsplit(".", 1)[0] if "." in file_name else file_name
|
| 294 |
+
if stem.startswith("CID_"):
|
| 295 |
+
return normalize_cid(stem)
|
| 296 |
+
if stem.startswith("MOL"):
|
| 297 |
+
if stem in lookup_cids:
|
| 298 |
+
return lookup_cids[stem]
|
| 299 |
+
cached = tcmsp_cache.get(stem) or {}
|
| 300 |
+
cached_cid = normalize_cid(str(cached.get("pubchem_cid") or ""))
|
| 301 |
+
if cached_cid and cached_cid != "0":
|
| 302 |
+
return cached_cid
|
| 303 |
+
if stem in group_cids:
|
| 304 |
+
return group_cids[stem]
|
| 305 |
+
return normalize_cid(stem)
|
| 306 |
+
|
| 307 |
+
|
| 308 |
+
def structure_key(record: dict[str, str]) -> tuple[str, str]:
|
| 309 |
+
for key in ("inchikey", "inchi", "smiles", "cid"):
|
| 310 |
+
value = normalize_cid(record.get(key, "")) if key == "cid" else record.get(key, "").strip()
|
| 311 |
+
if value:
|
| 312 |
+
return key, value
|
| 313 |
+
return "name_formula", f"{record.get('name', '')}|{record.get('formula', '')}"
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
def dedup_records(records: list[dict[str, str]]) -> list[dict[str, str]]:
|
| 317 |
+
unique: list[dict[str, str]] = []
|
| 318 |
+
for record in records:
|
| 319 |
+
record = dict(record)
|
| 320 |
+
record["cid"] = normalize_cid(record.get("cid", ""))
|
| 321 |
+
|
| 322 |
+
merged = False
|
| 323 |
+
for existing in unique:
|
| 324 |
+
same_inchikey = (
|
| 325 |
+
record.get("inchikey")
|
| 326 |
+
and existing.get("inchikey")
|
| 327 |
+
and record["inchikey"] == existing["inchikey"]
|
| 328 |
+
)
|
| 329 |
+
same_inchi = (
|
| 330 |
+
record.get("inchi")
|
| 331 |
+
and existing.get("inchi")
|
| 332 |
+
and record["inchi"] == existing["inchi"]
|
| 333 |
+
)
|
| 334 |
+
same_smiles = (
|
| 335 |
+
record.get("smiles")
|
| 336 |
+
and existing.get("smiles")
|
| 337 |
+
and record["smiles"] == existing["smiles"]
|
| 338 |
+
)
|
| 339 |
+
same_cid = record.get("cid") and existing.get("cid") and record["cid"] == existing["cid"]
|
| 340 |
+
if same_inchikey or same_inchi or same_smiles or same_cid:
|
| 341 |
+
for key, value in record.items():
|
| 342 |
+
if value and not existing.get(key):
|
| 343 |
+
existing[key] = value
|
| 344 |
+
merged = True
|
| 345 |
+
break
|
| 346 |
+
|
| 347 |
+
if not merged:
|
| 348 |
+
unique.append(record)
|
| 349 |
+
return unique
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
def add_record(index: dict[str, defaultdict[str, list]], record: dict[str, str]) -> None:
|
| 353 |
+
raw_names = {record.get("name", ""), record.get("iupac", "")}
|
| 354 |
+
raw_names.update(record.get("aliases", []))
|
| 355 |
+
for raw_name in raw_names:
|
| 356 |
+
if not raw_name:
|
| 357 |
+
continue
|
| 358 |
+
cleaned_name = clean_reference_name(raw_name)
|
| 359 |
+
if not cleaned_name:
|
| 360 |
+
continue
|
| 361 |
+
normalized = normalize_name(cleaned_name)
|
| 362 |
+
if normalized:
|
| 363 |
+
index["norm"][normalized].append(record)
|
| 364 |
+
compact = alnum_name(cleaned_name)
|
| 365 |
+
if compact:
|
| 366 |
+
index["alnum"][compact].append(record)
|
| 367 |
+
cas = record.get("cas", "").strip()
|
| 368 |
+
if cas:
|
| 369 |
+
index["cas"][cas].append(record)
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
def put_file_lookup(mapping: dict[str, str], file_name: str, value: str) -> None:
|
| 373 |
+
if not file_name or not value:
|
| 374 |
+
return
|
| 375 |
+
mapping[file_name] = value
|
| 376 |
+
stem = file_name
|
| 377 |
+
if "." in file_name:
|
| 378 |
+
stem = file_name.rsplit(".", 1)[0]
|
| 379 |
+
mapping[stem] = value
|
| 380 |
+
|
| 381 |
+
|
| 382 |
+
def get_file_lookup(mapping: dict[str, str], file_name: str) -> str:
|
| 383 |
+
if not file_name:
|
| 384 |
+
return ""
|
| 385 |
+
if file_name in mapping:
|
| 386 |
+
return mapping[file_name]
|
| 387 |
+
for suffix in (".sdf", ".mol2"):
|
| 388 |
+
candidate = f"{file_name}{suffix}"
|
| 389 |
+
if candidate in mapping:
|
| 390 |
+
return mapping[candidate]
|
| 391 |
+
stem = file_name.rsplit(".", 1)[0] if "." in file_name else file_name
|
| 392 |
+
return mapping.get(stem, "")
|
| 393 |
+
|
| 394 |
+
|
| 395 |
+
def build_reference_index() -> dict[str, defaultdict[str, list]]:
|
| 396 |
+
index: dict[str, defaultdict[str, list]] = {
|
| 397 |
+
"norm": defaultdict(list),
|
| 398 |
+
"alnum": defaultdict(list),
|
| 399 |
+
"cas": defaultdict(list),
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
handle, reader = open_csv_with_fallback(YAO_CSV)
|
| 403 |
+
try:
|
| 404 |
+
for row in reader:
|
| 405 |
+
record = {
|
| 406 |
+
"source": "药典中药汇总",
|
| 407 |
+
"name": clean_reference_name(pick(row, ("name",))),
|
| 408 |
+
"iupac": pick(row, ("iupacname",)),
|
| 409 |
+
"formula": pick(row, ("molecularformula",)),
|
| 410 |
+
"smiles": pick(row, ("smiles",)),
|
| 411 |
+
"inchi": pick(row, ("inchi",)),
|
| 412 |
+
"inchikey": pick(row, ("inchikey",)),
|
| 413 |
+
"cas": pick(row, ("cas",)),
|
| 414 |
+
"cid": pick(row, ("pubchemcid",)),
|
| 415 |
+
"aliases": [],
|
| 416 |
+
}
|
| 417 |
+
if record["name"] or record["iupac"]:
|
| 418 |
+
add_record(index, record)
|
| 419 |
+
finally:
|
| 420 |
+
handle.close()
|
| 421 |
+
|
| 422 |
+
for dirpath, _dirnames, filenames in os.walk(AGG_ROOT):
|
| 423 |
+
for filename in filenames:
|
| 424 |
+
if not filename.endswith("_Info_汇总.csv"):
|
| 425 |
+
continue
|
| 426 |
+
path = Path(dirpath) / filename
|
| 427 |
+
handle, reader = open_csv_with_fallback(path)
|
| 428 |
+
try:
|
| 429 |
+
for row in reader:
|
| 430 |
+
record = {
|
| 431 |
+
"source": filename,
|
| 432 |
+
"name": clean_reference_name(pick(row, NAME_COLUMNS)),
|
| 433 |
+
"iupac": pick(row, IUPAC_COLUMNS),
|
| 434 |
+
"formula": pick(row, FORMULA_COLUMNS),
|
| 435 |
+
"smiles": pick(row, SMILES_COLUMNS),
|
| 436 |
+
"inchi": pick(row, INCHI_COLUMNS),
|
| 437 |
+
"inchikey": pick(row, INCHIKEY_COLUMNS),
|
| 438 |
+
"cas": pick(row, CAS_COLUMNS),
|
| 439 |
+
"cid": pick(row, CID_COLUMNS),
|
| 440 |
+
"aliases": [],
|
| 441 |
+
}
|
| 442 |
+
if record["name"] or record["iupac"]:
|
| 443 |
+
add_record(index, record)
|
| 444 |
+
finally:
|
| 445 |
+
handle.close()
|
| 446 |
+
|
| 447 |
+
if HERB2_SOURCE_BACKFILL_CSV.exists():
|
| 448 |
+
handle, reader = open_csv_with_fallback(HERB2_SOURCE_BACKFILL_CSV)
|
| 449 |
+
try:
|
| 450 |
+
for row in reader:
|
| 451 |
+
if pick(row, ("sourcebackfillstatus",)) != "filled_ingredient_detail":
|
| 452 |
+
continue
|
| 453 |
+
if not any(
|
| 454 |
+
pick(row, columns)
|
| 455 |
+
for columns in (
|
| 456 |
+
("pubchemcid",),
|
| 457 |
+
("smiles",),
|
| 458 |
+
("inchi",),
|
| 459 |
+
("inchkey",),
|
| 460 |
+
("cas",),
|
| 461 |
+
)
|
| 462 |
+
):
|
| 463 |
+
continue
|
| 464 |
+
queried_name = clean_reference_name(pick(row, ("queriedname",)))
|
| 465 |
+
record = {
|
| 466 |
+
"source": "HERB2_source_backfill_rows",
|
| 467 |
+
"name": clean_reference_name(pick(row, ("sourceingredientname", "sourcepubchemname"))),
|
| 468 |
+
"iupac": pick(row, ("iupacname", "sourcepubchemname")),
|
| 469 |
+
"formula": pick(row, ("molecularformula",)),
|
| 470 |
+
"smiles": pick(row, ("smiles",)),
|
| 471 |
+
"inchi": pick(row, ("inchi",)),
|
| 472 |
+
"inchikey": pick(row, ("inchkey",)),
|
| 473 |
+
"cas": pick(row, ("cas",)),
|
| 474 |
+
"cid": pick(row, ("pubchemcid",)),
|
| 475 |
+
"aliases": (
|
| 476 |
+
split_aliases(pick(row, ("sourceingredientalias",)))
|
| 477 |
+
+ ([queried_name] if queried_name else [])
|
| 478 |
+
+ split_aliases(pick(row, ("sourcepubchemname",)))
|
| 479 |
+
),
|
| 480 |
+
}
|
| 481 |
+
if record["name"] or record["iupac"] or record["aliases"]:
|
| 482 |
+
add_record(index, record)
|
| 483 |
+
finally:
|
| 484 |
+
handle.close()
|
| 485 |
+
|
| 486 |
+
smiles_by_file: dict[str, str] = {}
|
| 487 |
+
handle, reader = open_csv_with_fallback(QQCM_SMILES)
|
| 488 |
+
try:
|
| 489 |
+
for row in reader:
|
| 490 |
+
smiles = pick(row, ("smiles",))
|
| 491 |
+
file_name = pick(row, ("file_name",))
|
| 492 |
+
put_file_lookup(smiles_by_file, file_name, smiles)
|
| 493 |
+
finally:
|
| 494 |
+
handle.close()
|
| 495 |
+
|
| 496 |
+
inchikey_by_file: dict[str, str] = {}
|
| 497 |
+
handle, reader = open_csv_with_fallback(QQCM_INCHIKEY)
|
| 498 |
+
try:
|
| 499 |
+
for row in reader:
|
| 500 |
+
inchikey = pick(row, ("inchikey",))
|
| 501 |
+
file_name = pick(row, ("file_name",))
|
| 502 |
+
put_file_lookup(inchikey_by_file, file_name, inchikey)
|
| 503 |
+
finally:
|
| 504 |
+
handle.close()
|
| 505 |
+
|
| 506 |
+
lookup_cids = load_lookup_cid_map()
|
| 507 |
+
group_cids = load_group_cid_map()
|
| 508 |
+
tcmsp_cache = load_tcmsp_cache()
|
| 509 |
+
|
| 510 |
+
handle, reader = open_csv_with_fallback(QQCM_NAME_MAP, delimiter="\t")
|
| 511 |
+
try:
|
| 512 |
+
for row in reader:
|
| 513 |
+
file_name = pick(row, ("file_name",))
|
| 514 |
+
compound_name = clean_reference_name(pick(row, ("compound_name",)))
|
| 515 |
+
if not file_name or not compound_name:
|
| 516 |
+
continue
|
| 517 |
+
record = {
|
| 518 |
+
"source": "qqcm_pubchem_drugbank_mapping",
|
| 519 |
+
"name": compound_name,
|
| 520 |
+
"iupac": "",
|
| 521 |
+
"formula": "",
|
| 522 |
+
"smiles": get_file_lookup(smiles_by_file, file_name),
|
| 523 |
+
"inchi": "",
|
| 524 |
+
"inchikey": get_file_lookup(inchikey_by_file, file_name),
|
| 525 |
+
"cas": "",
|
| 526 |
+
"cid": resolve_qqcm_pubchem_cid(file_name, lookup_cids, group_cids, tcmsp_cache),
|
| 527 |
+
"aliases": [],
|
| 528 |
+
}
|
| 529 |
+
add_record(index, record)
|
| 530 |
+
finally:
|
| 531 |
+
handle.close()
|
| 532 |
+
|
| 533 |
+
return index
|
| 534 |
+
|
| 535 |
+
|
| 536 |
+
def match_records(
|
| 537 |
+
name: str,
|
| 538 |
+
formula: str,
|
| 539 |
+
index: dict[str, defaultdict[str, list]],
|
| 540 |
+
) -> tuple[str, list[dict[str, str]], str]:
|
| 541 |
+
if is_inchi_literal(name):
|
| 542 |
+
return "无法解明结构", [], "名称字段是 InChI 文本,当前流程未解析 InChI 到标准标识符"
|
| 543 |
+
|
| 544 |
+
if is_unresolved_noise(name):
|
| 545 |
+
return "无法解明结构", [], "名称像缩写、内部代号、截断值或带噪声后缀,无法稳定对应唯一结构"
|
| 546 |
+
|
| 547 |
+
candidates: list[dict[str, str]] = []
|
| 548 |
+
reason = ""
|
| 549 |
+
normalized = normalize_name(name)
|
| 550 |
+
compact = alnum_name(name)
|
| 551 |
+
|
| 552 |
+
if is_cas_name(name):
|
| 553 |
+
candidates = dedup_records(index["cas"].get(name.strip(), []))
|
| 554 |
+
reason = "按 CAS 号匹配本地参考库"
|
| 555 |
+
else:
|
| 556 |
+
candidates = dedup_records(index["norm"].get(normalized, []))
|
| 557 |
+
if candidates:
|
| 558 |
+
reason = "按标准化名称精确匹配本地参考库"
|
| 559 |
+
elif compact:
|
| 560 |
+
candidates = dedup_records(index["alnum"].get(compact, []))
|
| 561 |
+
if candidates:
|
| 562 |
+
reason = "按去符号名称匹配本地参考库"
|
| 563 |
+
|
| 564 |
+
if not candidates:
|
| 565 |
+
return "无法解明结构", [], "本地参考库未找到可用同名结构"
|
| 566 |
+
|
| 567 |
+
matched_formula = [rec for rec in candidates if norm_formula(rec.get("formula", "")) == formula]
|
| 568 |
+
if formula and len(matched_formula) == 1:
|
| 569 |
+
return "唯一结构", matched_formula, f"{reason},且分子式唯一一致"
|
| 570 |
+
if formula and len(matched_formula) > 1:
|
| 571 |
+
return "多候选结构", matched_formula, f"{reason},但同名同分子式仍对应多个候选结构"
|
| 572 |
+
|
| 573 |
+
if len(candidates) == 1:
|
| 574 |
+
return "唯一结构", candidates, f"{reason},本地仅找到一个候选结构"
|
| 575 |
+
|
| 576 |
+
return "多候选结构", candidates, f"{reason},同名对应多个候选结构"
|
| 577 |
+
|
| 578 |
+
|
| 579 |
+
def format_candidates(records: list[dict[str, str]], limit: int = 5) -> str:
|
| 580 |
+
parts = []
|
| 581 |
+
for record in records[:limit]:
|
| 582 |
+
bits = []
|
| 583 |
+
if record.get("name"):
|
| 584 |
+
bits.append(record["name"])
|
| 585 |
+
if record.get("formula"):
|
| 586 |
+
bits.append(record["formula"])
|
| 587 |
+
if record.get("cid"):
|
| 588 |
+
bits.append(f"CID={record['cid']}")
|
| 589 |
+
if record.get("inchikey"):
|
| 590 |
+
bits.append(f"InChIKey={record['inchikey']}")
|
| 591 |
+
parts.append(" | ".join(bits))
|
| 592 |
+
return " ; ".join(parts)
|
| 593 |
+
|
| 594 |
+
|
| 595 |
+
def main() -> None:
|
| 596 |
+
index = build_reference_index()
|
| 597 |
+
status_counter: Counter[str] = Counter()
|
| 598 |
+
|
| 599 |
+
with MS_CSV.open("r", encoding="utf-8-sig", newline="") as src, OUTPUT_CSV.open(
|
| 600 |
+
"w", encoding="utf-8-sig", newline=""
|
| 601 |
+
) as dst:
|
| 602 |
+
reader = csv.DictReader(src)
|
| 603 |
+
fieldnames = list(reader.fieldnames or [])
|
| 604 |
+
extra = [
|
| 605 |
+
"structure_resolution",
|
| 606 |
+
"matched_smiles",
|
| 607 |
+
"matched_inchi",
|
| 608 |
+
"matched_inchikey",
|
| 609 |
+
"matched_pubchem_cid",
|
| 610 |
+
"match_reason",
|
| 611 |
+
"candidate_count",
|
| 612 |
+
"candidate_examples",
|
| 613 |
+
]
|
| 614 |
+
writer = csv.DictWriter(dst, fieldnames=fieldnames + extra)
|
| 615 |
+
writer.writeheader()
|
| 616 |
+
|
| 617 |
+
for row in reader:
|
| 618 |
+
name = row.get("Name", "").strip()
|
| 619 |
+
formula = norm_formula(row.get("Formula", ""))
|
| 620 |
+
status, records, reason = match_records(name, formula, index)
|
| 621 |
+
status_counter[status] += 1
|
| 622 |
+
primary = records[0] if records else {}
|
| 623 |
+
|
| 624 |
+
row.update(
|
| 625 |
+
{
|
| 626 |
+
"structure_resolution": status,
|
| 627 |
+
"matched_smiles": primary.get("smiles", "") if status == "唯一结构" else "",
|
| 628 |
+
"matched_inchi": primary.get("inchi", "") if status == "唯一结构" else "",
|
| 629 |
+
"matched_inchikey": primary.get("inchikey", "") if status == "唯一结构" else "",
|
| 630 |
+
"matched_pubchem_cid": primary.get("cid", "") if status == "唯一结构" else "",
|
| 631 |
+
"match_reason": reason,
|
| 632 |
+
"candidate_count": str(len(records)),
|
| 633 |
+
"candidate_examples": format_candidates(records),
|
| 634 |
+
}
|
| 635 |
+
)
|
| 636 |
+
writer.writerow(row)
|
| 637 |
+
|
| 638 |
+
print(f"output={OUTPUT_CSV}")
|
| 639 |
+
for status, count in sorted(status_counter.items()):
|
| 640 |
+
print(f"{status}\t{count}")
|
| 641 |
+
|
| 642 |
+
|
| 643 |
+
if __name__ == "__main__":
|
| 644 |
+
main()
|
MS/build_ms_intersection_compound_match.py
ADDED
|
@@ -0,0 +1,705 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Match QQCM mass-spec intersection hits against the local QQCM compound library."""
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import argparse
|
| 7 |
+
import csv
|
| 8 |
+
import json
|
| 9 |
+
import re
|
| 10 |
+
import sys
|
| 11 |
+
from collections import Counter, defaultdict
|
| 12 |
+
from dataclasses import dataclass, field
|
| 13 |
+
from difflib import SequenceMatcher
|
| 14 |
+
from pathlib import Path
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
ROOT = Path(__file__).resolve().parents[1]
|
| 18 |
+
MS_DIR = ROOT / "MS"
|
| 19 |
+
DEFAULT_MS_CSV = MS_DIR / "三者交集完整输出.csv"
|
| 20 |
+
DEFAULT_NAME_MAP = ROOT / "id_trans" / "qqcm_pubchem_drugbank_mapping.tsv"
|
| 21 |
+
DEFAULT_LABELS = (
|
| 22 |
+
ROOT / "KG" / "qqcm_compound_subgraph" / "helper_tables" / "qqcm_mol_id_labels.tsv"
|
| 23 |
+
)
|
| 24 |
+
DEFAULT_NODES = ROOT / "KG" / "qqcm_compound_subgraph" / "nodes.tsv"
|
| 25 |
+
DEFAULT_OUTPUT_DIR = MS_DIR / "ms_compare"
|
| 26 |
+
MASS_TOLERANCE = 0.01
|
| 27 |
+
|
| 28 |
+
GREEK_TRANSLATIONS = {
|
| 29 |
+
"α": "alpha",
|
| 30 |
+
"β": "beta",
|
| 31 |
+
"γ": "gamma",
|
| 32 |
+
"δ": "delta",
|
| 33 |
+
"κ": "kappa",
|
| 34 |
+
"λ": "lambda",
|
| 35 |
+
"μ": "mu",
|
| 36 |
+
"ω": "omega",
|
| 37 |
+
}
|
| 38 |
+
STEREO_PREFIX_RE = re.compile(r"^(?:d|l|dl|r|s)\s+", re.IGNORECASE)
|
| 39 |
+
NON_ALNUM_RE = re.compile(r"[^a-z0-9]+")
|
| 40 |
+
|
| 41 |
+
ACCEPTED_MATCH_STATUSES = {
|
| 42 |
+
"exact_name_formula_mass",
|
| 43 |
+
"high_fuzzy_formula_mass",
|
| 44 |
+
"fuzzy_formula_mass",
|
| 45 |
+
"formula_mass_single_candidate",
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
@dataclass
|
| 50 |
+
class CompoundRecord:
|
| 51 |
+
compound_node_id: str
|
| 52 |
+
preferred_name: str = ""
|
| 53 |
+
all_names: set[str] = field(default_factory=set)
|
| 54 |
+
drugbank_ids: set[str] = field(default_factory=set)
|
| 55 |
+
drugbank_names: set[str] = field(default_factory=set)
|
| 56 |
+
herb_names: set[str] = field(default_factory=set)
|
| 57 |
+
mol_ids: set[str] = field(default_factory=set)
|
| 58 |
+
file_names: set[str] = field(default_factory=set)
|
| 59 |
+
source_set: set[str] = field(default_factory=set)
|
| 60 |
+
parse_source_set: set[str] = field(default_factory=set)
|
| 61 |
+
inchikey: str = ""
|
| 62 |
+
smiles: str = ""
|
| 63 |
+
inchi: str = ""
|
| 64 |
+
formula: str = ""
|
| 65 |
+
exact_mass: float | None = None
|
| 66 |
+
molecular_weight: str = ""
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
def parse_args() -> argparse.Namespace:
|
| 70 |
+
parser = argparse.ArgumentParser(
|
| 71 |
+
description="Compare the QQCM three-way mass-spec intersection table with local QQCM compounds."
|
| 72 |
+
)
|
| 73 |
+
parser.add_argument("--ms-csv", type=Path, default=DEFAULT_MS_CSV)
|
| 74 |
+
parser.add_argument("--name-map", type=Path, default=DEFAULT_NAME_MAP)
|
| 75 |
+
parser.add_argument("--labels", type=Path, default=DEFAULT_LABELS)
|
| 76 |
+
parser.add_argument("--nodes", type=Path, default=DEFAULT_NODES)
|
| 77 |
+
parser.add_argument("--output-dir", type=Path, default=DEFAULT_OUTPUT_DIR)
|
| 78 |
+
parser.add_argument("--mass-tolerance", type=float, default=MASS_TOLERANCE)
|
| 79 |
+
return parser.parse_args()
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
def read_tsv_rows(path: Path) -> list[dict[str, str]]:
|
| 83 |
+
csv.field_size_limit(sys.maxsize)
|
| 84 |
+
with path.open("r", encoding="utf-8-sig", errors="replace", newline="") as handle:
|
| 85 |
+
return list(csv.DictReader(handle, delimiter="\t"))
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def read_csv_rows(path: Path) -> list[dict[str, str]]:
|
| 89 |
+
csv.field_size_limit(sys.maxsize)
|
| 90 |
+
with path.open("r", encoding="utf-8-sig", errors="replace", newline="") as handle:
|
| 91 |
+
return list(csv.DictReader(handle))
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def write_csv(path: Path, fieldnames: list[str], rows: list[dict[str, object]]) -> None:
|
| 95 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 96 |
+
with path.open("w", encoding="utf-8-sig", newline="") as handle:
|
| 97 |
+
writer = csv.DictWriter(handle, fieldnames=fieldnames)
|
| 98 |
+
writer.writeheader()
|
| 99 |
+
writer.writerows(rows)
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def split_pipe_values(value: str) -> list[str]:
|
| 103 |
+
return [item.strip() for item in value.split("|") if item.strip()]
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
def choose_preferred_name(names: set[str], drugbank_names: set[str]) -> str:
|
| 107 |
+
candidates = {item.strip() for item in [*names, *drugbank_names] if item.strip()}
|
| 108 |
+
if not candidates:
|
| 109 |
+
return ""
|
| 110 |
+
|
| 111 |
+
def score(name: str) -> tuple[int, int, str]:
|
| 112 |
+
lower = name.lower()
|
| 113 |
+
return (
|
| 114 |
+
1 if lower.startswith("cid_") or lower.startswith("mol") else 0,
|
| 115 |
+
len(name),
|
| 116 |
+
lower,
|
| 117 |
+
)
|
| 118 |
+
|
| 119 |
+
return sorted(candidates, key=score)[0]
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
def normalize_name(name: str) -> str:
|
| 123 |
+
text = (name or "").strip().lower()
|
| 124 |
+
for original, replacement in GREEK_TRANSLATIONS.items():
|
| 125 |
+
text = text.replace(original, replacement)
|
| 126 |
+
text = text.replace("_qt", "")
|
| 127 |
+
text = text.replace("_", " ")
|
| 128 |
+
text = text.replace("/", " ")
|
| 129 |
+
text = text.replace("\\", " ")
|
| 130 |
+
text = text.replace("-", " ")
|
| 131 |
+
text = text.replace(",", " ")
|
| 132 |
+
text = text.replace("'", "")
|
| 133 |
+
text = re.sub(r"[\(\)\[\]\{\}:;]+", " ", text)
|
| 134 |
+
text = re.sub(r"\s+", " ", text).strip()
|
| 135 |
+
return text
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
def build_name_aliases(name: str) -> set[str]:
|
| 139 |
+
base = normalize_name(name)
|
| 140 |
+
if not base:
|
| 141 |
+
return set()
|
| 142 |
+
|
| 143 |
+
aliases = {base}
|
| 144 |
+
aliases.add(NON_ALNUM_RE.sub("", base))
|
| 145 |
+
|
| 146 |
+
stereo_removed = STEREO_PREFIX_RE.sub("", base).strip()
|
| 147 |
+
if stereo_removed and stereo_removed != base:
|
| 148 |
+
aliases.add(stereo_removed)
|
| 149 |
+
aliases.add(NON_ALNUM_RE.sub("", stereo_removed))
|
| 150 |
+
|
| 151 |
+
return {alias for alias in aliases if alias}
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
def tokenize_name(name: str) -> set[str]:
|
| 155 |
+
base = normalize_name(name)
|
| 156 |
+
tokens = [item for item in re.split(r"[^a-z0-9]+", base) if item]
|
| 157 |
+
if tokens and tokens[0] in {"d", "l", "dl", "r", "s"}:
|
| 158 |
+
tokens = tokens[1:]
|
| 159 |
+
return set(tokens)
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
def name_similarity(query: str, candidate_names: set[str]) -> tuple[float, str]:
|
| 163 |
+
query_aliases = build_name_aliases(query)
|
| 164 |
+
query_tokens = tokenize_name(query)
|
| 165 |
+
best_score = 0.0
|
| 166 |
+
best_name = ""
|
| 167 |
+
|
| 168 |
+
for candidate_name in candidate_names:
|
| 169 |
+
candidate_aliases = build_name_aliases(candidate_name)
|
| 170 |
+
candidate_tokens = tokenize_name(candidate_name)
|
| 171 |
+
exact_alias_overlap = query_aliases & candidate_aliases
|
| 172 |
+
if exact_alias_overlap:
|
| 173 |
+
return 1.0, candidate_name
|
| 174 |
+
|
| 175 |
+
for query_alias in query_aliases:
|
| 176 |
+
for candidate_alias in candidate_aliases:
|
| 177 |
+
if not query_alias or not candidate_alias:
|
| 178 |
+
continue
|
| 179 |
+
ratio = SequenceMatcher(None, query_alias, candidate_alias).ratio()
|
| 180 |
+
if query_tokens and candidate_tokens:
|
| 181 |
+
common = query_tokens & candidate_tokens
|
| 182 |
+
union = query_tokens | candidate_tokens
|
| 183 |
+
jaccard = len(common) / len(union) if union else 0.0
|
| 184 |
+
containment = len(common) / min(
|
| 185 |
+
len(query_tokens), len(candidate_tokens)
|
| 186 |
+
)
|
| 187 |
+
else:
|
| 188 |
+
jaccard = 0.0
|
| 189 |
+
containment = 0.0
|
| 190 |
+
|
| 191 |
+
score = max(
|
| 192 |
+
ratio,
|
| 193 |
+
0.75 * ratio + 0.25 * jaccard,
|
| 194 |
+
0.7 * ratio + 0.3 * containment,
|
| 195 |
+
)
|
| 196 |
+
if query_alias in candidate_alias or candidate_alias in query_alias:
|
| 197 |
+
short = min(len(query_alias), len(candidate_alias))
|
| 198 |
+
long = max(len(query_alias), len(candidate_alias))
|
| 199 |
+
score = max(score, short / long)
|
| 200 |
+
|
| 201 |
+
if score > best_score:
|
| 202 |
+
best_score = score
|
| 203 |
+
best_name = candidate_name
|
| 204 |
+
|
| 205 |
+
return best_score, best_name
|
| 206 |
+
|
| 207 |
+
|
| 208 |
+
def parse_float(value: str) -> float | None:
|
| 209 |
+
text = (value or "").strip()
|
| 210 |
+
if not text:
|
| 211 |
+
return None
|
| 212 |
+
try:
|
| 213 |
+
return float(text)
|
| 214 |
+
except ValueError:
|
| 215 |
+
return None
|
| 216 |
+
|
| 217 |
+
|
| 218 |
+
def load_name_map(path: Path) -> dict[str, dict[str, str]]:
|
| 219 |
+
rows = read_tsv_rows(path)
|
| 220 |
+
mapping: dict[str, dict[str, str]] = {}
|
| 221 |
+
for row in rows:
|
| 222 |
+
raw_name = (row.get("file_name") or "").strip()
|
| 223 |
+
if not raw_name:
|
| 224 |
+
continue
|
| 225 |
+
mapping[raw_name] = row
|
| 226 |
+
mapping[Path(raw_name).stem] = row
|
| 227 |
+
return mapping
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
def load_label_rows(path: Path) -> list[dict[str, str]]:
|
| 231 |
+
return read_tsv_rows(path)
|
| 232 |
+
|
| 233 |
+
|
| 234 |
+
def load_node_meta(
|
| 235 |
+
path: Path, wanted_node_ids: set[str]
|
| 236 |
+
) -> dict[str, dict[str, object]]:
|
| 237 |
+
csv.field_size_limit(sys.maxsize)
|
| 238 |
+
node_meta: dict[str, dict[str, object]] = {}
|
| 239 |
+
with path.open("r", encoding="utf-8-sig", errors="replace", newline="") as handle:
|
| 240 |
+
reader = csv.DictReader(handle, delimiter="\t")
|
| 241 |
+
for row in reader:
|
| 242 |
+
if row.get("node_type") != "compound":
|
| 243 |
+
continue
|
| 244 |
+
node_id = row.get("node_id", "")
|
| 245 |
+
if node_id not in wanted_node_ids:
|
| 246 |
+
continue
|
| 247 |
+
extra = json.loads(row.get("extra_json") or "{}")
|
| 248 |
+
node_meta[node_id] = {
|
| 249 |
+
"aliases": split_pipe_values(row.get("aliases", "")),
|
| 250 |
+
"extra": extra,
|
| 251 |
+
}
|
| 252 |
+
return node_meta
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
def build_reference_records(
|
| 256 |
+
name_map_path: Path, labels_path: Path, nodes_path: Path
|
| 257 |
+
) -> list[CompoundRecord]:
|
| 258 |
+
name_map = load_name_map(name_map_path)
|
| 259 |
+
label_rows = load_label_rows(labels_path)
|
| 260 |
+
wanted_node_ids = {row["compound_node_id"] for row in label_rows if row["compound_node_id"]}
|
| 261 |
+
node_meta = load_node_meta(nodes_path, wanted_node_ids)
|
| 262 |
+
|
| 263 |
+
records_by_node: dict[str, CompoundRecord] = {}
|
| 264 |
+
|
| 265 |
+
for row in label_rows:
|
| 266 |
+
compound_node_id = row["compound_node_id"]
|
| 267 |
+
record = records_by_node.setdefault(
|
| 268 |
+
compound_node_id, CompoundRecord(compound_node_id=compound_node_id)
|
| 269 |
+
)
|
| 270 |
+
|
| 271 |
+
file_name = row.get("file_name", "").strip()
|
| 272 |
+
mol_id = row.get("mol_id", "").strip()
|
| 273 |
+
if file_name:
|
| 274 |
+
record.file_names.add(file_name)
|
| 275 |
+
if mol_id:
|
| 276 |
+
record.mol_ids.add(mol_id)
|
| 277 |
+
if row.get("compound_inchikey", "").strip() and not record.inchikey:
|
| 278 |
+
record.inchikey = row["compound_inchikey"].strip()
|
| 279 |
+
if row.get("smiles", "").strip() and not record.smiles:
|
| 280 |
+
record.smiles = row["smiles"].strip()
|
| 281 |
+
record.source_set.update(split_pipe_values(row.get("source", "")))
|
| 282 |
+
record.parse_source_set.update(split_pipe_values(row.get("parse_source", "")))
|
| 283 |
+
record.herb_names.update(split_pipe_values(row.get("herb_names", "")))
|
| 284 |
+
|
| 285 |
+
mapped = name_map.get(file_name) or name_map.get(Path(file_name).stem)
|
| 286 |
+
if mapped:
|
| 287 |
+
compound_name = (mapped.get("compound_name") or "").strip()
|
| 288 |
+
if compound_name:
|
| 289 |
+
record.all_names.add(compound_name)
|
| 290 |
+
drugbank_id = (mapped.get("drugbank_id") or "").strip()
|
| 291 |
+
drugbank_name = (mapped.get("drugbank_name") or "").strip()
|
| 292 |
+
if drugbank_id:
|
| 293 |
+
record.drugbank_ids.add(drugbank_id)
|
| 294 |
+
if drugbank_name:
|
| 295 |
+
record.drugbank_names.add(drugbank_name)
|
| 296 |
+
|
| 297 |
+
for compound_node_id, record in records_by_node.items():
|
| 298 |
+
meta = node_meta.get(compound_node_id, {})
|
| 299 |
+
extra = meta.get("extra", {})
|
| 300 |
+
if not record.inchikey:
|
| 301 |
+
record.inchikey = str(extra.get("InChIKey") or "").strip()
|
| 302 |
+
if not record.smiles:
|
| 303 |
+
record.smiles = str(extra.get("SMILES") or extra.get("smiles") or "").strip()
|
| 304 |
+
record.inchi = str(extra.get("InChI") or "").strip()
|
| 305 |
+
record.formula = str(extra.get("Molecular_Formula") or "").strip()
|
| 306 |
+
record.exact_mass = parse_float(str(extra.get("ExactMolWt") or ""))
|
| 307 |
+
record.molecular_weight = str(extra.get("MolWt") or "").strip()
|
| 308 |
+
record.mol_ids.update(str(item) for item in extra.get("qqcm_mol_ids", []) if str(item))
|
| 309 |
+
record.source_set.update(str(item) for item in extra.get("qqcm_sources", []) if str(item))
|
| 310 |
+
record.parse_source_set.update(
|
| 311 |
+
str(item) for item in extra.get("qqcm_parse_sources", []) if str(item)
|
| 312 |
+
)
|
| 313 |
+
record.herb_names.update(str(item) for item in extra.get("qqcm_herbs", []) if str(item))
|
| 314 |
+
record.preferred_name = choose_preferred_name(record.all_names, record.drugbank_names)
|
| 315 |
+
|
| 316 |
+
return sorted(records_by_node.values(), key=lambda item: item.preferred_name.lower())
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
def build_reference_rows(records: list[CompoundRecord]) -> list[dict[str, object]]:
|
| 320 |
+
rows: list[dict[str, object]] = []
|
| 321 |
+
for record in records:
|
| 322 |
+
rows.append(
|
| 323 |
+
{
|
| 324 |
+
"compound_node_id": record.compound_node_id,
|
| 325 |
+
"preferred_name": record.preferred_name,
|
| 326 |
+
"all_names": "|".join(sorted(record.all_names)),
|
| 327 |
+
"drugbank_ids": "|".join(sorted(record.drugbank_ids)),
|
| 328 |
+
"drugbank_names": "|".join(sorted(record.drugbank_names)),
|
| 329 |
+
"herb_names": "|".join(sorted(record.herb_names)),
|
| 330 |
+
"mol_ids": "|".join(sorted(record.mol_ids)),
|
| 331 |
+
"file_names": "|".join(sorted(record.file_names)),
|
| 332 |
+
"source_set": "|".join(sorted(record.source_set)),
|
| 333 |
+
"parse_source_set": "|".join(sorted(record.parse_source_set)),
|
| 334 |
+
"formula": record.formula,
|
| 335 |
+
"exact_mass": f"{record.exact_mass:.6f}" if record.exact_mass is not None else "",
|
| 336 |
+
"molecular_weight": record.molecular_weight,
|
| 337 |
+
"inchikey": record.inchikey,
|
| 338 |
+
"smiles": record.smiles,
|
| 339 |
+
"inchi": record.inchi,
|
| 340 |
+
}
|
| 341 |
+
)
|
| 342 |
+
return rows
|
| 343 |
+
|
| 344 |
+
|
| 345 |
+
def match_status_from_scores(
|
| 346 |
+
candidate_count: int, top_score: float, second_score: float, is_exact_alias: bool
|
| 347 |
+
) -> tuple[str, str]:
|
| 348 |
+
if candidate_count == 0:
|
| 349 |
+
return "no_formula_mass_match", "none"
|
| 350 |
+
if is_exact_alias:
|
| 351 |
+
return "exact_name_formula_mass", "high"
|
| 352 |
+
if candidate_count == 1:
|
| 353 |
+
return "formula_mass_single_candidate", "medium"
|
| 354 |
+
if top_score >= 0.92 and (top_score - second_score) >= 0.08:
|
| 355 |
+
return "high_fuzzy_formula_mass", "high"
|
| 356 |
+
if top_score >= 0.78 and (top_score - second_score) >= 0.05:
|
| 357 |
+
return "fuzzy_formula_mass", "medium"
|
| 358 |
+
return "ambiguous_formula_mass", "low"
|
| 359 |
+
|
| 360 |
+
|
| 361 |
+
def build_candidate_summary(candidates: list[tuple[CompoundRecord, float, str]]) -> str:
|
| 362 |
+
summary_parts: list[str] = []
|
| 363 |
+
for record, score, alias_name in candidates[:3]:
|
| 364 |
+
name = record.preferred_name or next(iter(record.all_names), "")
|
| 365 |
+
herb_names = "|".join(sorted(record.herb_names))
|
| 366 |
+
summary_parts.append(
|
| 367 |
+
f"{name} (score={score:.3f}; alias={alias_name or name}; herbs={herb_names})"
|
| 368 |
+
)
|
| 369 |
+
return " || ".join(summary_parts)
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
def match_ms_rows(
|
| 373 |
+
ms_rows: list[dict[str, str]],
|
| 374 |
+
reference_records: list[CompoundRecord],
|
| 375 |
+
mass_tolerance: float,
|
| 376 |
+
) -> tuple[list[dict[str, object]], list[dict[str, object]], dict[str, object]]:
|
| 377 |
+
records_by_formula: dict[str, list[CompoundRecord]] = defaultdict(list)
|
| 378 |
+
for record in reference_records:
|
| 379 |
+
if record.formula:
|
| 380 |
+
records_by_formula[record.formula].append(record)
|
| 381 |
+
|
| 382 |
+
row_level_matches: list[dict[str, object]] = []
|
| 383 |
+
matched_by_compound: dict[str, dict[str, object]] = {}
|
| 384 |
+
status_counter: Counter[str] = Counter()
|
| 385 |
+
|
| 386 |
+
for row in ms_rows:
|
| 387 |
+
ms_name = (row.get("Name") or "").strip()
|
| 388 |
+
ms_formula = (row.get("Formula") or "").strip()
|
| 389 |
+
ms_mass = parse_float(row.get("Mass (Da)", ""))
|
| 390 |
+
|
| 391 |
+
formula_candidates = records_by_formula.get(ms_formula, [])
|
| 392 |
+
if ms_mass is None:
|
| 393 |
+
mass_candidates = list(formula_candidates)
|
| 394 |
+
else:
|
| 395 |
+
mass_candidates = [
|
| 396 |
+
candidate
|
| 397 |
+
for candidate in formula_candidates
|
| 398 |
+
if candidate.exact_mass is None
|
| 399 |
+
or abs(candidate.exact_mass - ms_mass) <= mass_tolerance
|
| 400 |
+
]
|
| 401 |
+
|
| 402 |
+
scored_candidates: list[tuple[CompoundRecord, float, str]] = []
|
| 403 |
+
query_aliases = build_name_aliases(ms_name)
|
| 404 |
+
for candidate in mass_candidates:
|
| 405 |
+
candidate_names = set(candidate.all_names) | set(candidate.drugbank_names)
|
| 406 |
+
if candidate.preferred_name:
|
| 407 |
+
candidate_names.add(candidate.preferred_name)
|
| 408 |
+
score, alias_name = name_similarity(ms_name, candidate_names)
|
| 409 |
+
scored_candidates.append((candidate, score, alias_name))
|
| 410 |
+
|
| 411 |
+
scored_candidates.sort(
|
| 412 |
+
key=lambda item: (
|
| 413 |
+
item[1],
|
| 414 |
+
len(item[0].preferred_name or ""),
|
| 415 |
+
item[0].preferred_name.lower(),
|
| 416 |
+
),
|
| 417 |
+
reverse=True,
|
| 418 |
+
)
|
| 419 |
+
|
| 420 |
+
top_candidate = scored_candidates[0][0] if scored_candidates else None
|
| 421 |
+
top_score = scored_candidates[0][1] if scored_candidates else 0.0
|
| 422 |
+
top_alias_name = scored_candidates[0][2] if scored_candidates else ""
|
| 423 |
+
second_score = scored_candidates[1][1] if len(scored_candidates) > 1 else 0.0
|
| 424 |
+
exact_alias = bool(
|
| 425 |
+
scored_candidates
|
| 426 |
+
and (
|
| 427 |
+
query_aliases
|
| 428 |
+
& {
|
| 429 |
+
alias
|
| 430 |
+
for candidate_name in (
|
| 431 |
+
set(top_candidate.all_names)
|
| 432 |
+
| set(top_candidate.drugbank_names)
|
| 433 |
+
| ({top_candidate.preferred_name} if top_candidate.preferred_name else set())
|
| 434 |
+
)
|
| 435 |
+
for alias in build_name_aliases(candidate_name)
|
| 436 |
+
}
|
| 437 |
+
)
|
| 438 |
+
)
|
| 439 |
+
|
| 440 |
+
status, confidence = match_status_from_scores(
|
| 441 |
+
candidate_count=len(scored_candidates),
|
| 442 |
+
top_score=top_score,
|
| 443 |
+
second_score=second_score,
|
| 444 |
+
is_exact_alias=exact_alias,
|
| 445 |
+
)
|
| 446 |
+
status_counter[status] += 1
|
| 447 |
+
|
| 448 |
+
best_mass_delta = ""
|
| 449 |
+
if top_candidate and ms_mass is not None and top_candidate.exact_mass is not None:
|
| 450 |
+
best_mass_delta = f"{top_candidate.exact_mass - ms_mass:.6f}"
|
| 451 |
+
|
| 452 |
+
top_candidates_summary = build_candidate_summary(scored_candidates)
|
| 453 |
+
|
| 454 |
+
row_level_match = {
|
| 455 |
+
"ms_row_number": row.get("#", ""),
|
| 456 |
+
"ms_name": ms_name,
|
| 457 |
+
"ms_formula": ms_formula,
|
| 458 |
+
"ms_mass_da": row.get("Mass (Da)", ""),
|
| 459 |
+
"ms_found_at_mass_da": row.get("Found At Mass (Da)", ""),
|
| 460 |
+
"ms_adduct": row.get("Adduct", ""),
|
| 461 |
+
"ms_rt_min": row.get("Found At RT (min)", ""),
|
| 462 |
+
"ms_intensity": row.get("Intensity", ""),
|
| 463 |
+
"ms_area": row.get("Area", ""),
|
| 464 |
+
"match_status": status,
|
| 465 |
+
"match_confidence": confidence,
|
| 466 |
+
"formula_candidate_count": len(formula_candidates),
|
| 467 |
+
"formula_mass_candidate_count": len(scored_candidates),
|
| 468 |
+
"best_name_similarity": f"{top_score:.3f}" if scored_candidates else "",
|
| 469 |
+
"best_alias_name": top_alias_name,
|
| 470 |
+
"top_candidate_summary": top_candidates_summary,
|
| 471 |
+
"matched_compound_node_id": top_candidate.compound_node_id if top_candidate else "",
|
| 472 |
+
"matched_preferred_name": top_candidate.preferred_name if top_candidate else "",
|
| 473 |
+
"matched_all_names": "|".join(sorted(top_candidate.all_names)) if top_candidate else "",
|
| 474 |
+
"matched_drugbank_ids": "|".join(sorted(top_candidate.drugbank_ids))
|
| 475 |
+
if top_candidate
|
| 476 |
+
else "",
|
| 477 |
+
"matched_drugbank_names": "|".join(sorted(top_candidate.drugbank_names))
|
| 478 |
+
if top_candidate
|
| 479 |
+
else "",
|
| 480 |
+
"matched_herb_names": "|".join(sorted(top_candidate.herb_names)) if top_candidate else "",
|
| 481 |
+
"matched_formula": top_candidate.formula if top_candidate else "",
|
| 482 |
+
"matched_exact_mass": f"{top_candidate.exact_mass:.6f}"
|
| 483 |
+
if top_candidate and top_candidate.exact_mass is not None
|
| 484 |
+
else "",
|
| 485 |
+
"matched_mass_delta_da": best_mass_delta,
|
| 486 |
+
"matched_inchikey": top_candidate.inchikey if top_candidate else "",
|
| 487 |
+
"matched_smiles": top_candidate.smiles if top_candidate else "",
|
| 488 |
+
"matched_inchi": top_candidate.inchi if top_candidate else "",
|
| 489 |
+
"matched_mol_ids": "|".join(sorted(top_candidate.mol_ids)) if top_candidate else "",
|
| 490 |
+
"matched_file_names": "|".join(sorted(top_candidate.file_names)) if top_candidate else "",
|
| 491 |
+
"matched_sources": "|".join(sorted(top_candidate.source_set)) if top_candidate else "",
|
| 492 |
+
"matched_parse_sources": "|".join(sorted(top_candidate.parse_source_set))
|
| 493 |
+
if top_candidate
|
| 494 |
+
else "",
|
| 495 |
+
}
|
| 496 |
+
row_level_matches.append(row_level_match)
|
| 497 |
+
|
| 498 |
+
if top_candidate and status in ACCEPTED_MATCH_STATUSES:
|
| 499 |
+
existing = matched_by_compound.setdefault(
|
| 500 |
+
top_candidate.compound_node_id,
|
| 501 |
+
{
|
| 502 |
+
"compound_node_id": top_candidate.compound_node_id,
|
| 503 |
+
"preferred_name": top_candidate.preferred_name,
|
| 504 |
+
"all_names": "|".join(sorted(top_candidate.all_names)),
|
| 505 |
+
"drugbank_ids": "|".join(sorted(top_candidate.drugbank_ids)),
|
| 506 |
+
"drugbank_names": "|".join(sorted(top_candidate.drugbank_names)),
|
| 507 |
+
"herb_names": "|".join(sorted(top_candidate.herb_names)),
|
| 508 |
+
"formula": top_candidate.formula,
|
| 509 |
+
"exact_mass": f"{top_candidate.exact_mass:.6f}"
|
| 510 |
+
if top_candidate.exact_mass is not None
|
| 511 |
+
else "",
|
| 512 |
+
"molecular_weight": top_candidate.molecular_weight,
|
| 513 |
+
"inchikey": top_candidate.inchikey,
|
| 514 |
+
"smiles": top_candidate.smiles,
|
| 515 |
+
"inchi": top_candidate.inchi,
|
| 516 |
+
"mol_ids": "|".join(sorted(top_candidate.mol_ids)),
|
| 517 |
+
"file_names": "|".join(sorted(top_candidate.file_names)),
|
| 518 |
+
"source_set": "|".join(sorted(top_candidate.source_set)),
|
| 519 |
+
"parse_source_set": "|".join(sorted(top_candidate.parse_source_set)),
|
| 520 |
+
"supporting_ms_rows": [],
|
| 521 |
+
"supporting_ms_names": [],
|
| 522 |
+
"supporting_match_statuses": [],
|
| 523 |
+
"best_match_confidence": confidence,
|
| 524 |
+
},
|
| 525 |
+
)
|
| 526 |
+
existing["supporting_ms_rows"].append(str(row.get("#", "")))
|
| 527 |
+
existing["supporting_ms_names"].append(ms_name)
|
| 528 |
+
existing["supporting_match_statuses"].append(status)
|
| 529 |
+
if existing["best_match_confidence"] == "medium" and confidence == "high":
|
| 530 |
+
existing["best_match_confidence"] = "high"
|
| 531 |
+
|
| 532 |
+
matched_compounds: list[dict[str, object]] = []
|
| 533 |
+
for record in matched_by_compound.values():
|
| 534 |
+
matched_compounds.append(
|
| 535 |
+
{
|
| 536 |
+
**{
|
| 537 |
+
key: value
|
| 538 |
+
for key, value in record.items()
|
| 539 |
+
if key
|
| 540 |
+
not in {
|
| 541 |
+
"supporting_ms_rows",
|
| 542 |
+
"supporting_ms_names",
|
| 543 |
+
"supporting_match_statuses",
|
| 544 |
+
}
|
| 545 |
+
},
|
| 546 |
+
"supporting_ms_rows": "|".join(record["supporting_ms_rows"]),
|
| 547 |
+
"supporting_ms_names": "|".join(record["supporting_ms_names"]),
|
| 548 |
+
"supporting_match_statuses": "|".join(record["supporting_match_statuses"]),
|
| 549 |
+
"supporting_ms_count": len(record["supporting_ms_rows"]),
|
| 550 |
+
}
|
| 551 |
+
)
|
| 552 |
+
|
| 553 |
+
matched_compounds.sort(
|
| 554 |
+
key=lambda item: (-int(item["supporting_ms_count"]), item["preferred_name"].lower())
|
| 555 |
+
)
|
| 556 |
+
|
| 557 |
+
report = {
|
| 558 |
+
"total_ms_rows": len(ms_rows),
|
| 559 |
+
"status_counts": dict(status_counter),
|
| 560 |
+
"accepted_match_row_count": sum(
|
| 561 |
+
count for status, count in status_counter.items() if status in ACCEPTED_MATCH_STATUSES
|
| 562 |
+
),
|
| 563 |
+
"accepted_unique_compound_count": len(matched_compounds),
|
| 564 |
+
}
|
| 565 |
+
|
| 566 |
+
return row_level_matches, matched_compounds, report
|
| 567 |
+
|
| 568 |
+
|
| 569 |
+
def main() -> None:
|
| 570 |
+
args = parse_args()
|
| 571 |
+
output_dir = args.output_dir
|
| 572 |
+
output_dir.mkdir(parents=True, exist_ok=True)
|
| 573 |
+
|
| 574 |
+
reference_records = build_reference_records(
|
| 575 |
+
name_map_path=args.name_map,
|
| 576 |
+
labels_path=args.labels,
|
| 577 |
+
nodes_path=args.nodes,
|
| 578 |
+
)
|
| 579 |
+
reference_rows = build_reference_rows(reference_records)
|
| 580 |
+
ms_rows = read_csv_rows(args.ms_csv)
|
| 581 |
+
row_level_matches, matched_compounds, report = match_ms_rows(
|
| 582 |
+
ms_rows=ms_rows,
|
| 583 |
+
reference_records=reference_records,
|
| 584 |
+
mass_tolerance=args.mass_tolerance,
|
| 585 |
+
)
|
| 586 |
+
|
| 587 |
+
reference_path = output_dir / "qqcm_compound_reference_for_ms_compare.csv"
|
| 588 |
+
row_match_path = output_dir / "qqcm_ms_intersection_matches.csv"
|
| 589 |
+
matched_compounds_path = output_dir / "qqcm_ms_intersection_matched_compounds.csv"
|
| 590 |
+
report_path = output_dir / "qqcm_ms_intersection_match_report.json"
|
| 591 |
+
|
| 592 |
+
write_csv(
|
| 593 |
+
reference_path,
|
| 594 |
+
[
|
| 595 |
+
"compound_node_id",
|
| 596 |
+
"preferred_name",
|
| 597 |
+
"all_names",
|
| 598 |
+
"drugbank_ids",
|
| 599 |
+
"drugbank_names",
|
| 600 |
+
"herb_names",
|
| 601 |
+
"mol_ids",
|
| 602 |
+
"file_names",
|
| 603 |
+
"source_set",
|
| 604 |
+
"parse_source_set",
|
| 605 |
+
"formula",
|
| 606 |
+
"exact_mass",
|
| 607 |
+
"molecular_weight",
|
| 608 |
+
"inchikey",
|
| 609 |
+
"smiles",
|
| 610 |
+
"inchi",
|
| 611 |
+
],
|
| 612 |
+
reference_rows,
|
| 613 |
+
)
|
| 614 |
+
write_csv(
|
| 615 |
+
row_match_path,
|
| 616 |
+
[
|
| 617 |
+
"ms_row_number",
|
| 618 |
+
"ms_name",
|
| 619 |
+
"ms_formula",
|
| 620 |
+
"ms_mass_da",
|
| 621 |
+
"ms_found_at_mass_da",
|
| 622 |
+
"ms_adduct",
|
| 623 |
+
"ms_rt_min",
|
| 624 |
+
"ms_intensity",
|
| 625 |
+
"ms_area",
|
| 626 |
+
"match_status",
|
| 627 |
+
"match_confidence",
|
| 628 |
+
"formula_candidate_count",
|
| 629 |
+
"formula_mass_candidate_count",
|
| 630 |
+
"best_name_similarity",
|
| 631 |
+
"best_alias_name",
|
| 632 |
+
"top_candidate_summary",
|
| 633 |
+
"matched_compound_node_id",
|
| 634 |
+
"matched_preferred_name",
|
| 635 |
+
"matched_all_names",
|
| 636 |
+
"matched_drugbank_ids",
|
| 637 |
+
"matched_drugbank_names",
|
| 638 |
+
"matched_herb_names",
|
| 639 |
+
"matched_formula",
|
| 640 |
+
"matched_exact_mass",
|
| 641 |
+
"matched_mass_delta_da",
|
| 642 |
+
"matched_inchikey",
|
| 643 |
+
"matched_smiles",
|
| 644 |
+
"matched_inchi",
|
| 645 |
+
"matched_mol_ids",
|
| 646 |
+
"matched_file_names",
|
| 647 |
+
"matched_sources",
|
| 648 |
+
"matched_parse_sources",
|
| 649 |
+
],
|
| 650 |
+
row_level_matches,
|
| 651 |
+
)
|
| 652 |
+
write_csv(
|
| 653 |
+
matched_compounds_path,
|
| 654 |
+
[
|
| 655 |
+
"compound_node_id",
|
| 656 |
+
"preferred_name",
|
| 657 |
+
"all_names",
|
| 658 |
+
"drugbank_ids",
|
| 659 |
+
"drugbank_names",
|
| 660 |
+
"herb_names",
|
| 661 |
+
"formula",
|
| 662 |
+
"exact_mass",
|
| 663 |
+
"molecular_weight",
|
| 664 |
+
"inchikey",
|
| 665 |
+
"smiles",
|
| 666 |
+
"inchi",
|
| 667 |
+
"mol_ids",
|
| 668 |
+
"file_names",
|
| 669 |
+
"source_set",
|
| 670 |
+
"parse_source_set",
|
| 671 |
+
"best_match_confidence",
|
| 672 |
+
"supporting_ms_rows",
|
| 673 |
+
"supporting_ms_names",
|
| 674 |
+
"supporting_match_statuses",
|
| 675 |
+
"supporting_ms_count",
|
| 676 |
+
],
|
| 677 |
+
matched_compounds,
|
| 678 |
+
)
|
| 679 |
+
report_path.write_text(
|
| 680 |
+
json.dumps(
|
| 681 |
+
{
|
| 682 |
+
**report,
|
| 683 |
+
"inputs": {
|
| 684 |
+
"ms_csv": str(args.ms_csv),
|
| 685 |
+
"name_map": str(args.name_map),
|
| 686 |
+
"labels": str(args.labels),
|
| 687 |
+
"nodes": str(args.nodes),
|
| 688 |
+
},
|
| 689 |
+
"outputs": {
|
| 690 |
+
"reference_csv": str(reference_path),
|
| 691 |
+
"row_match_csv": str(row_match_path),
|
| 692 |
+
"matched_compounds_csv": str(matched_compounds_path),
|
| 693 |
+
"report_json": str(report_path),
|
| 694 |
+
},
|
| 695 |
+
},
|
| 696 |
+
ensure_ascii=False,
|
| 697 |
+
indent=2,
|
| 698 |
+
)
|
| 699 |
+
+ "\n",
|
| 700 |
+
encoding="utf-8",
|
| 701 |
+
)
|
| 702 |
+
|
| 703 |
+
|
| 704 |
+
if __name__ == "__main__":
|
| 705 |
+
main()
|
MS/三者交集完整输出.csv
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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Formula,Mass (Da),Found At Mass (Da),Adduct,Found At RT (min),Formula Finder Result,Intensity,Area,Formula Finder Score,Combined Score,Mass Error Score,Isotope Score,S:N,Extraction Mass (Da),Error (ppm),Error (mDa),RT Delta (min)
|
| 2 |
+
3,L-,,C6H14N4O2,174.1116759,175.1185266,[M+H]+,0.953070451,C6H14N4O2,103328.7716,38267.73407,0.755079068,0.861527871,0.878435351,0.951069196,836.71299,175.1189523,-2.431292985,-0.42576548,0.953070451
|
| 3 |
+
6,L-Valin,,C5H11NO2,117.0789787,118.0860542,[M+H]+,0.981320917,C5H11NO2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 4 |
+
7,quercetin,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 5 |
+
8,isoquercetin_qt,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 6 |
+
11,"quercetin,3-o-glucoside_qt",,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 7 |
+
22,isorhamnetin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 8 |
+
29,betaine,,C5H11NO2,117.0789787,118.0860542,[M+H]+,0.981320917,C5H11NO2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 9 |
+
41,m-Acetylphenol,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 10 |
+
44,Hyacinthin,,C8H8O,120.057515,121.06473,[M+H]+,20.53158743,C8H8O,39727.89058,13303.52496,0.636451403,0.810936649,0.974646323,0.821712221,399.2004228,121.0647914,-0.507073547,-0.061388753,20.53158743
|
| 11 |
+
48,morin,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 12 |
+
72,d-mandelonitrile,,C8H7NO,133.0527639,134.0595297,[M+H]+,3.877725782,C8H7NO,69033.38754,22093.85116,0.904764269,0.870157829,0.809528538,0.896180679,1308.156922,134.0600404,-3.809429249,-0.510692239,3.877725782
|
| 13 |
+
74,MNN,,C8H7NO,133.0527639,134.0595297,[M+H]+,3.877725782,C8H7NO,69033.38754,22093.85116,0.904764269,0.870157829,0.809528538,0.896180679,1308.156922,134.0600404,-3.809429249,-0.510692239,3.877725782
|
| 14 |
+
76,"isorhamnetin,3-o-rutinoside_qt",,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 15 |
+
77,quercetin 3-o-rhamnopyranosyl_qt,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 16 |
+
80,Hypnon,,C8H8O,120.057515,121.06473,[M+H]+,20.53158743,C8H8O,39727.89058,13303.52496,0.636451403,0.810936649,0.974646323,0.821712221,399.2004228,121.0647914,-0.507073547,-0.061388753,20.53158743
|
| 17 |
+
81,Piperonal,,C8H6O3,150.0316942,151.0388167,[M+H]+,20.98601191,C8H6O3,6632.539065,1553.688043,0.624681301,0.809643771,0.949034479,0.855215532,113.4501033,151.0389706,-1.01931041,-0.153955595,20.98601191
|
| 18 |
+
90,6-Hydroxyindole,,C8H7NO,133.0527639,134.0595297,[M+H]+,3.877725782,C8H7NO,69033.38754,22093.85116,0.904764269,0.870157829,0.809528538,0.896180679,1308.156922,134.0600404,-3.809429249,-0.510692239,3.877725782
|
| 19 |
+
93,ADO,,C10H13N5O4,267.0967541,268.1035554,[M+H]+,12.64490854,C10H13N5O4,10378.56541,3699.678021,0.807347252,0.831923166,0.911373433,0.777048813,569.8228938,268.1040306,-1.772531334,-0.475222795,12.64490854
|
| 20 |
+
95,Amide HPL,,C16H33NO,255.256215,256.2629801,[M+H]+,38.32818689,C16H33NO,5733.432635,3103.877124,0.950117198,0.940048676,0.900234396,0.969794435,336.1017564,256.2634914,-1.995312086,-0.511325642,38.32818689
|
| 21 |
+
96,Indoxyl,,C8H7NO,133.0527639,134.0595297,[M+H]+,3.877725782,C8H7NO,69033.38754,22093.85116,0.904764269,0.870157829,0.809528538,0.896180679,1308.156922,134.0600404,-3.809429249,-0.510692239,3.877725782
|
| 22 |
+
97,HBA,,C7H6O2,122.0367795,123.0439384,[M+H]+,16.56579624,C7H6O2,8189.400396,3236.540161,0.476118562,0.790609998,0.952237124,0.94347431,127.6678918,123.044056,-0.95525753,-0.117538761,16.56579624
|
| 23 |
+
110,WLN: T5OJ BVO1,,C6H6O3,126.0316942,127.038473,[M+H]+,10.41703582,C6H6O3,25164.229,10336.97035,0.804164329,0.866685656,0.804164329,0.991728309,372.2537329,127.0389706,-3.916713418,-0.497575241,10.41703582
|
| 24 |
+
112,2-Methylbenzoxazol,,C8H7NO,133.0527639,134.0595297,[M+H]+,3.877725782,C8H7NO,69033.38754,22093.85116,0.904764269,0.870157829,0.809528538,0.896180679,1308.156922,134.0600404,-3.809429249,-0.510692239,3.877725782
|
| 25 |
+
118,L-Adenosine,,C10H13N5O4,267.0967541,268.1035554,[M+H]+,12.64490854,C10H13N5O4,10378.56541,3699.678021,0.807347252,0.831923166,0.911373433,0.777048813,569.8228938,268.1040306,-1.772531334,-0.475222795,12.64490854
|
| 26 |
+
127,Sexangularetin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 27 |
+
129,3-O-Methylquercetin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 28 |
+
130,11-Hydroxynumantenine,,C21H26N2O4,370.1892576,371.1954814,[M+H]+,22.23487262,C21H26N2O4,26880.98736,22793.73408,0.85820344,0.883952207,0.85820344,0.93544974,1131.626559,371.1965341,-2.835931193,-1.05268783,22.23487262
|
| 29 |
+
134,6-Hydroxykaempferol,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 30 |
+
140,Piceol,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 31 |
+
141,Herbacetin,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 32 |
+
144,anisaldehyde,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 33 |
+
149,o-Anisaldehyde,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 34 |
+
151,"2-(2,6-dihydroxyphenyl)-3,5,7-trihydroxy-chromone",,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 35 |
+
152,Skullcapflavone II,,C19H18O8,374.1001678,375.1061551,[M+H]+,33.38864112,C19H18O8,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 36 |
+
153,NEOBAICALEIN,,C19H18O8,374.1001678,375.1061551,[M+H]+,33.38864112,C19H18O8,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 37 |
+
162,demethylwedelolactone,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 38 |
+
163,Tolualdehydes,,C8H8O,120.057515,121.06473,[M+H]+,20.53158743,C8H8O,39727.89058,13303.52496,0.636451403,0.810936649,0.974646323,0.821712221,399.2004228,121.0647914,-0.507073547,-0.061388753,20.53158743
|
| 39 |
+
171,Coumaran,,C8H8O,120.057515,121.06473,[M+H]+,20.53158743,C8H8O,39727.89058,13303.52496,0.636451403,0.810936649,0.974646323,0.821712221,399.2004228,121.0647914,-0.507073547,-0.061388753,20.53158743
|
| 40 |
+
177,6-OH-Luteolin,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 41 |
+
179,Tamarixetin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 42 |
+
180,Azaleatin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 43 |
+
191,Robinetin,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 44 |
+
196,Ara-Furan-A,,C10H13N5O4,267.0967541,268.1035554,[M+H]+,12.64490854,C10H13N5O4,10378.56541,3699.678021,0.807347252,0.831923166,0.911373433,0.777048813,569.8228938,268.1040306,-1.772531334,-0.475222795,12.64490854
|
| 45 |
+
197,PAC,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 46 |
+
206,Nortangeretin,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 47 |
+
208,"2,6,10-trimethyl-dodecane",,C6H8O4,144.0422589,145.0490386,[M+H]+,10.41466868,C6H8O4,40048.31948,16803.67256,0.414378113,0.732432702,0.828756226,0.954163767,503.6725902,145.0495353,-3.424875481,-0.496776597,10.41466868
|
| 48 |
+
213,casticin,,C19H18O8,374.1001678,375.1061551,[M+H]+,33.38864112,C19H18O8,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 49 |
+
215,Nepetin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 50 |
+
220,WLN: QR BV1,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 51 |
+
224,cirsilneol,,C5H11NO2,117.0789787,118.0860542,[M+H]+,0.981320917,C5H11NO2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 52 |
+
231,"3,7,8-Tri-O-methylellagic acid",,C17H12O8,344.0532176,345.0592593,[M+H]+,33.38874291,C17H12O8,28439.02606,8112.923381,0.8210734,0.85634068,0.8210734,0.92687524,2024.293585,345.0604941,-3.578531992,-1.234810017,33.38874291
|
| 53 |
+
234,Rhamnetin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 54 |
+
235,quercetin-3'-methyl ether,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 55 |
+
238,Clorius,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 56 |
+
249,methylrosmarinate,,C19H18O8,374.1001678,375.1061551,[M+H]+,33.38864112,C19H18O8,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 57 |
+
255,3-methylquercetin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 58 |
+
262,"3,5-Dihydroxy-6,7,3',4'-tetramethoxyflavone",,C19H18O8,374.1001678,375.1061551,[M+H]+,33.38864112,C19H18O8,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 59 |
+
263,"isorhamnetin,3-glucoside_qt",,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 60 |
+
271,Hypolaetin,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 61 |
+
274,RON,,C5H11NO2,117.0789787,118.0860542,[M+H]+,0.981320917,C5H11NO2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 62 |
+
279,capillarisin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 63 |
+
281,andrographidine F_qt,,C19H18O8,374.1001678,375.1061551,[M+H]+,33.38864112,C19H18O8,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 64 |
+
284,5-Indolol,,C8H7NO,133.0527639,134.0595297,[M+H]+,3.877725782,C8H7NO,69033.38754,22093.85116,0.904764269,0.870157829,0.809528538,0.896180679,1308.156922,134.0600404,-3.809429249,-0.510692239,3.877725782
|
| 65 |
+
290,"2,6-Cresotaldehyde",,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 66 |
+
293,Isorhynchophylline,,C21H26N2O4,370.1892576,371.1954814,[M+H]+,22.23487262,C21H26N2O4,26880.98736,22793.73408,0.85820344,0.883952207,0.85820344,0.93544974,1131.626559,371.1965341,-2.835931193,-1.05268783,22.23487262
|
| 67 |
+
298,methyl 2-dimethylaminoacetate,,C5H11NO2,117.0789787,118.0860542,[M+H]+,0.981320917,C5H11NO2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 68 |
+
303,MYF,,C15H10O7,302.0426529,303.0491544,[M+H]+,22.49616242,C15H10O7,19099.66836,6559.060367,0.613204661,0.782312438,0.872141078,0.861591576,1512.185708,303.0499293,-2.557178443,-0.774952747,22.49616242
|
| 69 |
+
306,WLN: QVR D1,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 70 |
+
309,ZINC03107553,,C8H8O,120.057515,121.06473,[M+H]+,20.53158743,C8H8O,39727.89058,13303.52496,0.636451403,0.810936649,0.974646323,0.821712221,399.2004228,121.0647914,-0.507073547,-0.061388753,20.53158743
|
| 71 |
+
310,m-Tolualdehyde,,C8H8O,120.057515,121.06473,[M+H]+,20.53158743,C8H8O,39727.89058,13303.52496,0.636451403,0.810936649,0.974646323,0.821712221,399.2004228,121.0647914,-0.507073547,-0.061388753,20.53158743
|
| 72 |
+
315,"3,5,3'-trimethoxyquercetin",,C19H18O8,374.1001678,375.1061551,[M+H]+,33.38864112,C19H18O8,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 73 |
+
317,Pedalitin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 74 |
+
329,"5,6-dihydroxy-2,7,3',4'-tetramethoxyflavonol",,C19H18O8,374.1001678,375.1061551,[M+H]+,33.38864112,C19H18O8,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 75 |
+
332,m-Formylphenol,,C7H6O2,122.0367795,123.0439384,[M+H]+,16.56579624,C7H6O2,8189.400396,3236.540161,0.476118562,0.790609998,0.952237124,0.94347431,127.6678918,123.044056,-0.95525753,-0.117538761,16.56579624
|
| 76 |
+
333,2-Methyl-N-phenylmaleimide,,C11H9NO2,187.0633286,188.0702859,[M+H]+,11.3903728,C11H9NO2,18233.54491,8431.753367,0.576253376,0.774332688,0.915123453,0.831621234,662.4482661,188.0706051,-1.697530933,-0.31925567,11.3903728
|
| 77 |
+
334,NK,,C7H6O2,122.0367795,123.0439384,[M+H]+,16.56579624,C7H6O2,8189.400396,3236.540161,0.476118562,0.790609998,0.952237124,0.94347431,127.6678918,123.044056,-0.95525753,-0.117538761,16.56579624
|
| 78 |
+
335,4-hydroxy-3H-2-benzofuran-1-one,,C8H6O3,150.0316942,151.0388167,[M+H]+,20.98601191,C8H6O3,6632.539065,1553.688043,0.624681301,0.809643771,0.949034479,0.855215532,113.4501033,151.0389706,-1.01931041,-0.153955595,20.98601191
|
| 79 |
+
336,2-hydroxy-1-phenylethanone,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 80 |
+
343,wilsonic acid,,C11H9NO2,187.0633286,188.0702859,[M+H]+,11.3903728,C11H9NO2,18233.54491,8431.753367,0.576253376,0.774332688,0.915123453,0.831621234,662.4482661,188.0706051,-1.697530933,-0.31925567,11.3903728
|
| 81 |
+
348,Adenosine,,C10H13N5O4,267.0967541,268.1035554,[M+H]+,12.64490854,C10H13N5O4,10378.56541,3699.678021,0.807347252,0.831923166,0.911373433,0.777048813,569.8228938,268.1040306,-1.772531334,-0.475222795,12.64490854
|
| 82 |
+
349,indican_qt,,C8H7NO,133.0527639,134.0595297,[M+H]+,3.877725782,C8H7NO,69033.38754,22093.85116,0.904764269,0.870157829,0.809528538,0.896180679,1308.156922,134.0600404,-3.809429249,-0.510692239,3.877725782
|
| 83 |
+
352,alpha-D-Arabinofuranosyladenine,,C10H13N5O4,267.0967541,268.1035554,[M+H]+,12.64490854,C10H13N5O4,10378.56541,3699.678021,0.807347252,0.831923166,0.911373433,0.777048813,569.8228938,268.1040306,-1.772531334,-0.475222795,12.64490854
|
| 84 |
+
357,"(6R,7aR)-6-hydroxy-7,7a-dihydro-6H-benzofuran-2-one",,C8H8O3,152.0473442,153.0544948,[M+H]+,20.37067606,C8H8O3,7058.737319,3786.28592,0.479430535,0.682861245,0.958861069,0.610292132,140.4328921,153.0546207,-0.822778615,-0.125930069,20.37067606
|
| 85 |
+
358,"(6S,7aR)-6-hydroxy-7,7a-dihydro-6H-benzofuran-2-one",,C8H8O3,152.0473442,153.0544948,[M+H]+,20.37067606,C8H8O3,7058.737319,3786.28592,0.479430535,0.682861245,0.958861069,0.610292132,140.4328921,153.0546207,-0.822778615,-0.125930069,20.37067606
|
| 86 |
+
359,4-HYDROXYBENZYLCYANIDE,,C8H7NO,133.0527639,134.0595297,[M+H]+,3.877725782,C8H7NO,69033.38754,22093.85116,0.904764269,0.870157829,0.809528538,0.896180679,1308.156922,134.0600404,-3.809429249,-0.510692239,3.877725782
|
| 87 |
+
360,Chrysosplenetin,,C19H18O8,374.1001678,375.1061551,[M+H]+,33.38864112,C19H18O8,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 88 |
+
362,3-Methoxyherbacetin,,C16H12O7,316.058303,317.0645959,[M+H]+,33.38698524,C16H12O7,56991.48554,13485.77683,0.789517643,0.843606857,0.844896937,0.896405991,2026.302163,317.0655794,-3.102061251,-0.983556848,33.38698524
|
| 89 |
+
364,o-Tolualdehyde,,C8H8O,120.057515,121.06473,[M+H]+,20.53158743,C8H8O,39727.89058,13303.52496,0.636451403,0.810936649,0.974646323,0.821712221,399.2004228,121.0647914,-0.507073547,-0.061388753,20.53158743
|
| 90 |
+
387,o-Anisic acid,,C8H8O3,152.0473442,153.0544948,[M+H]+,20.37067606,C8H8O3,7058.737319,3786.28592,0.479430535,0.682861245,0.958861069,0.610292132,140.4328921,153.0546207,-0.822778615,-0.125930069,20.37067606
|
| 91 |
+
391,"5-hydroxy-2-(4-hydroxy-3,5-dimethoxy-phenyl)-6,7-dimethoxy-chromone",,C19H18O8,374.1001678,375.1061551,[M+H]+,33.38864112,C19H18O8,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 92 |
+
393,3-(2-furyl)-2-methyl-acrolein,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 93 |
+
401,Menisdaurin,,C14H19NO7,313.1161522,314.1226859,[M+H]+,12.51270601,C14H19NO7,9887.455898,3618.755316,0.780491482,0.785072951,0.881762636,0.692964737,532.418457,314.1234287,-2.364747288,-0.742822526,12.51270601
|
| 94 |
+
410,m-Anisaldehyde,,C8H8O2,136.0524296,137.059432,[M+H]+,32.82804443,C8H8O2,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 95 |
+
416,beta-Eudesmol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 96 |
+
417,"2-[(1R,3S,4S)-3-isopropenyl-4-methyl-4-vinylcyclohexyl]propan-2-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 97 |
+
418,juniper camphor,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 98 |
+
419,"2-[(2R,5S,6S)-6,10-dimethylspiro[4.5]dec-9-en-2-yl]propan-2-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 99 |
+
424,ZINC02040970,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 100 |
+
425,"2-[(2S,5S,6S)-6,10-dimethylspiro[4.5]dec-9-en-2-yl]propan-2-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 101 |
+
426,ZINC01609418,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 102 |
+
427,Guaiol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 103 |
+
429,Beta- Eudesmol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 104 |
+
433,"(Z,Z)-farnesol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 105 |
+
435,farnesol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 106 |
+
440,anemonin,,C7H10N2O2,154.0742277,172.1074908,[M+NH4]+,2.513963084,C7H10N2O2,15552.0,3261.313284,0.652900607,0.773158075,0.836578332,0.829995286,436.2283303,172.1080533,-3.268433353,-0.562523702,2.513963084
|
| 107 |
+
445,patchouli alcohol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 108 |
+
449,Cedrol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 109 |
+
450,turmerone,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 110 |
+
451,Zingiberenol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 111 |
+
452,"(1R,4S,4aR,8aR)-4-isopropyl-1,6-dimethyl-3,4,4a,7,8,8a-hexahydro-2H-naphthalen-1-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 112 |
+
453,epi-10- .gamma.-Eudesmol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 113 |
+
454,"(4aS,8aS)-3,5,8a-trimethyl-4a,9-dihydro-4H-benzo[f]benzofuran",,C15H18O,214.1357654,232.1691432,[M+NH4]+,31.41443133,C15H18O,10553.70849,2635.68498,0.531482378,0.761375834,0.903579587,0.849065538,780.6134134,232.1695909,-1.928408262,-0.447717757,31.41443133
|
| 114 |
+
455,dihydropyrocurzerenone,,C15H18O,214.1357654,232.1691432,[M+NH4]+,31.41443133,C15H18O,10553.70849,2635.68498,0.531482378,0.761375834,0.903579587,0.849065538,780.6134134,232.1695909,-1.928408262,-0.447717757,31.41443133
|
| 115 |
+
456,lindestrene,,C15H18O,214.1357654,232.1691432,[M+NH4]+,31.41443133,C15H18O,10553.70849,2635.68498,0.531482378,0.761375834,0.903579587,0.849065538,780.6134134,232.1695909,-1.928408262,-0.447717757,31.41443133
|
| 116 |
+
457,7-epi-α-eudesmol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 117 |
+
458,C09704,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 118 |
+
467,(+)-Ledol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 119 |
+
468,49070_FLUKA,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 120 |
+
474,Tiglic acid,,C5H8O2,100.0524296,118.0860542,[M+NH4]+,0.981320917,C5H8O2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 121 |
+
491,ZINC04568391,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 122 |
+
492,PTL,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 123 |
+
493,Methylbutenol,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 124 |
+
494,Isovaleral,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 125 |
+
495,Peruviol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 126 |
+
497,Pentanone,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 127 |
+
498,ZINC02031653,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 128 |
+
499,AllOAc,,C5H8O2,100.0524296,118.0860542,[M+NH4]+,0.981320917,C5H8O2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 129 |
+
501,Coniferol,,C10H12O3,180.0786444,198.1125963,[M+NH4]+,1.049358408,C10H12O3,8091.514913,1746.171502,0.484065479,0.654664882,0.968130957,0.51179821,117.7030573,198.11247,0.637380855,0.126273096,1.049358408
|
| 130 |
+
503,ZINC01692449,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 131 |
+
507,CIS-2-PENTENOL,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 132 |
+
510,"(Z,E)-farnesol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 133 |
+
512,"(E,Z)-farnesol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 134 |
+
514,hexadec-11-enal,,C16H30O,238.2296658,256.2629801,[M+NH4]+,38.32818689,C16H30O,5733.432635,3103.877124,0.950117198,0.940048676,0.900234396,0.969794435,336.1017564,256.2634914,-1.995312086,-0.511325642,38.32818689
|
| 135 |
+
518,T-Cadinol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 136 |
+
519,T-Muurolol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 137 |
+
524,ZINC01849758,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 138 |
+
525,Prenol,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 139 |
+
541,"(1S,4aR,8aR)-7-isopropylidene-1,4a-dimethyl-1-decalinol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 140 |
+
543,3-octadecenoic acid,,C18H34O2,282.2558806,300.2885799,[M+NH4]+,38.50214895,C18H34O2,2385.066631,667.5447529,0.406232044,0.71057242,0.812464088,0.913021129,164.3127527,300.2897062,-3.75071825,-1.126302081,38.50214895
|
| 141 |
+
544,8-Hydroxycadalene,,C15H18O,214.1357654,232.1691432,[M+NH4]+,31.41443133,C15H18O,10553.70849,2635.68498,0.531482378,0.761375834,0.903579587,0.849065538,780.6134134,232.1695909,-1.928408262,-0.447717757,31.41443133
|
| 142 |
+
549,ledol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 143 |
+
550,tau-cadinol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 144 |
+
551,γ-cadinol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 145 |
+
552,alpha-Eudesmol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 146 |
+
554,Angelic acid,,C5H8O2,100.0524296,118.0860542,[M+NH4]+,0.981320917,C5H8O2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 147 |
+
564,(+)-Maalioxide,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 148 |
+
565,"3,5-Dimethyl-p-anisic acid",,C10H12O3,180.0786444,198.1125963,[M+NH4]+,1.049358408,C10H12O3,8091.514913,1746.171502,0.484065479,0.654664882,0.968130957,0.51179821,117.7030573,198.11247,0.637380855,0.126273096,1.049358408
|
| 149 |
+
566,(-)-Epicedrol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 150 |
+
567,7-Hydroxycadalene,,C15H18O,214.1357654,232.1691432,[M+NH4]+,31.41443133,C15H18O,10553.70849,2635.68498,0.531482378,0.761375834,0.903579587,0.849065538,780.6134134,232.1695909,-1.928408262,-0.447717757,31.41443133
|
| 151 |
+
569,1-tert-Butyl-7-methoxynaphthalene,,C15H18O,214.1357654,232.1691432,[M+NH4]+,31.41443133,C15H18O,10553.70849,2635.68498,0.531482378,0.761375834,0.903579587,0.849065538,780.6134134,232.1695909,-1.928408262,-0.447717757,31.41443133
|
| 152 |
+
571,MIPK,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 153 |
+
573,Isoprenol,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 154 |
+
576,6892-80-4,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 155 |
+
582,Petroselic acid,,C18H34O2,282.2558806,300.2885799,[M+NH4]+,38.50214895,C18H34O2,2385.066631,667.5447529,0.406232044,0.71057242,0.812464088,0.913021129,164.3127527,300.2897062,-3.75071825,-1.126302081,38.50214895
|
| 156 |
+
583,zingiberol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 157 |
+
584,(-)-alpha-Bisabolol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 158 |
+
587,α-cadinol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 159 |
+
589,Chokegard,,C16H30O,238.2296658,256.2629801,[M+NH4]+,38.32818689,C16H30O,5733.432635,3103.877124,0.950117198,0.940048676,0.900234396,0.969794435,336.1017564,256.2634914,-1.995312086,-0.511325642,38.32818689
|
| 160 |
+
592,8-Octadecenoic acid,,C18H34O2,282.2558806,300.2885799,[M+NH4]+,38.50214895,C18H34O2,2385.066631,667.5447529,0.406232044,0.71057242,0.812464088,0.913021129,164.3127527,300.2897062,-3.75071825,-1.126302081,38.50214895
|
| 161 |
+
593,"2-[(2R,5R,6R)-6,10-dimethylspiro[4.5]dec-9-en-2-yl]propan-2-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 162 |
+
596,Z-8-Hexadecen-1-ol acetate,,C18H34O2,282.2558806,300.2885799,[M+NH4]+,38.50214895,C18H34O2,2385.066631,667.5447529,0.406232044,0.71057242,0.812464088,0.913021129,164.3127527,300.2897062,-3.75071825,-1.126302081,38.50214895
|
| 163 |
+
597,dan-shexinkum b,,C18H16O3,280.1099446,298.1427231,[M+NH4]+,30.7478167,C18H16O3,4565.096366,2366.753087,0.824403732,0.829498728,0.824403732,0.839688722,141.8248847,298.1437701,-3.511925368,-1.04705867,30.7478167
|
| 164 |
+
598,β-cadinol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 165 |
+
600,(-)-Drimenol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 166 |
+
603,"3,5-Dimethoxyacetophenone",,C10H12O3,180.0786444,198.1125963,[M+NH4]+,1.049358408,C10H12O3,8091.514913,1746.171502,0.484065479,0.654664882,0.968130957,0.51179821,117.7030573,198.11247,0.637380855,0.126273096,1.049358408
|
| 167 |
+
605,2-methyl-3-butene-1-ol,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 168 |
+
606,sesquicineole,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 169 |
+
607,agarospirol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 170 |
+
608,cis-9-Hexadecenal,,C16H30O,238.2296658,256.2629801,[M+NH4]+,38.32818689,C16H30O,5733.432635,3103.877124,0.950117198,0.940048676,0.900234396,0.969794435,336.1017564,256.2634914,-1.995312086,-0.511325642,38.32818689
|
| 171 |
+
609,"(1S,4aS,8aS)-7-isopropyl-1,4a-dimethyl-2,3,4,5,6,8a-hexahydronaphthalen-1-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 172 |
+
613,SENECIC ACID,,C5H8O2,100.0524296,118.0860542,[M+NH4]+,0.981320917,C5H8O2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 173 |
+
615,"2-hydroxy-7-carboxy-1-methyl-5-ethenyl-9,10-dihydrophenanthrene",,C18H16O3,280.1099446,298.1427231,[M+NH4]+,30.7478167,C18H16O3,4565.096366,2366.753087,0.824403732,0.829498728,0.824403732,0.839688722,141.8248847,298.1437701,-3.511925368,-1.04705867,30.7478167
|
| 174 |
+
616,19435-97-3,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 175 |
+
617,(E)-Pent-2-en-1-ol,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 176 |
+
618,"2-[(1S,3Z,7Z)-4,8-dimethyl-1-cyclodeca-3,7-dienyl]propan-2-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 177 |
+
621,"2,5-Dimethoxyacetophenone",,C10H12O3,180.0786444,198.1125963,[M+NH4]+,1.049358408,C10H12O3,8091.514913,1746.171502,0.484065479,0.654664882,0.968130957,0.51179821,117.7030573,198.11247,0.637380855,0.126273096,1.049358408
|
| 178 |
+
623,5-(prop-2-enoyloxy) pentadecane,,C18H34O2,282.2558806,300.2885799,[M+NH4]+,38.50214895,C18H34O2,2385.066631,667.5447529,0.406232044,0.71057242,0.812464088,0.913021129,164.3127527,300.2897062,-3.75071825,-1.126302081,38.50214895
|
| 179 |
+
638,(2R)-2-methyloxolan-3-one,,C5H8O2,100.0524296,118.0860542,[M+NH4]+,0.981320917,C5H8O2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 180 |
+
640,"2,3-Pentadione",,C5H8O2,100.0524296,118.0860542,[M+NH4]+,0.981320917,C5H8O2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 181 |
+
641,ZINC00901303,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 182 |
+
645,"(3R)-2,2,3-trimethyloxirane",,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 183 |
+
650,"4,7-dimethyl-7-(4-methylpent-3-enyl)bicyclo[2.2.1]heptan-3-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 184 |
+
651,"4-Ethenyl-2,2,4-trimethyl-3-(1-methylethenyl)-cyclo-hexane-methanol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 185 |
+
656,"(1R,4aR,7R,8aR)-7-isopropenyl-1,4a-dimethyl-1-decalinol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 186 |
+
659,regaloside E_qt,,C14H16O7,296.0896031,314.1226859,[M+NH4]+,12.51270601,C14H16O7,9887.455898,3618.755316,0.780491482,0.785072951,0.881762636,0.692964737,532.418457,314.1234287,-2.364747288,-0.742822526,12.51270601
|
| 187 |
+
660,Ethyl anisate,,C10H12O3,180.0786444,198.1125963,[M+NH4]+,1.049358408,C10H12O3,8091.514913,1746.171502,0.484065479,0.654664882,0.968130957,0.51179821,117.7030573,198.11247,0.637380855,0.126273096,1.049358408
|
| 188 |
+
661,SBB008790,,C16H30O,238.2296658,256.2629801,[M+NH4]+,38.32818689,C16H30O,5733.432635,3103.877124,0.950117198,0.940048676,0.900234396,0.969794435,336.1017564,256.2634914,-1.995312086,-0.511325642,38.32818689
|
| 189 |
+
663,C09628,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 190 |
+
664,farfugin A,,C15H18O,214.1357654,232.1691432,[M+NH4]+,31.41443133,C15H18O,10553.70849,2635.68498,0.531482378,0.761375834,0.903579587,0.849065538,780.6134134,232.1695909,-1.928408262,-0.447717757,31.41443133
|
| 191 |
+
668,"(1S,4R,4aR,8aR)-1-isopropyl-4,7-dimethyl-2,3,4,5,6,8a-hexahydro-1H-naphthalen-4a-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 192 |
+
671,glucofrangulin,,C10H12O3,180.0786444,198.1125963,[M+NH4]+,1.049358408,C10H12O3,8091.514913,1746.171502,0.484065479,0.654664882,0.968130957,0.51179821,117.7030573,198.11247,0.637380855,0.126273096,1.049358408
|
| 193 |
+
676,"2-[(2R,8R,8aS)-8,8a-dimethyl-2,3,4,6,7,8-hexahydro-1H-naphthalen-2-yl]propan-2-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 194 |
+
678,"4-Methyl-2-(1,5-dimethyl-4-hexenyl)-3-cyclohexen-1-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 195 |
+
681,ZINC04026398,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 196 |
+
682,2-methylbut-2-en-1-ol,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 197 |
+
689,C2H5CH=CHCOOH,,C5H8O2,100.0524296,118.0860542,[M+NH4]+,0.981320917,C5H8O2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 198 |
+
693,caryophyllenyl alcohol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 199 |
+
695,"decahydro-2,2,4,8-tetramethyl-4,8-methano-azulen-9-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 200 |
+
699,2-[4-(methoxymethyl)phenyl]acetic acid,,C10H12O3,180.0786444,198.1125963,[M+NH4]+,1.049358408,C10H12O3,8091.514913,1746.171502,0.484065479,0.654664882,0.968130957,0.51179821,117.7030573,198.11247,0.637380855,0.126273096,1.049358408
|
| 201 |
+
703,Lindenene,,C15H18O,214.1357654,232.1691432,[M+NH4]+,31.41443133,C15H18O,10553.70849,2635.68498,0.531482378,0.761375834,0.903579587,0.849065538,780.6134134,232.1695909,-1.928408262,-0.447717757,31.41443133
|
| 202 |
+
704,methyl (2S)-3-hydroxy-2-phenylpropanoate,,C10H12O3,180.0786444,198.1125963,[M+NH4]+,1.049358408,C10H12O3,8091.514913,1746.171502,0.484065479,0.654664882,0.968130957,0.51179821,117.7030573,198.11247,0.637380855,0.126273096,1.049358408
|
| 203 |
+
708,"3-(2-pentenyl)-1,2,4-cyclopentanetrione",,C10H12O3,180.0786444,198.1125963,[M+NH4]+,1.049358408,C10H12O3,8091.514913,1746.171502,0.484065479,0.654664882,0.968130957,0.51179821,117.7030573,198.11247,0.637380855,0.126273096,1.049358408
|
| 204 |
+
713,E-14-Hexadecenal,,C16H30O,238.2296658,256.2629801,[M+NH4]+,38.32818689,C16H30O,5733.432635,3103.877124,0.950117198,0.940048676,0.900234396,0.969794435,336.1017564,256.2634914,-1.995312086,-0.511325642,38.32818689
|
| 205 |
+
714,"octahydro-4α,5-dimethyl-3-(1-methylethyl)naphthalenone",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 206 |
+
715,"1-hydroxy-1,7-dimethyl-4-isopropyl-2,7-cyclodecadiene",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 207 |
+
716,cadinol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 208 |
+
731,(2S)-2-methyloxolan-3-one,,C5H8O2,100.0524296,118.0860542,[M+NH4]+,0.981320917,C5H8O2,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 209 |
+
732,Elemol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 210 |
+
734,"1,6,10-dodecatrien-4-ol,3,7,11-trimethyl-",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 211 |
+
736,"(2R-cis)-1,2,3,4,4a,5,6,7-Octahydro-alpha,alpha,4a,8-tetramethyl-2-naphthalenemethanol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 212 |
+
737,"1,5,5,8-tetramethyl-3,7-cycloundecadien-1-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 213 |
+
738,"(1S,4aS,8aS)-7-isopropylidene-1,4a-dimethyl-1-decalinol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 214 |
+
739,delta-Cadinol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 215 |
+
740,cis-nerolidol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 216 |
+
741,Bisabolol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 217 |
+
744,ZINC05063142,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 218 |
+
747,"[1R-(1.alpha.,3a.beta.,4.alpha.,8a.beta.,9S)]-decahydro-1,5,5,8a-tetramethyl-1,4-Methanoazulen-9-ol",,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 219 |
+
751,ZINC02034403,,C5H10O,86.07316504,104.1068645,[M+NH4]+,0.940900279,C5H10O,172762.9827,37369.15602,0.835018188,0.911867934,0.939400006,0.961185608,9660.085785,104.1069906,-1.211999873,-0.126177659,0.940900279
|
| 220 |
+
752,2-(4-hydroxyphenyl)ethyl acetate,,C10H12O3,180.0786444,198.1125963,[M+NH4]+,1.049358408,C10H12O3,8091.514913,1746.171502,0.484065479,0.654664882,0.968130957,0.51179821,117.7030573,198.11247,0.637380855,0.126273096,1.049358408
|
| 221 |
+
756,cubeben camphor,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 222 |
+
759,caryophyllene alcohol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 223 |
+
760,caryophyllenol,,C15H26O,222.1983657,240.2317825,[M+NH4]+,35.67794331,C15H26O,1525.139521,339.1082653,0.957464009,0.902725224,0.914928017,0.835783647,126.9446974,240.2321913,-1.701439655,-0.408740577,35.67794331
|
| 224 |
+
614,vanillin,,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 225 |
+
697,methyl salicylate,,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 226 |
+
1298,RMN,,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 227 |
+
1657,dysoanthraquinone,,C18H14O7,342.073953,375.1061551,[M+CH4OH]+,33.38864112,C18H14O7,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 228 |
+
1821,Isovanillin,,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 229 |
+
4238,Abiol,,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 230 |
+
4988,ANN,,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 231 |
+
5336,FOA,,C5H4O3,112.0160441,145.0490386,[M+CH4OH]+,10.41466868,C5H4O3,40048.31948,16803.67256,0.414378113,0.732432702,0.828756226,0.954163767,503.6725902,145.0495353,-3.424875481,-0.496776597,10.41466868
|
| 232 |
+
5346,"4-Methoxy-1,2-benzodioxole",,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 233 |
+
5500,4-Methoxysalicyaldehyde,,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 234 |
+
5558,CNH,,C4H7NO,85.05276393,118.0860542,[M+CH4OH]+,0.981320917,C4H7NO,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 235 |
+
6612,OHP,,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 236 |
+
6699,WLN: QR CQ DV1,,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 237 |
+
6759,2-Acetylresorcinol,,C8H8O3,152.0473442,185.080044,[M+CH4OH]+,16.49250994,C8H8O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 238 |
+
7360,2-Pyrol,,C4H7NO,85.05276393,118.0860542,[M+CH4OH]+,0.981320917,C4H7NO,703669.0876,200743.7014,0.89584635,0.915016178,0.914917375,0.934284809,7228.897227,118.0862552,-1.701652497,-0.200941771,0.981320917
|
| 239 |
+
9924,maoyancaosu,,C18H14O7,342.073953,375.1061551,[M+CH4OH]+,33.38864112,C18H14O7,33455.69129,8489.480842,0.413599128,0.729126396,0.828161526,0.945618535,2869.856249,375.1074443,-3.436769482,-1.289157817,33.38864112
|
| 240 |
+
846,paeonol,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 241 |
+
1827,Sobrol A,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 242 |
+
2720,Apocynin,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 243 |
+
2897,BZF,,C8H6O,118.0418649,137.059432,[M+H2O+H]+,32.82804443,C8H6O,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 244 |
+
3918,Veratral,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 245 |
+
5403,Vanirom,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 246 |
+
5458,"2',4'-Dihydroxy-3'-methylacetophenone",,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 247 |
+
7188,3-Hydroxy-4-methoxyacetophenone,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 248 |
+
8336,Methyl 4-hydroxyphenylacetate,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 249 |
+
8786,MHP,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 250 |
+
9056,LOF,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 251 |
+
9283,3-Ethynylphenol,,C8H6O,118.0418649,137.059432,[M+H2O+H]+,32.82804443,C8H6O,101269.2619,27905.09099,0.69411051,0.85676415,0.900029035,0.976152904,504.8636075,137.0597061,-1.999419296,-0.274039821,32.82804443
|
| 252 |
+
11274,(S)-tropic acid,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 253 |
+
12924,m-Acetoxyanisole,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
| 254 |
+
13085,MELILOTATE,,C9H10O3,166.0629943,185.080044,[M+H2O+H]+,16.49250994,C9H10O3,13310.83845,3799.374852,0.432226587,0.572857728,0.786166262,0.500180336,536.3982636,185.0808355,-4.276674769,-0.791530539,16.49250994
|
MS/三者并集完整输出.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
MS/三者并集完整输出_结构标注.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
TAR/chembl_summary_table.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
TAR/chembl_summary_table_with_uniprot.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
TAR/chembl_uniprot_mapping.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
TAR/compound_target_jaccard_pairs.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
TAR/compute_compound_target_similarity.py
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# 这个脚本负责把“化合物 -> 靶点集合”关系转换成化合物两两相似度。
|
| 3 |
+
# 支持:
|
| 4 |
+
# 1. 读取一张包含 compound_id / target_uniprot_ids 的 CSV;
|
| 5 |
+
# 2. 以靶点集合为基础计算 Jaccard 或 cosine 相似度;
|
| 6 |
+
# 3. 同时导出完整矩阵和非零配对表。
|
| 7 |
+
|
| 8 |
+
from __future__ import annotations
|
| 9 |
+
|
| 10 |
+
# argparse 用来解析命令行参数。
|
| 11 |
+
import argparse
|
| 12 |
+
# csv 用来读写输入输出表。
|
| 13 |
+
import csv
|
| 14 |
+
# math 用来计算 cosine 相似度分母。
|
| 15 |
+
import math
|
| 16 |
+
# Path 用统一方式处理路径。
|
| 17 |
+
from pathlib import Path
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def parse_args() -> argparse.Namespace:
|
| 21 |
+
# 定义命令行参数,允许切换输入列名、分隔符和相似度指标。
|
| 22 |
+
parser = argparse.ArgumentParser(
|
| 23 |
+
description=(
|
| 24 |
+
"Compute pairwise compound similarity from target sets. Compound IDs "
|
| 25 |
+
"are derived from file_name with the suffix removed by default."
|
| 26 |
+
)
|
| 27 |
+
)
|
| 28 |
+
parser.add_argument(
|
| 29 |
+
"-i",
|
| 30 |
+
"--input",
|
| 31 |
+
type=Path,
|
| 32 |
+
default=Path("chembl_summary_table_with_uniprot.csv"),
|
| 33 |
+
help="Input CSV file. Default: %(default)s",
|
| 34 |
+
)
|
| 35 |
+
parser.add_argument(
|
| 36 |
+
"--id-column",
|
| 37 |
+
default="file_name",
|
| 38 |
+
help="Column used to build compound IDs. Default: %(default)s",
|
| 39 |
+
)
|
| 40 |
+
parser.add_argument(
|
| 41 |
+
"--target-column",
|
| 42 |
+
default="target_uniprot_ids",
|
| 43 |
+
help="Column containing target IDs. Default: %(default)s",
|
| 44 |
+
)
|
| 45 |
+
parser.add_argument(
|
| 46 |
+
"--separator",
|
| 47 |
+
default=";",
|
| 48 |
+
help="Separator used in the target column. Default: %(default)s",
|
| 49 |
+
)
|
| 50 |
+
parser.add_argument(
|
| 51 |
+
"--metric",
|
| 52 |
+
choices=("jaccard", "cosine"),
|
| 53 |
+
default="jaccard",
|
| 54 |
+
help="Similarity metric. Default: %(default)s",
|
| 55 |
+
)
|
| 56 |
+
parser.add_argument(
|
| 57 |
+
"--matrix-output",
|
| 58 |
+
type=Path,
|
| 59 |
+
default=None,
|
| 60 |
+
help=(
|
| 61 |
+
"Output CSV for the full similarity matrix. Default: "
|
| 62 |
+
"compound_target_<metric>_matrix.csv"
|
| 63 |
+
),
|
| 64 |
+
)
|
| 65 |
+
parser.add_argument(
|
| 66 |
+
"--pairs-output",
|
| 67 |
+
type=Path,
|
| 68 |
+
default=None,
|
| 69 |
+
help=(
|
| 70 |
+
"Output CSV for non-zero compound pairs. Default: "
|
| 71 |
+
"compound_target_<metric>_pairs.csv"
|
| 72 |
+
),
|
| 73 |
+
)
|
| 74 |
+
parser.add_argument(
|
| 75 |
+
"--include-zero-pairs",
|
| 76 |
+
action="store_true",
|
| 77 |
+
help="Also write zero-similarity pairs into the pair list output.",
|
| 78 |
+
)
|
| 79 |
+
parser.add_argument(
|
| 80 |
+
"--include-empty-compounds",
|
| 81 |
+
action="store_true",
|
| 82 |
+
help=(
|
| 83 |
+
"Include compounds with empty target sets. By default they are "
|
| 84 |
+
"skipped because their similarities are not informative."
|
| 85 |
+
),
|
| 86 |
+
)
|
| 87 |
+
# 返回解析后的参数对象。
|
| 88 |
+
return parser.parse_args()
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
def split_targets(raw_value: str, separator: str) -> set[str]:
|
| 92 |
+
# 空值直接返回空集合。
|
| 93 |
+
if not raw_value:
|
| 94 |
+
return set()
|
| 95 |
+
# 同一化合物的靶点按分隔符拆开,并顺手去掉空项和空白。
|
| 96 |
+
return {item.strip() for item in raw_value.split(separator) if item.strip()}
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
def compound_id_from_filename(value: str) -> str:
|
| 100 |
+
# 输入列默认是 `CID_72.sdf` 这类文件名,这里统一转成 stem。
|
| 101 |
+
return Path(value).stem.strip()
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
def load_compound_targets(
|
| 105 |
+
input_path: Path,
|
| 106 |
+
id_column: str,
|
| 107 |
+
target_column: str,
|
| 108 |
+
separator: str,
|
| 109 |
+
include_empty_compounds: bool,
|
| 110 |
+
) -> tuple[list[str], list[set[str]], int]:
|
| 111 |
+
# compound_targets 保存每个 compound_id 聚合后的靶点集合。
|
| 112 |
+
compound_targets: dict[str, set[str]] = {}
|
| 113 |
+
# duplicate_rows 统计同一 compound_id 在输入表里重复出现了多少次。
|
| 114 |
+
duplicate_rows = 0
|
| 115 |
+
|
| 116 |
+
with input_path.open("r", newline="", encoding="utf-8-sig") as handle:
|
| 117 |
+
reader = csv.DictReader(handle)
|
| 118 |
+
# 输入表必须有表头。
|
| 119 |
+
if reader.fieldnames is None:
|
| 120 |
+
raise ValueError("Input CSV has no header row.")
|
| 121 |
+
# 传入的列名必须真实存在。
|
| 122 |
+
if id_column not in reader.fieldnames:
|
| 123 |
+
raise KeyError(f"ID column {id_column!r} not found in input CSV.")
|
| 124 |
+
if target_column not in reader.fieldnames:
|
| 125 |
+
raise KeyError(f"Target column {target_column!r} not found in input CSV.")
|
| 126 |
+
|
| 127 |
+
for row in reader:
|
| 128 |
+
# 先把输入列转成统一 compound_id。
|
| 129 |
+
compound_id = compound_id_from_filename(row.get(id_column, ""))
|
| 130 |
+
if not compound_id:
|
| 131 |
+
continue
|
| 132 |
+
|
| 133 |
+
# 把这一行的靶点列拆成集合。
|
| 134 |
+
targets = split_targets(row.get(target_column, ""), separator)
|
| 135 |
+
# 默认跳过空靶点化合物,因为它们的相似度通常没什么信息量。
|
| 136 |
+
if not targets and not include_empty_compounds:
|
| 137 |
+
continue
|
| 138 |
+
|
| 139 |
+
# 同一个 compound_id 允许多行出现,这里统一做集合并。
|
| 140 |
+
if compound_id in compound_targets:
|
| 141 |
+
duplicate_rows += 1
|
| 142 |
+
compound_targets[compound_id].update(targets)
|
| 143 |
+
else:
|
| 144 |
+
compound_targets[compound_id] = set(targets)
|
| 145 |
+
|
| 146 |
+
# 按首次出现顺序导出 compound_id 列表和对应靶点集合。
|
| 147 |
+
compound_ids = list(compound_targets.keys())
|
| 148 |
+
target_sets = [compound_targets[compound_id] for compound_id in compound_ids]
|
| 149 |
+
return compound_ids, target_sets, duplicate_rows
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
def calculate_similarity(targets_a: set[str], targets_b: set[str], metric: str) -> tuple[float, int]:
|
| 153 |
+
# shared_count 既用于算分,也会单独写到 pairs 输出里。
|
| 154 |
+
shared_count = len(targets_a & targets_b)
|
| 155 |
+
|
| 156 |
+
if metric == "jaccard":
|
| 157 |
+
# Jaccard = 交集 / 并集。
|
| 158 |
+
union_count = len(targets_a | targets_b)
|
| 159 |
+
similarity = (shared_count / union_count) if union_count else 0.0
|
| 160 |
+
else:
|
| 161 |
+
# 这里的 cosine 实际上是二值集合向量上的 cosine。
|
| 162 |
+
denominator = math.sqrt(len(targets_a) * len(targets_b))
|
| 163 |
+
similarity = (shared_count / denominator) if denominator else 0.0
|
| 164 |
+
|
| 165 |
+
# 返回相似度和共享靶点数。
|
| 166 |
+
return similarity, shared_count
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
def main() -> None:
|
| 170 |
+
# 先解析命令行参数。
|
| 171 |
+
args = parse_args()
|
| 172 |
+
# 如果用户没显式指定输出路径,就按 metric 自动生成默认文件名。
|
| 173 |
+
matrix_output = args.matrix_output or Path(f"compound_target_{args.metric}_matrix.csv")
|
| 174 |
+
pairs_output = args.pairs_output or Path(f"compound_target_{args.metric}_pairs.csv")
|
| 175 |
+
|
| 176 |
+
# 矩阵输出和配对输出不能写到同一个文件。
|
| 177 |
+
if matrix_output.resolve() == pairs_output.resolve():
|
| 178 |
+
raise ValueError("Matrix output and pairs output paths must be different.")
|
| 179 |
+
|
| 180 |
+
# 先确保输出目录存在。
|
| 181 |
+
matrix_output.parent.mkdir(parents=True, exist_ok=True)
|
| 182 |
+
pairs_output.parent.mkdir(parents=True, exist_ok=True)
|
| 183 |
+
|
| 184 |
+
# 读取并聚合“化合物 -> 靶点集合”。
|
| 185 |
+
compound_ids, target_sets, duplicate_rows = load_compound_targets(
|
| 186 |
+
input_path=args.input,
|
| 187 |
+
id_column=args.id_column,
|
| 188 |
+
target_column=args.target_column,
|
| 189 |
+
separator=args.separator,
|
| 190 |
+
include_empty_compounds=args.include_empty_compounds,
|
| 191 |
+
)
|
| 192 |
+
|
| 193 |
+
# target_counts 后面会写到 pairs 表,方便判断“高相似是因为共享多还是集合本身小”。
|
| 194 |
+
target_counts = [len(targets) for targets in target_sets]
|
| 195 |
+
compound_count = len(compound_ids)
|
| 196 |
+
pair_count = 0
|
| 197 |
+
nonzero_pair_count = 0
|
| 198 |
+
|
| 199 |
+
with (
|
| 200 |
+
matrix_output.open("w", newline="", encoding="utf-8-sig") as matrix_handle,
|
| 201 |
+
pairs_output.open("w", newline="", encoding="utf-8-sig") as pairs_handle,
|
| 202 |
+
):
|
| 203 |
+
matrix_writer = csv.writer(matrix_handle)
|
| 204 |
+
pairs_writer = csv.writer(pairs_handle)
|
| 205 |
+
|
| 206 |
+
# 完整矩阵第一行是列名;pairs 表单独写一套配对字段。
|
| 207 |
+
matrix_writer.writerow(["compound_id", *compound_ids])
|
| 208 |
+
pairs_writer.writerow(
|
| 209 |
+
[
|
| 210 |
+
"compound_1",
|
| 211 |
+
"compound_2",
|
| 212 |
+
"similarity",
|
| 213 |
+
"shared_target_count",
|
| 214 |
+
"target_count_1",
|
| 215 |
+
"target_count_2",
|
| 216 |
+
]
|
| 217 |
+
)
|
| 218 |
+
|
| 219 |
+
for i, compound_id_a in enumerate(compound_ids):
|
| 220 |
+
# 每轮构造矩阵中的一整行。
|
| 221 |
+
row = [compound_id_a]
|
| 222 |
+
targets_a = target_sets[i]
|
| 223 |
+
|
| 224 |
+
for j, compound_id_b in enumerate(compound_ids):
|
| 225 |
+
targets_b = target_sets[j]
|
| 226 |
+
|
| 227 |
+
if i == j:
|
| 228 |
+
# 对角线默认记作自相似;空集合则记 0。
|
| 229 |
+
similarity = 1.0 if targets_a else 0.0
|
| 230 |
+
shared_count = len(targets_a)
|
| 231 |
+
else:
|
| 232 |
+
similarity, shared_count = calculate_similarity(
|
| 233 |
+
targets_a, targets_b, args.metric
|
| 234 |
+
)
|
| 235 |
+
|
| 236 |
+
row.append(f"{similarity:.6f}")
|
| 237 |
+
|
| 238 |
+
# pairs 只写上三角,避免重复输出 A-B / B-A。
|
| 239 |
+
if j <= i:
|
| 240 |
+
continue
|
| 241 |
+
|
| 242 |
+
pair_count += 1
|
| 243 |
+
if similarity > 0:
|
| 244 |
+
nonzero_pair_count += 1
|
| 245 |
+
|
| 246 |
+
# 默认只输出非零相似对;显式要求时再包含零值对。
|
| 247 |
+
if similarity > 0 or args.include_zero_pairs:
|
| 248 |
+
pairs_writer.writerow(
|
| 249 |
+
[
|
| 250 |
+
compound_id_a,
|
| 251 |
+
compound_id_b,
|
| 252 |
+
f"{similarity:.6f}",
|
| 253 |
+
shared_count,
|
| 254 |
+
target_counts[i],
|
| 255 |
+
target_counts[j],
|
| 256 |
+
]
|
| 257 |
+
)
|
| 258 |
+
|
| 259 |
+
matrix_writer.writerow(row)
|
| 260 |
+
|
| 261 |
+
# 打印这次计算的摘要,便于快速核查规模和输出位置。
|
| 262 |
+
print(f"Metric: {args.metric}")
|
| 263 |
+
print(f"Input file: {args.input}")
|
| 264 |
+
print(f"Compounds used: {compound_count}")
|
| 265 |
+
print(f"Duplicate compound IDs merged: {duplicate_rows}")
|
| 266 |
+
print(f"Total unique pairs: {pair_count}")
|
| 267 |
+
print(f"Pairs with similarity > 0: {nonzero_pair_count}")
|
| 268 |
+
print(f"Matrix output: {matrix_output}")
|
| 269 |
+
print(f"Pairs output: {pairs_output}")
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
if __name__ == "__main__":
|
| 273 |
+
main()
|
TAR/convert_chembl_targets_to_uniprot.py
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Convert ChEMBL target IDs in a summary table into UniProt IDs."""
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import argparse
|
| 7 |
+
import csv
|
| 8 |
+
from collections import defaultdict
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
from typing import Iterable
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
def parse_args() -> argparse.Namespace:
|
| 14 |
+
parser = argparse.ArgumentParser(
|
| 15 |
+
description=(
|
| 16 |
+
"Map the ChEMBL target IDs in a CSV column to UniProt IDs using a "
|
| 17 |
+
"tab-delimited mapping file."
|
| 18 |
+
)
|
| 19 |
+
)
|
| 20 |
+
parser.add_argument(
|
| 21 |
+
"-i",
|
| 22 |
+
"--input",
|
| 23 |
+
type=Path,
|
| 24 |
+
default=Path("chembl_summary_table.csv"),
|
| 25 |
+
help="Input CSV file. Default: %(default)s",
|
| 26 |
+
)
|
| 27 |
+
parser.add_argument(
|
| 28 |
+
"-m",
|
| 29 |
+
"--mapping",
|
| 30 |
+
type=Path,
|
| 31 |
+
default=Path("chembl_uniprot_mapping.txt"),
|
| 32 |
+
help="ChEMBL-to-UniProt mapping file. Default: %(default)s",
|
| 33 |
+
)
|
| 34 |
+
parser.add_argument(
|
| 35 |
+
"-o",
|
| 36 |
+
"--output",
|
| 37 |
+
type=Path,
|
| 38 |
+
default=Path("chembl_summary_table_with_uniprot.csv"),
|
| 39 |
+
help="Output CSV file. Default: %(default)s",
|
| 40 |
+
)
|
| 41 |
+
parser.add_argument(
|
| 42 |
+
"--target-column",
|
| 43 |
+
default="target_chembl_ids",
|
| 44 |
+
help="Column containing ChEMBL target IDs. Default: %(default)s",
|
| 45 |
+
)
|
| 46 |
+
parser.add_argument(
|
| 47 |
+
"--output-column",
|
| 48 |
+
default="target_uniprot_ids",
|
| 49 |
+
help="Column for mapped UniProt IDs. Default: %(default)s",
|
| 50 |
+
)
|
| 51 |
+
parser.add_argument(
|
| 52 |
+
"--count-column",
|
| 53 |
+
default="target_uniprot_count",
|
| 54 |
+
help="Column for unique UniProt ID count. Default: %(default)s",
|
| 55 |
+
)
|
| 56 |
+
parser.add_argument(
|
| 57 |
+
"--unmapped-column",
|
| 58 |
+
default="unmapped_target_chembl_ids",
|
| 59 |
+
help="Column for unmapped ChEMBL target IDs. Default: %(default)s",
|
| 60 |
+
)
|
| 61 |
+
parser.add_argument(
|
| 62 |
+
"--separator",
|
| 63 |
+
default=";",
|
| 64 |
+
help="Separator used in the target ID column. Default: %(default)s",
|
| 65 |
+
)
|
| 66 |
+
parser.add_argument(
|
| 67 |
+
"--replace-target-column",
|
| 68 |
+
action="store_true",
|
| 69 |
+
help=(
|
| 70 |
+
"Overwrite the original target column with UniProt IDs instead of "
|
| 71 |
+
"writing a separate output column."
|
| 72 |
+
),
|
| 73 |
+
)
|
| 74 |
+
return parser.parse_args()
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def deduplicate(values: Iterable[str]) -> list[str]:
|
| 78 |
+
seen: set[str] = set()
|
| 79 |
+
result: list[str] = []
|
| 80 |
+
for value in values:
|
| 81 |
+
if value not in seen:
|
| 82 |
+
seen.add(value)
|
| 83 |
+
result.append(value)
|
| 84 |
+
return result
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
def split_target_ids(raw_value: str, separator: str) -> list[str]:
|
| 88 |
+
if not raw_value:
|
| 89 |
+
return []
|
| 90 |
+
return [item.strip() for item in raw_value.split(separator) if item.strip()]
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
def load_mapping(mapping_path: Path) -> dict[str, list[str]]:
|
| 94 |
+
mapping: dict[str, list[str]] = defaultdict(list)
|
| 95 |
+
|
| 96 |
+
with mapping_path.open("r", encoding="utf-8") as handle:
|
| 97 |
+
for line_number, line in enumerate(handle, start=1):
|
| 98 |
+
line = line.strip()
|
| 99 |
+
if not line or line.startswith("#"):
|
| 100 |
+
continue
|
| 101 |
+
|
| 102 |
+
parts = line.split("\t")
|
| 103 |
+
if len(parts) < 2:
|
| 104 |
+
raise ValueError(
|
| 105 |
+
f"Invalid mapping format at line {line_number}: {line!r}"
|
| 106 |
+
)
|
| 107 |
+
|
| 108 |
+
uniprot_id = parts[0].strip()
|
| 109 |
+
chembl_target_id = parts[1].strip()
|
| 110 |
+
|
| 111 |
+
if not uniprot_id or not chembl_target_id:
|
| 112 |
+
continue
|
| 113 |
+
|
| 114 |
+
if uniprot_id not in mapping[chembl_target_id]:
|
| 115 |
+
mapping[chembl_target_id].append(uniprot_id)
|
| 116 |
+
|
| 117 |
+
return dict(mapping)
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
def main() -> None:
|
| 121 |
+
args = parse_args()
|
| 122 |
+
if args.input.resolve() == args.output.resolve():
|
| 123 |
+
raise ValueError("Input and output paths must be different.")
|
| 124 |
+
|
| 125 |
+
args.output.parent.mkdir(parents=True, exist_ok=True)
|
| 126 |
+
mapping = load_mapping(args.mapping)
|
| 127 |
+
|
| 128 |
+
rows_processed = 0
|
| 129 |
+
rows_with_targets = 0
|
| 130 |
+
rows_with_uniprot = 0
|
| 131 |
+
all_unmapped: set[str] = set()
|
| 132 |
+
|
| 133 |
+
with args.input.open("r", newline="", encoding="utf-8-sig") as input_handle:
|
| 134 |
+
reader = csv.DictReader(input_handle)
|
| 135 |
+
if reader.fieldnames is None:
|
| 136 |
+
raise ValueError("Input CSV has no header row.")
|
| 137 |
+
if args.target_column not in reader.fieldnames:
|
| 138 |
+
raise KeyError(
|
| 139 |
+
f"Target column {args.target_column!r} not found in input CSV."
|
| 140 |
+
)
|
| 141 |
+
|
| 142 |
+
fieldnames = list(reader.fieldnames)
|
| 143 |
+
if args.replace_target_column:
|
| 144 |
+
extra_fields = [args.count_column, args.unmapped_column]
|
| 145 |
+
else:
|
| 146 |
+
extra_fields = [
|
| 147 |
+
args.output_column,
|
| 148 |
+
args.count_column,
|
| 149 |
+
args.unmapped_column,
|
| 150 |
+
]
|
| 151 |
+
for field in extra_fields:
|
| 152 |
+
if field not in fieldnames:
|
| 153 |
+
fieldnames.append(field)
|
| 154 |
+
|
| 155 |
+
with args.output.open("w", newline="", encoding="utf-8-sig") as output_handle:
|
| 156 |
+
writer = csv.DictWriter(output_handle, fieldnames=fieldnames)
|
| 157 |
+
writer.writeheader()
|
| 158 |
+
|
| 159 |
+
for row in reader:
|
| 160 |
+
rows_processed += 1
|
| 161 |
+
chembl_target_ids = split_target_ids(row.get(args.target_column, ""), args.separator)
|
| 162 |
+
|
| 163 |
+
if chembl_target_ids:
|
| 164 |
+
rows_with_targets += 1
|
| 165 |
+
|
| 166 |
+
mapped_uniprots: list[str] = []
|
| 167 |
+
unmapped_target_ids: list[str] = []
|
| 168 |
+
|
| 169 |
+
for chembl_target_id in chembl_target_ids:
|
| 170 |
+
mapped_values = mapping.get(chembl_target_id)
|
| 171 |
+
if mapped_values:
|
| 172 |
+
mapped_uniprots.extend(mapped_values)
|
| 173 |
+
else:
|
| 174 |
+
unmapped_target_ids.append(chembl_target_id)
|
| 175 |
+
|
| 176 |
+
mapped_uniprots = deduplicate(mapped_uniprots)
|
| 177 |
+
unmapped_target_ids = deduplicate(unmapped_target_ids)
|
| 178 |
+
|
| 179 |
+
if mapped_uniprots:
|
| 180 |
+
rows_with_uniprot += 1
|
| 181 |
+
|
| 182 |
+
uniprot_value = args.separator.join(mapped_uniprots)
|
| 183 |
+
unmapped_value = args.separator.join(unmapped_target_ids)
|
| 184 |
+
|
| 185 |
+
if args.replace_target_column:
|
| 186 |
+
row[args.target_column] = uniprot_value
|
| 187 |
+
else:
|
| 188 |
+
row[args.output_column] = uniprot_value
|
| 189 |
+
|
| 190 |
+
row[args.count_column] = str(len(mapped_uniprots))
|
| 191 |
+
row[args.unmapped_column] = unmapped_value
|
| 192 |
+
|
| 193 |
+
all_unmapped.update(unmapped_target_ids)
|
| 194 |
+
writer.writerow(row)
|
| 195 |
+
|
| 196 |
+
print(f"Loaded {len(mapping)} ChEMBL target mappings from {args.mapping}")
|
| 197 |
+
print(f"Processed {rows_processed} rows from {args.input}")
|
| 198 |
+
print(f"Rows with non-empty {args.target_column}: {rows_with_targets}")
|
| 199 |
+
print(f"Rows with mapped UniProt IDs: {rows_with_uniprot}")
|
| 200 |
+
print(f"Unique unmapped ChEMBL target IDs: {len(all_unmapped)}")
|
| 201 |
+
if all_unmapped:
|
| 202 |
+
preview = args.separator.join(sorted(all_unmapped)[:20])
|
| 203 |
+
print(f"First unmapped target IDs: {preview}")
|
| 204 |
+
print(f"Output written to: {args.output}")
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
if __name__ == "__main__":
|
| 208 |
+
main()
|
TAR/drug_target_uniprot_only.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
presentation/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Presentation Scripts
|
| 2 |
+
|
| 3 |
+
This directory contains scripts that modify or extend the QQCM presentation file:
|
| 4 |
+
|
| 5 |
+
- `../清窍聪明汤.pptx`
|
| 6 |
+
|
| 7 |
+
These scripts are not part of the AMVL / KG / MS modeling pipeline itself.
|
| 8 |
+
They are reporting helpers used to automatically insert explanatory slides,
|
| 9 |
+
summary tables, and result pages into the presentation.
|
| 10 |
+
|
| 11 |
+
Current scripts:
|
| 12 |
+
|
| 13 |
+
- `insert_amvl_method_intro.py`
|
| 14 |
+
Adds an AMVL method explanation slide near the front of the deck.
|
| 15 |
+
- `insert_amvl_method_intro_v2.py`
|
| 16 |
+
A revised layout/version of the AMVL method explanation insertion.
|
| 17 |
+
- `insert_overall_mean_coverage_slides.py`
|
| 18 |
+
Inserts slides summarizing overall mean coverage style results.
|
| 19 |
+
- `insert_weighted_ms_result_slides.py`
|
| 20 |
+
Inserts slides summarizing dose-weighted and MS-weighted result tables.
|
| 21 |
+
|
| 22 |
+
In short, `presentation/` is for:
|
| 23 |
+
|
| 24 |
+
- PPT automation
|
| 25 |
+
- report generation helpers
|
| 26 |
+
- slide insertion / update scripts
|
| 27 |
+
|
| 28 |
+
It is not for:
|
| 29 |
+
|
| 30 |
+
- data preprocessing
|
| 31 |
+
- knowledge graph construction
|
| 32 |
+
- MS structure annot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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import copy
|
| 5 |
+
import re
|
| 6 |
+
import zipfile
|
| 7 |
+
import xml.etree.ElementTree as ET
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
ROOT = Path(__file__).resolve().parents[1]
|
| 12 |
+
PPT_PATH = ROOT / "清窍聪明汤.pptx"
|
| 13 |
+
|
| 14 |
+
A_NS = "http://schemas.openxmlformats.org/drawingml/2006/main"
|
| 15 |
+
P_NS = "http://schemas.openxmlformats.org/presentationml/2006/main"
|
| 16 |
+
R_NS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
|
| 17 |
+
REL_NS = "http://schemas.openxmlformats.org/package/2006/relationships"
|
| 18 |
+
CT_NS = "http://schemas.openxmlformats.org/package/2006/content-types"
|
| 19 |
+
|
| 20 |
+
NS = {"a": A_NS, "p": P_NS, "r": R_NS}
|
| 21 |
+
|
| 22 |
+
ET.register_namespace("a", A_NS)
|
| 23 |
+
ET.register_namespace("p", P_NS)
|
| 24 |
+
ET.register_namespace("r", R_NS)
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def qn(ns: str, tag: str) -> str:
|
| 28 |
+
mapping = {"a": A_NS, "p": P_NS, "r": R_NS}
|
| 29 |
+
return f"{{{mapping[ns]}}}{tag}"
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
def clear_paragraphs(tx_body: ET.Element) -> None:
|
| 33 |
+
for child in list(tx_body):
|
| 34 |
+
if child.tag == qn("a", "p"):
|
| 35 |
+
tx_body.remove(child)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def make_paragraph(text: str, font_size: int, align: str = "l") -> ET.Element:
|
| 39 |
+
paragraph = ET.Element(qn("a", "p"))
|
| 40 |
+
p_pr = ET.SubElement(paragraph, qn("a", "pPr"), {"algn": align})
|
| 41 |
+
ln_spc = ET.SubElement(p_pr, qn("a", "lnSpc"))
|
| 42 |
+
ET.SubElement(ln_spc, qn("a", "spcPct"), {"val": "108000"})
|
| 43 |
+
ET.SubElement(p_pr, qn("a", "buNone"))
|
| 44 |
+
run = ET.SubElement(paragraph, qn("a", "r"))
|
| 45 |
+
ET.SubElement(run, qn("a", "rPr"), {"lang": "zh-CN", "altLang": "en-US", "sz": str(font_size)})
|
| 46 |
+
ET.SubElement(run, qn("a", "t")).text = text
|
| 47 |
+
ET.SubElement(paragraph, qn("a", "endParaRPr"), {"lang": "zh-CN", "altLang": "en-US", "sz": str(font_size)})
|
| 48 |
+
return paragraph
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def set_textbox_paragraphs(sp: ET.Element, paragraphs: list[str], font_size: int, align: str = "l") -> None:
|
| 52 |
+
tx_body = sp.find("p:txBody", NS)
|
| 53 |
+
if tx_body is None:
|
| 54 |
+
return
|
| 55 |
+
clear_paragraphs(tx_body)
|
| 56 |
+
for paragraph_text in paragraphs:
|
| 57 |
+
tx_body.append(make_paragraph(paragraph_text, font_size=font_size, align=align))
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def build_intro_slide(template_xml: bytes) -> bytes:
|
| 61 |
+
root = ET.fromstring(template_xml)
|
| 62 |
+
shapes = root.find("p:cSld/p:spTree", NS).findall("p:sp", NS)
|
| 63 |
+
title = "AMVL原文方法讲解"
|
| 64 |
+
paragraphs = [
|
| 65 |
+
"1. 原文将药物重定位建模为多视图药物-疾病关联预测问题:在已知关联矩阵基础上,同时整合药物侧和疾病侧多种相似性信息。",
|
| 66 |
+
"2. 数据层面,作者把传统药物特征与新信息源统一到同一框架中:药物侧由 5 个基础相似矩阵扩展到 8 个视图,疾病侧由 2 个扩展到 3 个视图;新增信息来自化学诱导转录组特征、知识图谱嵌入和大语言模型语义表示。",
|
| 67 |
+
"3. 算法层面,AMVL 不是单一模块,而是将 BMC、GIP、MSBMF 和 MVL 进行组合:先做矩阵补全,再补充交互轮廓相似性,再做矩阵分解与多视图学习,最后用集成策略得到最终关联分数。",
|
| 68 |
+
"4. 其中 MVL 负责把不同视图的药物和疾病相似性学习成统一表示,MSBMF 负责从低秩空间恢复潜在关联,BMC 用于缓解原始药物-疾病矩阵稀疏带来的缺失问题。",
|
| 69 |
+
"5. 原文的关键创新点在于“相似矩阵扩展 + 多模块集成”:既增强了新药与疾病的表示能力,也让模型能在多源异构数据下保持较好的泛化性能和可扩展性。",
|
| 70 |
+
]
|
| 71 |
+
set_textbox_paragraphs(shapes[6], [title], font_size=2400)
|
| 72 |
+
set_textbox_paragraphs(shapes[-1], paragraphs, font_size=1580)
|
| 73 |
+
return ET.tostring(root, encoding="utf-8", xml_declaration=True)
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def shift_target(target: str) -> str:
|
| 77 |
+
match = re.search(r"slide(\d+)\.xml", target)
|
| 78 |
+
if not match:
|
| 79 |
+
return target
|
| 80 |
+
number = int(match.group(1))
|
| 81 |
+
return target.replace(f"slide{number}.xml", f"slide{number + 1}.xml")
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def shift_note_target(target: str) -> str:
|
| 85 |
+
match = re.search(r"notesSlide(\d+)\.xml", target)
|
| 86 |
+
if not match:
|
| 87 |
+
return target
|
| 88 |
+
number = int(match.group(1))
|
| 89 |
+
return target.replace(f"notesSlide{number}.xml", f"notesSlide{number + 1}.xml")
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
def main() -> None:
|
| 93 |
+
with zipfile.ZipFile(PPT_PATH) as source_zip:
|
| 94 |
+
files = {name: source_zip.read(name) for name in source_zip.namelist()}
|
| 95 |
+
|
| 96 |
+
slide_numbers = sorted(
|
| 97 |
+
int(match.group(1))
|
| 98 |
+
for name in files
|
| 99 |
+
if (match := re.fullmatch(r"ppt/slides/slide(\d+)\.xml", name))
|
| 100 |
+
)
|
| 101 |
+
max_slide = max(slide_numbers)
|
| 102 |
+
|
| 103 |
+
# Shift slides and related notes/rels one position back from slide 2 onwards.
|
| 104 |
+
for number in range(max_slide, 1, -1):
|
| 105 |
+
files[f"ppt/slides/slide{number + 1}.xml"] = files[f"ppt/slides/slide{number}.xml"]
|
| 106 |
+
files[f"ppt/slides/_rels/slide{number + 1}.xml.rels"] = files[f"ppt/slides/_rels/slide{number}.xml.rels"]
|
| 107 |
+
files[f"ppt/notesSlides/notesSlide{number + 1}.xml"] = files[f"ppt/notesSlides/notesSlide{number}.xml"]
|
| 108 |
+
note_rel = f"ppt/notesSlides/_rels/notesSlide{number}.xml.rels"
|
| 109 |
+
if note_rel in files:
|
| 110 |
+
rel_root = ET.fromstring(files[note_rel])
|
| 111 |
+
for rel in rel_root.findall(f'{{{REL_NS}}}Relationship'):
|
| 112 |
+
if rel.attrib.get("Type", "").endswith("/slide"):
|
| 113 |
+
rel.set("Target", f"../slides/slide{number + 1}.xml")
|
| 114 |
+
files[f"ppt/notesSlides/_rels/notesSlide{number + 1}.xml.rels"] = ET.tostring(
|
| 115 |
+
rel_root, encoding="utf-8", xml_declaration=True
|
| 116 |
+
)
|
| 117 |
+
|
| 118 |
+
# Create new slide2 from current slide3-style text page template.
|
| 119 |
+
files["ppt/slides/slide2.xml"] = build_intro_slide(files["ppt/slides/slide3.xml"])
|
| 120 |
+
files["ppt/slides/_rels/slide2.xml.rels"] = files["ppt/slides/_rels/slide3.xml.rels"]
|
| 121 |
+
files["ppt/notesSlides/notesSlide2.xml"] = files["ppt/notesSlides/notesSlide3.xml"]
|
| 122 |
+
note_rel_root = ET.fromstring(files["ppt/notesSlides/_rels/notesSlide3.xml.rels"])
|
| 123 |
+
for rel in note_rel_root.findall(f'{{{REL_NS}}}Relationship'):
|
| 124 |
+
if rel.attrib.get("Type", "").endswith("/slide"):
|
| 125 |
+
rel.set("Target", "../slides/slide2.xml")
|
| 126 |
+
files["ppt/notesSlides/_rels/notesSlide2.xml.rels"] = ET.tostring(
|
| 127 |
+
note_rel_root, encoding="utf-8", xml_declaration=True
|
| 128 |
+
)
|
| 129 |
+
|
| 130 |
+
# Update presentation slide list and relationships.
|
| 131 |
+
presentation_root = ET.fromstring(files["ppt/presentation.xml"])
|
| 132 |
+
sld_id_list = presentation_root.find("p:sldIdLst", NS)
|
| 133 |
+
sld_ids = sld_id_list.findall("p:sldId", NS)
|
| 134 |
+
if len(sld_ids) < 2:
|
| 135 |
+
raise RuntimeError("Unexpected slide count in presentation.xml")
|
| 136 |
+
new_sld = copy.deepcopy(sld_ids[1])
|
| 137 |
+
new_sld.set("id", str(int(sld_ids[-1].attrib["id"]) + 1))
|
| 138 |
+
new_sld.set(qn("r", "id"), "rIdNEW")
|
| 139 |
+
sld_id_list.insert(1, new_sld)
|
| 140 |
+
files["ppt/presentation.xml"] = ET.tostring(presentation_root, encoding="utf-8", xml_declaration=True)
|
| 141 |
+
|
| 142 |
+
rel_root = ET.fromstring(files["ppt/_rels/presentation.xml.rels"])
|
| 143 |
+
rels = rel_root.findall(f'{{{REL_NS}}}Relationship')
|
| 144 |
+
for rel in rels:
|
| 145 |
+
target = rel.attrib.get("Target", "")
|
| 146 |
+
if re.search(r"slides/slide([2-9]|\d{2,})\.xml$", target):
|
| 147 |
+
rel.set("Target", shift_target(target))
|
| 148 |
+
elif re.search(r"notesSlides/notesSlide([2-9]|\d{2,})\.xml$", target):
|
| 149 |
+
rel.set("Target", shift_note_target(target))
|
| 150 |
+
max_rid = max(int(rel.attrib["Id"][3:]) for rel in rels if rel.attrib.get("Id", "").startswith("rId"))
|
| 151 |
+
new_rel = ET.Element(f'{{{REL_NS}}}Relationship', {
|
| 152 |
+
"Id": f"rId{max_rid + 1}",
|
| 153 |
+
"Type": "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide",
|
| 154 |
+
"Target": "slides/slide2.xml",
|
| 155 |
+
})
|
| 156 |
+
rel_root.append(new_rel)
|
| 157 |
+
files["ppt/_rels/presentation.xml.rels"] = ET.tostring(rel_root, encoding="utf-8", xml_declaration=True)
|
| 158 |
+
|
| 159 |
+
# Replace placeholder rId on the inserted slide entry.
|
| 160 |
+
presentation_root = ET.fromstring(files["ppt/presentation.xml"])
|
| 161 |
+
sld_id_list = presentation_root.find("p:sldIdLst", NS)
|
| 162 |
+
inserted = sld_id_list.findall("p:sldId", NS)[1]
|
| 163 |
+
inserted.set(qn("r", "id"), f"rId{max_rid + 1}")
|
| 164 |
+
files["ppt/presentation.xml"] = ET.tostring(presentation_root, encoding="utf-8", xml_declaration=True)
|
| 165 |
+
|
| 166 |
+
# Update content types.
|
| 167 |
+
content_root = ET.fromstring(files["[Content_Types].xml"])
|
| 168 |
+
for override in content_root.findall(f'{{{CT_NS}}}Override'):
|
| 169 |
+
part = override.attrib.get("PartName", "")
|
| 170 |
+
match = re.search(r"/ppt/slides/slide(\d+)\.xml$", part)
|
| 171 |
+
if match and int(match.group(1)) >= 2:
|
| 172 |
+
override.set("PartName", part.replace(f"slide{match.group(1)}.xml", f"slide{int(match.group(1)) + 1}.xml"))
|
| 173 |
+
new_override = ET.Element(f'{{{CT_NS}}}Override', {
|
| 174 |
+
"PartName": "/ppt/slides/slide2.xml",
|
| 175 |
+
"ContentType": "application/vnd.openxmlformats-officedocument.presentationml.slide+xml",
|
| 176 |
+
})
|
| 177 |
+
content_root.append(new_override)
|
| 178 |
+
files["[Content_Types].xml"] = ET.tostring(content_root, encoding="utf-8", xml_declaration=True)
|
| 179 |
+
|
| 180 |
+
temp_path = PPT_PATH.with_suffix(".tmp.pptx")
|
| 181 |
+
with zipfile.ZipFile(temp_path, "w", compression=zipfile.ZIP_DEFLATED) as output_zip:
|
| 182 |
+
for name in sorted(files):
|
| 183 |
+
output_zip.writestr(name, files[name])
|
| 184 |
+
temp_path.replace(PPT_PATH)
|
| 185 |
+
print(f"Inserted A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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import copy
|
| 5 |
+
import re
|
| 6 |
+
import zipfile
|
| 7 |
+
import xml.etree.ElementTree as ET
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
ROOT = Path(__file__).resolve().parents[1]
|
| 12 |
+
PPT_PATH = ROOT / "清窍聪明汤.pptx"
|
| 13 |
+
|
| 14 |
+
A_NS = "http://schemas.openxmlformats.org/drawingml/2006/main"
|
| 15 |
+
P_NS = "http://schemas.openxmlformats.org/presentationml/2006/main"
|
| 16 |
+
R_NS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
|
| 17 |
+
REL_NS = "http://schemas.openxmlformats.org/package/2006/relationships"
|
| 18 |
+
CT_NS = "http://schemas.openxmlformats.org/package/2006/content-types"
|
| 19 |
+
|
| 20 |
+
NS = {"a": A_NS, "p": P_NS, "r": R_NS}
|
| 21 |
+
|
| 22 |
+
ET.register_namespace("a", A_NS)
|
| 23 |
+
ET.register_namespace("p", P_NS)
|
| 24 |
+
ET.register_namespace("r", R_NS)
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def qn(ns: str, tag: str) -> str:
|
| 28 |
+
mapping = {"a": A_NS, "p": P_NS, "r": R_NS}
|
| 29 |
+
return f"{{{mapping[ns]}}}{tag}"
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
def clear_paragraphs(tx_body: ET.Element) -> None:
|
| 33 |
+
for child in list(tx_body):
|
| 34 |
+
if child.tag == qn("a", "p"):
|
| 35 |
+
tx_body.remove(child)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def make_paragraph(text: str, font_size: int, align: str = "l") -> ET.Element:
|
| 39 |
+
paragraph = ET.Element(qn("a", "p"))
|
| 40 |
+
p_pr = ET.SubElement(paragraph, qn("a", "pPr"), {"algn": align})
|
| 41 |
+
ln_spc = ET.SubElement(p_pr, qn("a", "lnSpc"))
|
| 42 |
+
ET.SubElement(ln_spc, qn("a", "spcPct"), {"val": "108000"})
|
| 43 |
+
ET.SubElement(p_pr, qn("a", "buNone"))
|
| 44 |
+
run = ET.SubElement(paragraph, qn("a", "r"))
|
| 45 |
+
ET.SubElement(run, qn("a", "rPr"), {"lang": "zh-CN", "altLang": "en-US", "sz": str(font_size)})
|
| 46 |
+
ET.SubElement(run, qn("a", "t")).text = text
|
| 47 |
+
ET.SubElement(paragraph, qn("a", "endParaRPr"), {"lang": "zh-CN", "altLang": "en-US", "sz": str(font_size)})
|
| 48 |
+
return paragraph
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def set_textbox_paragraphs(sp: ET.Element, paragraphs: list[str], font_size: int, align: str = "l") -> None:
|
| 52 |
+
tx_body = sp.find("p:txBody", NS)
|
| 53 |
+
if tx_body is None:
|
| 54 |
+
return
|
| 55 |
+
clear_paragraphs(tx_body)
|
| 56 |
+
for paragraph_text in paragraphs:
|
| 57 |
+
tx_body.append(make_paragraph(paragraph_text, font_size=font_size, align=align))
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def build_intro_slide(template_xml: bytes) -> bytes:
|
| 61 |
+
root = ET.fromstring(template_xml)
|
| 62 |
+
shapes = root.find("p:cSld/p:spTree", NS).findall("p:sp", NS)
|
| 63 |
+
title = "AMVL原文方法讲解"
|
| 64 |
+
paragraphs = [
|
| 65 |
+
"1. AMVL 的目标是把药物重定位问题表示成多视图药物-疾病关联预测:在已知关联矩阵上,同时整合药物侧和疾病侧多种相似性信息。",
|
| 66 |
+
"2. 原文在传统 5 个药物视图和 2 个疾病视图基础上,进一步加入化学诱导转录组特征、知识图谱嵌入和大语言模型语义表示,将输入扩展为 8 个药物相似矩阵和 3 个疾病相似矩阵。",
|
| 67 |
+
"3. 算法主线不是单一步骤,而是先做双关系矩阵补全 BMC,再利用 GIP 补充交互轮廓相似性,随后结合 MSBMF 和 MVL 分别完成低秩关联恢复与多视图统一学习。",
|
| 68 |
+
"4. 其中 MVL 负责把多个相似矩阵学习成统一的药物表示和疾病表示,MSBMF 负责在矩阵分解空间中恢复潜在关联,最后再通过集成策略输出最终预测结果。",
|
| 69 |
+
"5. 原文的关键创新点在于相似矩阵扩展与多模块集成并行推进,因此模型既能吸收多源异构信息,又能在大规模数据集上保持较好的鲁棒性和泛化能力。",
|
| 70 |
+
]
|
| 71 |
+
set_textbox_paragraphs(shapes[1], [title], font_size=2400)
|
| 72 |
+
set_textbox_paragraphs(shapes[2], paragraphs, font_size=1580)
|
| 73 |
+
return ET.tostring(root, encoding="utf-8", xml_declaration=True)
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def shift_target(target: str) -> str:
|
| 77 |
+
match = re.search(r"slide(\d+)\.xml", target)
|
| 78 |
+
if not match:
|
| 79 |
+
return target
|
| 80 |
+
number = int(match.group(1))
|
| 81 |
+
return target.replace(f"slide{number}.xml", f"slide{number + 1}.xml")
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def shift_note_target(target: str) -> str:
|
| 85 |
+
match = re.search(r"notesSlide(\d+)\.xml", target)
|
| 86 |
+
if not match:
|
| 87 |
+
return target
|
| 88 |
+
number = int(match.group(1))
|
| 89 |
+
return target.replace(f"notesSlide{number}.xml", f"notesSlide{number + 1}.xml")
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
def main() -> None:
|
| 93 |
+
with zipfile.ZipFile(PPT_PATH) as source_zip:
|
| 94 |
+
files = {name: source_zip.read(name) for name in source_zip.namelist()}
|
| 95 |
+
|
| 96 |
+
slide_numbers = sorted(
|
| 97 |
+
int(match.group(1))
|
| 98 |
+
for name in files
|
| 99 |
+
if (match := re.fullmatch(r"ppt/slides/slide(\d+)\.xml", name))
|
| 100 |
+
)
|
| 101 |
+
max_slide = max(slide_numbers)
|
| 102 |
+
|
| 103 |
+
template_slide_xml = files["ppt/slides/slide2.xml"]
|
| 104 |
+
template_slide_rels = files["ppt/slides/_rels/slide2.xml.rels"]
|
| 105 |
+
template_note_xml = files["ppt/notesSlides/notesSlide2.xml"]
|
| 106 |
+
template_note_rels = files["ppt/notesSlides/_rels/notesSlide2.xml.rels"]
|
| 107 |
+
|
| 108 |
+
for number in range(max_slide, 1, -1):
|
| 109 |
+
files[f"ppt/slides/slide{number + 1}.xml"] = files[f"ppt/slides/slide{number}.xml"]
|
| 110 |
+
files[f"ppt/slides/_rels/slide{number + 1}.xml.rels"] = files[f"ppt/slides/_rels/slide{number}.xml.rels"]
|
| 111 |
+
files[f"ppt/notesSlides/notesSlide{number + 1}.xml"] = files[f"ppt/notesSlides/notesSlide{number}.xml"]
|
| 112 |
+
old_note_rel = f"ppt/notesSlides/_rels/notesSlide{number}.xml.rels"
|
| 113 |
+
if old_note_rel in files:
|
| 114 |
+
note_rel_root = ET.fromstring(files[old_note_rel])
|
| 115 |
+
for rel in note_rel_root.findall(f'{{{REL_NS}}}Relationship'):
|
| 116 |
+
if rel.attrib.get("Type", "").endswith("/slide"):
|
| 117 |
+
rel.set("Target", f"../slides/slide{number + 1}.xml")
|
| 118 |
+
files[f"ppt/notesSlides/_rels/notesSlide{number + 1}.xml.rels"] = ET.tostring(
|
| 119 |
+
note_rel_root, encoding="utf-8", xml_declaration=True
|
| 120 |
+
)
|
| 121 |
+
|
| 122 |
+
files["ppt/slides/slide2.xml"] = build_intro_slide(template_slide_xml)
|
| 123 |
+
files["ppt/slides/_rels/slide2.xml.rels"] = template_slide_rels
|
| 124 |
+
files["ppt/notesSlides/notesSlide2.xml"] = template_note_xml
|
| 125 |
+
note_rel_root = ET.fromstring(template_note_rels)
|
| 126 |
+
for rel in note_rel_root.findall(f'{{{REL_NS}}}Relationship'):
|
| 127 |
+
if rel.attrib.get("Type", "").endswith("/slide"):
|
| 128 |
+
rel.set("Target", "../slides/slide2.xml")
|
| 129 |
+
files["ppt/notesSlides/_rels/notesSlide2.xml.rels"] = ET.tostring(
|
| 130 |
+
note_rel_root, encoding="utf-8", xml_declaration=True
|
| 131 |
+
)
|
| 132 |
+
|
| 133 |
+
presentation_root = ET.fromstring(files["ppt/presentation.xml"])
|
| 134 |
+
sld_id_list = presentation_root.find("p:sldIdLst", NS)
|
| 135 |
+
sld_ids = sld_id_list.findall("p:sldId", NS)
|
| 136 |
+
new_sld = copy.deepcopy(sld_ids[1])
|
| 137 |
+
new_sld.set("id", str(max(int(node.attrib["id"]) for node in sld_ids) + 1))
|
| 138 |
+
new_sld.set(qn("r", "id"), "rIdNEW")
|
| 139 |
+
sld_id_list.insert(1, new_sld)
|
| 140 |
+
|
| 141 |
+
rel_root = ET.fromstring(files["ppt/_rels/presentation.xml.rels"])
|
| 142 |
+
rels = rel_root.findall(f'{{{REL_NS}}}Relationship')
|
| 143 |
+
for rel in rels:
|
| 144 |
+
target = rel.attrib.get("Target", "")
|
| 145 |
+
if re.search(r"slides/slide([2-9]|\d{2,})\.xml$", target):
|
| 146 |
+
rel.set("Target", shift_target(target))
|
| 147 |
+
elif re.search(r"notesSlides/notesSlide([2-9]|\d{2,})\.xml$", target):
|
| 148 |
+
rel.set("Target", shift_note_target(target))
|
| 149 |
+
max_rid = max(int(rel.attrib["Id"][3:]) for rel in rels if rel.attrib.get("Id", "").startswith("rId"))
|
| 150 |
+
rel_root.append(
|
| 151 |
+
ET.Element(
|
| 152 |
+
f'{{{REL_NS}}}Relationship',
|
| 153 |
+
{
|
| 154 |
+
"Id": f"rId{max_rid + 1}",
|
| 155 |
+
"Type": "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide",
|
| 156 |
+
"Target": "slides/slide2.xml",
|
| 157 |
+
},
|
| 158 |
+
)
|
| 159 |
+
)
|
| 160 |
+
inserted = sld_id_list.findall("p:sldId", NS)[1]
|
| 161 |
+
inserted.set(qn("r", "id"), f"rId{max_rid + 1}")
|
| 162 |
+
|
| 163 |
+
files["ppt/presentation.xml"] = ET.tostring(presentation_root, encoding="utf-8", xml_declaration=True)
|
| 164 |
+
files["ppt/_rels/presentation.xml.rels"] = ET.tostring(rel_root, encoding="utf-8", xml_declaration=True)
|
| 165 |
+
|
| 166 |
+
content_root = ET.fromstring(files["[Content_Types].xml"])
|
| 167 |
+
for override in content_root.findall(f'{{{CT_NS}}}Override'):
|
| 168 |
+
part = override.attrib.get("PartName", "")
|
| 169 |
+
slide_match = re.search(r"/ppt/slides/slide(\d+)\.xml$", part)
|
| 170 |
+
if slide_match and int(slide_match.group(1)) >= 2:
|
| 171 |
+
override.set(
|
| 172 |
+
"PartName",
|
| 173 |
+
part.replace(f"slide{slide_match.group(1)}.xml", f"slide{int(slide_match.group(1)) + 1}.xml"),
|
| 174 |
+
)
|
| 175 |
+
content_root.append(
|
| 176 |
+
ET.Element(
|
| 177 |
+
f'{{{CT_NS}}}Override',
|
| 178 |
+
{
|
| 179 |
+
"PartName": "/ppt/slides/slide2.xml",
|
| 180 |
+
"ContentType": "application/vnd.openxmlformats-officedocument.presentationml.slide+xml",
|
| 181 |
+
},
|
| 182 |
+
)
|
| 183 |
+
)
|
| 184 |
+
files["[Content_Types].xml"] = ET.tostring(content_root, encoding="utf-8", xml_declaration=True)
|
| 185 |
+
|
| 186 |
+
temp_path = PPT_PATH.with_suffix(".tmp.pptx")
|
| 187 |
+
with zipfile.ZipFile(temp_path, "w", compression=zipfile.ZIP_DEFLATED) as output_zip:
|
| 188 |
+
for name in sorted(files):
|
| 189 |
+
output_zip.writestr(name, files[name])
|
| 190 |
+
temp_path.replace(PPT_PATH)
|
| 191 |
+
print(f"Inserted AMVL intro slide into: {PPT_PATH}")
|
| 192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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import copy
|
| 5 |
+
import csv
|
| 6 |
+
import re
|
| 7 |
+
import zipfile
|
| 8 |
+
import xml.etree.ElementTree as ET
|
| 9 |
+
from dataclasses import dataclass
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
from typing import Iterable
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
ROOT = Path(__file__).resolve().parents[1]
|
| 15 |
+
PPT_PATH = ROOT / "清窍聪明汤.pptx"
|
| 16 |
+
OVERALL_SUMMARY = ROOT / "re" / "MS" / "idrug" / "omc" / "formula_indication_summary.csv"
|
| 17 |
+
TOPK_SUMMARY = ROOT / "re" / "MS" / "idrug" / "topk" / "formula_indication_summary.csv"
|
| 18 |
+
|
| 19 |
+
A_NS = "http://schemas.openxmlformats.org/drawingml/2006/main"
|
| 20 |
+
P_NS = "http://schemas.openxmlformats.org/presentationml/2006/main"
|
| 21 |
+
R_NS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
|
| 22 |
+
REL_NS = "http://schemas.openxmlformats.org/package/2006/relationships"
|
| 23 |
+
CT_NS = "http://schemas.openxmlformats.org/package/2006/content-types"
|
| 24 |
+
|
| 25 |
+
NS = {"a": A_NS, "p": P_NS, "r": R_NS}
|
| 26 |
+
|
| 27 |
+
ET.register_namespace("a", A_NS)
|
| 28 |
+
ET.register_namespace("p", P_NS)
|
| 29 |
+
ET.register_namespace("r", R_NS)
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
def qn(ns: str, tag: str) -> str:
|
| 33 |
+
mapping = {"a": A_NS, "p": P_NS, "r": R_NS}
|
| 34 |
+
return f"{{{mapping[ns]}}}{tag}"
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
@dataclass
|
| 38 |
+
class TextSlideSpec:
|
| 39 |
+
title: str
|
| 40 |
+
paragraphs: list[str]
|
| 41 |
+
font_size: int = 1500
|
| 42 |
+
title_font_size: int = 2200
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
@dataclass
|
| 46 |
+
class TableSlideSpec:
|
| 47 |
+
title: str
|
| 48 |
+
headers: list[str]
|
| 49 |
+
rows: list[list[str]]
|
| 50 |
+
body_font_size: int = 1650
|
| 51 |
+
header_font_size: int = 1700
|
| 52 |
+
row_height: int = 640000
|
| 53 |
+
col_widths: list[int] | None = None
|
| 54 |
+
title_font_size: int = 2200
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def load_csv_rows(path: Path) -> list[dict[str, str]]:
|
| 58 |
+
with path.open("r", encoding="utf-8-sig", newline="") as handle:
|
| 59 |
+
reader = csv.DictReader(handle)
|
| 60 |
+
return [{(key or "").lstrip("\ufeff"): value or "" for key, value in row.items()} for row in reader]
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
def short_disease_name(name: str) -> str:
|
| 64 |
+
custom = {
|
| 65 |
+
"沃尔夫-帕金森-怀特综合症": "WPW综合征",
|
| 66 |
+
"增生性髓鞘病对疼痛不敏感": "增生性髓鞘病致痛觉缺失",
|
| 67 |
+
"有或没有先兆的偏头痛,易感性,1": "偏头痛(有/无先兆)1",
|
| 68 |
+
"人类免疫缺陷病毒 1 型,易感性": "HIV-1易感性",
|
| 69 |
+
"疟疾,易感性": "疟疾易感性",
|
| 70 |
+
"哮喘,易感性": "哮喘易感性",
|
| 71 |
+
"高血压,必不可少": "原发性高血压",
|
| 72 |
+
}
|
| 73 |
+
return custom.get(name, name)
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def format_score(value: str | float, digits: int = 6) -> str:
|
| 77 |
+
return f"{float(value):.{digits}f}"
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
def format_percent(value: str | float, digits: int = 1) -> str:
|
| 81 |
+
return f"{100 * float(value):.{digits}f}%"
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def clear_paragraphs(tx_body: ET.Element) -> None:
|
| 85 |
+
for child in list(tx_body):
|
| 86 |
+
if child.tag == qn("a", "p"):
|
| 87 |
+
tx_body.remove(child)
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
def make_paragraph(text: str, font_size: int, align: str = "l") -> ET.Element:
|
| 91 |
+
paragraph = ET.Element(qn("a", "p"))
|
| 92 |
+
p_pr = ET.SubElement(paragraph, qn("a", "pPr"), {"algn": align})
|
| 93 |
+
ln_spc = ET.SubElement(p_pr, qn("a", "lnSpc"))
|
| 94 |
+
ET.SubElement(ln_spc, qn("a", "spcPct"), {"val": "108000"})
|
| 95 |
+
ET.SubElement(p_pr, qn("a", "buNone"))
|
| 96 |
+
run = ET.SubElement(paragraph, qn("a", "r"))
|
| 97 |
+
ET.SubElement(run, qn("a", "rPr"), {"lang": "zh-CN", "altLang": "en-US", "sz": str(font_size)})
|
| 98 |
+
ET.SubElement(run, qn("a", "t")).text = text
|
| 99 |
+
ET.SubElement(paragraph, qn("a", "endParaRPr"), {"lang": "zh-CN", "altLang": "en-US", "sz": str(font_size)})
|
| 100 |
+
return paragraph
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
def set_textbox_paragraphs(sp: ET.Element, paragraphs: Iterable[str], font_size: int, align: str = "l") -> None:
|
| 104 |
+
tx_body = sp.find("p:txBody", NS)
|
| 105 |
+
if tx_body is None:
|
| 106 |
+
return
|
| 107 |
+
clear_paragraphs(tx_body)
|
| 108 |
+
for paragraph_text in paragraphs:
|
| 109 |
+
tx_body.append(make_paragraph(paragraph_text, font_size=font_size, align=align))
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
def set_table_cell_text(tc: ET.Element, text: str, font_size: int, align: str = "ctr") -> None:
|
| 113 |
+
tx_body = tc.find("a:txBody", NS)
|
| 114 |
+
if tx_body is None:
|
| 115 |
+
return
|
| 116 |
+
clear_paragraphs(tx_body)
|
| 117 |
+
tx_body.append(make_paragraph(text, font_size=font_size, align=align))
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
def rebuild_table(tbl: ET.Element, spec: TableSlideSpec) -> None:
|
| 121 |
+
tbl_grid = tbl.find("a:tblGrid", NS)
|
| 122 |
+
rows = tbl.findall("a:tr", NS)
|
| 123 |
+
header_row_template = rows[0]
|
| 124 |
+
body_row_template = rows[1]
|
| 125 |
+
|
| 126 |
+
for child in list(tbl):
|
| 127 |
+
if child.tag in {qn("a", "tblGrid"), qn("a", "tr")}:
|
| 128 |
+
tbl.remove(child)
|
| 129 |
+
|
| 130 |
+
new_grid = copy.deepcopy(tbl_grid)
|
| 131 |
+
for child in list(new_grid):
|
| 132 |
+
new_grid.remove(child)
|
| 133 |
+
for width in spec.col_widths or []:
|
| 134 |
+
ET.SubElement(new_grid, qn("a", "gridCol"), {"w": str(width)})
|
| 135 |
+
tbl.append(new_grid)
|
| 136 |
+
|
| 137 |
+
header_row = copy.deepcopy(header_row_template)
|
| 138 |
+
header_row.set("h", str(spec.row_height))
|
| 139 |
+
for cell, text in zip(header_row.findall("a:tc", NS), spec.headers):
|
| 140 |
+
set_table_cell_text(cell, text, font_size=spec.header_font_size, align="ctr")
|
| 141 |
+
tbl.append(header_row)
|
| 142 |
+
|
| 143 |
+
for row_values in spec.rows:
|
| 144 |
+
row = copy.deepcopy(body_row_template)
|
| 145 |
+
row.set("h", str(spec.row_height))
|
| 146 |
+
for index, (cell, text) in enumerate(zip(row.findall("a:tc", NS), row_values)):
|
| 147 |
+
align = "l" if index == 2 else "ctr"
|
| 148 |
+
set_table_cell_text(cell, text, font_size=spec.body_font_size, align=align)
|
| 149 |
+
tbl.append(row)
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
def build_text_slide_xml(template_xml: bytes, spec: TextSlideSpec) -> bytes:
|
| 153 |
+
root = ET.fromstring(template_xml)
|
| 154 |
+
shapes = root.find("p:cSld/p:spTree", NS).findall("p:sp", NS)
|
| 155 |
+
set_textbox_paragraphs(shapes[1], [spec.title], font_size=spec.title_font_size)
|
| 156 |
+
set_textbox_paragraphs(shapes[2], spec.paragraphs, font_size=spec.font_size)
|
| 157 |
+
return ET.tostring(root, encoding="utf-8", xml_declaration=True)
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
def build_table_slide_xml(template_xml: bytes, spec: TableSlideSpec) -> bytes:
|
| 161 |
+
root = ET.fromstring(template_xml)
|
| 162 |
+
shapes = root.find("p:cSld/p:spTree", NS).findall("p:sp", NS)
|
| 163 |
+
set_textbox_paragraphs(shapes[1], [spec.title], font_size=spec.title_font_size)
|
| 164 |
+
tbl = root.find(".//a:tbl", NS)
|
| 165 |
+
rebuild_table(tbl, spec)
|
| 166 |
+
return ET.tostring(root, encoding="utf-8", xml_declaration=True)
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
def update_slide_rel_notes_target(rel_xml: bytes, note_number: int) -> bytes:
|
| 170 |
+
root = ET.fromstring(rel_xml)
|
| 171 |
+
for rel in root.findall(f"{{{REL_NS}}}Relationship"):
|
| 172 |
+
if rel.attrib.get("Type", "").endswith("/notesSlide"):
|
| 173 |
+
rel.set("Target", f"../notesSlides/notesSlide{note_number}.xml")
|
| 174 |
+
return ET.tostring(root, encoding="utf-8", xml_declaration=True)
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
def update_note_rel_slide_target(rel_xml: bytes, slide_number: int) -> bytes:
|
| 178 |
+
root = ET.fromstring(rel_xml)
|
| 179 |
+
for rel in root.findall(f"{{{REL_NS}}}Relationship"):
|
| 180 |
+
if rel.attrib.get("Type", "").endswith("/slide"):
|
| 181 |
+
rel.set("Target", f"../slides/slide{slide_number}.xml")
|
| 182 |
+
return ET.tostring(root, encoding="utf-8", xml_declaration=True)
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
def find_row(rows: list[dict[str, str]], disease_id: str) -> dict[str, str]:
|
| 186 |
+
for row in rows:
|
| 187 |
+
if row["disease_id"] == disease_id:
|
| 188 |
+
return row
|
| 189 |
+
raise KeyError(f"Disease not found: {disease_id}")
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
def build_specs() -> tuple[TableSlideSpec, TextSlideSpec]:
|
| 193 |
+
overall_rows = load_csv_rows(OVERALL_SUMMARY)
|
| 194 |
+
topk_rows = load_csv_rows(TOPK_SUMMARY)
|
| 195 |
+
topk_rank = {row["disease_id"]: int(row["formula_rank"]) for row in topk_rows}
|
| 196 |
+
|
| 197 |
+
top3 = overall_rows[:3]
|
| 198 |
+
breast = find_row(overall_rows, "D114480")
|
| 199 |
+
hypertension = find_row(overall_rows, "D145500")
|
| 200 |
+
lung = find_row(overall_rows, "D211980")
|
| 201 |
+
hiv = find_row(overall_rows, "D609423")
|
| 202 |
+
|
| 203 |
+
table_rows = [
|
| 204 |
+
[
|
| 205 |
+
str(idx),
|
| 206 |
+
row["disease_id"],
|
| 207 |
+
short_disease_name(row["disease_name_zh"]),
|
| 208 |
+
format_score(row["formula_primary_score"], 6),
|
| 209 |
+
format_percent(row["support_ratio_ge_primary_threshold"], 1),
|
| 210 |
+
]
|
| 211 |
+
for idx, row in enumerate(overall_rows[:5], start=1)
|
| 212 |
+
]
|
| 213 |
+
|
| 214 |
+
table_spec = TableSlideSpec(
|
| 215 |
+
title="基于MS+iDrug的overall mean coverage结果",
|
| 216 |
+
headers=["排名", "疾病ID", "疾病名称", "均值×覆盖率", "覆盖比例"],
|
| 217 |
+
rows=table_rows,
|
| 218 |
+
col_widths=[900000, 1700000, 3900000, 2200000, 2278515],
|
| 219 |
+
)
|
| 220 |
+
|
| 221 |
+
text_spec = TextSlideSpec(
|
| 222 |
+
title="overall mean coverage结果解读",
|
| 223 |
+
paragraphs=[
|
| 224 |
+
"1. overall mean coverage 指标使用全体化合物均值 × 覆盖比例(阈值 >= 1e-4)作为主分数,强调“平均信号强度 + 多成分覆盖度”的综合表现。",
|
| 225 |
+
(
|
| 226 |
+
f"2. Top 3 仍为 {short_disease_name(top3[0]['disease_name_zh'])}、"
|
| 227 |
+
f"{short_disease_name(top3[1]['disease_name_zh'])} 和 "
|
| 228 |
+
f"{short_disease_name(top3[2]['disease_name_zh'])},对应覆盖化合物数分别为 "
|
| 229 |
+
f"{top3[0]['support_count_ge_primary_threshold']}、"
|
| 230 |
+
f"{top3[1]['support_count_ge_primary_threshold']} 和 "
|
| 231 |
+
f"{top3[2]['support_count_ge_primary_threshold']} 个,占全部 MS 化合物的 "
|
| 232 |
+
f"{format_percent(top3[0]['support_ratio_ge_primary_threshold'])}、"
|
| 233 |
+
f"{format_percent(top3[1]['support_ratio_ge_primary_threshold'])} 和 "
|
| 234 |
+
f"{format_percent(top3[2]['support_ratio_ge_primary_threshold'])}。"
|
| 235 |
+
),
|
| 236 |
+
(
|
| 237 |
+
f"3. 与 top-k 排序相比,{short_disease_name(breast['disease_name_zh'])}由第 "
|
| 238 |
+
f"{topk_rank[breast['disease_id']]} 位升至第 4 位,"
|
| 239 |
+
f"{short_disease_name(hypertension['disease_name_zh'])}由第 "
|
| 240 |
+
f"{topk_rank[hypertension['disease_id']]} 位升至第 5 位,"
|
| 241 |
+
f"{short_disease_name(lung['disease_name_zh'])}由第 "
|
| 242 |
+
f"{topk_rank[lung['disease_id']]} 位升至第 7 位,说明这些候选并非仅由少数峰值成分驱动。"
|
| 243 |
+
),
|
| 244 |
+
(
|
| 245 |
+
f"4. {short_disease_name(hiv['disease_name_zh'])}从 top-k 的第 "
|
| 246 |
+
f"{topk_rank[hiv['disease_id']]} 位降至这里的第 {hiv['formula_rank']} 位,"
|
| 247 |
+
f"主要原因是覆盖比例只有 {format_percent(hiv['support_ratio_ge_primary_threshold'])},"
|
| 248 |
+
"明显低于前列候选的 30% 左右,提示其更依赖少数高分化合物。"
|
| 249 |
+
),
|
| 250 |
+
"5. 因此,overall mean coverage 更适合作为 top-k 结果的稳健性补充;若某疾病在两种排序下都靠前,可优先进入后续人工筛选与文献验证。",
|
| 251 |
+
],
|
| 252 |
+
)
|
| 253 |
+
return table_spec, text_spec
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
def ensure_override(content_root: ET.Element, part_name: str, content_type: str) -> None:
|
| 257 |
+
for override in content_root.findall(f"{{{CT_NS}}}Override"):
|
| 258 |
+
if override.attrib.get("PartName") == part_name:
|
| 259 |
+
return
|
| 260 |
+
content_root.append(
|
| 261 |
+
ET.Element(
|
| 262 |
+
f"{{{CT_NS}}}Override",
|
| 263 |
+
{
|
| 264 |
+
"PartName": part_name,
|
| 265 |
+
"ContentType": content_type,
|
| 266 |
+
},
|
| 267 |
+
)
|
| 268 |
+
)
|
| 269 |
+
|
| 270 |
+
|
| 271 |
+
def insert_after_slide(ppt_path: Path) -> None:
|
| 272 |
+
with zipfile.ZipFile(ppt_path) as source_zip:
|
| 273 |
+
files = {name: source_zip.read(name) for name in source_zip.namelist()}
|
| 274 |
+
|
| 275 |
+
if any("overall mean coverage结果".encode("utf-8") in data for name, data in files.items() if name.startswith("ppt/slides/slide")):
|
| 276 |
+
raise SystemExit("overall mean coverage slides already exist; no changes made.")
|
| 277 |
+
|
| 278 |
+
slide_numbers = sorted(
|
| 279 |
+
int(match.group(1))
|
| 280 |
+
for name in files
|
| 281 |
+
if (match := re.fullmatch(r"ppt/slides/slide(\d+)\.xml", name))
|
| 282 |
+
)
|
| 283 |
+
note_numbers = sorted(
|
| 284 |
+
int(match.group(1))
|
| 285 |
+
for name in files
|
| 286 |
+
if (match := re.fullmatch(r"ppt/notesSlides/notesSlide(\d+)\.xml", name))
|
| 287 |
+
)
|
| 288 |
+
|
| 289 |
+
new_slide_numbers = [max(slide_numbers) + 1, max(slide_numbers) + 2]
|
| 290 |
+
new_note_numbers = [max(note_numbers) + 1, max(note_numbers) + 2]
|
| 291 |
+
|
| 292 |
+
table_spec, text_spec = build_specs()
|
| 293 |
+
table_template_xml = files["ppt/slides/slide14.xml"]
|
| 294 |
+
text_template_xml = files["ppt/slides/slide15.xml"]
|
| 295 |
+
table_slide_rel_template = files["ppt/slides/_rels/slide14.xml.rels"]
|
| 296 |
+
text_slide_rel_template = files["ppt/slides/_rels/slide15.xml.rels"]
|
| 297 |
+
table_note_xml = files["ppt/notesSlides/notesSlide14.xml"]
|
| 298 |
+
text_note_xml = files["ppt/notesSlides/notesSlide15.xml"]
|
| 299 |
+
table_note_rel_template = files["ppt/notesSlides/_rels/notesSlide14.xml.rels"]
|
| 300 |
+
text_note_rel_template = files["ppt/notesSlides/_rels/notesSlide15.xml.rels"]
|
| 301 |
+
|
| 302 |
+
files[f"ppt/slides/slide{new_slide_numbers[0]}.xml"] = build_table_slide_xml(table_template_xml, table_spec)
|
| 303 |
+
files[f"ppt/slides/slide{new_slide_numbers[1]}.xml"] = build_text_slide_xml(text_template_xml, text_spec)
|
| 304 |
+
files[f"ppt/slides/_rels/slide{new_slide_numbers[0]}.xml.rels"] = update_slide_rel_notes_target(
|
| 305 |
+
table_slide_rel_template, new_note_numbers[0]
|
| 306 |
+
)
|
| 307 |
+
files[f"ppt/slides/_rels/slide{new_slide_numbers[1]}.xml.rels"] = update_slide_rel_notes_target(
|
| 308 |
+
text_slide_rel_template, new_note_numbers[1]
|
| 309 |
+
)
|
| 310 |
+
files[f"ppt/notesSlides/notesSlide{new_note_numbers[0]}.xml"] = table_note_xml
|
| 311 |
+
files[f"ppt/notesSlides/notesSlide{new_note_numbers[1]}.xml"] = text_note_xml
|
| 312 |
+
files[f"ppt/notesSlides/_rels/notesSlide{new_note_numbers[0]}.xml.rels"] = update_note_rel_slide_target(
|
| 313 |
+
table_note_rel_template, new_slide_numbers[0]
|
| 314 |
+
)
|
| 315 |
+
files[f"ppt/notesSlides/_rels/notesSlide{new_note_numbers[1]}.xml.rels"] = update_note_rel_slide_target(
|
| 316 |
+
text_note_rel_template, new_slide_numbers[1]
|
| 317 |
+
)
|
| 318 |
+
|
| 319 |
+
presentation_root = ET.fromstring(files["ppt/presentation.xml"])
|
| 320 |
+
rel_root = ET.fromstring(files["ppt/_rels/presentation.xml.rels"])
|
| 321 |
+
sld_id_list = presentation_root.find("p:sldIdLst", NS)
|
| 322 |
+
sld_ids = sld_id_list.findall("p:sldId", NS)
|
| 323 |
+
rels = rel_root.findall(f"{{{REL_NS}}}Relationship")
|
| 324 |
+
rel_map = {rel.attrib["Id"]: rel.attrib.get("Target", "") for rel in rels}
|
| 325 |
+
|
| 326 |
+
insert_pos = None
|
| 327 |
+
slide15_rid = None
|
| 328 |
+
for index, sld in enumerate(sld_ids):
|
| 329 |
+
rid = sld.attrib.get(qn("r", "id"))
|
| 330 |
+
if rel_map.get(rid) == "slides/slide15.xml":
|
| 331 |
+
insert_pos = index + 1
|
| 332 |
+
slide15_rid = rid
|
| 333 |
+
break
|
| 334 |
+
if insert_pos is None or slide15_rid is None:
|
| 335 |
+
raise RuntimeError("Failed to locate slide15.xml in presentation order.")
|
| 336 |
+
|
| 337 |
+
max_sld_id = max(int(node.attrib["id"]) for node in sld_ids)
|
| 338 |
+
max_rid = max(int(rel.attrib["Id"][3:]) for rel in rels if rel.attrib.get("Id", "").startswith("rId"))
|
| 339 |
+
new_rids = [f"rId{max_rid + 1}", f"rId{max_rid + 2}"]
|
| 340 |
+
|
| 341 |
+
for offset, (new_sld_id, new_rid) in enumerate(zip([max_sld_id + 1, max_sld_id + 2], new_rids)):
|
| 342 |
+
sld_id_list.insert(
|
| 343 |
+
insert_pos + offset,
|
| 344 |
+
ET.Element(qn("p", "sldId"), {"id": str(new_sld_id), qn("r", "id"): new_rid}),
|
| 345 |
+
)
|
| 346 |
+
|
| 347 |
+
for new_rid, slide_number in zip(new_rids, new_slide_numbers):
|
| 348 |
+
rel_root.append(
|
| 349 |
+
ET.Element(
|
| 350 |
+
f"{{{REL_NS}}}Relationship",
|
| 351 |
+
{
|
| 352 |
+
"Id": new_rid,
|
| 353 |
+
"Type": "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide",
|
| 354 |
+
"Target": f"slides/slide{slide_number}.xml",
|
| 355 |
+
},
|
| 356 |
+
)
|
| 357 |
+
)
|
| 358 |
+
|
| 359 |
+
files["ppt/presentation.xml"] = ET.tostring(presentation_root, encoding="utf-8", xml_declaration=True)
|
| 360 |
+
files["ppt/_rels/presentation.xml.rels"] = ET.tostring(rel_root, encoding="utf-8", xml_declaration=True)
|
| 361 |
+
|
| 362 |
+
content_root = ET.fromstring(files["[Content_Types].xml"])
|
| 363 |
+
ensure_override(
|
| 364 |
+
content_root,
|
| 365 |
+
f"/ppt/slides/slide{new_slide_numbers[0]}.xml",
|
| 366 |
+
"application/vnd.openxmlformats-officedocument.presentationml.slide+xml",
|
| 367 |
+
)
|
| 368 |
+
ensure_override(
|
| 369 |
+
content_root,
|
| 370 |
+
f"/ppt/slides/slide{new_slide_numbers[1]}.xml",
|
| 371 |
+
"application/vnd.openxmlformats-officedocument.presentationml.slide+xml",
|
| 372 |
+
)
|
| 373 |
+
ensure_override(
|
| 374 |
+
content_root,
|
| 375 |
+
f"/ppt/notesSlides/notesSlide{new_note_numbers[0]}.xml",
|
| 376 |
+
"application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml",
|
| 377 |
+
)
|
| 378 |
+
ensure_override(
|
| 379 |
+
content_root,
|
| 380 |
+
f"/ppt/notesSlides/notesSlide{new_note_numbers[1]}.xml",
|
| 381 |
+
"application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml",
|
| 382 |
+
)
|
| 383 |
+
files["[Content_Types].xml"] = ET.tostring(content_root, encoding="utf-8", xml_declaration=True)
|
| 384 |
+
|
| 385 |
+
temp_path = ppt_path.with_suffix(".tmp.pptx")
|
| 386 |
+
with zipfile.ZipFile(temp_path, "w", compression=zipfile.ZIP_DEFLATED) as output_zip:
|
| 387 |
+
for name in sorted(files):
|
| 388 |
+
output_zip.writestr(name, files[name])
|
| 389 |
+
temp_path.replace(ppt_path)
|
| 390 |
+
|
| 391 |
+
|
| 392 |
+
def main() -> None:
|
| 393 |
+
insert_after_slide(PPT_PATH)
|
| 394 |
+
print(f"Inserted overall mean coverage slides into: {PPT_PATH}")
|
| 395 |
+
|
| 396 |
+
|
| 397 |
+
if __name__ == "__main__":
|
| 398 |
+
main()
|
presentation/insert_weighted_ms_result_slides.py
ADDED
|
@@ -0,0 +1,447 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import copy
|
| 5 |
+
import csv
|
| 6 |
+
import re
|
| 7 |
+
import zipfile
|
| 8 |
+
import xml.etree.ElementTree as ET
|
| 9 |
+
from dataclasses import dataclass
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
from typing import Iterable
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
ROOT = Path(__file__).resolve().parents[1]
|
| 15 |
+
PPT_PATH = ROOT / "清窍聪明汤.pptx"
|
| 16 |
+
|
| 17 |
+
DOSE_TOPK_SUMMARY = (
|
| 18 |
+
ROOT / "re" / "MS" / "idrug" / "w_dose_topk_v2_cons" / "formula_indication_summary.csv"
|
| 19 |
+
)
|
| 20 |
+
DOSE_OVERALL_SUMMARY = (
|
| 21 |
+
ROOT
|
| 22 |
+
/ "re"
|
| 23 |
+
/ "MS"
|
| 24 |
+
/ "idrug"
|
| 25 |
+
/ "w_dose_omc_v2_cons"
|
| 26 |
+
/ "formula_indication_summary.csv"
|
| 27 |
+
)
|
| 28 |
+
MS_TOPK_SUMMARY = (
|
| 29 |
+
ROOT / "re" / "MS" / "idrug" / "w_ms_topk_full" / "formula_indication_summary.csv"
|
| 30 |
+
)
|
| 31 |
+
MS_OVERALL_SUMMARY = (
|
| 32 |
+
ROOT
|
| 33 |
+
/ "re"
|
| 34 |
+
/ "MS"
|
| 35 |
+
/ "idrug"
|
| 36 |
+
/ "w_ms_omc_full"
|
| 37 |
+
/ "formula_indication_summary.csv"
|
| 38 |
+
)
|
| 39 |
+
|
| 40 |
+
A_NS = "http://schemas.openxmlformats.org/drawingml/2006/main"
|
| 41 |
+
P_NS = "http://schemas.openxmlformats.org/presentationml/2006/main"
|
| 42 |
+
R_NS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
|
| 43 |
+
REL_NS = "http://schemas.openxmlformats.org/package/2006/relationships"
|
| 44 |
+
CT_NS = "http://schemas.openxmlformats.org/package/2006/content-types"
|
| 45 |
+
|
| 46 |
+
NS = {"a": A_NS, "p": P_NS, "r": R_NS}
|
| 47 |
+
|
| 48 |
+
ET.register_namespace("a", A_NS)
|
| 49 |
+
ET.register_namespace("p", P_NS)
|
| 50 |
+
ET.register_namespace("r", R_NS)
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
def qn(ns: str, tag: str) -> str:
|
| 54 |
+
mapping = {"a": A_NS, "p": P_NS, "r": R_NS}
|
| 55 |
+
return f"{{{mapping[ns]}}}{tag}"
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
@dataclass
|
| 59 |
+
class TextSlideSpec:
|
| 60 |
+
title: str
|
| 61 |
+
paragraphs: list[str]
|
| 62 |
+
font_size: int = 1450
|
| 63 |
+
title_font_size: int = 2200
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
@dataclass
|
| 67 |
+
class TableSlideSpec:
|
| 68 |
+
title: str
|
| 69 |
+
headers: list[str]
|
| 70 |
+
rows: list[list[str]]
|
| 71 |
+
footer: str
|
| 72 |
+
body_font_size: int = 1650
|
| 73 |
+
header_font_size: int = 1700
|
| 74 |
+
footer_font_size: int = 1450
|
| 75 |
+
row_height: int = 640000
|
| 76 |
+
title_font_size: int = 2100
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
def load_csv_rows(path: Path) -> list[dict[str, str]]:
|
| 80 |
+
with path.open("r", encoding="utf-8-sig", newline="") as handle:
|
| 81 |
+
reader = csv.DictReader(handle)
|
| 82 |
+
return [{(key or "").lstrip("\ufeff"): value or "" for key, value in row.items()} for row in reader]
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
def short_disease_name(name: str) -> str:
|
| 86 |
+
custom = {
|
| 87 |
+
"沃尔夫-帕金森-怀特综合症": "WPW综合征",
|
| 88 |
+
"增生性髓鞘病对疼痛不敏感": "增生性髓鞘病致痛觉缺失",
|
| 89 |
+
"有或没有先兆的偏头痛,易感性,1": "偏头痛(有/无先兆)1",
|
| 90 |
+
"人类免疫缺陷病毒 1 型,易感性": "HIV-1易感性",
|
| 91 |
+
"疟疾,易感性": "疟疾易感性",
|
| 92 |
+
"哮喘,易感性": "哮喘易感性",
|
| 93 |
+
"高血压,必不可少": "原发性高血压",
|
| 94 |
+
"炎症性肠病(克罗恩病)1": "克罗恩病1",
|
| 95 |
+
"结核分枝杆菌,易感性": "结核分枝杆菌易感性",
|
| 96 |
+
"青少年全身性类风湿性关节炎": "青少年系统性关节炎",
|
| 97 |
+
}
|
| 98 |
+
return custom.get(name, name)
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
def format_score(value: str | float, digits: int = 6) -> str:
|
| 102 |
+
return f"{float(value):.{digits}f}"
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def format_percent(value: str | float, digits: int = 1) -> str:
|
| 106 |
+
return f"{100 * float(value):.{digits}f}%"
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
def clear_paragraphs(tx_body: ET.Element) -> None:
|
| 110 |
+
for child in list(tx_body):
|
| 111 |
+
if child.tag == qn("a", "p"):
|
| 112 |
+
tx_body.remove(child)
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def make_paragraph(text: str, font_size: int, align: str = "l") -> ET.Element:
|
| 116 |
+
paragraph = ET.Element(qn("a", "p"))
|
| 117 |
+
p_pr = ET.SubElement(paragraph, qn("a", "pPr"), {"algn": align})
|
| 118 |
+
ln_spc = ET.SubElement(p_pr, qn("a", "lnSpc"))
|
| 119 |
+
ET.SubElement(ln_spc, qn("a", "spcPct"), {"val": "108000"})
|
| 120 |
+
ET.SubElement(p_pr, qn("a", "buNone"))
|
| 121 |
+
run = ET.SubElement(paragraph, qn("a", "r"))
|
| 122 |
+
ET.SubElement(run, qn("a", "rPr"), {"lang": "zh-CN", "altLang": "en-US", "sz": str(font_size)})
|
| 123 |
+
ET.SubElement(run, qn("a", "t")).text = text
|
| 124 |
+
ET.SubElement(paragraph, qn("a", "endParaRPr"), {"lang": "zh-CN", "altLang": "en-US", "sz": str(font_size)})
|
| 125 |
+
return paragraph
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
def set_textbox_paragraphs(sp: ET.Element, paragraphs: Iterable[str], font_size: int, align: str = "l") -> None:
|
| 129 |
+
tx_body = sp.find("p:txBody", NS)
|
| 130 |
+
if tx_body is None:
|
| 131 |
+
return
|
| 132 |
+
clear_paragraphs(tx_body)
|
| 133 |
+
for paragraph_text in paragraphs:
|
| 134 |
+
tx_body.append(make_paragraph(paragraph_text, font_size=font_size, align=align))
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
def set_table_cell_text(tc: ET.Element, text: str, font_size: int, align: str = "ctr") -> None:
|
| 138 |
+
tx_body = tc.find("a:txBody", NS)
|
| 139 |
+
if tx_body is None:
|
| 140 |
+
return
|
| 141 |
+
clear_paragraphs(tx_body)
|
| 142 |
+
tx_body.append(make_paragraph(text, font_size=font_size, align=align))
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
def rebuild_table(tbl: ET.Element, spec: TableSlideSpec) -> None:
|
| 146 |
+
rows = tbl.findall("a:tr", NS)
|
| 147 |
+
header_row_template = rows[0]
|
| 148 |
+
body_row_template = rows[1]
|
| 149 |
+
tbl_grid = tbl.find("a:tblGrid", NS)
|
| 150 |
+
|
| 151 |
+
for child in list(tbl):
|
| 152 |
+
if child.tag in {qn("a", "tr")}:
|
| 153 |
+
tbl.remove(child)
|
| 154 |
+
|
| 155 |
+
if tbl_grid is not None:
|
| 156 |
+
pass
|
| 157 |
+
|
| 158 |
+
header_row = copy.deepcopy(header_row_template)
|
| 159 |
+
header_row.set("h", str(spec.row_height))
|
| 160 |
+
for cell, text in zip(header_row.findall("a:tc", NS), spec.headers):
|
| 161 |
+
set_table_cell_text(cell, text, font_size=spec.header_font_size, align="ctr")
|
| 162 |
+
tbl.append(header_row)
|
| 163 |
+
|
| 164 |
+
for row_values in spec.rows:
|
| 165 |
+
row = copy.deepcopy(body_row_template)
|
| 166 |
+
row.set("h", str(spec.row_height))
|
| 167 |
+
for index, (cell, text) in enumerate(zip(row.findall("a:tc", NS), row_values)):
|
| 168 |
+
align = "l" if index == 2 else "ctr"
|
| 169 |
+
set_table_cell_text(cell, text, font_size=spec.body_font_size, align=align)
|
| 170 |
+
tbl.append(row)
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
def build_text_slide_xml(template_xml: bytes, spec: TextSlideSpec) -> bytes:
|
| 174 |
+
root = ET.fromstring(template_xml)
|
| 175 |
+
shapes = root.find("p:cSld/p:spTree", NS).findall("p:sp", NS)
|
| 176 |
+
set_textbox_paragraphs(shapes[1], [spec.title], font_size=spec.title_font_size)
|
| 177 |
+
set_textbox_paragraphs(shapes[2], spec.paragraphs, font_size=spec.font_size)
|
| 178 |
+
return ET.tostring(root, encoding="utf-8", xml_declaration=True)
|
| 179 |
+
|
| 180 |
+
|
| 181 |
+
def build_table_slide_xml(template_xml: bytes, spec: TableSlideSpec) -> bytes:
|
| 182 |
+
root = ET.fromstring(template_xml)
|
| 183 |
+
shapes = root.find("p:cSld/p:spTree", NS).findall("p:sp", NS)
|
| 184 |
+
set_textbox_paragraphs(shapes[1], [spec.title], font_size=spec.title_font_size)
|
| 185 |
+
set_textbox_paragraphs(shapes[2], [spec.footer], font_size=spec.footer_font_size)
|
| 186 |
+
tbl = root.find(".//a:tbl", NS)
|
| 187 |
+
rebuild_table(tbl, spec)
|
| 188 |
+
return ET.tostring(root, encoding="utf-8", xml_declaration=True)
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
def update_slide_rel_notes_target(rel_xml: bytes, note_number: int) -> bytes:
|
| 192 |
+
root = ET.fromstring(rel_xml)
|
| 193 |
+
for rel in root.findall(f"{{{REL_NS}}}Relationship"):
|
| 194 |
+
if rel.attrib.get("Type", "").endswith("/notesSlide"):
|
| 195 |
+
rel.set("Target", f"../notesSlides/notesSlide{note_number}.xml")
|
| 196 |
+
return ET.tostring(root, encoding="utf-8", xml_declaration=True)
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
def update_note_rel_slide_target(rel_xml: bytes, slide_number: int) -> bytes:
|
| 200 |
+
root = ET.fromstring(rel_xml)
|
| 201 |
+
for rel in root.findall(f"{{{REL_NS}}}Relationship"):
|
| 202 |
+
if rel.attrib.get("Type", "").endswith("/slide"):
|
| 203 |
+
rel.set("Target", f"../slides/slide{slide_number}.xml")
|
| 204 |
+
return ET.tostring(root, encoding="utf-8", xml_declaration=True)
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
def ensure_override(content_root: ET.Element, part_name: str, content_type: str) -> None:
|
| 208 |
+
for override in content_root.findall(f"{{{CT_NS}}}Override"):
|
| 209 |
+
if override.attrib.get("PartName") == part_name:
|
| 210 |
+
return
|
| 211 |
+
content_root.append(
|
| 212 |
+
ET.Element(
|
| 213 |
+
f"{{{CT_NS}}}Override",
|
| 214 |
+
{
|
| 215 |
+
"PartName": part_name,
|
| 216 |
+
"ContentType": content_type,
|
| 217 |
+
},
|
| 218 |
+
)
|
| 219 |
+
)
|
| 220 |
+
|
| 221 |
+
|
| 222 |
+
def build_topk_rows(summary_path: Path) -> list[list[str]]:
|
| 223 |
+
rows = load_csv_rows(summary_path)[:5]
|
| 224 |
+
return [
|
| 225 |
+
[
|
| 226 |
+
row["formula_rank"],
|
| 227 |
+
row["disease_id"],
|
| 228 |
+
short_disease_name(row["disease_name_zh"]),
|
| 229 |
+
format_score(row["formula_top_primaryk_mean_score"], 5),
|
| 230 |
+
format_score(row["formula_top10_mean_score"], 5),
|
| 231 |
+
]
|
| 232 |
+
for row in rows
|
| 233 |
+
]
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
def build_overall_rows(summary_path: Path) -> list[list[str]]:
|
| 237 |
+
rows = load_csv_rows(summary_path)[:5]
|
| 238 |
+
return [
|
| 239 |
+
[
|
| 240 |
+
row["formula_rank"],
|
| 241 |
+
row["disease_id"],
|
| 242 |
+
short_disease_name(row["disease_name_zh"]),
|
| 243 |
+
format_score(row["formula_primary_score"], 6),
|
| 244 |
+
format_percent(row["support_ratio_ge_primary_threshold"], 1),
|
| 245 |
+
]
|
| 246 |
+
for row in rows
|
| 247 |
+
]
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
def build_specs() -> list[tuple[str, object]]:
|
| 251 |
+
dose_text = TextSlideSpec(
|
| 252 |
+
title="MS化合物中药归属与剂量加权说明",
|
| 253 |
+
paragraphs=[
|
| 254 |
+
"1. 先将三次质谱并集中的 2253 个结果去重并做结构校验,整理出 1503 个可直接进入 iDrug 预测的唯一结构化合物。",
|
| 255 |
+
"2. 这些 MS 化合物的中药归属先用清窍聪明汤自建结构库做精确匹配和高相似结构匹配,再在 TCMBank、HERB、SymMap、BATMAN、ETCM2、本地中药汇总库和 TCM-MKG 中逐步补充溯源信息。",
|
| 256 |
+
"3. 所有命中的“化合物-中药”关系按化合物编号汇总后,得到 496 个已确认归属的化合物和 785 条确认到的化合物-中药对应关系;一个化合物若同时来自多味药,就保留全部已确认来源。",
|
| 257 |
+
"4. 剂量加权使用的是版本2保守方案:先把 11 味药的剂量做温和压缩,避免大剂量药把结果拉得过开;再把每味药转换成围绕平均水平上下浮动的相对权重。",
|
| 258 |
+
"5. 对已归属化合物,只保留 70% 的剂量偏移幅度;若一个化合物对应多味药,就取这些药权重的平均水平;对暂时没有确认中药归属的化合物,统一给 0.9 的轻度保守权重。",
|
| 259 |
+
],
|
| 260 |
+
)
|
| 261 |
+
|
| 262 |
+
dose_topk = TableSlideSpec(
|
| 263 |
+
title="iDrug + Top-k(剂量加权)疾病预测结果",
|
| 264 |
+
headers=["排名", "疾病ID", "疾病名称", "top-16均值", "top-10均值"],
|
| 265 |
+
rows=build_topk_rows(DOSE_TOPK_SUMMARY),
|
| 266 |
+
footer="这里使用版本2保守剂量权重:已归属化合物按中药剂量做温和调整,未归属化合物统一赋权 0.9;随后再取加权后 top-16 均值排序。",
|
| 267 |
+
)
|
| 268 |
+
|
| 269 |
+
dose_overall = TableSlideSpec(
|
| 270 |
+
title="iDrug + overall mean coverage(剂量加权)疾病预测结果",
|
| 271 |
+
headers=["排名", "疾病ID", "疾病名称", "均值×覆盖率", "覆盖比例"],
|
| 272 |
+
rows=build_overall_rows(DOSE_OVERALL_SUMMARY),
|
| 273 |
+
footer="这里先按版本2保守剂量权重调整每个化合物分数,再计算全体化合物平均水平与达到阈值的覆盖比例,最后以“平均值 × 覆盖比例”排序(阈值为 0.0001)。",
|
| 274 |
+
)
|
| 275 |
+
|
| 276 |
+
ms_text = TextSlideSpec(
|
| 277 |
+
title="MS化合物中药归属与交并集加权说明",
|
| 278 |
+
paragraphs=[
|
| 279 |
+
"1. 交并集加权使用的 1503 个 iDrug 化合物,仍沿用前述 MS 整理流程和唯一结构编号;若需要回溯到具体中药来源,也仍使用同一套已确认的中药归属汇总表。",
|
| 280 |
+
"2. 本次加权本身不直接依赖中药剂量,而是根据三次质谱重复出现的稳定性来区分化合物:若某个化合物对应的并集行同时出现在三次交集表中,就记为交集化合物;否则记为只在并集中出现的化合物。",
|
| 281 |
+
"3. 在进入 iDrug 的 1503 个化合物里,共有 170 个交集化合物、1333 个并集但不在交集中的化合物。为突出重复检出的稳定成分,交集化合物整体提高权重,并把并集非交集化合物略微下调。",
|
| 282 |
+
"4. 这里采用全量交并集加权方案,并同时把整体平均权重控制在接近 1:最终交集化合物权重大约为 1.339,并集非交集化合物权重大约为 0.957;随后再分别用 Top-k 和 overall mean coverage 做方剂层面排序。",
|
| 283 |
+
],
|
| 284 |
+
)
|
| 285 |
+
|
| 286 |
+
ms_topk = TableSlideSpec(
|
| 287 |
+
title="iDrug + Top-k(交并集加权)疾病预测结果",
|
| 288 |
+
headers=["排名", "疾病ID", "疾病名称", "top-16均值", "top-10均值"],
|
| 289 |
+
rows=build_topk_rows(MS_TOPK_SUMMARY),
|
| 290 |
+
footer="这里先按三次质谱交并集状态赋权:交集化合物约 1.339,并集非交集化合物约 0.957;随后再取加权后 top-16 均值排序。",
|
| 291 |
+
)
|
| 292 |
+
|
| 293 |
+
ms_overall = TableSlideSpec(
|
| 294 |
+
title="iDrug + overall mean coverage(交并集加权)疾病预测结果",
|
| 295 |
+
headers=["排名", "疾病ID", "疾病名称", "均值×覆盖率", "覆盖比例"],
|
| 296 |
+
rows=build_overall_rows(MS_OVERALL_SUMMARY),
|
| 297 |
+
footer="这里先按交并集状态调整每个化合物分数,再计算全体化合物平均水平与达到阈值的覆盖比例,最后以“平均值 × 覆盖比例”排序(阈值为 0.0001)。",
|
| 298 |
+
)
|
| 299 |
+
|
| 300 |
+
return [
|
| 301 |
+
("text", dose_text),
|
| 302 |
+
("topk", dose_topk),
|
| 303 |
+
("overall", dose_overall),
|
| 304 |
+
("text", ms_text),
|
| 305 |
+
("topk", ms_topk),
|
| 306 |
+
("overall", ms_overall),
|
| 307 |
+
]
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
def insert_before_next_step(ppt_path: Path) -> None:
|
| 311 |
+
with zipfile.ZipFile(ppt_path) as source_zip:
|
| 312 |
+
files = {name: source_zip.read(name) for name in source_zip.namelist()}
|
| 313 |
+
|
| 314 |
+
marker = "MS化合物中药归属与剂量加权说明".encode("utf-8")
|
| 315 |
+
if any(marker in data for name, data in files.items() if name.startswith("ppt/slides/slide")):
|
| 316 |
+
raise SystemExit("Weighted result slides already exist; no changes made.")
|
| 317 |
+
|
| 318 |
+
slide_numbers = sorted(
|
| 319 |
+
int(match.group(1))
|
| 320 |
+
for name in files
|
| 321 |
+
if (match := re.fullmatch(r"ppt/slides/slide(\d+)\.xml", name))
|
| 322 |
+
)
|
| 323 |
+
note_numbers = sorted(
|
| 324 |
+
int(match.group(1))
|
| 325 |
+
for name in files
|
| 326 |
+
if (match := re.fullmatch(r"ppt/notesSlides/notesSlide(\d+)\.xml", name))
|
| 327 |
+
)
|
| 328 |
+
|
| 329 |
+
specs = build_specs()
|
| 330 |
+
new_slide_numbers = list(range(max(slide_numbers) + 1, max(slide_numbers) + 1 + len(specs)))
|
| 331 |
+
new_note_numbers = list(range(max(note_numbers) + 1, max(note_numbers) + 1 + len(specs)))
|
| 332 |
+
|
| 333 |
+
text_template_xml = files["ppt/slides/slide18.xml"]
|
| 334 |
+
text_slide_rel_template = files["ppt/slides/_rels/slide18.xml.rels"]
|
| 335 |
+
text_note_xml = files["ppt/notesSlides/notesSlide18.xml"]
|
| 336 |
+
text_note_rel_template = files["ppt/notesSlides/_rels/notesSlide18.xml.rels"]
|
| 337 |
+
|
| 338 |
+
topk_template_xml = files["ppt/slides/slide15.xml"]
|
| 339 |
+
topk_slide_rel_template = files["ppt/slides/_rels/slide15.xml.rels"]
|
| 340 |
+
topk_note_xml = files["ppt/notesSlides/notesSlide15.xml"]
|
| 341 |
+
topk_note_rel_template = files["ppt/notesSlides/_rels/notesSlide15.xml.rels"]
|
| 342 |
+
|
| 343 |
+
overall_template_xml = files["ppt/slides/slide16.xml"]
|
| 344 |
+
overall_slide_rel_template = files["ppt/slides/_rels/slide16.xml.rels"]
|
| 345 |
+
overall_note_xml = files["ppt/notesSlides/notesSlide16.xml"]
|
| 346 |
+
overall_note_rel_template = files["ppt/notesSlides/_rels/notesSlide16.xml.rels"]
|
| 347 |
+
|
| 348 |
+
for slide_number, note_number, (kind, spec) in zip(new_slide_numbers, new_note_numbers, specs):
|
| 349 |
+
if kind == "text":
|
| 350 |
+
files[f"ppt/slides/slide{slide_number}.xml"] = build_text_slide_xml(text_template_xml, spec)
|
| 351 |
+
files[f"ppt/slides/_rels/slide{slide_number}.xml.rels"] = update_slide_rel_notes_target(
|
| 352 |
+
text_slide_rel_template, note_number
|
| 353 |
+
)
|
| 354 |
+
files[f"ppt/notesSlides/notesSlide{note_number}.xml"] = text_note_xml
|
| 355 |
+
files[f"ppt/notesSlides/_rels/notesSlide{note_number}.xml.rels"] = update_note_rel_slide_target(
|
| 356 |
+
text_note_rel_template, slide_number
|
| 357 |
+
)
|
| 358 |
+
elif kind == "topk":
|
| 359 |
+
files[f"ppt/slides/slide{slide_number}.xml"] = build_table_slide_xml(topk_template_xml, spec)
|
| 360 |
+
files[f"ppt/slides/_rels/slide{slide_number}.xml.rels"] = update_slide_rel_notes_target(
|
| 361 |
+
topk_slide_rel_template, note_number
|
| 362 |
+
)
|
| 363 |
+
files[f"ppt/notesSlides/notesSlide{note_number}.xml"] = topk_note_xml
|
| 364 |
+
files[f"ppt/notesSlides/_rels/notesSlide{note_number}.xml.rels"] = update_note_rel_slide_target(
|
| 365 |
+
topk_note_rel_template, slide_number
|
| 366 |
+
)
|
| 367 |
+
elif kind == "overall":
|
| 368 |
+
files[f"ppt/slides/slide{slide_number}.xml"] = build_table_slide_xml(overall_template_xml, spec)
|
| 369 |
+
files[f"ppt/slides/_rels/slide{slide_number}.xml.rels"] = update_slide_rel_notes_target(
|
| 370 |
+
overall_slide_rel_template, note_number
|
| 371 |
+
)
|
| 372 |
+
files[f"ppt/notesSlides/notesSlide{note_number}.xml"] = overall_note_xml
|
| 373 |
+
files[f"ppt/notesSlides/_rels/notesSlide{note_number}.xml.rels"] = update_note_rel_slide_target(
|
| 374 |
+
overall_note_rel_template, slide_number
|
| 375 |
+
)
|
| 376 |
+
else:
|
| 377 |
+
raise ValueError(f"Unknown slide kind: {kind}")
|
| 378 |
+
|
| 379 |
+
presentation_root = ET.fromstring(files["ppt/presentation.xml"])
|
| 380 |
+
rel_root = ET.fromstring(files["ppt/_rels/presentation.xml.rels"])
|
| 381 |
+
sld_id_list = presentation_root.find("p:sldIdLst", NS)
|
| 382 |
+
sld_ids = sld_id_list.findall("p:sldId", NS)
|
| 383 |
+
rels = rel_root.findall(f"{{{REL_NS}}}Relationship")
|
| 384 |
+
rel_map = {rel.attrib["Id"]: rel.attrib.get("Target", "") for rel in rels}
|
| 385 |
+
|
| 386 |
+
insert_pos = None
|
| 387 |
+
for index, sld in enumerate(sld_ids):
|
| 388 |
+
rid = sld.attrib.get(qn("r", "id"))
|
| 389 |
+
if rel_map.get(rid) == "slides/slide18.xml":
|
| 390 |
+
insert_pos = index
|
| 391 |
+
break
|
| 392 |
+
if insert_pos is None:
|
| 393 |
+
raise RuntimeError("Failed to locate slide18.xml (下一步计划) in presentation order.")
|
| 394 |
+
|
| 395 |
+
max_sld_id = max(int(node.attrib["id"]) for node in sld_ids)
|
| 396 |
+
max_rid = max(int(rel.attrib["Id"][3:]) for rel in rels if rel.attrib.get("Id", "").startswith("rId"))
|
| 397 |
+
new_rids = [f"rId{max_rid + 1 + i}" for i in range(len(specs))]
|
| 398 |
+
|
| 399 |
+
for offset, (new_sld_id, new_rid) in enumerate(zip(range(max_sld_id + 1, max_sld_id + 1 + len(specs)), new_rids)):
|
| 400 |
+
sld_id_list.insert(
|
| 401 |
+
insert_pos + offset,
|
| 402 |
+
ET.Element(qn("p", "sldId"), {"id": str(new_sld_id), qn("r", "id"): new_rid}),
|
| 403 |
+
)
|
| 404 |
+
|
| 405 |
+
for new_rid, slide_number in zip(new_rids, new_slide_numbers):
|
| 406 |
+
rel_root.append(
|
| 407 |
+
ET.Element(
|
| 408 |
+
f"{{{REL_NS}}}Relationship",
|
| 409 |
+
{
|
| 410 |
+
"Id": new_rid,
|
| 411 |
+
"Type": "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide",
|
| 412 |
+
"Target": f"slides/slide{slide_number}.xml",
|
| 413 |
+
},
|
| 414 |
+
)
|
| 415 |
+
)
|
| 416 |
+
|
| 417 |
+
files["ppt/presentation.xml"] = ET.tostring(presentation_root, encoding="utf-8", xml_declaration=True)
|
| 418 |
+
files["ppt/_rels/presentation.xml.rels"] = ET.tostring(rel_root, encoding="utf-8", xml_declaration=True)
|
| 419 |
+
|
| 420 |
+
content_root = ET.fromstring(files["[Content_Types].xml"])
|
| 421 |
+
for slide_number, note_number in zip(new_slide_numbers, new_note_numbers):
|
| 422 |
+
ensure_override(
|
| 423 |
+
content_root,
|
| 424 |
+
f"/ppt/slides/slide{slide_number}.xml",
|
| 425 |
+
"application/vnd.openxmlformats-officedocument.presentationml.slide+xml",
|
| 426 |
+
)
|
| 427 |
+
ensure_override(
|
| 428 |
+
content_root,
|
| 429 |
+
f"/ppt/notesSlides/notesSlide{note_number}.xml",
|
| 430 |
+
"application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml",
|
| 431 |
+
)
|
| 432 |
+
files["[Content_Types].xml"] = ET.tostring(content_root, encoding="utf-8", xml_declaration=True)
|
| 433 |
+
|
| 434 |
+
temp_path = ppt_path.with_suffix(".tmp.pptx")
|
| 435 |
+
with zipfile.ZipFile(temp_path, "w", compression=zipfile.ZIP_DEFLATED) as output_zip:
|
| 436 |
+
for name in sorted(files):
|
| 437 |
+
output_zip.writestr(name, files[name])
|
| 438 |
+
temp_path.replace(ppt_path)
|
| 439 |
+
|
| 440 |
+
|
| 441 |
+
def main() -> None:
|
| 442 |
+
insert_before_next_step(PPT_PATH)
|
| 443 |
+
print(f"Inserted weighted MS result slides into: {PPT_PATH}")
|
| 444 |
+
|
| 445 |
+
|
| 446 |
+
if __name__ == "__main__":
|
| 447 |
+
main()
|
原始记录/SC.ipynb
ADDED
|
@@ -0,0 +1,1622 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "code",
|
| 5 |
+
"execution_count": null,
|
| 6 |
+
"id": "c337925f",
|
| 7 |
+
"metadata": {},
|
| 8 |
+
"outputs": [],
|
| 9 |
+
"source": [
|
| 10 |
+
"import os\n",
|
| 11 |
+
"import re\n",
|
| 12 |
+
"import time\n",
|
| 13 |
+
"import urllib.request\n",
|
| 14 |
+
"\n",
|
| 15 |
+
"# 下载sdf结构\n",
|
| 16 |
+
"\n",
|
| 17 |
+
"input_dir = r\"D:\\2\\QQCM\\suoyoujiegou-fangji\"\n",
|
| 18 |
+
"out_dir = r\"D:\\2\\QQCM\\pubchem_clean_sdf\"\n",
|
| 19 |
+
"\n",
|
| 20 |
+
"os.makedirs(out_dir, exist_ok=True)\n",
|
| 21 |
+
"\n",
|
| 22 |
+
"cid_set = set()\n",
|
| 23 |
+
"\n",
|
| 24 |
+
"# -------- 1. 从文件名提取 CID --------\n",
|
| 25 |
+
"for fname in os.listdir(input_dir):\n",
|
| 26 |
+
" if not fname.lower().endswith(\".sdf\"):\n",
|
| 27 |
+
" continue\n",
|
| 28 |
+
"\n",
|
| 29 |
+
" name = fname.replace(\".sdf\", \"\")\n",
|
| 30 |
+
"\n",
|
| 31 |
+
" # 纯数字\n",
|
| 32 |
+
" if re.fullmatch(r\"\\d+\", name):\n",
|
| 33 |
+
" cid_set.add(name)\n",
|
| 34 |
+
"\n",
|
| 35 |
+
" # Conformer3D_COMPOUND_CID_204\n",
|
| 36 |
+
" else:\n",
|
| 37 |
+
" m = re.search(r\"CID_(\\d+)\", name)\n",
|
| 38 |
+
" if m:\n",
|
| 39 |
+
" cid_set.add(m.group(1))\n",
|
| 40 |
+
"\n",
|
| 41 |
+
"print(f\"📦 发现 CID 数量: {len(cid_set)}\")\n",
|
| 42 |
+
"\n",
|
| 43 |
+
"# -------- 2. 下载 SDF(3D -> 2D fallback) --------\n",
|
| 44 |
+
"for cid in sorted(cid_set):\n",
|
| 45 |
+
" out_path = os.path.join(out_dir, f\"CID_{cid}.sdf\")\n",
|
| 46 |
+
" if os.path.exists(out_path):\n",
|
| 47 |
+
" continue\n",
|
| 48 |
+
"\n",
|
| 49 |
+
" success = False\n",
|
| 50 |
+
"\n",
|
| 51 |
+
" # 尝试 3D\n",
|
| 52 |
+
" for record_type in [\"3d\", \"2d\"]:\n",
|
| 53 |
+
" url = f\"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/CID/{cid}/SDF?record_type={record_type}\"\n",
|
| 54 |
+
" try:\n",
|
| 55 |
+
" with urllib.request.urlopen(url, timeout=30) as resp:\n",
|
| 56 |
+
" data = resp.read().decode(\"utf-8\")\n",
|
| 57 |
+
" if len(data) > 100:\n",
|
| 58 |
+
" with open(out_path, \"w\", encoding=\"utf-8\") as f:\n",
|
| 59 |
+
" f.write(data)\n",
|
| 60 |
+
" print(f\"✅ CID {cid} ({record_type.upper()})\")\n",
|
| 61 |
+
" success = True\n",
|
| 62 |
+
" break\n",
|
| 63 |
+
" except Exception:\n",
|
| 64 |
+
" pass\n",
|
| 65 |
+
"\n",
|
| 66 |
+
" if not success:\n",
|
| 67 |
+
" print(f\"❌ CID {cid} 下载失败\")\n",
|
| 68 |
+
"\n",
|
| 69 |
+
" time.sleep(0.2)\n"
|
| 70 |
+
]
|
| 71 |
+
},
|
| 72 |
+
{
|
| 73 |
+
"cell_type": "code",
|
| 74 |
+
"execution_count": null,
|
| 75 |
+
"id": "d524b760",
|
| 76 |
+
"metadata": {},
|
| 77 |
+
"outputs": [],
|
| 78 |
+
"source": [
|
| 79 |
+
"import os\n",
|
| 80 |
+
"import csv\n",
|
| 81 |
+
"\n",
|
| 82 |
+
"# MOL号提取\n",
|
| 83 |
+
"\n",
|
| 84 |
+
"# 设置文件夹路径\n",
|
| 85 |
+
"folder_path = r\"D:\\2\\QQCM\\suoyoujiegou-fangji\"\n",
|
| 86 |
+
"\n",
|
| 87 |
+
"# 存储提取出的 MOL 编号\n",
|
| 88 |
+
"mol_list = []\n",
|
| 89 |
+
"\n",
|
| 90 |
+
"# 遍历文件夹中的所有文件\n",
|
| 91 |
+
"for filename in os.listdir(folder_path):\n",
|
| 92 |
+
" # 检查是否以 \"MOL\" 开头,并且是文件(不是子文件夹)\n",
|
| 93 |
+
" if os.path.isfile(os.path.join(folder_path, filename)) and filename.startswith(\"MOL\"):\n",
|
| 94 |
+
" # 去掉扩展名(例如 .mol、.sdf、.txt 等)\n",
|
| 95 |
+
" mol_name = os.path.splitext(filename)[0]\n",
|
| 96 |
+
" mol_list.append(mol_name)\n",
|
| 97 |
+
"\n",
|
| 98 |
+
"# 去重(可选)\n",
|
| 99 |
+
"mol_list = sorted(set(mol_list))\n",
|
| 100 |
+
"\n",
|
| 101 |
+
"# 写入 CSV 文件\n",
|
| 102 |
+
"output_csv = os.path.join(folder_path, \"MOL_list.csv\")\n",
|
| 103 |
+
"with open(output_csv, mode='w', newline='', encoding='utf-8') as f:\n",
|
| 104 |
+
" writer = csv.writer(f)\n",
|
| 105 |
+
" writer.writerow([\"MOL_ID\"]) # 表头\n",
|
| 106 |
+
" for mol in mol_list:\n",
|
| 107 |
+
" writer.writerow([mol])\n",
|
| 108 |
+
"\n",
|
| 109 |
+
"print(f\"共提取 {len(mol_list)} 个 MOL 编号,已保存到:{output_csv}\")"
|
| 110 |
+
]
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"cell_type": "code",
|
| 114 |
+
"execution_count": null,
|
| 115 |
+
"id": "4f5c1e1d",
|
| 116 |
+
"metadata": {},
|
| 117 |
+
"outputs": [],
|
| 118 |
+
"source": [
|
| 119 |
+
"import time\n",
|
| 120 |
+
"import csv\n",
|
| 121 |
+
"import os\n",
|
| 122 |
+
"from selenium import webdriver\n",
|
| 123 |
+
"from selenium.webdriver.edge.service import Service\n",
|
| 124 |
+
"from selenium.webdriver.edge.options import Options\n",
|
| 125 |
+
"from selenium.webdriver.common.by import By\n",
|
| 126 |
+
"from selenium.webdriver.support.ui import WebDriverWait\n",
|
| 127 |
+
"from selenium.webdriver.support import expected_conditions as EC\n",
|
| 128 |
+
"\n",
|
| 129 |
+
"# 根据MOL号在TCMSP下载mol2\n",
|
| 130 |
+
"\n",
|
| 131 |
+
"# ========= 基本配置 =========\n",
|
| 132 |
+
"EDGE_DRIVER_PATH = r\"D:\\Software\\edgedriver_win64\\msedgedriver.exe\"\n",
|
| 133 |
+
"DOWNLOAD_DIR = r\"D:\\2\\QQCM\\tcmsp_mol2\"\n",
|
| 134 |
+
"CSV_PATH = r\"D:\\2\\QQCM\\MOL_list.csv\"\n",
|
| 135 |
+
"START_MOL = \"MOL002133\"\n",
|
| 136 |
+
"\n",
|
| 137 |
+
"# ========= Edge 下载设置 =========\n",
|
| 138 |
+
"edge_options = Options()\n",
|
| 139 |
+
"prefs = {\n",
|
| 140 |
+
" \"download.default_directory\": DOWNLOAD_DIR,\n",
|
| 141 |
+
" \"download.prompt_for_download\": False,\n",
|
| 142 |
+
" \"download.directory_upgrade\": True,\n",
|
| 143 |
+
" \"safebrowsing.enabled\": True\n",
|
| 144 |
+
"}\n",
|
| 145 |
+
"edge_options.add_experimental_option(\"prefs\", prefs)\n",
|
| 146 |
+
"edge_options.add_argument(\"--disable-popup-blocking\")\n",
|
| 147 |
+
"\n",
|
| 148 |
+
"service = Service(EDGE_DRIVER_PATH)\n",
|
| 149 |
+
"driver = webdriver.Edge(service=service, options=edge_options)\n",
|
| 150 |
+
"wait = WebDriverWait(driver, 20)\n",
|
| 151 |
+
"\n",
|
| 152 |
+
"# ========= 打开 TCMSP 页面 =========\n",
|
| 153 |
+
"driver.get(\"https://tcmsp-e.com/browse.php?qc=ingredients\")\n",
|
| 154 |
+
"time.sleep(5)\n",
|
| 155 |
+
"\n",
|
| 156 |
+
"# ========= 读取 CSV 中的 MOL =========\n",
|
| 157 |
+
"with open(CSV_PATH, newline='', encoding='utf-8') as f:\n",
|
| 158 |
+
" reader = csv.reader(f)\n",
|
| 159 |
+
" all_mols = [row[0].strip() for row in reader if row]\n",
|
| 160 |
+
"\n",
|
| 161 |
+
"# ========= 起始 MOL 截断 =========\n",
|
| 162 |
+
"if START_MOL not in all_mols:\n",
|
| 163 |
+
" raise ValueError(f\"{START_MOL} 不在 CSV 中\")\n",
|
| 164 |
+
"\n",
|
| 165 |
+
"start_index = all_mols.index(START_MOL) + 1\n",
|
| 166 |
+
"all_mols = all_mols[start_index:]\n",
|
| 167 |
+
"\n",
|
| 168 |
+
"# ========= 读取已下载的 mol2 文件 =========\n",
|
| 169 |
+
"downloaded_files = os.listdir(DOWNLOAD_DIR)\n",
|
| 170 |
+
"\n",
|
| 171 |
+
"downloaded_mols = set()\n",
|
| 172 |
+
"for fn in downloaded_files:\n",
|
| 173 |
+
" name, ext = os.path.splitext(fn)\n",
|
| 174 |
+
" if ext.lower() == \".mol2\":\n",
|
| 175 |
+
" downloaded_mols.add(name)\n",
|
| 176 |
+
"\n",
|
| 177 |
+
"# ========= 找出缺失的 MOL =========\n",
|
| 178 |
+
"missing_mols = [mol for mol in all_mols if mol not in downloaded_mols]\n",
|
| 179 |
+
"\n",
|
| 180 |
+
"print(f\"📌 CSV(起点后)总数:{len(all_mols)}\")\n",
|
| 181 |
+
"print(f\"📂 已下载 mol2 数量:{len(downloaded_mols)}\")\n",
|
| 182 |
+
"print(f\"❗ 缺失待补下载:{len(missing_mols)}\")\n",
|
| 183 |
+
"\n",
|
| 184 |
+
"# ========= 主循环(只跑缺失的) =========\n",
|
| 185 |
+
"for mol in missing_mols:\n",
|
| 186 |
+
" print(f\"🔍 补下载 {mol}\")\n",
|
| 187 |
+
"\n",
|
| 188 |
+
" try:\n",
|
| 189 |
+
" # 打开搜索框\n",
|
| 190 |
+
" search_btn = wait.until(EC.element_to_be_clickable((\n",
|
| 191 |
+
" By.XPATH, '//*[@id=\"grid\"]/div[1]/div/table/thead/tr/th[1]/a[1]/span'\n",
|
| 192 |
+
" )))\n",
|
| 193 |
+
" search_btn.click()\n",
|
| 194 |
+
" time.sleep(1)\n",
|
| 195 |
+
"\n",
|
| 196 |
+
" # 输入 MOL\n",
|
| 197 |
+
" input_box = wait.until(EC.presence_of_element_located((\n",
|
| 198 |
+
" By.XPATH, '/html/body/div[4]/form/div[1]/input[1]'\n",
|
| 199 |
+
" )))\n",
|
| 200 |
+
" input_box.clear()\n",
|
| 201 |
+
" input_box.send_keys(mol)\n",
|
| 202 |
+
"\n",
|
| 203 |
+
" # 搜索\n",
|
| 204 |
+
" submit_btn = wait.until(EC.element_to_be_clickable((\n",
|
| 205 |
+
" By.XPATH, '/html/body/div[4]/form/div[1]/div[2]/button[1]'\n",
|
| 206 |
+
" )))\n",
|
| 207 |
+
" submit_btn.click()\n",
|
| 208 |
+
"\n",
|
| 209 |
+
" # 点击结果\n",
|
| 210 |
+
" mol_link = wait.until(EC.element_to_be_clickable((\n",
|
| 211 |
+
" By.XPATH, '//td[@role=\"gridcell\"]//a[contains(@href,\"molecule.php\")]'\n",
|
| 212 |
+
" )))\n",
|
| 213 |
+
" mol_link.click()\n",
|
| 214 |
+
" time.sleep(3)\n",
|
| 215 |
+
"\n",
|
| 216 |
+
" # 下载\n",
|
| 217 |
+
" download_img = wait.until(EC.element_to_be_clickable((\n",
|
| 218 |
+
" By.XPATH, '//*[@id=\"container_lsp\"]/div[2]/table/thead/tr[3]/td/a/img'\n",
|
| 219 |
+
" )))\n",
|
| 220 |
+
" download_img.click()\n",
|
| 221 |
+
" print(f\"⬇️ 触发下载 {mol}\")\n",
|
| 222 |
+
" time.sleep(2)\n",
|
| 223 |
+
"\n",
|
| 224 |
+
" # 关闭弹窗\n",
|
| 225 |
+
" try:\n",
|
| 226 |
+
" driver.find_element(By.TAG_NAME, \"body\").click()\n",
|
| 227 |
+
" time.sleep(1)\n",
|
| 228 |
+
" except:\n",
|
| 229 |
+
" pass\n",
|
| 230 |
+
"\n",
|
| 231 |
+
" # 回搜索页\n",
|
| 232 |
+
" driver.get(\"https://tcmsp-e.com/browse.php?qc=ingredients\")\n",
|
| 233 |
+
" time.sleep(3)\n",
|
| 234 |
+
"\n",
|
| 235 |
+
" except Exception as e:\n",
|
| 236 |
+
" print(f\"❌ {mol} 失败:{e}\")\n",
|
| 237 |
+
" with open(\"failed_mol.txt\", \"a\", encoding=\"utf-8\") as fw:\n",
|
| 238 |
+
" fw.write(mol + \"\\n\")\n",
|
| 239 |
+
"\n",
|
| 240 |
+
"print(\"🎉 补下载流程完成\")"
|
| 241 |
+
]
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"cell_type": "code",
|
| 245 |
+
"execution_count": null,
|
| 246 |
+
"id": "e82c6251",
|
| 247 |
+
"metadata": {},
|
| 248 |
+
"outputs": [],
|
| 249 |
+
"source": [
|
| 250 |
+
"#!/usr/bin/env python3\n",
|
| 251 |
+
"# -*- coding: utf-8 -*-\n",
|
| 252 |
+
"\n",
|
| 253 |
+
"# SDF和1MOL2去重\n",
|
| 254 |
+
"\n",
|
| 255 |
+
"import os\n",
|
| 256 |
+
"from rdkit import Chem\n",
|
| 257 |
+
"from tqdm import tqdm\n",
|
| 258 |
+
"\n",
|
| 259 |
+
"# ======================\n",
|
| 260 |
+
"# 路径配置\n",
|
| 261 |
+
"# ======================\n",
|
| 262 |
+
"SDF_DIR = r\"D:\\2\\QQCM\\化合物SDF\\pubchem_clean_sdf\"\n",
|
| 263 |
+
"MOL2_DIR = r\"D:\\2\\QQCM\\化合物SDF\\tcmsp_mol2\"\n",
|
| 264 |
+
"\n",
|
| 265 |
+
"# ======================\n",
|
| 266 |
+
"# 工具函数\n",
|
| 267 |
+
"# ======================\n",
|
| 268 |
+
"def mol_to_inchikey(mol):\n",
|
| 269 |
+
" \"\"\"将分子转为 InChIKey\"\"\"\n",
|
| 270 |
+
" try:\n",
|
| 271 |
+
" return Chem.MolToInchiKey(mol)\n",
|
| 272 |
+
" except:\n",
|
| 273 |
+
" return None\n",
|
| 274 |
+
"\n",
|
| 275 |
+
"\n",
|
| 276 |
+
"def load_sdf_inchikeys(sdf_dir):\n",
|
| 277 |
+
" \"\"\"读取所有 SDF 文件,提取 InChIKey\"\"\"\n",
|
| 278 |
+
" inchikey_set = set()\n",
|
| 279 |
+
"\n",
|
| 280 |
+
" files = [f for f in os.listdir(sdf_dir) if f.endswith(\".sdf\")]\n",
|
| 281 |
+
"\n",
|
| 282 |
+
" print(f\"=== 读取 SDF: {len(files)} 个文件 ===\")\n",
|
| 283 |
+
"\n",
|
| 284 |
+
" for f in tqdm(files):\n",
|
| 285 |
+
" path = os.path.join(sdf_dir, f)\n",
|
| 286 |
+
" suppl = Chem.SDMolSupplier(path)\n",
|
| 287 |
+
"\n",
|
| 288 |
+
" for mol in suppl:\n",
|
| 289 |
+
" if mol is None:\n",
|
| 290 |
+
" continue\n",
|
| 291 |
+
" ik = mol_to_inchikey(mol)\n",
|
| 292 |
+
" if ik:\n",
|
| 293 |
+
" inchikey_set.add(ik)\n",
|
| 294 |
+
"\n",
|
| 295 |
+
" print(f\"SDF唯一分子数: {len(inchikey_set)}\")\n",
|
| 296 |
+
" return inchikey_set\n",
|
| 297 |
+
"\n",
|
| 298 |
+
"\n",
|
| 299 |
+
"def process_mol2(mol2_dir, sdf_inchikeys):\n",
|
| 300 |
+
" \"\"\"对 mol2 去重(与 SDF 比较)\"\"\"\n",
|
| 301 |
+
" files = [f for f in os.listdir(mol2_dir) if f.endswith(\".mol2\")]\n",
|
| 302 |
+
"\n",
|
| 303 |
+
" print(f\"=== 检查 MOL2: {len(files)} 个文件 ===\")\n",
|
| 304 |
+
"\n",
|
| 305 |
+
" deleted = 0\n",
|
| 306 |
+
"\n",
|
| 307 |
+
" for f in tqdm(files):\n",
|
| 308 |
+
" path = os.path.join(mol2_dir, f)\n",
|
| 309 |
+
"\n",
|
| 310 |
+
" mol = Chem.MolFromMol2File(path)\n",
|
| 311 |
+
" if mol is None:\n",
|
| 312 |
+
" continue\n",
|
| 313 |
+
"\n",
|
| 314 |
+
" ik = mol_to_inchikey(mol)\n",
|
| 315 |
+
" if ik is None:\n",
|
| 316 |
+
" continue\n",
|
| 317 |
+
"\n",
|
| 318 |
+
" # 如果在 SDF 中存在 → 删除 mol2\n",
|
| 319 |
+
" if ik in sdf_inchikeys:\n",
|
| 320 |
+
" try:\n",
|
| 321 |
+
" os.remove(path)\n",
|
| 322 |
+
" deleted += 1\n",
|
| 323 |
+
" except Exception as e:\n",
|
| 324 |
+
" print(f\"删除失败: {path} | {e}\")\n",
|
| 325 |
+
"\n",
|
| 326 |
+
" print(f\"删除重复 mol2 文件: {deleted} 个\")\n",
|
| 327 |
+
"\n",
|
| 328 |
+
"\n",
|
| 329 |
+
"# ======================\n",
|
| 330 |
+
"# 主程序\n",
|
| 331 |
+
"# ======================\n",
|
| 332 |
+
"if __name__ == \"__main__\":\n",
|
| 333 |
+
" sdf_inchikeys = load_sdf_inchikeys(SDF_DIR)\n",
|
| 334 |
+
" process_mol2(MOL2_DIR, sdf_inchikeys)\n",
|
| 335 |
+
"\n",
|
| 336 |
+
" print(\"=== 去重完成 ===\")"
|
| 337 |
+
]
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"cell_type": "code",
|
| 341 |
+
"execution_count": null,
|
| 342 |
+
"id": "343eb3da",
|
| 343 |
+
"metadata": {},
|
| 344 |
+
"outputs": [],
|
| 345 |
+
"source": [
|
| 346 |
+
"#!/usr/bin/env python3\n",
|
| 347 |
+
"# -*- coding: utf-8 -*-\n",
|
| 348 |
+
"\n",
|
| 349 |
+
"# 转smiles\n",
|
| 350 |
+
"\n",
|
| 351 |
+
"import os\n",
|
| 352 |
+
"import pandas as pd\n",
|
| 353 |
+
"from tqdm import tqdm\n",
|
| 354 |
+
"from rdkit import Chem\n",
|
| 355 |
+
"\n",
|
| 356 |
+
"# ======================\n",
|
| 357 |
+
"# 输入路径\n",
|
| 358 |
+
"# ======================\n",
|
| 359 |
+
"SDF_DIR = \"/mnt/disk1/yanganqi/QQCM/COM/pubchem_clean_sdf\"\n",
|
| 360 |
+
"MOL2_DIR = \"/mnt/disk1/yanganqi/QQCM/COM/tcmsp_mol2\"\n",
|
| 361 |
+
"\n",
|
| 362 |
+
"# 输出文件\n",
|
| 363 |
+
"OUT_CSV = \"/mnt/disk1/yanganqi/compound_smiles.csv\"\n",
|
| 364 |
+
"\n",
|
| 365 |
+
"# ======================\n",
|
| 366 |
+
"# 工具函数\n",
|
| 367 |
+
"# ======================\n",
|
| 368 |
+
"\n",
|
| 369 |
+
"def extract_mol_id(filename):\n",
|
| 370 |
+
" \"\"\"从文件名提取 mol_id\"\"\"\n",
|
| 371 |
+
" if filename.endswith(\".sdf\"):\n",
|
| 372 |
+
" # CID_12345678.sdf → 12345678\n",
|
| 373 |
+
" return filename.replace(\"CID_\", \"\").replace(\".sdf\", \"\")\n",
|
| 374 |
+
" elif filename.endswith(\".mol2\"):\n",
|
| 375 |
+
" # MOL000019.mol2 → MOL000019\n",
|
| 376 |
+
" return filename.replace(\".mol2\", \"\")\n",
|
| 377 |
+
" return None\n",
|
| 378 |
+
"\n",
|
| 379 |
+
"\n",
|
| 380 |
+
"def sdf_to_smiles(file_path):\n",
|
| 381 |
+
" \"\"\"SDF → SMILES\"\"\"\n",
|
| 382 |
+
" try:\n",
|
| 383 |
+
" suppl = Chem.SDMolSupplier(file_path)\n",
|
| 384 |
+
" mol = suppl[0] if suppl and len(suppl) > 0 else None\n",
|
| 385 |
+
" if mol:\n",
|
| 386 |
+
" return Chem.MolToSmiles(mol, canonical=True)\n",
|
| 387 |
+
" except Exception:\n",
|
| 388 |
+
" return None\n",
|
| 389 |
+
" return None\n",
|
| 390 |
+
"\n",
|
| 391 |
+
"\n",
|
| 392 |
+
"def mol2_to_smiles(file_path):\n",
|
| 393 |
+
" \"\"\"MOL2 → SMILES\"\"\"\n",
|
| 394 |
+
" try:\n",
|
| 395 |
+
" mol = Chem.MolFromMol2File(file_path)\n",
|
| 396 |
+
" if mol:\n",
|
| 397 |
+
" return Chem.MolToSmiles(mol, canonical=True)\n",
|
| 398 |
+
" except Exception:\n",
|
| 399 |
+
" return None\n",
|
| 400 |
+
" return None\n",
|
| 401 |
+
"\n",
|
| 402 |
+
"\n",
|
| 403 |
+
"# ======================\n",
|
| 404 |
+
"# 主流程\n",
|
| 405 |
+
"# ======================\n",
|
| 406 |
+
"\n",
|
| 407 |
+
"results = []\n",
|
| 408 |
+
"\n",
|
| 409 |
+
"print(\"=== Processing SDF files ===\")\n",
|
| 410 |
+
"sdf_files = [f for f in os.listdir(SDF_DIR) if f.endswith(\".sdf\")]\n",
|
| 411 |
+
"\n",
|
| 412 |
+
"for f in tqdm(sdf_files):\n",
|
| 413 |
+
" path = os.path.join(SDF_DIR, f)\n",
|
| 414 |
+
" smiles = sdf_to_smiles(path)\n",
|
| 415 |
+
"\n",
|
| 416 |
+
" results.append({\n",
|
| 417 |
+
" \"file_name\": f,\n",
|
| 418 |
+
" \"mol_id\": extract_mol_id(f),\n",
|
| 419 |
+
" \"source\": \"pubchem_sdf\",\n",
|
| 420 |
+
" \"smiles\": smiles\n",
|
| 421 |
+
" })\n",
|
| 422 |
+
"\n",
|
| 423 |
+
"\n",
|
| 424 |
+
"print(\"=== Processing MOL2 files ===\")\n",
|
| 425 |
+
"mol2_files = [f for f in os.listdir(MOL2_DIR) if f.endswith(\".mol2\")]\n",
|
| 426 |
+
"\n",
|
| 427 |
+
"for f in tqdm(mol2_files):\n",
|
| 428 |
+
" path = os.path.join(MOL2_DIR, f)\n",
|
| 429 |
+
" smiles = mol2_to_smiles(path)\n",
|
| 430 |
+
"\n",
|
| 431 |
+
" results.append({\n",
|
| 432 |
+
" \"file_name\": f,\n",
|
| 433 |
+
" \"mol_id\": extract_mol_id(f),\n",
|
| 434 |
+
" \"source\": \"tcmsp_mol2\",\n",
|
| 435 |
+
" \"smiles\": smiles\n",
|
| 436 |
+
" })\n",
|
| 437 |
+
"\n",
|
| 438 |
+
"\n",
|
| 439 |
+
"# ======================\n",
|
| 440 |
+
"# 保存结果\n",
|
| 441 |
+
"# ======================\n",
|
| 442 |
+
"\n",
|
| 443 |
+
"df = pd.DataFrame(results)\n",
|
| 444 |
+
"\n",
|
| 445 |
+
"# 标记成功/失败\n",
|
| 446 |
+
"df[\"status\"] = df[\"smiles\"].apply(lambda x: \"success\" if pd.notna(x) else \"fail\")\n",
|
| 447 |
+
"\n",
|
| 448 |
+
"# 去掉失败(如果你想保留可以注释掉)\n",
|
| 449 |
+
"df_clean = df.dropna(subset=[\"smiles\"])\n",
|
| 450 |
+
"\n",
|
| 451 |
+
"# 保存\n",
|
| 452 |
+
"df_clean.to_csv(OUT_CSV, index=False)\n",
|
| 453 |
+
"\n",
|
| 454 |
+
"# ======================\n",
|
| 455 |
+
"# 统计信息\n",
|
| 456 |
+
"# ======================\n",
|
| 457 |
+
"\n",
|
| 458 |
+
"print(\"=== Done ===\")\n",
|
| 459 |
+
"print(f\"Total files: {len(df)}\")\n",
|
| 460 |
+
"print(f\"Success: {len(df_clean)}\")\n",
|
| 461 |
+
"print(f\"Failed: {len(df) - len(df_clean)}\")\n",
|
| 462 |
+
"print(f\"Saved to: {OUT_CSV}\")"
|
| 463 |
+
]
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"cell_type": "code",
|
| 467 |
+
"execution_count": 4,
|
| 468 |
+
"id": "063288e1",
|
| 469 |
+
"metadata": {},
|
| 470 |
+
"outputs": [
|
| 471 |
+
{
|
| 472 |
+
"name": "stdout",
|
| 473 |
+
"output_type": "stream",
|
| 474 |
+
"text": [
|
| 475 |
+
"🚀 开始加载结构文件...\n",
|
| 476 |
+
"🔍 读取 SDF: CID_10.sdf\n"
|
| 477 |
+
]
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"ename": "OSError",
|
| 481 |
+
"evalue": "File error: Bad input file D:\\2\\QQCM\\化合物SDF\\pubchem_clean_sdf\\CID_10.sdf",
|
| 482 |
+
"output_type": "error",
|
| 483 |
+
"traceback": [
|
| 484 |
+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
| 485 |
+
"\u001b[1;31mOSError\u001b[0m Traceback (most recent call last)",
|
| 486 |
+
"Cell \u001b[1;32mIn[4], line 119\u001b[0m\n\u001b[0;32m 114\u001b[0m \u001b[38;5;66;03m# =========================\u001b[39;00m\n\u001b[0;32m 115\u001b[0m \u001b[38;5;66;03m# 主流程\u001b[39;00m\n\u001b[0;32m 116\u001b[0m \u001b[38;5;66;03m# =========================\u001b[39;00m\n\u001b[0;32m 117\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m🚀 开始加载结构文件...\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m--> 119\u001b[0m sdf_mols, sdf_ids \u001b[38;5;241m=\u001b[39m \u001b[43mload_sdf_folder\u001b[49m\u001b[43m(\u001b[49m\u001b[43mSDF_DIR\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 120\u001b[0m mol2_mols, mol2_ids \u001b[38;5;241m=\u001b[39m load_mol2_folder(MOL2_DIR)\n\u001b[0;32m 122\u001b[0m mols \u001b[38;5;241m=\u001b[39m sdf_mols \u001b[38;5;241m+\u001b[39m mol2_mols\n",
|
| 487 |
+
"Cell \u001b[1;32mIn[4], line 58\u001b[0m, in \u001b[0;36mload_sdf_folder\u001b[1;34m(folder)\u001b[0m\n\u001b[0;32m 55\u001b[0m path \u001b[38;5;241m=\u001b[39m os\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mjoin(folder, fname)\n\u001b[0;32m 56\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m🔍 读取 SDF: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mfname\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m---> 58\u001b[0m suppl \u001b[38;5;241m=\u001b[39m \u001b[43mChem\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mSDMolSupplier\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msanitize\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mremoveHs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[0;32m 59\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m i, mol \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28menumerate\u001b[39m(suppl):\n\u001b[0;32m 60\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m mol \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n",
|
| 488 |
+
"\u001b[1;31mOSError\u001b[0m: File error: Bad input file D:\\2\\QQCM\\化合物SDF\\pubchem_clean_sdf\\CID_10.sdf"
|
| 489 |
+
]
|
| 490 |
+
}
|
| 491 |
+
],
|
| 492 |
+
"source": [
|
| 493 |
+
"import os\n",
|
| 494 |
+
"import numpy as np\n",
|
| 495 |
+
"import pandas as pd\n",
|
| 496 |
+
"from rdkit import Chem\n",
|
| 497 |
+
"from rdkit.Chem import AllChem, DataStructs\n",
|
| 498 |
+
"from rdkit.Chem import SaltRemover\n",
|
| 499 |
+
"from rdkit.Chem.MolStandardize import rdMolStandardize\n",
|
| 500 |
+
"from rdkit.Chem.rdmolops import RemoveHs\n",
|
| 501 |
+
"\n",
|
| 502 |
+
"# 化学结构相似性\n",
|
| 503 |
+
"\n",
|
| 504 |
+
"# =========================\n",
|
| 505 |
+
"# 路径设置\n",
|
| 506 |
+
"# =========================\n",
|
| 507 |
+
"SDF_DIR = r\"D:\\2\\QQCM\\化合物SDF\\pubchem_clean_sdf\"\n",
|
| 508 |
+
"MOL2_DIR = r\"D:\\2\\QQCM\\化合物SDF\\tcmsp_mol2\"\n",
|
| 509 |
+
"OUTPUT = \"chemical_structure_similarity_morgan.csv\"\n",
|
| 510 |
+
"\n",
|
| 511 |
+
"# =========================\n",
|
| 512 |
+
"# 温和标准化(沿用你的逻辑)\n",
|
| 513 |
+
"# =========================\n",
|
| 514 |
+
"def standardize_mol_soft(m):\n",
|
| 515 |
+
" if m is None:\n",
|
| 516 |
+
" return None\n",
|
| 517 |
+
"\n",
|
| 518 |
+
" try:\n",
|
| 519 |
+
" remover = SaltRemover.SaltRemover()\n",
|
| 520 |
+
" m = remover.StripMol(m, dontRemoveEverything=True)\n",
|
| 521 |
+
" except:\n",
|
| 522 |
+
" pass\n",
|
| 523 |
+
"\n",
|
| 524 |
+
" try:\n",
|
| 525 |
+
" m = rdMolStandardize.Cleanup(m)\n",
|
| 526 |
+
" except:\n",
|
| 527 |
+
" pass\n",
|
| 528 |
+
"\n",
|
| 529 |
+
" try:\n",
|
| 530 |
+
" m = RemoveHs(m)\n",
|
| 531 |
+
" except:\n",
|
| 532 |
+
" pass\n",
|
| 533 |
+
"\n",
|
| 534 |
+
" return m\n",
|
| 535 |
+
"\n",
|
| 536 |
+
"# =========================\n",
|
| 537 |
+
"# 读取 SDF 文件\n",
|
| 538 |
+
"# =========================\n",
|
| 539 |
+
"def load_sdf_folder(folder):\n",
|
| 540 |
+
" mols = []\n",
|
| 541 |
+
" ids = []\n",
|
| 542 |
+
"\n",
|
| 543 |
+
" for fname in os.listdir(folder):\n",
|
| 544 |
+
" if not fname.lower().endswith(\".sdf\"):\n",
|
| 545 |
+
" continue\n",
|
| 546 |
+
"\n",
|
| 547 |
+
" path = os.path.join(folder, fname)\n",
|
| 548 |
+
" print(f\"🔍 读取 SDF: {fname}\")\n",
|
| 549 |
+
"\n",
|
| 550 |
+
" suppl = Chem.SDMolSupplier(path, sanitize=False, removeHs=False)\n",
|
| 551 |
+
" for i, mol in enumerate(suppl):\n",
|
| 552 |
+
" if mol is None:\n",
|
| 553 |
+
" continue\n",
|
| 554 |
+
"\n",
|
| 555 |
+
" mol = standardize_mol_soft(mol)\n",
|
| 556 |
+
" if mol is None:\n",
|
| 557 |
+
" continue\n",
|
| 558 |
+
"\n",
|
| 559 |
+
" mol_id = (\n",
|
| 560 |
+
" mol.GetProp(\"_Name\")\n",
|
| 561 |
+
" if mol.HasProp(\"_Name\") and mol.GetProp(\"_Name\").strip() != \"\"\n",
|
| 562 |
+
" else f\"{os.path.splitext(fname)[0]}_{i}\"\n",
|
| 563 |
+
" )\n",
|
| 564 |
+
"\n",
|
| 565 |
+
" mols.append(mol)\n",
|
| 566 |
+
" ids.append(mol_id)\n",
|
| 567 |
+
"\n",
|
| 568 |
+
" return mols, ids\n",
|
| 569 |
+
"\n",
|
| 570 |
+
"# =========================\n",
|
| 571 |
+
"# 读取 MOL2 文件\n",
|
| 572 |
+
"# =========================\n",
|
| 573 |
+
"def load_mol2_folder(folder):\n",
|
| 574 |
+
" mols = []\n",
|
| 575 |
+
" ids = []\n",
|
| 576 |
+
"\n",
|
| 577 |
+
" for fname in os.listdir(folder):\n",
|
| 578 |
+
" if not fname.lower().endswith(\".mol2\"):\n",
|
| 579 |
+
" continue\n",
|
| 580 |
+
"\n",
|
| 581 |
+
" path = os.path.join(folder, fname)\n",
|
| 582 |
+
" print(f\"🔍 读取 MOL2: {fname}\")\n",
|
| 583 |
+
"\n",
|
| 584 |
+
" try:\n",
|
| 585 |
+
" mol = Chem.MolFromMol2File(\n",
|
| 586 |
+
" path,\n",
|
| 587 |
+
" sanitize=False,\n",
|
| 588 |
+
" removeHs=False\n",
|
| 589 |
+
" )\n",
|
| 590 |
+
" except:\n",
|
| 591 |
+
" continue\n",
|
| 592 |
+
"\n",
|
| 593 |
+
" if mol is None:\n",
|
| 594 |
+
" continue\n",
|
| 595 |
+
"\n",
|
| 596 |
+
" mol = standardize_mol_soft(mol)\n",
|
| 597 |
+
" if mol is None:\n",
|
| 598 |
+
" continue\n",
|
| 599 |
+
"\n",
|
| 600 |
+
" mol_id = os.path.splitext(fname)[0]\n",
|
| 601 |
+
" mols.append(mol)\n",
|
| 602 |
+
" ids.append(mol_id)\n",
|
| 603 |
+
"\n",
|
| 604 |
+
" return mols, ids\n",
|
| 605 |
+
"\n",
|
| 606 |
+
"# =========================\n",
|
| 607 |
+
"# 主流程\n",
|
| 608 |
+
"# =========================\n",
|
| 609 |
+
"print(\"🚀 开始加载结构文件...\")\n",
|
| 610 |
+
"\n",
|
| 611 |
+
"sdf_mols, sdf_ids = load_sdf_folder(SDF_DIR)\n",
|
| 612 |
+
"mol2_mols, mol2_ids = load_mol2_folder(MOL2_DIR)\n",
|
| 613 |
+
"\n",
|
| 614 |
+
"mols = sdf_mols + mol2_mols\n",
|
| 615 |
+
"ids = sdf_ids + mol2_ids\n",
|
| 616 |
+
"\n",
|
| 617 |
+
"print(f\"✅ 成功加载分子数:{len(mols)}\")\n",
|
| 618 |
+
"\n",
|
| 619 |
+
"# =========================\n",
|
| 620 |
+
"# 生成 Morgan 指纹\n",
|
| 621 |
+
"# =========================\n",
|
| 622 |
+
"print(\"🧬 生成 Morgan 指纹...\")\n",
|
| 623 |
+
"\n",
|
| 624 |
+
"fps = [\n",
|
| 625 |
+
" AllChem.GetMorganFingerprintAsBitVect(\n",
|
| 626 |
+
" mol,\n",
|
| 627 |
+
" radius=2,\n",
|
| 628 |
+
" nBits=2048,\n",
|
| 629 |
+
" useChirality=False\n",
|
| 630 |
+
" )\n",
|
| 631 |
+
" for mol in mols\n",
|
| 632 |
+
"]\n",
|
| 633 |
+
"\n",
|
| 634 |
+
"# =========================\n",
|
| 635 |
+
"# 计算相似度矩阵\n",
|
| 636 |
+
"# =========================\n",
|
| 637 |
+
"print(\"📐 计算 Tanimoto 相似度矩阵...\")\n",
|
| 638 |
+
"\n",
|
| 639 |
+
"n = len(fps)\n",
|
| 640 |
+
"sim_matrix = np.zeros((n, n))\n",
|
| 641 |
+
"\n",
|
| 642 |
+
"for i in range(n):\n",
|
| 643 |
+
" sim_matrix[i] = DataStructs.BulkTanimotoSimilarity(\n",
|
| 644 |
+
" fps[i],\n",
|
| 645 |
+
" fps\n",
|
| 646 |
+
" )\n",
|
| 647 |
+
"\n",
|
| 648 |
+
"df = pd.DataFrame(sim_matrix, index=ids, columns=ids)\n",
|
| 649 |
+
"df.to_csv(OUTPUT, encoding=\"utf-8-sig\")\n",
|
| 650 |
+
"\n",
|
| 651 |
+
"print(\"🎉 完成!\")\n",
|
| 652 |
+
"print(f\"📄 输出文件:{OUTPUT}\")\n"
|
| 653 |
+
]
|
| 654 |
+
},
|
| 655 |
+
{
|
| 656 |
+
"cell_type": "code",
|
| 657 |
+
"execution_count": 2,
|
| 658 |
+
"id": "4cd19f27",
|
| 659 |
+
"metadata": {},
|
| 660 |
+
"outputs": [
|
| 661 |
+
{
|
| 662 |
+
"name": "stderr",
|
| 663 |
+
"output_type": "stream",
|
| 664 |
+
"text": [
|
| 665 |
+
" 40%|███▉ | 2133/5363 [1:52:55<3:44:23, 4.17s/it]"
|
| 666 |
+
]
|
| 667 |
+
},
|
| 668 |
+
{
|
| 669 |
+
"name": "stdout",
|
| 670 |
+
"output_type": "stream",
|
| 671 |
+
"text": [
|
| 672 |
+
"[ERROR] index 2132: HTTPSConnectionPool(host='www.ebi.ac.uk', port=443): Max retries exceeded with url: /chembl/api/data/molecule.json?smiles=CC1%3DC%5BC%40H%5D2%5BC%40H%5D%28C%28C%29C%29CC%5BC%40%5D%28C%29%28O%29%5BC%40H%5D2CC1 (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1017)')))\n"
|
| 673 |
+
]
|
| 674 |
+
},
|
| 675 |
+
{
|
| 676 |
+
"name": "stderr",
|
| 677 |
+
"output_type": "stream",
|
| 678 |
+
"text": [
|
| 679 |
+
" 83%|████████▎ | 4452/5363 [4:14:43<4:01:31, 15.91s/it]"
|
| 680 |
+
]
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"name": "stdout",
|
| 684 |
+
"output_type": "stream",
|
| 685 |
+
"text": [
|
| 686 |
+
"[ERROR] index 4451: HTTPSConnectionPool(host='www.ebi.ac.uk', port=443): Read timed out. (read timeout=30)\n"
|
| 687 |
+
]
|
| 688 |
+
},
|
| 689 |
+
{
|
| 690 |
+
"name": "stderr",
|
| 691 |
+
"output_type": "stream",
|
| 692 |
+
"text": [
|
| 693 |
+
"100%|██████████| 5363/5363 [5:10:13<00:00, 3.47s/it] "
|
| 694 |
+
]
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"name": "stdout",
|
| 698 |
+
"output_type": "stream",
|
| 699 |
+
"text": [
|
| 700 |
+
"完成,结果已保存至:D:\\2\\QQCM\\chembl_summary_table.csv\n"
|
| 701 |
+
]
|
| 702 |
+
},
|
| 703 |
+
{
|
| 704 |
+
"name": "stderr",
|
| 705 |
+
"output_type": "stream",
|
| 706 |
+
"text": [
|
| 707 |
+
"\n"
|
| 708 |
+
]
|
| 709 |
+
}
|
| 710 |
+
],
|
| 711 |
+
"source": [
|
| 712 |
+
"import time\n",
|
| 713 |
+
"import requests\n",
|
| 714 |
+
"import pandas as pd\n",
|
| 715 |
+
"from tqdm import tqdm\n",
|
| 716 |
+
"import os\n",
|
| 717 |
+
"\n",
|
| 718 |
+
"# ChEMBL靶点寻找\n",
|
| 719 |
+
"\n",
|
| 720 |
+
"# =========================\n",
|
| 721 |
+
"# 基本配置\n",
|
| 722 |
+
"# =========================\n",
|
| 723 |
+
"INPUT_CSV = r\"D:\\2\\QQCM\\compound_smiles.csv\"\n",
|
| 724 |
+
"OUTPUT_CSV = r\"D:\\2\\QQCM\\chembl_summary_table.csv\"\n",
|
| 725 |
+
"\n",
|
| 726 |
+
"SMILES_COL = \"smiles\"\n",
|
| 727 |
+
"\n",
|
| 728 |
+
"CHEMBL_API_BASE = \"https://www.ebi.ac.uk/chembl/api/data\"\n",
|
| 729 |
+
"CHEMBL_HOST = \"https://www.ebi.ac.uk\"\n",
|
| 730 |
+
"\n",
|
| 731 |
+
"HEADERS = {\n",
|
| 732 |
+
" \"Accept\": \"application/json\"\n",
|
| 733 |
+
"}\n",
|
| 734 |
+
"\n",
|
| 735 |
+
"REQUEST_DELAY = 0.3 # 秒,防止被限速\n",
|
| 736 |
+
"\n",
|
| 737 |
+
"\n",
|
| 738 |
+
"# =========================\n",
|
| 739 |
+
"# API 调用函数\n",
|
| 740 |
+
"# =========================\n",
|
| 741 |
+
"def get_chembl_molecule(smiles):\n",
|
| 742 |
+
" \"\"\"SMILES -> ChEMBL molecule\"\"\"\n",
|
| 743 |
+
" url = f\"{CHEMBL_API_BASE}/molecule.json\"\n",
|
| 744 |
+
" params = {\"smiles\": smiles}\n",
|
| 745 |
+
"\n",
|
| 746 |
+
" r = requests.get(url, params=params, headers=HEADERS, timeout=30)\n",
|
| 747 |
+
" if r.status_code != 200:\n",
|
| 748 |
+
" return None\n",
|
| 749 |
+
"\n",
|
| 750 |
+
" data = r.json()\n",
|
| 751 |
+
" molecules = data.get(\"molecules\", [])\n",
|
| 752 |
+
" return molecules[0] if molecules else None\n",
|
| 753 |
+
"\n",
|
| 754 |
+
"\n",
|
| 755 |
+
"def get_activities(chembl_id):\n",
|
| 756 |
+
" \"\"\"CHEMBL_ID -> activities(支持分页)\"\"\"\n",
|
| 757 |
+
" activities = []\n",
|
| 758 |
+
"\n",
|
| 759 |
+
" url = f\"{CHEMBL_API_BASE}/activity.json\"\n",
|
| 760 |
+
" params = {\n",
|
| 761 |
+
" \"molecule_chembl_id\": chembl_id,\n",
|
| 762 |
+
" \"limit\": 1000\n",
|
| 763 |
+
" }\n",
|
| 764 |
+
"\n",
|
| 765 |
+
" while True:\n",
|
| 766 |
+
" r = requests.get(url, params=params, headers=HEADERS, timeout=30)\n",
|
| 767 |
+
" if r.status_code != 200:\n",
|
| 768 |
+
" break\n",
|
| 769 |
+
"\n",
|
| 770 |
+
" data = r.json()\n",
|
| 771 |
+
" activities.extend(data.get(\"activities\", []))\n",
|
| 772 |
+
"\n",
|
| 773 |
+
" next_url = data.get(\"page_meta\", {}).get(\"next\")\n",
|
| 774 |
+
" if not next_url:\n",
|
| 775 |
+
" break\n",
|
| 776 |
+
"\n",
|
| 777 |
+
" # ---- 修复:next 是相对路径 ----\n",
|
| 778 |
+
" if next_url.startswith(\"/\"):\n",
|
| 779 |
+
" url = CHEMBL_HOST + next_url\n",
|
| 780 |
+
" params = None\n",
|
| 781 |
+
" else:\n",
|
| 782 |
+
" url = next_url\n",
|
| 783 |
+
" params = None\n",
|
| 784 |
+
"\n",
|
| 785 |
+
" time.sleep(REQUEST_DELAY)\n",
|
| 786 |
+
"\n",
|
| 787 |
+
" return activities\n",
|
| 788 |
+
"\n",
|
| 789 |
+
"\n",
|
| 790 |
+
"# =========================\n",
|
| 791 |
+
"# 主流程(支持断点续跑)\n",
|
| 792 |
+
"# =========================\n",
|
| 793 |
+
"def main():\n",
|
| 794 |
+
"\n",
|
| 795 |
+
" # ---------- 如果已有输出表,直接读取 ----------\n",
|
| 796 |
+
" if os.path.exists(OUTPUT_CSV):\n",
|
| 797 |
+
" print(\"检测到已有结果表,启用断点续跑模式\")\n",
|
| 798 |
+
" df = pd.read_csv(OUTPUT_CSV)\n",
|
| 799 |
+
" else:\n",
|
| 800 |
+
" df = pd.read_csv(INPUT_CSV)\n",
|
| 801 |
+
"\n",
|
| 802 |
+
" # 新列初始化\n",
|
| 803 |
+
" df[\"chembl_hit\"] = False\n",
|
| 804 |
+
" df[\"chembl_id\"] = \"\"\n",
|
| 805 |
+
" df[\"target_count\"] = 0\n",
|
| 806 |
+
" df[\"target_chembl_ids\"] = \"\"\n",
|
| 807 |
+
" df[\"target_gene_names\"] = \"\"\n",
|
| 808 |
+
" df[\"activity_types\"] = \"\"\n",
|
| 809 |
+
"\n",
|
| 810 |
+
" for idx, row in tqdm(df.iterrows(), total=len(df)):\n",
|
| 811 |
+
" # ---- 断点跳过逻辑 ----\n",
|
| 812 |
+
" if pd.notna(row.get(\"chembl_id\")) and str(row.get(\"chembl_id\")).strip() != \"\":\n",
|
| 813 |
+
" continue\n",
|
| 814 |
+
"\n",
|
| 815 |
+
" smiles = row[SMILES_COL]\n",
|
| 816 |
+
"\n",
|
| 817 |
+
" try:\n",
|
| 818 |
+
" mol = get_chembl_molecule(smiles)\n",
|
| 819 |
+
" time.sleep(REQUEST_DELAY)\n",
|
| 820 |
+
"\n",
|
| 821 |
+
" if mol is None:\n",
|
| 822 |
+
" continue\n",
|
| 823 |
+
"\n",
|
| 824 |
+
" chembl_id = mol.get(\"molecule_chembl_id\")\n",
|
| 825 |
+
" if not chembl_id:\n",
|
| 826 |
+
" continue\n",
|
| 827 |
+
"\n",
|
| 828 |
+
" activities = get_activities(chembl_id)\n",
|
| 829 |
+
" time.sleep(REQUEST_DELAY)\n",
|
| 830 |
+
"\n",
|
| 831 |
+
" # 至少命中 molecule\n",
|
| 832 |
+
" df.at[idx, \"chembl_hit\"] = True\n",
|
| 833 |
+
" df.at[idx, \"chembl_id\"] = chembl_id\n",
|
| 834 |
+
"\n",
|
| 835 |
+
" if not activities:\n",
|
| 836 |
+
" continue\n",
|
| 837 |
+
"\n",
|
| 838 |
+
" target_ids = set()\n",
|
| 839 |
+
" gene_names = set()\n",
|
| 840 |
+
" act_types = set()\n",
|
| 841 |
+
"\n",
|
| 842 |
+
" for act in activities:\n",
|
| 843 |
+
" if act.get(\"target_chembl_id\"):\n",
|
| 844 |
+
" target_ids.add(act[\"target_chembl_id\"])\n",
|
| 845 |
+
" if act.get(\"target_pref_name\"):\n",
|
| 846 |
+
" gene_names.add(act[\"target_pref_name\"])\n",
|
| 847 |
+
" if act.get(\"standard_type\"):\n",
|
| 848 |
+
" act_types.add(act[\"standard_type\"])\n",
|
| 849 |
+
"\n",
|
| 850 |
+
" df.at[idx, \"target_count\"] = len(target_ids)\n",
|
| 851 |
+
" df.at[idx, \"target_chembl_ids\"] = \";\".join(sorted(target_ids))\n",
|
| 852 |
+
" df.at[idx, \"target_gene_names\"] = \";\".join(sorted(gene_names))\n",
|
| 853 |
+
" df.at[idx, \"activity_types\"] = \";\".join(sorted(act_types))\n",
|
| 854 |
+
"\n",
|
| 855 |
+
" except Exception as e:\n",
|
| 856 |
+
" print(f\"[ERROR] index {idx}: {e}\")\n",
|
| 857 |
+
" continue\n",
|
| 858 |
+
"\n",
|
| 859 |
+
" # ---------- 覆盖写回 ----------\n",
|
| 860 |
+
" df.to_csv(OUTPUT_CSV, index=False, encoding=\"utf-8-sig\")\n",
|
| 861 |
+
" print(f\"完成,结果已保存至:{OUTPUT_CSV}\")\n",
|
| 862 |
+
"\n",
|
| 863 |
+
"\n",
|
| 864 |
+
"if __name__ == \"__main__\":\n",
|
| 865 |
+
" main()\n"
|
| 866 |
+
]
|
| 867 |
+
},
|
| 868 |
+
{
|
| 869 |
+
"cell_type": "code",
|
| 870 |
+
"execution_count": null,
|
| 871 |
+
"id": "41bace8d",
|
| 872 |
+
"metadata": {},
|
| 873 |
+
"outputs": [
|
| 874 |
+
{
|
| 875 |
+
"name": "stderr",
|
| 876 |
+
"output_type": "stream",
|
| 877 |
+
"text": [
|
| 878 |
+
"SwissTarget: 0%| | 7/4364 [00:00<00:08, 494.59it/s]"
|
| 879 |
+
]
|
| 880 |
+
},
|
| 881 |
+
{
|
| 882 |
+
"name": "stdout",
|
| 883 |
+
"output_type": "stream",
|
| 884 |
+
"text": [
|
| 885 |
+
"\n",
|
| 886 |
+
"⚠️ 疑似 IP 被封(1/5)\n",
|
| 887 |
+
"⏳ 等待 16.9 分钟后重试当前分子 70698224\n"
|
| 888 |
+
]
|
| 889 |
+
}
|
| 890 |
+
],
|
| 891 |
+
"source": [
|
| 892 |
+
"import os\n",
|
| 893 |
+
"import time\n",
|
| 894 |
+
"import shutil\n",
|
| 895 |
+
"import random\n",
|
| 896 |
+
"import pandas as pd\n",
|
| 897 |
+
"from tqdm import tqdm\n",
|
| 898 |
+
"\n",
|
| 899 |
+
"# swiss靶点预测\n",
|
| 900 |
+
"\n",
|
| 901 |
+
"from selenium import webdriver\n",
|
| 902 |
+
"from selenium.webdriver.common.by import By\n",
|
| 903 |
+
"from selenium.webdriver.edge.service import Service\n",
|
| 904 |
+
"from selenium.webdriver.edge.options import Options\n",
|
| 905 |
+
"from selenium.webdriver.support.ui import WebDriverWait\n",
|
| 906 |
+
"from selenium.webdriver.support import expected_conditions as EC\n",
|
| 907 |
+
"from selenium.common.exceptions import (\n",
|
| 908 |
+
" TimeoutException,\n",
|
| 909 |
+
" UnexpectedAlertPresentException,\n",
|
| 910 |
+
" WebDriverException\n",
|
| 911 |
+
")\n",
|
| 912 |
+
"\n",
|
| 913 |
+
"# =========================\n",
|
| 914 |
+
"# 配置区\n",
|
| 915 |
+
"# =========================\n",
|
| 916 |
+
"INPUT_CSV = r\"D:\\2\\QQCM\\compound_smiles.csv\"\n",
|
| 917 |
+
"DOWNLOAD_DIR = r\"D:\\2\\QQCM\\swiss_results\"\n",
|
| 918 |
+
"\n",
|
| 919 |
+
"EDGE_DRIVER = r\"D:\\Software\\edgedriver_win64\\msedgedriver.exe\"\n",
|
| 920 |
+
"SWISS_URL = \"https://swisstargetprediction.ch/index.php\"\n",
|
| 921 |
+
"\n",
|
| 922 |
+
"SMILES_COL = \"smiles\"\n",
|
| 923 |
+
"MOLID_COL = \"mol_id\"\n",
|
| 924 |
+
"\n",
|
| 925 |
+
"SMILES_XPATH = '//*[@id=\"smilesBox\"]'\n",
|
| 926 |
+
"SUBMIT_XPATH = '//*[@id=\"submitButton\"]'\n",
|
| 927 |
+
"DOWNLOAD_XPATH = '//*[@id=\"exportButtons\"]/div/button[2]'\n",
|
| 928 |
+
"\n",
|
| 929 |
+
"WAIT_TIMEOUT = 60\n",
|
| 930 |
+
"REQUEST_DELAY = 10 # Swiss 必须慢\n",
|
| 931 |
+
"\n",
|
| 932 |
+
"MAX_BLOCKS_BEFORE_QUIT = 5 # 连续封禁上限\n",
|
| 933 |
+
"\n",
|
| 934 |
+
"# =========================\n",
|
| 935 |
+
"# 🔁 断点 / 补跑模式开关\n",
|
| 936 |
+
"# =========================\n",
|
| 937 |
+
"RETRY_MODE = True\n",
|
| 938 |
+
"# False:首轮跑(success / no_result / failed 都跳过)\n",
|
| 939 |
+
"# True :补跑轮(只要 result_file 为空,就允许再跑)\n",
|
| 940 |
+
"\n",
|
| 941 |
+
"# =========================\n",
|
| 942 |
+
"# 初始化 Edge\n",
|
| 943 |
+
"# =========================\n",
|
| 944 |
+
"def init_driver():\n",
|
| 945 |
+
" options = Options()\n",
|
| 946 |
+
" options.add_argument(\"--start-maximized\")\n",
|
| 947 |
+
" options.add_argument(\"--disable-blink-features=AutomationControlled\")\n",
|
| 948 |
+
" options.add_experimental_option(\"excludeSwitches\", [\"enable-automation\"])\n",
|
| 949 |
+
" options.add_experimental_option(\"useAutomationExtension\", False)\n",
|
| 950 |
+
"\n",
|
| 951 |
+
" prefs = {\n",
|
| 952 |
+
" \"download.default_directory\": DOWNLOAD_DIR,\n",
|
| 953 |
+
" \"download.prompt_for_download\": False,\n",
|
| 954 |
+
" \"directory_upgrade\": True,\n",
|
| 955 |
+
" \"safebrowsing.enabled\": True\n",
|
| 956 |
+
" }\n",
|
| 957 |
+
" options.add_experimental_option(\"prefs\", prefs)\n",
|
| 958 |
+
"\n",
|
| 959 |
+
" service = Service(EDGE_DRIVER)\n",
|
| 960 |
+
" driver = webdriver.Edge(service=service, options=options)\n",
|
| 961 |
+
" driver.execute_script(\n",
|
| 962 |
+
" \"Object.defineProperty(navigator, 'webdriver', {get: () => undefined})\"\n",
|
| 963 |
+
" )\n",
|
| 964 |
+
" return driver\n",
|
| 965 |
+
"\n",
|
| 966 |
+
"\n",
|
| 967 |
+
"# =========================\n",
|
| 968 |
+
"# 主流程\n",
|
| 969 |
+
"# =========================\n",
|
| 970 |
+
"def main():\n",
|
| 971 |
+
" os.makedirs(DOWNLOAD_DIR, exist_ok=True)\n",
|
| 972 |
+
" df = pd.read_csv(INPUT_CSV)\n",
|
| 973 |
+
"\n",
|
| 974 |
+
" # 自动补齐状态列\n",
|
| 975 |
+
" for col in [\"predict_status\", \"fail_reason\", \"result_file\"]:\n",
|
| 976 |
+
" if col not in df.columns:\n",
|
| 977 |
+
" df[col] = \"\"\n",
|
| 978 |
+
"\n",
|
| 979 |
+
" try:\n",
|
| 980 |
+
" driver = init_driver()\n",
|
| 981 |
+
" wait = WebDriverWait(driver, WAIT_TIMEOUT)\n",
|
| 982 |
+
" except Exception as e:\n",
|
| 983 |
+
" print(f\"❌ 浏览器初始化失败: {e}\")\n",
|
| 984 |
+
" return\n",
|
| 985 |
+
"\n",
|
| 986 |
+
" consecutive_blocks = 0\n",
|
| 987 |
+
" total = len(df)\n",
|
| 988 |
+
" processed = 0\n",
|
| 989 |
+
" pbar = tqdm(total=total, desc=\"SwissTarget\")\n",
|
| 990 |
+
"\n",
|
| 991 |
+
" idx = 0\n",
|
| 992 |
+
" while idx < total:\n",
|
| 993 |
+
" row = df.iloc[idx]\n",
|
| 994 |
+
" mol_id = str(row[MOLID_COL])\n",
|
| 995 |
+
" smiles = str(row[SMILES_COL])\n",
|
| 996 |
+
" out_csv = os.path.join(DOWNLOAD_DIR, f\"{mol_id}.csv\")\n",
|
| 997 |
+
"\n",
|
| 998 |
+
" status = str(df.at[idx, \"predict_status\"])\n",
|
| 999 |
+
" result_file = str(df.at[idx, \"result_file\"])\n",
|
| 1000 |
+
"\n",
|
| 1001 |
+
" # =========================\n",
|
| 1002 |
+
" # ✅ 是否跳过当前分子\n",
|
| 1003 |
+
" # =========================\n",
|
| 1004 |
+
" if not RETRY_MODE:\n",
|
| 1005 |
+
" if status in [\"success\", \"no_result\", \"failed\"]:\n",
|
| 1006 |
+
" idx += 1\n",
|
| 1007 |
+
" processed += 1\n",
|
| 1008 |
+
" pbar.n = processed\n",
|
| 1009 |
+
" pbar.refresh()\n",
|
| 1010 |
+
" continue\n",
|
| 1011 |
+
" else:\n",
|
| 1012 |
+
" if result_file and result_file != \"nan\":\n",
|
| 1013 |
+
" idx += 1\n",
|
| 1014 |
+
" processed += 1\n",
|
| 1015 |
+
" pbar.n = processed\n",
|
| 1016 |
+
" pbar.refresh()\n",
|
| 1017 |
+
" continue\n",
|
| 1018 |
+
"\n",
|
| 1019 |
+
" # =========================\n",
|
| 1020 |
+
" # 主预测逻辑\n",
|
| 1021 |
+
" # =========================\n",
|
| 1022 |
+
" try:\n",
|
| 1023 |
+
" driver.get(SWISS_URL)\n",
|
| 1024 |
+
"\n",
|
| 1025 |
+
" box = wait.until(\n",
|
| 1026 |
+
" EC.presence_of_element_located((By.XPATH, SMILES_XPATH))\n",
|
| 1027 |
+
" )\n",
|
| 1028 |
+
" box.clear()\n",
|
| 1029 |
+
" box.send_keys(smiles)\n",
|
| 1030 |
+
" time.sleep(1.5)\n",
|
| 1031 |
+
"\n",
|
| 1032 |
+
" driver.find_element(By.XPATH, SUBMIT_XPATH).click()\n",
|
| 1033 |
+
"\n",
|
| 1034 |
+
" download_btn = wait.until(\n",
|
| 1035 |
+
" EC.presence_of_element_located((By.XPATH, DOWNLOAD_XPATH))\n",
|
| 1036 |
+
" )\n",
|
| 1037 |
+
"\n",
|
| 1038 |
+
" before = set(os.listdir(DOWNLOAD_DIR))\n",
|
| 1039 |
+
" download_btn.click()\n",
|
| 1040 |
+
"\n",
|
| 1041 |
+
" success = False\n",
|
| 1042 |
+
" for _ in range(30):\n",
|
| 1043 |
+
" after = set(os.listdir(DOWNLOAD_DIR))\n",
|
| 1044 |
+
" new_files = after - before\n",
|
| 1045 |
+
" csvs = [f for f in new_files if f.endswith(\".csv\")]\n",
|
| 1046 |
+
" if csvs:\n",
|
| 1047 |
+
" shutil.move(\n",
|
| 1048 |
+
" os.path.join(DOWNLOAD_DIR, csvs[0]),\n",
|
| 1049 |
+
" out_csv\n",
|
| 1050 |
+
" )\n",
|
| 1051 |
+
" success = True\n",
|
| 1052 |
+
" break\n",
|
| 1053 |
+
" time.sleep(1)\n",
|
| 1054 |
+
"\n",
|
| 1055 |
+
" if success:\n",
|
| 1056 |
+
" df.at[idx, \"predict_status\"] = \"success\"\n",
|
| 1057 |
+
" df.at[idx, \"result_file\"] = f\"{mol_id}.csv\"\n",
|
| 1058 |
+
" df.at[idx, \"fail_reason\"] = \"\"\n",
|
| 1059 |
+
" else:\n",
|
| 1060 |
+
" df.at[idx, \"predict_status\"] = \"failed\"\n",
|
| 1061 |
+
" df.at[idx, \"fail_reason\"] = \"download_failed\"\n",
|
| 1062 |
+
"\n",
|
| 1063 |
+
" df.to_csv(INPUT_CSV, index=False)\n",
|
| 1064 |
+
" time.sleep(REQUEST_DELAY)\n",
|
| 1065 |
+
"\n",
|
| 1066 |
+
" consecutive_blocks = 0\n",
|
| 1067 |
+
" idx += 1\n",
|
| 1068 |
+
" processed += 1\n",
|
| 1069 |
+
" pbar.n = processed\n",
|
| 1070 |
+
" pbar.refresh()\n",
|
| 1071 |
+
"\n",
|
| 1072 |
+
" # =========================\n",
|
| 1073 |
+
" # ❌ 无结果(结构问题 / Swiss 硬限制)\n",
|
| 1074 |
+
" # =========================\n",
|
| 1075 |
+
" except TimeoutException:\n",
|
| 1076 |
+
" df.at[idx, \"predict_status\"] = \"no_result\"\n",
|
| 1077 |
+
" df.at[idx, \"fail_reason\"] = \"no_result\"\n",
|
| 1078 |
+
" df.to_csv(INPUT_CSV, index=False)\n",
|
| 1079 |
+
"\n",
|
| 1080 |
+
" idx += 1\n",
|
| 1081 |
+
" processed += 1\n",
|
| 1082 |
+
" pbar.n = processed\n",
|
| 1083 |
+
" pbar.refresh()\n",
|
| 1084 |
+
"\n",
|
| 1085 |
+
" except UnexpectedAlertPresentException:\n",
|
| 1086 |
+
" try:\n",
|
| 1087 |
+
" driver.switch_to.alert.accept()\n",
|
| 1088 |
+
" except:\n",
|
| 1089 |
+
" pass\n",
|
| 1090 |
+
" df.at[idx, \"predict_status\"] = \"no_result\"\n",
|
| 1091 |
+
" df.at[idx, \"fail_reason\"] = \"alert\"\n",
|
| 1092 |
+
" df.to_csv(INPUT_CSV, index=False)\n",
|
| 1093 |
+
"\n",
|
| 1094 |
+
" idx += 1\n",
|
| 1095 |
+
" processed += 1\n",
|
| 1096 |
+
" pbar.n = processed\n",
|
| 1097 |
+
" pbar.refresh()\n",
|
| 1098 |
+
"\n",
|
| 1099 |
+
" # =========================\n",
|
| 1100 |
+
" # 🚨 疑似封 IP(允许重试)\n",
|
| 1101 |
+
" # =========================\n",
|
| 1102 |
+
" except WebDriverException:\n",
|
| 1103 |
+
" df.at[idx, \"predict_status\"] = \"blocked\"\n",
|
| 1104 |
+
" df.at[idx, \"fail_reason\"] = \"ip_block\"\n",
|
| 1105 |
+
" df.to_csv(INPUT_CSV, index=False)\n",
|
| 1106 |
+
"\n",
|
| 1107 |
+
" consecutive_blocks += 1\n",
|
| 1108 |
+
" print(f\"\\n⚠️ 疑似 IP 被封({consecutive_blocks}/{MAX_BLOCKS_BEFORE_QUIT})\")\n",
|
| 1109 |
+
"\n",
|
| 1110 |
+
" if consecutive_blocks >= MAX_BLOCKS_BEFORE_QUIT:\n",
|
| 1111 |
+
" print(\"❌ 连续封禁达到上限,安全退出\")\n",
|
| 1112 |
+
" break\n",
|
| 1113 |
+
"\n",
|
| 1114 |
+
" try:\n",
|
| 1115 |
+
" driver.quit()\n",
|
| 1116 |
+
" except:\n",
|
| 1117 |
+
" pass\n",
|
| 1118 |
+
"\n",
|
| 1119 |
+
" wait_time = random.uniform(900, 1200)\n",
|
| 1120 |
+
" print(f\"⏳ 等待 {wait_time/60:.1f} 分钟后重试当前分子 {mol_id}\")\n",
|
| 1121 |
+
" time.sleep(wait_time)\n",
|
| 1122 |
+
"\n",
|
| 1123 |
+
" try:\n",
|
| 1124 |
+
" driver = init_driver()\n",
|
| 1125 |
+
" wait = WebDriverWait(driver, WAIT_TIMEOUT)\n",
|
| 1126 |
+
" except Exception as e:\n",
|
| 1127 |
+
" print(f\"❌ 浏览器重启失败: {e}\")\n",
|
| 1128 |
+
" break\n",
|
| 1129 |
+
"\n",
|
| 1130 |
+
" continue\n",
|
| 1131 |
+
"\n",
|
| 1132 |
+
" pbar.close()\n",
|
| 1133 |
+
" try:\n",
|
| 1134 |
+
" driver.quit()\n",
|
| 1135 |
+
" except:\n",
|
| 1136 |
+
" pass\n",
|
| 1137 |
+
"\n",
|
| 1138 |
+
" print(\"✅ SwissTarget 批量预测流程结束\")\n",
|
| 1139 |
+
"\n",
|
| 1140 |
+
"\n",
|
| 1141 |
+
"if __name__ == \"__main__\":\n",
|
| 1142 |
+
" main()\n"
|
| 1143 |
+
]
|
| 1144 |
+
},
|
| 1145 |
+
{
|
| 1146 |
+
"cell_type": "code",
|
| 1147 |
+
"execution_count": null,
|
| 1148 |
+
"id": "b7d0e5f2",
|
| 1149 |
+
"metadata": {},
|
| 1150 |
+
"outputs": [],
|
| 1151 |
+
"source": [
|
| 1152 |
+
"import scipy.io\n",
|
| 1153 |
+
"import pandas as pd\n",
|
| 1154 |
+
"import numpy as np\n",
|
| 1155 |
+
"\n",
|
| 1156 |
+
"# Fdataset.mat转为csv\n",
|
| 1157 |
+
"\n",
|
| 1158 |
+
"mat = scipy.io.loadmat(r\"C:\\Users\\Lenovo\\Downloads\\Fdataset.mat\")\n",
|
| 1159 |
+
"\n",
|
| 1160 |
+
"for key, value in mat.items():\n",
|
| 1161 |
+
" # 跳过 MATLAB 自带变量\n",
|
| 1162 |
+
" if key.startswith(\"__\"):\n",
|
| 1163 |
+
" continue\n",
|
| 1164 |
+
"\n",
|
| 1165 |
+
" # 只处理二维 numpy 数组\n",
|
| 1166 |
+
" if isinstance(value, np.ndarray) and value.ndim == 2:\n",
|
| 1167 |
+
" df = pd.DataFrame(value)\n",
|
| 1168 |
+
" df.to_csv(f\"{key}.csv\", index=False)\n",
|
| 1169 |
+
" print(f\"已导出: {key}.csv\")\n"
|
| 1170 |
+
]
|
| 1171 |
+
},
|
| 1172 |
+
{
|
| 1173 |
+
"cell_type": "code",
|
| 1174 |
+
"execution_count": 6,
|
| 1175 |
+
"id": "1c20a5a2",
|
| 1176 |
+
"metadata": {},
|
| 1177 |
+
"outputs": [
|
| 1178 |
+
{
|
| 1179 |
+
"name": "stdout",
|
| 1180 |
+
"output_type": "stream",
|
| 1181 |
+
"text": [
|
| 1182 |
+
"✅ 已生成整合表:D:\\2\\QQCM\\drug_target_merged.csv,共 133501 条 drug–target 关系\n"
|
| 1183 |
+
]
|
| 1184 |
+
}
|
| 1185 |
+
],
|
| 1186 |
+
"source": [
|
| 1187 |
+
"import pandas as pd\n",
|
| 1188 |
+
"from pathlib import Path\n",
|
| 1189 |
+
"import re\n",
|
| 1190 |
+
"\n",
|
| 1191 |
+
"# 整合药靶结果\n",
|
| 1192 |
+
"\n",
|
| 1193 |
+
"# =========================\n",
|
| 1194 |
+
"# 路径配置\n",
|
| 1195 |
+
"# =========================\n",
|
| 1196 |
+
"chembl_path = Path(r\"D:\\2\\QQCM\\chembl_summary_table.csv\")\n",
|
| 1197 |
+
"swiss_dir = Path(r\"D:\\2\\QQCM\\swiss_results\")\n",
|
| 1198 |
+
"\n",
|
| 1199 |
+
"out_path = Path(r\"D:\\2\\QQCM\\drug_target_merged.csv\")\n",
|
| 1200 |
+
"\n",
|
| 1201 |
+
"# =========================\n",
|
| 1202 |
+
"# 工具函数\n",
|
| 1203 |
+
"# =========================\n",
|
| 1204 |
+
"def split_multi(cell):\n",
|
| 1205 |
+
" if pd.isna(cell):\n",
|
| 1206 |
+
" return []\n",
|
| 1207 |
+
" return re.split(r\"[;,|/]+\", str(cell))\n",
|
| 1208 |
+
"\n",
|
| 1209 |
+
"\n",
|
| 1210 |
+
"# =========================\n",
|
| 1211 |
+
"# 1. 处理 ChEMBL 表\n",
|
| 1212 |
+
"# =========================\n",
|
| 1213 |
+
"chembl_df = pd.read_csv(chembl_path)\n",
|
| 1214 |
+
"\n",
|
| 1215 |
+
"chembl_rows = []\n",
|
| 1216 |
+
"\n",
|
| 1217 |
+
"for _, row in chembl_df.iterrows():\n",
|
| 1218 |
+
" if not row.get(\"chembl_hit\", False):\n",
|
| 1219 |
+
" continue\n",
|
| 1220 |
+
"\n",
|
| 1221 |
+
" drug_id = str(row[\"mol_id\"]).strip()\n",
|
| 1222 |
+
"\n",
|
| 1223 |
+
" targets = split_multi(row.get(\"target_chembl_ids\"))\n",
|
| 1224 |
+
" for t in targets:\n",
|
| 1225 |
+
" t = t.strip()\n",
|
| 1226 |
+
" if not t:\n",
|
| 1227 |
+
" continue\n",
|
| 1228 |
+
" chembl_rows.append({\n",
|
| 1229 |
+
" \"drug_id\": drug_id,\n",
|
| 1230 |
+
" \"target_id\": t, # ⚠️ 这里假设你已是 UniProt ID\n",
|
| 1231 |
+
" \"source\": \"ChEMBL\",\n",
|
| 1232 |
+
" \"confidence\": 1.0\n",
|
| 1233 |
+
" })\n",
|
| 1234 |
+
"\n",
|
| 1235 |
+
"chembl_long = pd.DataFrame(chembl_rows)\n",
|
| 1236 |
+
"\n",
|
| 1237 |
+
"# =========================\n",
|
| 1238 |
+
"# 2. 处理 Swiss 文件夹\n",
|
| 1239 |
+
"# =========================\n",
|
| 1240 |
+
"swiss_rows = []\n",
|
| 1241 |
+
"\n",
|
| 1242 |
+
"for csv_file in swiss_dir.glob(\"*.csv\"):\n",
|
| 1243 |
+
" drug_id = csv_file.stem # 文件名即 drug_id\n",
|
| 1244 |
+
" df = pd.read_csv(csv_file)\n",
|
| 1245 |
+
"\n",
|
| 1246 |
+
" for _, row in df.iterrows():\n",
|
| 1247 |
+
" uid = str(row.get(\"Uniprot ID\", \"\")).strip()\n",
|
| 1248 |
+
" prob = row.get(\"Probability*\", None)\n",
|
| 1249 |
+
"\n",
|
| 1250 |
+
" if not uid or pd.isna(prob):\n",
|
| 1251 |
+
" continue\n",
|
| 1252 |
+
"\n",
|
| 1253 |
+
" # 轻度清洗阈值(可调)\n",
|
| 1254 |
+
" if prob < 0.1:\n",
|
| 1255 |
+
" continue\n",
|
| 1256 |
+
"\n",
|
| 1257 |
+
" swiss_rows.append({\n",
|
| 1258 |
+
" \"drug_id\": drug_id,\n",
|
| 1259 |
+
" \"target_id\": uid,\n",
|
| 1260 |
+
" \"source\": \"Swiss\",\n",
|
| 1261 |
+
" \"confidence\": float(prob)\n",
|
| 1262 |
+
" })\n",
|
| 1263 |
+
"\n",
|
| 1264 |
+
"swiss_long = pd.DataFrame(swiss_rows)\n",
|
| 1265 |
+
"\n",
|
| 1266 |
+
"# =========================\n",
|
| 1267 |
+
"# 3. 合并 & 去重\n",
|
| 1268 |
+
"# =========================\n",
|
| 1269 |
+
"merged = pd.concat([chembl_long, swiss_long], ignore_index=True)\n",
|
| 1270 |
+
"\n",
|
| 1271 |
+
"# 如果同一 drug-target 同时存在 ChEMBL 和 Swiss,保留最高 confidence\n",
|
| 1272 |
+
"merged = (\n",
|
| 1273 |
+
" merged\n",
|
| 1274 |
+
" .sort_values(\"confidence\", ascending=False)\n",
|
| 1275 |
+
" .drop_duplicates(subset=[\"drug_id\", \"target_id\"], keep=\"first\")\n",
|
| 1276 |
+
")\n",
|
| 1277 |
+
"\n",
|
| 1278 |
+
"merged.to_csv(out_path, index=False, encoding=\"utf-8-sig\")\n",
|
| 1279 |
+
"print(f\"✅ 已生成整合表:{out_path},共 {len(merged)} 条 drug–target 关系\")\n"
|
| 1280 |
+
]
|
| 1281 |
+
},
|
| 1282 |
+
{
|
| 1283 |
+
"cell_type": "code",
|
| 1284 |
+
"execution_count": null,
|
| 1285 |
+
"id": "82ff0a15",
|
| 1286 |
+
"metadata": {},
|
| 1287 |
+
"outputs": [
|
| 1288 |
+
{
|
| 1289 |
+
"name": "stdout",
|
| 1290 |
+
"output_type": "stream",
|
| 1291 |
+
"text": [
|
| 1292 |
+
"✅ 已加载 ChEMBL→UniProt 映射:12904 个 CHEMBL target\n",
|
| 1293 |
+
"🎉 映射完成!\n",
|
| 1294 |
+
" 共得到 113271 条 drug–UniProt 关系\n",
|
| 1295 |
+
" 输出文件:D:\\2\\QQCM\\drug_target_uniprot_only.csv\n",
|
| 1296 |
+
"🔍 是否仍存在 CHEMBL ID? False\n"
|
| 1297 |
+
]
|
| 1298 |
+
}
|
| 1299 |
+
],
|
| 1300 |
+
"source": [
|
| 1301 |
+
"import pandas as pd\n",
|
| 1302 |
+
"import re\n",
|
| 1303 |
+
"from pathlib import Path\n",
|
| 1304 |
+
"\n",
|
| 1305 |
+
"# chembl id映射uniprot id\n",
|
| 1306 |
+
"\n",
|
| 1307 |
+
"# ===============================\n",
|
| 1308 |
+
"# 路径配置\n",
|
| 1309 |
+
"# ===============================\n",
|
| 1310 |
+
"mapping_path = Path(r\"D:\\2\\QQCM\\chembl_uniprot_mapping.txt\")\n",
|
| 1311 |
+
"merged_path = Path(r\"D:\\2\\QQCM\\drug_target_merged.csv\")\n",
|
| 1312 |
+
"out_path = Path(r\"D:\\2\\QQCM\\drug_target_uniprot_only.csv\")\n",
|
| 1313 |
+
"\n",
|
| 1314 |
+
"# ===============================\n",
|
| 1315 |
+
"# 1. 读取 ChEMBL–UniProt 映射表\n",
|
| 1316 |
+
"# 文件结构:\n",
|
| 1317 |
+
"# UniProt | CHEMBL | name | type\n",
|
| 1318 |
+
"# ===============================\n",
|
| 1319 |
+
"mapping_df = pd.read_csv(\n",
|
| 1320 |
+
" mapping_path,\n",
|
| 1321 |
+
" sep=\"\\t\",\n",
|
| 1322 |
+
" comment=\"#\", # 跳过注释行\n",
|
| 1323 |
+
" header=None,\n",
|
| 1324 |
+
" names=[\n",
|
| 1325 |
+
" \"uniprot_id\",\n",
|
| 1326 |
+
" \"chembl_target_id\",\n",
|
| 1327 |
+
" \"target_name\",\n",
|
| 1328 |
+
" \"target_type\"\n",
|
| 1329 |
+
" ]\n",
|
| 1330 |
+
")\n",
|
| 1331 |
+
"\n",
|
| 1332 |
+
"# 只保留我们真正需要的两列\n",
|
| 1333 |
+
"mapping_df = mapping_df[[\"chembl_target_id\", \"uniprot_id\"]]\n",
|
| 1334 |
+
"\n",
|
| 1335 |
+
"# 构建 dict: CHEMBLxxx -> [UniProt1, UniProt2, ...]\n",
|
| 1336 |
+
"chembl2uniprot = (\n",
|
| 1337 |
+
" mapping_df\n",
|
| 1338 |
+
" .groupby(\"chembl_target_id\")[\"uniprot_id\"]\n",
|
| 1339 |
+
" .apply(list)\n",
|
| 1340 |
+
" .to_dict()\n",
|
| 1341 |
+
")\n",
|
| 1342 |
+
"\n",
|
| 1343 |
+
"print(f\"✅ 已加载 ChEMBL→UniProt 映射:{len(chembl2uniprot)} 个 CHEMBL target\")\n",
|
| 1344 |
+
"\n",
|
| 1345 |
+
"# ===============================\n",
|
| 1346 |
+
"# 2. 读取 drug–target 整合表\n",
|
| 1347 |
+
"# ===============================\n",
|
| 1348 |
+
"df = pd.read_csv(merged_path)\n",
|
| 1349 |
+
"\n",
|
| 1350 |
+
"required_cols = {\"drug_id\", \"target_id\", \"source\", \"confidence\"}\n",
|
| 1351 |
+
"missing = required_cols - set(df.columns)\n",
|
| 1352 |
+
"if missing:\n",
|
| 1353 |
+
" raise ValueError(f\"❌ 输入表缺少必要列: {missing}\")\n",
|
| 1354 |
+
"\n",
|
| 1355 |
+
"# ===============================\n",
|
| 1356 |
+
"# 3. 映射 CHEMBL → UniProt\n",
|
| 1357 |
+
"# ===============================\n",
|
| 1358 |
+
"rows = []\n",
|
| 1359 |
+
"\n",
|
| 1360 |
+
"for _, row in df.iterrows():\n",
|
| 1361 |
+
" drug_id = row[\"drug_id\"]\n",
|
| 1362 |
+
" target = str(row[\"target_id\"]).strip()\n",
|
| 1363 |
+
" source = row[\"source\"]\n",
|
| 1364 |
+
" conf = row[\"confidence\"]\n",
|
| 1365 |
+
"\n",
|
| 1366 |
+
" # 情况 1:已经是 UniProt ID\n",
|
| 1367 |
+
" if not re.match(r\"^CHEMBL\\d+$\", target):\n",
|
| 1368 |
+
" rows.append({\n",
|
| 1369 |
+
" \"drug_id\": drug_id,\n",
|
| 1370 |
+
" \"uniprot_id\": target,\n",
|
| 1371 |
+
" \"source\": source,\n",
|
| 1372 |
+
" \"confidence\": conf\n",
|
| 1373 |
+
" })\n",
|
| 1374 |
+
" continue\n",
|
| 1375 |
+
"\n",
|
| 1376 |
+
" # 情况 2:是 CHEMBL target ID\n",
|
| 1377 |
+
" uniprots = chembl2uniprot.get(target, [])\n",
|
| 1378 |
+
"\n",
|
| 1379 |
+
" # 无法映射 → 丢弃(也可以在这里记录日志)\n",
|
| 1380 |
+
" if not uniprots:\n",
|
| 1381 |
+
" continue\n",
|
| 1382 |
+
"\n",
|
| 1383 |
+
" # 1 → 多:拆行\n",
|
| 1384 |
+
" for up in uniprots:\n",
|
| 1385 |
+
" rows.append({\n",
|
| 1386 |
+
" \"drug_id\": drug_id,\n",
|
| 1387 |
+
" \"uniprot_id\": up,\n",
|
| 1388 |
+
" \"source\": source,\n",
|
| 1389 |
+
" \"confidence\": conf\n",
|
| 1390 |
+
" })\n",
|
| 1391 |
+
"\n",
|
| 1392 |
+
"mapped_df = pd.DataFrame(rows)\n",
|
| 1393 |
+
"\n",
|
| 1394 |
+
"# ===============================\n",
|
| 1395 |
+
"# 4. 去重:同一 drug–UniProt\n",
|
| 1396 |
+
"# 保留 confidence 最大的一条\n",
|
| 1397 |
+
"# ===============================\n",
|
| 1398 |
+
"mapped_df = (\n",
|
| 1399 |
+
" mapped_df\n",
|
| 1400 |
+
" .sort_values(\"confidence\", ascending=False)\n",
|
| 1401 |
+
" .drop_duplicates(\n",
|
| 1402 |
+
" subset=[\"drug_id\", \"uniprot_id\"],\n",
|
| 1403 |
+
" keep=\"first\"\n",
|
| 1404 |
+
" )\n",
|
| 1405 |
+
")\n",
|
| 1406 |
+
"\n",
|
| 1407 |
+
"# ===============================\n",
|
| 1408 |
+
"# 5. 导出结果\n",
|
| 1409 |
+
"# ===============================\n",
|
| 1410 |
+
"mapped_df.to_csv(\n",
|
| 1411 |
+
" out_path,\n",
|
| 1412 |
+
" index=False,\n",
|
| 1413 |
+
" encoding=\"utf-8-sig\"\n",
|
| 1414 |
+
")\n",
|
| 1415 |
+
"\n",
|
| 1416 |
+
"print(f\"🎉 映射完成!\")\n",
|
| 1417 |
+
"print(f\" 共得到 {len(mapped_df)} 条 drug–UniProt 关系\")\n",
|
| 1418 |
+
"print(f\" 输出文件:{out_path}\")\n",
|
| 1419 |
+
"\n",
|
| 1420 |
+
"# ===============================\n",
|
| 1421 |
+
"# 6. 自检:不应再出现 CHEMBL\n",
|
| 1422 |
+
"# ===============================\n",
|
| 1423 |
+
"has_chembl = mapped_df[\"uniprot_id\"].str.startswith(\"CHEMBL\").any()\n",
|
| 1424 |
+
"print(f\"🔍 是否仍存在 CHEMBL ID? {has_chembl}\")\n"
|
| 1425 |
+
]
|
| 1426 |
+
},
|
| 1427 |
+
{
|
| 1428 |
+
"cell_type": "code",
|
| 1429 |
+
"execution_count": null,
|
| 1430 |
+
"id": "c554713a",
|
| 1431 |
+
"metadata": {},
|
| 1432 |
+
"outputs": [
|
| 1433 |
+
{
|
| 1434 |
+
"name": "stdout",
|
| 1435 |
+
"output_type": "stream",
|
| 1436 |
+
"text": [
|
| 1437 |
+
"✅ 加权 Jaccard 相似度计算完成\n",
|
| 1438 |
+
"📐 矩阵形状: (2803, 2803)\n",
|
| 1439 |
+
"📁 输出文件: drug_weighted_jaccard_similarity.csv\n"
|
| 1440 |
+
]
|
| 1441 |
+
}
|
| 1442 |
+
],
|
| 1443 |
+
"source": [
|
| 1444 |
+
"#!/usr/bin/env python3\n",
|
| 1445 |
+
"# -*- coding: utf-8 -*-\n",
|
| 1446 |
+
"\n",
|
| 1447 |
+
"# 药靶加权Jaccard相似度计算\n",
|
| 1448 |
+
"\n",
|
| 1449 |
+
"import pandas as pd\n",
|
| 1450 |
+
"import numpy as np\n",
|
| 1451 |
+
"from typing import Dict\n",
|
| 1452 |
+
"\n",
|
| 1453 |
+
"\n",
|
| 1454 |
+
"def load_drug_target_weights(\n",
|
| 1455 |
+
" csv_path: str,\n",
|
| 1456 |
+
" drug_col: str = \"drug_id\",\n",
|
| 1457 |
+
" target_col: str = \"uniprot_id\",\n",
|
| 1458 |
+
" weight_col: str = \"confidence\",\n",
|
| 1459 |
+
" encoding: str = \"utf-8-sig\"\n",
|
| 1460 |
+
") -> tuple[list[str], Dict[str, Dict[str, float]]]:\n",
|
| 1461 |
+
" \"\"\"\n",
|
| 1462 |
+
" 构建:\n",
|
| 1463 |
+
" - 药物顺序列表\n",
|
| 1464 |
+
" - drug -> {target: weight} 的映射\n",
|
| 1465 |
+
" \"\"\"\n",
|
| 1466 |
+
" df = pd.read_csv(csv_path, encoding=encoding)\n",
|
| 1467 |
+
"\n",
|
| 1468 |
+
" for col in [drug_col, target_col, weight_col]:\n",
|
| 1469 |
+
" if col not in df.columns:\n",
|
| 1470 |
+
" raise ValueError(f\"缺少必要列: {col}\")\n",
|
| 1471 |
+
"\n",
|
| 1472 |
+
" df = df[[drug_col, target_col, weight_col]].copy()\n",
|
| 1473 |
+
" df[drug_col] = df[drug_col].astype(str).str.strip()\n",
|
| 1474 |
+
" df[target_col] = df[target_col].astype(str).str.strip()\n",
|
| 1475 |
+
"\n",
|
| 1476 |
+
" # 去掉非法记录\n",
|
| 1477 |
+
" df = df[(df[drug_col] != \"\") & (df[target_col] != \"\")]\n",
|
| 1478 |
+
" df = df.dropna(subset=[weight_col])\n",
|
| 1479 |
+
"\n",
|
| 1480 |
+
" # 药物顺序(首次出现)\n",
|
| 1481 |
+
" order = list(pd.unique(df[drug_col]))\n",
|
| 1482 |
+
"\n",
|
| 1483 |
+
" # drug -> target -> max(confidence)\n",
|
| 1484 |
+
" drug2weights: Dict[str, Dict[str, float]] = {d: {} for d in order}\n",
|
| 1485 |
+
"\n",
|
| 1486 |
+
" for _, row in df.iterrows():\n",
|
| 1487 |
+
" d = row[drug_col]\n",
|
| 1488 |
+
" t = row[target_col]\n",
|
| 1489 |
+
" w = float(row[weight_col])\n",
|
| 1490 |
+
"\n",
|
| 1491 |
+
" # 同一 drug–target 取最大置信度(保守 & 常见)\n",
|
| 1492 |
+
" if t not in drug2weights[d]:\n",
|
| 1493 |
+
" drug2weights[d][t] = w\n",
|
| 1494 |
+
" else:\n",
|
| 1495 |
+
" drug2weights[d][t] = max(drug2weights[d][t], w)\n",
|
| 1496 |
+
"\n",
|
| 1497 |
+
" return order, drug2weights\n",
|
| 1498 |
+
"\n",
|
| 1499 |
+
"\n",
|
| 1500 |
+
"def weighted_jaccard_matrix(\n",
|
| 1501 |
+
" order: list[str],\n",
|
| 1502 |
+
" drug2weights: Dict[str, Dict[str, float]]\n",
|
| 1503 |
+
") -> pd.DataFrame:\n",
|
| 1504 |
+
" \"\"\"\n",
|
| 1505 |
+
" 计算加权 Jaccard 相似度矩阵\n",
|
| 1506 |
+
" \"\"\"\n",
|
| 1507 |
+
" n = len(order)\n",
|
| 1508 |
+
" mat = np.zeros((n, n), dtype=float)\n",
|
| 1509 |
+
"\n",
|
| 1510 |
+
" for i in range(n):\n",
|
| 1511 |
+
" di = order[i]\n",
|
| 1512 |
+
" Wi = drug2weights.get(di, {})\n",
|
| 1513 |
+
"\n",
|
| 1514 |
+
" for j in range(i, n):\n",
|
| 1515 |
+
" if i == j:\n",
|
| 1516 |
+
" sim = 1.0\n",
|
| 1517 |
+
" else:\n",
|
| 1518 |
+
" dj = order[j]\n",
|
| 1519 |
+
" Wj = drug2weights.get(dj, {})\n",
|
| 1520 |
+
"\n",
|
| 1521 |
+
" targets = set(Wi) | set(Wj)\n",
|
| 1522 |
+
"\n",
|
| 1523 |
+
" num = 0.0\n",
|
| 1524 |
+
" den = 0.0\n",
|
| 1525 |
+
" for t in targets:\n",
|
| 1526 |
+
" wi = Wi.get(t, 0.0)\n",
|
| 1527 |
+
" wj = Wj.get(t, 0.0)\n",
|
| 1528 |
+
" num += min(wi, wj)\n",
|
| 1529 |
+
" den += max(wi, wj)\n",
|
| 1530 |
+
"\n",
|
| 1531 |
+
" sim = num / den if den > 0 else 0.0\n",
|
| 1532 |
+
"\n",
|
| 1533 |
+
" mat[i, j] = mat[j, i] = sim\n",
|
| 1534 |
+
"\n",
|
| 1535 |
+
" return pd.DataFrame(mat, index=order, columns=order)\n",
|
| 1536 |
+
"\n",
|
| 1537 |
+
"\n",
|
| 1538 |
+
"def run(\n",
|
| 1539 |
+
" input_csv: str,\n",
|
| 1540 |
+
" output_csv: str,\n",
|
| 1541 |
+
" drug_col: str = \"drug_id\",\n",
|
| 1542 |
+
" target_col: str = \"uniprot_id\",\n",
|
| 1543 |
+
" weight_col: str = \"confidence\",\n",
|
| 1544 |
+
" encoding: str = \"utf-8-sig\"\n",
|
| 1545 |
+
"):\n",
|
| 1546 |
+
" order, drug2weights = load_drug_target_weights(\n",
|
| 1547 |
+
" input_csv, drug_col, target_col, weight_col, encoding\n",
|
| 1548 |
+
" )\n",
|
| 1549 |
+
"\n",
|
| 1550 |
+
" sim_df = weighted_jaccard_matrix(order, drug2weights)\n",
|
| 1551 |
+
" sim_df.to_csv(output_csv, encoding=encoding)\n",
|
| 1552 |
+
"\n",
|
| 1553 |
+
" print(f\"✅ 加权 Jaccard 相似度计算完成\")\n",
|
| 1554 |
+
" print(f\"📐 矩阵形状: {sim_df.shape}\")\n",
|
| 1555 |
+
" print(f\"📁 输出文件: {output_csv}\")\n",
|
| 1556 |
+
"\n",
|
| 1557 |
+
" return sim_df\n",
|
| 1558 |
+
"\n",
|
| 1559 |
+
"\n",
|
| 1560 |
+
"if __name__ == \"__main__\":\n",
|
| 1561 |
+
" input_file = \"drug_target_uniprot_only.csv\"\n",
|
| 1562 |
+
" output_file = \"drug_weighted_jaccard_similarity.csv\"\n",
|
| 1563 |
+
"\n",
|
| 1564 |
+
" run(\n",
|
| 1565 |
+
" input_csv=input_file,\n",
|
| 1566 |
+
" output_csv=output_file,\n",
|
| 1567 |
+
" drug_col=\"drug_id\",\n",
|
| 1568 |
+
" target_col=\"uniprot_id\",\n",
|
| 1569 |
+
" weight_col=\"confidence\",\n",
|
| 1570 |
+
" encoding=\"utf-8-sig\"\n",
|
| 1571 |
+
" )\n"
|
| 1572 |
+
]
|
| 1573 |
+
},
|
| 1574 |
+
{
|
| 1575 |
+
"cell_type": "code",
|
| 1576 |
+
"execution_count": null,
|
| 1577 |
+
"id": "1f905cc3",
|
| 1578 |
+
"metadata": {},
|
| 1579 |
+
"outputs": [
|
| 1580 |
+
{
|
| 1581 |
+
"name": "stdout",
|
| 1582 |
+
"output_type": "stream",
|
| 1583 |
+
"text": [
|
| 1584 |
+
"向量矩阵形状: (616, 1024)\n",
|
| 1585 |
+
"<class 'numpy.ndarray'>\n",
|
| 1586 |
+
"float32\n"
|
| 1587 |
+
]
|
| 1588 |
+
}
|
| 1589 |
+
],
|
| 1590 |
+
"source": [
|
| 1591 |
+
"import numpy as np\n",
|
| 1592 |
+
"# 矩阵检查\n",
|
| 1593 |
+
"embeddings = np.load(r\"D:\\2\\111数据库\\模型\\embedding\\output\\herb_embeddings.npy\")\n",
|
| 1594 |
+
"\n",
|
| 1595 |
+
"print(\"向量矩阵形状:\", embeddings.shape)\n",
|
| 1596 |
+
"print(type(embeddings))\n",
|
| 1597 |
+
"print(embeddings.dtype)"
|
| 1598 |
+
]
|
| 1599 |
+
}
|
| 1600 |
+
],
|
| 1601 |
+
"metadata": {
|
| 1602 |
+
"kernelspec": {
|
| 1603 |
+
"display_name": "env",
|
| 1604 |
+
"language": "python",
|
| 1605 |
+
"name": "python3"
|
| 1606 |
+
},
|
| 1607 |
+
"language_info": {
|
| 1608 |
+
"codemirror_mode": {
|
| 1609 |
+
"name": "ipython",
|
| 1610 |
+
"version": 3
|
| 1611 |
+
},
|
| 1612 |
+
"file_extension": ".py",
|
| 1613 |
+
"mimetype": "text/x-python",
|
| 1614 |
+
"name": "python",
|
| 1615 |
+
"nbconvert_exporter": "python",
|
| 1616 |
+
"pygments_lexer": "ipython3",
|
| 1617 |
+
"version": "3.10.19"
|
| 1618 |
+
}
|
| 1619 |
+
},
|
| 1620 |
+
"nbformat": 4,
|
| 1621 |
+
"nbformat_minor": 5
|
| 1622 |
+
}
|