Pthon batch processing generates dssp files from pdb files,
#-*-Coding: UTF-8-*-"Created on Sat Jun 20 19:36:34 2015 @ author: chaofn "import OS" The purpose of this program is to put all the files in the/ifs/home/fanchao/Manesh_pdb directory in linux (a total of 215 files) batch Processing generates the pdb file into the dssp file "" # listdir returns the list of file names fileLine = OS. listdir ('/ifs/home/fanchao/manesh_pdb') # traverse the entire list for I in range (len (fileLine)-1 ): # use a variable to indicate input_file = '/ifs/home/fanchao/Manesh_pdb/' + fileLine [I] # Remove the suffix of the file name first, the file name out_file = fileLine [I] With the suffix dssp is formed. split ('. ') [0] + '. dssp 'output_file = '/ifs/home/fanchao/Manesh_dssp/' + out_file # Note: parameter transfer (first % s, then % variable name ), the input of multiple variables must be represented by tuples and % OS before tuples. system ('/ifs/share/lib/dssp/dssp2-I % s-o % s' % (input_file, output_file ))