autodataming的个人博客分享 http://blog.sciencenet.cn/u/autodataming

博文

vina中的构象保存为pdb格式

已有 5849 次阅读 2013-10-9 22:00 |个人分类:DrugDesign|系统分类:科研笔记| PDB, pdbqt, 格式转换, vian

背景:
之前有讲过可以通过pymol统计氢键的信息,
由于pymol对pdbqt的支持不好
ADT中的脚本pdbqt_to_pdb.py
只能实现pdbqts_to_pdb的功能
所以我写了个shell脚本,实现pdbqts_to_pdbs功能,用这个脚本前必须配置一些环境变量。
======================================pdbqts_to_pdbs.sh
#!/bin/sh

#Function : convert the pdbqt format of  ligand database to pdb format
#author: Chen Zhaoqiang
#email: 744891290@qq.com
#date:2013.10.09
#required:vina_split in vina  and pdbqt_to_pdb.py in adt
#usage: pdbqts_to_pdbs.sh --input xxx.pdbqt


if [ $# -lt 2 ];then
   echo "usage: pdbqts_to_pdbs.sh --input xxx.pdbqt\n";
fi

if [ -d temppp ];then
   cd ./temppp
   rm ./* -f
else
   mkdir temppp
   cd ./temppp
fi
cp ../$2 ./
vina_split --input $2
rm ./$2
for file in $( ls );
do
   echo $file
   pdbqt_to_pdb.py -f $file -o $file'.pdb'
   echo  $file
       rm $file


done

#modify the name to short

rename .pdbqt.out_ligand "" ./*
rename .pdbqt "" ./*
let count=1
for file in $( ls );
do
   echo -e "MODEL $count\n" >>$2
   cat $file >>$2
   echo -e "ENDMDL\n" >>$2
   rm $file
   let count+=1
done
let count-=1
echo $count
rename .pdbqt.out.pdbqt _out_$count.pdb ./$2
cp ./* ../
cd ..
rm -f temppp -r
===========================================================
把这个脚本放到path中,实现和pdbqt_to_pdb.py同样的地位


####

pdb的库中必须要有MODEL ENDMDL的标签,

chimera这个软件不识别pdb文件中*,*不能代替一般字母

如果这个脚本不能用,先测试vina_split这个命令能不能使用。




https://wap.sciencenet.cn/blog-950202-731524.html

上一篇:在linux随时随地使用MGL当中的脚本
下一篇:pdb文件的分割脚本splitpdbs.pl
收藏 IP: 202.127.19.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-3-29 03:28

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部