# ============================================================================ # # This script reads in the following input parameters: # a. The atomic structure of a component (PDB format) fitted in a cryo-EM map # and its length # b. The cryo-EM density map (includeing origin, format, size) # c. The name of the directory that contains all "fits" # d. The list containing the names of all "fits" # and calculate the energy of each fit (CCF, stereo-chemical # and non-bonded interactions terms). # # ======================= Maya Topf, 19 Dec 2008 ============================ from modeller import * import shutil import sys, os, os.path import string import math from score import energy env = environ() ############### INPUT PARAMETERS ################## path = './' # directory path em_map_file = 'map.mrc' # name of EM density map (mrc) format='MRC' # map format: MRC or XPLOR apix=1.0 # voxel size: A/pixel box_size=86 # size of the density map (cubic) resolution=10.0 # resolution x=-31.00; y=-36.0; z=-11.00 # origin of the map results_dir = 'final/' # a directory for the PDB files of all fits code = 'mdl1' # 4 letter code of the structure list_pdb_file = 'list_pdbs.txt' # a file containing the names the above files ############### RUN OPTIMIZATION ################## list_pdbs = [] in_file = open(list_pdb_file ,'U') num=0 while True: in_line = in_file.readline() if len(in_line) == 0: break in_line = in_line[:-1] list_pdbs.append(in_line) print list_pdbs # calculate score for each model: i=0 for input_pdb_file in list_pdbs: if input_pdb_file == "": break file_name = results_dir + input_pdb_file i+=1 energy(path, code, str(i), 9*i, em_map_file, file_name, format, apix, box_size, resolution, x, y, z)