生物分子模拟论坛

 找回密码
 我想注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 14384|回复: 12

[AutoDock&Vina] vina 虚拟筛选log文件的分析的脚本

[复制链接]
发表于 2013-8-29 14:18:40 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,下载更多分子模拟资源。

您需要 登录 才可以下载或查看,没有帐号?我想注册

x
由于附件中不能上传pl文件,你把后缀的doc去掉。
脚本中已经包含了使用方法,vina筛选不明白的地方可以联系我。


[code=Perl width=600px]#!/usr/bin/perl -w
use strict;
print "author: chenzhaoqiang;qq 744891290\n\n";
# 0 1 2 3

if(@ARGV<4)
{
print "usage: perl anly_log.pl -dir e:/log/ -output e:/result.txt
in the dir of log to save xxx.log
function: to anlyse the vina result : extract the best vina docking score
the result format is:
ligandname score
to deal with the log may have three case :
1 empty (in ./test/cmc_3d_9927.pdbqt.log);
2 no docking score(cmc_3d_2277.pdbqt.log);
3 success docking(cmc_3d_1394.pdbqt.log)\n";

#print $ARGV[0]," -dir", $ARGV[1],"e:/log/";
}
opendir(DR,$ARGV[1])|| die "can find the dir of log";
my @files=readdir(DR);

if(@files<=2)
{
print "errir :this log dir is empty\n";
}

=pod
#to debug
print $#files,"\n";
print $files[0],$files[1],$files[2],"\n";
=cut
=pod
shift @files;
shift @files;

print $#files,"\n";
print $files[0];
=cut


###########################################
#put energy to hash table

my %hash;
shift @files;
shift @files;
foreach my $file(@files)
{
my $filepath=$ARGV[1].$file;
open FH,$filepath or die "in the log dir can't find the file $file";
my @text=<FH>;
close(FH);

if(@text>=28)
{
#print $text[14]," ",$text[27],"\n";
if($text[14]=~/will\s+be\s+(\S+)/)
{
my $ligandname=$1;
if($text[27]=~/^\s+\d+\s+(\S+)/)
{
$hash{$ligandname}=$1;
}


}
else
{
print "error: the log file is not standard!!!\n";
}

}
}


###################################################
#sort by the energy
if(@ARGV==4)
{


open FF,">$ARGV[3]";


foreach my $key(sort {$hash{$a}<=>$hash{$b}} keys %hash)
{
print FF "$key $hash{$key}\n";
}
print "congratulation!!! successs^^\n";
}
else
{
print "error ,in the command you should follow the format
usage: perl anly_log.pl -dir e:/log/ -output e:/result.txt\n";
} [/code]


      

anly_log.pl.doc

2.09 KB, 下载次数: 106

发表于 2017-5-9 12:52:52 | 显示全部楼层
大神,我用上面的脚本试了,一直出现 ”error: the log file is not standard!!! ”。不知道是哪里出问题了,请求帮忙分析下。

我用的是autodock_vina_1_1_2_win32.msi,所生成的log文件 中总共是34行,一般有9个pose。log文件示例如下:


“”“”
#################################################################
# If you used AutoDock Vina in your work, please cite:          #
#                                                               #
# O. Trott, A. J. Olson,                                        #
# AutoDock Vina: improving the speed and accuracy of docking    #
# with a new scoring function, efficient optimization and       #
# multithreading, Journal of Computational Chemistry 31 (2010)  #
# 455-461                                                       #
#                                                               #
# DOI 10.1002/jcc.21334                                         #
#                                                               #
# Please see http://vina.scripps.edu for more information.      #
#################################################################

Reading input ... done.
Setting up the scoring function ... done.
Analyzing the binding site ... done.
Using random seed: 493456392
Performing search ... done.
Refining results ... done.

mode |   affinity | dist from best mode
     | (kcal/mol) | rmsd l.b.| rmsd u.b.
-----+------------+----------+----------
   1         -7.2      0.000      0.000
   2         -7.1      1.044      1.769
   3         -7.0      2.642      5.304
   4         -6.7      1.898      4.831
   5         -6.6      1.568      2.499
   6         -6.5      3.472      7.128
   7         -6.5      3.442      5.705
   8         -6.3      3.435      5.350
   9         -6.3      3.827      5.811
Writing output ... done.
“”“”“”
 楼主| 发表于 2016-5-30 12:58:58 | 显示全部楼层
xufund 发表于 2016-4-27 22:06
谢谢分享。请问如何判断对接结果好还是不好的标准是什么?也就是说结合能一般大于多少算好?除了看结合能外 ...

找个阳性化合物做个对照。一般-10;结合模式
发表于 2016-5-30 22:09:48 | 显示全部楼层
数据挖掘 发表于 2016-5-30 12:58
找个阳性化合物做个对照。一般-10;结合模式

谢谢回答。能具体说一下您编写的脚本怎么使用吗?linux新手,啥也不懂
发表于 2013-8-30 14:56:41 | 显示全部楼层
做个记号,学习一下
发表于 2014-5-3 12:31:54 | 显示全部楼层
不错 学习一下 谢谢分享
发表于 2014-12-4 22:44:53 | 显示全部楼层
非常感谢,学习一下
发表于 2016-4-27 22:06:53 | 显示全部楼层
谢谢分享。请问如何判断对接结果好还是不好的标准是什么?也就是说结合能一般大于多少算好?除了看结合能外,还要看哪些指标?阈值说多少
 楼主| 发表于 2016-6-8 12:45:50 | 显示全部楼层
xufund 发表于 2016-5-30 22:09
谢谢回答。能具体说一下您编写的脚本怎么使用吗?linux新手,啥也不懂

从log文件中提取打分的
发表于 2017-5-14 21:41:24 | 显示全部楼层
本帖最后由 phenylazide 于 2017-5-14 22:12 编辑

linux 下面,用grep命令一下就出来了.
您需要登录后才可以回帖 登录 | 我想注册

本版积分规则

QQ|分迪科技|小黑屋|手机版|Archiver|生物分子模拟论坛 ( 蜀ICP备14009200号-3 )

GMT+8, 2024-4-27 13:10 , Processed in 0.200135 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表