3

我有一个 .pdb 文件,其中包含同一分子的多个构象异构体。现在我想将这些conformers 中的每一个转换为一个单独的.xyz 文件。根据 open babel 帮助,这可以通过-m选项来完成。

-m Produces multiple output files, to allow:
   Splitting: e.g.        babel infile.mol new.smi -m
    puts each molecule into new1.smi new2.smi etc
   Batch conversion: e.g. babel *.mol -osmi -m
    converts each input file to a .smi file

但这仅转换第一个几何图形然后停止:

babel -ipdb confs.pdb -oxyz test.xyz -m
  1 molecule converted
  14 audit log messages

(在 Ubuntu 和 OSX 上测试了 open babel 2.3.2)

有什么建议可以解决这个问题或改用哪个程序?

4

1 回答 1

0

使用这个 linux 命令拆分你的 pdb 文件:

grep -n 'MODEL\|ENDMDL' models.pdb | cut -d: -f 1 | \
 awk '{if(NR%2) printf "sed -n %d,",$1+1; else printf "%dp models.pdb > model_%03d.pdb\n", $1-1,NR/2;}' |  bash -sf

输入文件为models.pdb,分割文件命名为model_0001.pdb、model_0002.pdb...等

更多细节在这里:https ://strucbio.biologie.uni-konstanz.de/ccp4wiki/index.php/Split_NMR-style_multiple_model_pdb_files_into_individual_models

于 2020-08-25T15:52:48.143 回答