mol2sph

来自「最经典的分子对结软件」· 代码 · 共 76 行

TXT
76
字号
#!/usr/bin/nawk -f{# assign initial variable values# determine the number of atoms in mol2 fileif ($1 == "@<TRIPOS>MOLECULE")    {    print "DOCK 3.5 receptor_spheres";   print "hydrophobe";   print "acceptor";   print "donor";   check = 1;   next;   } # keep skipping until number of centres variable located - two lines# after @<TRIPOS>MOLECULEif (check < 2)   {   if (check == 1)      {      check = 2;      next;      }   else       {      next;      }   }#print header cluster info into sphere file using number of centres dataif (check < 3)   {   print "cluster     1   number of centres in file  =   " $1;    check = 3;   next;   }# determine start position of atom dataif (check < 4)    if ($1 == "@<TRIPOS>ATOM")   {      check = 4;      next;   }    else   {       next;   } # for each atom, determine criticality based on charge variable ($9),# critical number = truncated value of charge. color defined by the atom# type - termineat when substructure data reached if ($1 == "@<TRIPOS>SUBSTRUCTURE")   {   exit;   }else   {   if ($6 == "S.3") {color = 1}   else if ($6 == "O.3") {color = 2}   else if ($6 == "N.3") {color = 3};   printf("%5d%10.3f%10.3f%10.3f%13s%2d%3d\n",$1,$3,$4,$5,nullstring, \   $9,color)    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?