Background Workflow |
Py################# # JOB VARIABLES # ################# start_expt = 1 end_expt = 27 substitution = 'C' par_dir = '/mindstore/home33ext/kscopino/5JUP_PROTOCOL/PIGGYBACKING/COD1_' + substitution + '2_1S_50PS/' data_dir = 'COD1_' + substitution + '2_' ############### # WRITE FILES # ############### # file to submit to scheduler outfile = open('run_cpptraj_1c_rms.sh','w') outfile.write('#!/bin/bash\n' +\ '#BSUB -e err_rms\n' +\ '#BSUB -o out_rms\n' +\ '#BSUB -q exx96\n' +\ '#BSUB -J "rms_CPU"\n' +\ '#BSUB -n 1\n\n' +\ '# env\n' +\ 'export PATH=/home/apps/CENTOS7/amber/amber18/bin:$PATH\n' +\ 'export LD_LIBRARY_PATH=/home/apps/CENTOS7/amber/amber18/lib:/home/apps/CENTOS7/amber/amber18/lib64:$LD_LIBRARY_PATH\n' +\ 'export PATH=/share/apps/openmpi/1.4.4+intel-12/bin:$PATH\n' +\ 'export LD_LIBRARY_PATH=/share/apps/openmpi/1.4.4+intel-12/lib:$LD_LIBRARY_PATH\n\n' +\ '# call cpptraj in Amber18\n' +\ 'for i in {' + str(start_expt) + '..' + str(end_expt) + '}; do\n' +\ ' cd ' + par_dir + data_dir + '$i/DATA\n' +\ ' cpptraj -i cpptraj_1c_rms.in\n' +\ 'done\n\n') outfile.close() # experimental files for i in range(start_expt,end_expt + 1): outfile = open(par_dir + data_dir + str(i) + '/DATA/cpptraj_1c_rms.in', 'w') outfile.write('# This script is to check the stability of an experimental run using RMSD to determine the length of equilibration dynamics\n' +\ '# prmtop file\n' +\ 'parm ' + par_dir + '5JUP_GC_179' + substitution + '_nowat.prmtop [modi3]\n\n' +\ '# reference for RMSD (should be the average structure for the entire trajectory)\n' +\ 'trajin ' + par_dir + data_dir + str(i) + '/DATA/avg_struct.rst\n\n' +\ '# experimental neutral dynamics trajectory\n' +\ 'trajin ' + par_dir + data_dir + str(i) + '/mdcrd_nd_' + str(i) + '_strip parm [modi3]\n\n' +\ '# RMSD of unrestrained backbone atoms\n' +\ 'rms unrestr_resid first :6-10,18-21,34,36-38,42-72,96-97,102-107,113-115,127-129,133-138,147-152,163-164,166-170,172-183,188-203,216-226,243-251,266-268,313-329,344-349,361-371,378,445-450,480-493@N,CA,C,O,P,O5\',O3\',C5\' out rmsd_' + str(i) + '_NOTrestr_bkbone.dat\n' +\ '# RMSD of restrained backbone atoms\n' +\ 'rms restr_resid first :1-5,11-17,22-33,35,39-41,73-95,98-101,108-112,116-126,130-132,139-146,153-162,165,171,184-187,204-215,227-242,252-265,269-312,330-343,350-360,372-377,379-444,451-479,494-495@N,CA,C,O,P,O5\',O3\',C5\' out rmsd_' + str(i) + '_restr_bkbone.dat\n' +\ '# RMSD of mRNA (A-site codon, +1 codon), tRNA anticodon, and CAR\n' +\ 'rms unrestr_resid_local first :105,114,167-169,175-180,368@N,CA,C,O,P,O5\',O3\',C5\' out rmsd_' + str(i) + '_local_bkbone.dat\n\n') outfile.close() |