Spaces:
Build error
Build error
| import os | |
| import pdb | |
| import sys | |
| def search_file(textcontent): | |
| filelist=[] | |
| #pdb输入文件位置 | |
| pdbfile="/home/bio/workshop/zhang/input/input_pdb/{}/{}.pdb".format(textcontent,textcontent) | |
| filelist.append(pdbfile) | |
| #cst输出文件位置 | |
| # cstnum 是编号 存储如配体0号,1号的外部文件夹 | |
| outpath="/home/bio/workshop/zhang/output/" | |
| cstnum=os.listdir(outpath+"out_cst/{}/{}.pdb".format(textcontent,textcontent)) | |
| for i in cstnum: | |
| cstfile=outpath+"out_cst/{}/{}.pdb".format(textcontent,textcontent)+"/"+i+"/"+"binding_site.cst" | |
| #os.rename(cstfile,outpath+"out_cst/{}/{}.pdb/{}/binding_site_{}.cst".format(textcontent,textcontent,i,i))#输出文件重命名 cstfile改名啦 | |
| #cstfile=outpath+"out_cst/{}/{}.pdb/{}/binding_site_{}.cst".format(textcontent,textcontent,i,i) | |
| filelist.append(cstfile) | |
| return filelist | |