pdb2syb
来自「最经典的分子对结软件」· 代码 · 共 92 行
TXT
92 行
#!/bin/sh# this script simplifies the interface to E.Meng's idtosyb program,# designed to make better approximations to connectivity and atom# typing than SYBYL, which does an atrocious job#idtosyb_dir=/usr/dock/source/database/idtosybidtosyb_exe=/usr/dock/bin/idtosybcurdir=`pwd`# check for valid invocationif [ $# -ne 1 ]; then echo "Need 1 argument. Usage: `basename $0` <pdb_filename>" exit 1fi# check for valid fileif [ ! -f $1 ]; then echo "Error! $1 does not exist." exit 1fi# check for existence of idtosyb directoryif [ ! -d $idtosyb_dir ]; then echo Error! idtosyb directory $idtosyb_dir not found. echo Please update the variable idtosyb_dir in `basename $0` to point echo to the proper location. exit 1fi# check for existence of idtosyb executableif [ ! -x $idtosyb_exe ]; then echo Error! idtosyb executable $idtosyb_exe not found. echo Please update the variable idtosyb_exe in `basename $0` to point echo to the proper location. exit 1fi# check for existence of conversion toolstools="attyps params"for tool in $toolsdo if [ ! -f $idtosyb_dir/$tool ]; then echo Error! $tool not found in $idtosyb_dir. echo Please put a copy in this directory. exit 1 fidonepdbin=$1sybout=`echo $pdbin | nawk '{p=index($1,".pdb"); if (p != 0) {print substr($1,1,p-1)} else {print}}'`.mol2if [ -f $sybout ]; then echo Desired output file exists. Overwrite? read ans case $ans in [yY]*) ;; *) echo Aborting... exit ;; esacfi# acquire parameter filesif [ "$curdir" != "$idtosyb_dir" ]; then /bin/cp $idtosyb_dir/params . /bin/cp $idtosyb_dir/attyps .fi# set up linksln -fs $pdbin pdbfil > /dev/null 2>&1if [ -f sybfil ]; then /bin/rm sybfil; fi# run the program$idtosyb_exe# remove files and clean upif [ "$curdir" != "$idtosyb_dir" ]; then /bin/rm params /bin/rm attypsfi/bin/rm pdbfil > /dev/null 2>&1/bin/mv sybfil $syboutecho "SYBYL mol2 file $sybout created."
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?