|||
背景:
vina结果构想文件是多个pdbqt,之前把它转成pdb格式的时候没有进行分隔,
而之前的统计氢键信息的脚本不能处理 多状态的pdb文件
所以写了一个分割pdb脚本
==============================================================
#!/usr/bin/perl -w
use strict;
#author: chen zhaoqiang
#usage: perl splitpdbs.pl -f xxx.pdb
#contact: 744891290@qq.com
#the remark must be {MODEL id} AND ENDMDL
if(@ARGV<2)
{
print "#usage: perl splitpdbs.pl -f xxx.pdb";
print "notice: #the remark must be {MODEL id} AND ENDMDLn";
#$ARGV[1]="ar3_9.pdb";
exit 0;
}
open FH,$ARGV[1];
my $basename=$ARGV[1];
$basename=~s/\.pdb//;
while(<FH>)
{
if($_=~/MODEL\s+(\d+)/)
{
my $newfile=$basename.'_'.$1.'.pdb';
open FF,">$newfile";
}
print FF $_ ;
}
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-28 02:41
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社