('Rec','Lig','dG(kT)','solv','coul','ions','dG(kcal/mol)\n') s = '%(rec)4s : %(lig)4s %(dG_kt)7.2f %(solv)7.2f %(coul)7.2f %(ions)7.2f %(dG_kcal)7.2f\n' d = copy.copy(com['dG_delphi']) d.update({'rec': com.rec_model.pdbCode, 'lig': com.lig_model.pdbCode}) r = t r += s % d return r ### MAIN ### ############ options = T.cmdDict({'ocom': 'delphi.complex', 'o': 'dg_delphi.out'}) try: f_out = T.absfile(options['o']) f_ocom = T.absfile(options['ocom']) options['autocap'] = 'autocap' in options options['debug'] = 'debug' in options options['verbose'] = 'v' in options if 'nice' in options: options['nice'] = int(options['nice']) for key in [ 'indi', 'exdi', 'salt', 'ionrad', 'prbrad', 'bndcon', 'scale', 'perfil'
p.add( points[i] ) ## Legend curves.reverse() p.add( B.PlotKey( .70, .85, curves ) ) return p ############### ## MAIN ############### if __name__ == '__main__': options = T.cmdDict( defOptions() ) if not 'i' in options: _use() ## Load result tree and dict with protocols dat = T.load( options['i'] ) title = 't' in options p = dat['protocols'] r = Reporter( dat, p ) if 'eps' in options: p = r.plot_ens( ['dS', 'dS_sep', 'dS_rigid', 'dS_cross',
Options: -o .. one or several project folders (default: current) -? or -help .. this help screen Default options: """ for key, value in o.items(): print "\t-",key, "\t",value sys.exit(0) if __name__ == '__main__': options = T.cmdDict({'o':[ os.getcwd() ]}) if '?' in options or 'help' in options: _use( options ) folders = T.toList( options['o'] ) if not os.path.exists( folders[0] +'/templates'): print 'Current directory is not a valid modeling folder.' _use( options ) T.flushPrint( "Creating folders and links...\n" ) for f in folders: sv = VS(outFolder=f) sv.go(f)
""" identify options that have to be passed on to blastall """ result = {} def_keys = defaultOptions().keys() + ['psi'] for k, v in options.items(): if not k in def_keys: result[ k ] = v return result ### MAIN ### options = tools.cmdDict( defaultOptions() ) outFolder = tools.absfile( options['o'] ) f_target = tools.absfile( options['q'] ) f_target = f_target or outFolder + SequenceSearcher.F_FASTA_TARGET if not (f_target and os.path.exists( f_target ) ): _use( defaultOptions() ) if '?' in options or 'help' in options: _use( defaultOptions() ) seq_db = options['db'] e = float( options['e'] ) aln = int( options['aln']) clustLim = int( options['limit']) simCut = float( options['simcut'] )
if len(todo) > 0: msg = "\n%i out of %i complexes are to be updated\n\n" t.flushPrint(msg % (len(todo), len(cl))) return cl else: t.flushPrint("\nList contains no data that can be updated\n") ########################### # MAIN ########################### if len(sys.argv) < 3: _use() options = t.cmdDict(defaultOptions()) ## ## current keys used for scoring ## scoreKeys = ['eProsa', 'ePairScore', 'foldX', 'cons_ent', 'cons_max'] ## load docking solutions t.flushPrint("\nLoading complex list %s ... " % t.absfile(options['i'])) complex_lst = t.load(options['i']) t.flushPrint("done\n") ## validate and expand list of keys to be calculated force = [] if options.has_key('f'): raw_force = t.toList(options['f']) ## check that the key is valid
Options: -d [str], list of project directory -s show the structure final.pdb im PyMol """ for key, value in o.items(): print "\t-",key, "\t",value sys.exit(0) if __name__ == '__main__': options = T.cmdDict() f = os.getcwd() if '?' in options or 'help' in options: _use( options ) if not os.path.exists(f + VS.F_RESULT_FOLDER) and not options.has_key('d'): print 'Current directory is not a valid modeling project folder.' _use( options ) ## Try to add project folders ## look for default cross-validation projects d = [] if os.path.exists( f + VS.F_RESULT_FOLDER ): d = [ f ]
-r receptor chain list (e.g. 0 1 ) -l ligand ~ (e.g. 2 ) -o output file -lo,lr ligand, receptor model output file Default options: """ for key, value in options.items(): print "\t-",key, "\t",value sys.exit(0) ### MAIN ### ############ options = T.cmdDict( {'o':'ref.complex', 'lo':'lig.model', 'ro':'rec.model' } ) if len (sys.argv) < 3: _use( options ) ## create a reference complex print "Loading..." ref_com = PDBModel( options['c'] ) print "Removing water..." ref_com.remove( lambda a: a['residue_name'] in ['TIP3','HOH','WAT'] ) ## extract rec and lig chains rec_chains = T.toIntList( options['r'] ) lig_chains = T.toIntList( options['l'] ) print "Extracting rec and lig..."
if len( sys.argv ) < 2: print \ """ Restart a distributed calculation. Syntax: restartPVM.py -i |rst_file| [-a] Options: i .. restart file containing result of TrackingJobMaster.getRst() a .. add hosts to PVM """ sys.exit(0) ## MAIN ## use() cmd = T.cmdDict() T.flushPrint('Loading restart data...') rst = T.load( cmd['i'] ) hosts = [] if 'a' in cmd: hosts = [ h['host'] for h in rst['hosts'] ] master = restart( rst, hosts=hosts ) T.flushPrint('Master initialized for restart.') master.start()
o['o'] = 'entropy_result.dic' ## uncomment for testing ## o['step'] = 2 ## o['start']= 100 ## o['stop'] = 400 ## o['ref'] = '~/interfaces/c15/com_wet/ref.complex' ## o['i'] = '~/interfaces/c15/rec_pcr_00/traj.dat+\ ## ~/interfaces/c15/lig_pcr_00/traj.dat' return o ########## ## MAIN ## options = t.cmdDict( defOptions() ) if not ('i' in options ): _use() ## convert command line parameters for k in ['s','e','ss', 'se', 'step','fit_s', 'fit_e', 'nice','thin', 'ex_n', 'ex3', 'shift', 'border']: if k in options: options[k] = int( options[k] ) for k in ['debug', 'verbose', 'cast', 'split', 'shuffle', 'shift', 'heavy', 'solvent', 'protein']: if k in options: options[k] = 1 else:
## have too remove objects backvards not to change indexes r.reverse() for j in r: d.remove(j) if len(d)==0: print 'Nothing to model. Exiting.' sys.exit(0) return d if __name__ == '__main__': ## look for default cross-validation projects options = T.cmdDict({'h':10, 'd':[], 'zfilter':TF.Z_CUTOFF,'idfilter':TF.ID_CUTOFF}) d=options['d'] or collect_project_folders( ) if (options['d'] is None) or ('help' in options or '?' in options): _use( options ) folders = T.toList(options['d']) hostNumber = int(options['h']) fastaTarget = options.get('fta', None) f_pir = options.get('pir', None) template_folder = options.get('tf', None) starting_model = int(options.get('sm', 1)) ending_model = int(options.get('em', 10)) ferror = options.get('fe', None) windows = "w" in options
EnsembleTraj.py for details). traj2ensemble.py -i |in_traj| -n |n_members| -o |out_traj| -pdb |PDBCode| ] o - out file name (default: replace input file) n - number of ensemble members to expect (default: 10) pdb - PDB code to be stored in trajectory """ sys.exit(0) ########## ## MAIN ## use() o = T.cmdDict( {'n':10} ) f_in = T.absfile( o['i'] ) f_out = T.absfile( o.get('o', f_in) ) n = int( o['n'] ) T.flushPrint("Loading...") t = T.load( f_in ) T.flushPrint("Converting %i frames..." % len(t) ) if isinstance(t, EnsembleTraj ): T.flushPrint( "Nothing to be done!\n") sys.exit(0) t = traj2ensemble( t, n )
addFrameNames( t, trajIndex ) e = end or len( t ) if start or end or (step != 1): t = t.takeFrames( range( start, e, step ) ) return t ############ ### MAIN ### use() o = T.cmdDict( {'o':'traj_ensemble.dat'} ) out = T.absfile( o['o'] ) inLst = T.toList( o['i'] ) start = int( o.get('s','0') ) end = o.get( 'e', None ) if end: end = int( end ) step = int( o.get('step',1) ) ref = o.get('ref',None) if ref: ref = PDBModel( T.absfile( ref ) ) if 'prot' in o: ref = ref.compress( ref.maskProtein() )
if len( todo ) > 0: msg = "\n%i out of %i complexes are to be updated\n\n" t.flushPrint( msg%(len(todo), len(cl) ) ) return cl else: t.flushPrint( "\nList contains no data that can be updated\n" ) ########################### # MAIN ########################### if len(sys.argv) < 3: _use() options = t.cmdDict( defaultOptions() ) ## ## current keys used for scoring ## scoreKeys = ['eProsa', 'ePairScore', 'foldX', 'cons_ent', 'cons_max'] ## load docking solutions t.flushPrint( "\nLoading complex list %s ... " % t.absfile( options['i'] ) ) complex_lst = t.load( options['i'] ) t.flushPrint( "done\n" ) ## validate and expand list of keys to be calculated force = [] if options.has_key('f'): raw_force = t.toList( options['f'] ) ## check that the key is valid
they must have, at least, all the atoms that are in the reference. Default options: """ for key, value in options.items(): print "\t-",key, "\t",value sys.exit(0) ### MAIN ### ############ if len (sys.argv) < 3: _use( {'o':'traj.dat'} ) options = tools.cmdDict( {'o':'traj.dat'} ) ## get all PDBs and models directly from a directory (avoids shell limits) if 'd' in options: d = tools.absfile( options['d'] ) l = os.listdir( d ) l = [ x for x in l if x[-4:].upper() == '.PDB' or x[-6:] == '.MODEL' \ or x[-7:].upper() == '.PDB.GZ' ] l = [ os.path.join( d, f ) for f in l ] options['i'] = l if 'e' in options: t_class = EnsembleTraj else: t_class = Trajectory
Options: -o .. one or several project folders (default: current) -? or -help .. this help screen Default options: """ for key, value in o.items(): print "\t-", key, "\t", value sys.exit(0) if __name__ == '__main__': options = T.cmdDict({'o': [os.getcwd()]}) if '?' in options or 'help' in options: _use(options) folders = T.toList(options['o']) if not os.path.exists(folders[0] + '/templates'): print 'Current directory is not a valid modeling folder.' _use(options) T.flushPrint("Creating folders and links...\n") for f in folders: sv = VS(outFolder=f) sv.go(f)
for j in r: d.remove(j) if len(d) == 0: print 'Nothing to model. Exiting.' sys.exit(0) return d if __name__ == '__main__': ## look for default cross-validation projects options = T.cmdDict({ 'h': 10, 'd': [], 'zfilter': TF.Z_CUTOFF, 'idfilter': TF.ID_CUTOFF }) d = options['d'] or collect_project_folders() if (options['d'] is None) or ('help' in options or '?' in options): _use(options) folders = T.toList(options['d']) hostNumber = int(options['h']) fastaTarget = options.get('fta', None) f_pir = options.get('pir', None) template_folder = options.get('tf', None) starting_model = int(options.get('sm', 1)) ending_model = int(options.get('em', 10)) ferror = options.get('fe', None)
options = {} options['q'] = tools.testRoot() + '/Mod/project/target.fasta' options['o'] = tools.testRoot() + '/Mod/project' options['log'] = '1' options['view'] = '1' return options ########################### # MAIN ########################### if len(sys.argv) < 3: _use() options = tools.cmdDict(options) #options = testOptions() outFolder = tools.absfile(options['o']) f_target = tools.absfile(options['q']) f_target = f_target or outFolder + SequenceSearcher.F_FASTA_TARGET log = None if 'log' in options: log = LogFile(outFolder + '/modelling.log') ## databases used seq_db = 'swissprot' tmp_db = 'pdbaa' ###############
+ [ c.rec_model ] if c.lig_model not in known_ligs: stray_ligs[ c['model2']] = stray_ligs.get( c['model2'], []) \ + [ c.lig_model ] return stray_recs, stray_ligs ############## ## MAIN ############## if __name__ == '__main__': options = T.cmdDict({ 'o': 'complexes_pooled.cl', 'mo': 'changed_models', 'ldic': 'pcr_lig/models.dic', 'rdic': 'pcr_rec/models.dic' }) if len(sys.argv) < 2: syntax() fs = [T.absfile(f) for f in T.toList(options['i'])] result = ComplexList() rec_dic = T.load(T.absfile(options['rdic'])) lig_dic = T.load(T.absfile(options['ldic'])) for f in fs:
stray_recs[ c['model1']] = stray_recs.get( c['model1'], []) \ + [ c.rec_model ] if c.lig_model not in known_ligs: stray_ligs[ c['model2']] = stray_ligs.get( c['model2'], []) \ + [ c.lig_model ] return stray_recs, stray_ligs ############## ## MAIN ############## if __name__ == '__main__': options = T.cmdDict( {'o':'complexes_pooled.cl', 'mo':'changed_models', 'ldic':'pcr_lig/models.dic', 'rdic':'pcr_rec/models.dic'} ) if len( sys.argv ) < 2: syntax() fs = [ T.absfile( f ) for f in T.toList( options['i'] ) ] result = ComplexList() rec_dic = T.load( T.absfile( options['rdic'] ) ) lig_dic = T.load( T.absfile( options['ldic'] ) ) for f in fs: T.flushPrint('Loading %s ...' % f )
return l, replaced def replace_import_statement(l, module, importas): if importas == module: importas = '' else: importas = ' as ' + importas return l.replace('from ' + module + ' import *', 'import ' + module + importas) options = t.cmdDict({'m': 'Numeric', 'as': 'N', 'e': ['Complex']}) module = options['m'] importas = options.get('as', module) srcfiles = t.toList(options.get('i', None)) exclude = t.toList(options['e']) try: exec('import ' + module) for fname in srcfiles: fname = t.absfile(fname)
for j in r: d.remove(j) if len(d) == 0: print 'Nothing to align. Exiting.' sys.exit(0) return d if __name__ == '__main__': ## look for default cross-validation projects d = [] options = T.cmdDict({'h': 10, 'd': d}) d = options['d'] or collect_project_folders() if (options['d'] is None) or ('help' in options or '?' in options): _use(options) folders = T.toList(options['d']) hostNumber = int(options['h']) pdbFolder = options.get('pdb', None) fastaTemplates = options.get('ft', None) fastaSequences = options.get('fs', None) fastaTarget = options.get('fta', None) ferror = options.get('fe', None) show_output = 'w' in options
-amber rename CYX -> CYS, HID/HIE/HIP -> HIS, unwrap atom names (this creates models with the same atom/res names as pdbs created with ambpdb -p top.parm -aatm -bres < some.crd > some.pdb ) -s sort atoms alphabetically within residues Default options: """ for key, value in o.items(): print "\t-",key, "\t",value sys.exit(0) if __name__ == '__main__': options = T.cmdDict( {'h':10, 'c':5 } ) if len( sys.argv ) < 2: _use( options ) hostNumber = int( options['h'] ) chunk = int( options['c'] ) windows = options.has_key('w') amber = options.has_key('amber') sort = options.has_key('s') outFolder = None if options.has_key('o'): outFolder = T.absfile( options['o'] ) ## get all PDBs and models directly from a directory (avoids shell limits)
return result def test(): options = defOptions() options['i'] = '/home/Bis/raik/data/tb/interfaces/c11/lig_pcr_00/traj.dat' options['step'] = '3' options['s'] = '0' options['o'] = '~johan/dock/scripts' options['ref'] = '' return options if __name__ == '__main__': if len(sys.argv) < 2: _use() ## options = test() options = T.cmdDict(defOptions()) tc = load(options) r = cluster(tc, options) ## r=rmsdLimitedClustering( tc, options ) if options.has_key('co'): T.dump(tc, options['co']) report(tc)
-d [str], list of project validation directories -modlist str, the path to the 'PDBModels.list' from the project directory -ref str, the path to the 'reference.pdb' from the project directory (known structure) """ for key, value in o.items(): print "\t-", key, "\t", value sys.exit(0) if __name__ == '__main__': options = T.cmdDict() f = os.getcwd() if '?' in options or 'help' in options or 'h' in options: _use(options) if not os.path.exists(f + B.F_INPUT_FOLDER) and not options.has_key('d'): print 'Current directory is not a valid modeling project folder.' _use(options) ## Try to add project folders ## look for default cross-validation projects d = [] if os.path.exists(f + VS.F_RESULT_FOLDER): d = glob.glob(f + VS.F_RESULT_FOLDER + '/*')
options = {} options['q'] = tools.testRoot()+ '/Mod/project/target.fasta' options['o'] = tools.testRoot()+ '/Mod/project' options['log'] = '1' options['view'] = '1' return options ########################### # MAIN ########################### if len(sys.argv) < 3: _use() options = tools.cmdDict( options ) #options = testOptions() outFolder = tools.absfile( options['o'] ) f_target = tools.absfile( options['q'] ) f_target = f_target or outFolder + SequenceSearcher.F_FASTA_TARGET log = None if 'log' in options: log = LogFile( outFolder + '/modelling.log' ) ## databases used seq_db = 'swissprot' tmp_db = 'pdbaa'
- Ends of chains are assumed if the residue numbering jumps backward, if there is a TER record or chain ID or segid change, or if there is a chain break. - A chain break is assumed if there is an untypical gap in the chain of back- bone atoms (see PDBModel.chainBreaks() ). - The index of the first chain is 0. - Original waters are deleted. - As usual, options can also be put into a file and loaded with the -x option Default options: """ for key, value in options.items(): print "\t-",key, "\t",value #sys.exit(0) options = t.cmdDict( {'o':'out.parm'} ) try: f_out = options['o'] if 'ocrd' in options: options['f_out_crd'] = options['ocrd'] if 'opdb' in options: options['f_out_pdb'] = options['opdb'] if 'box' in options: options['box'] = float( options['box'] ) options['cap'] = 'cap' in options options['capN']= t.toIntList( options.get('capN',[])) options['capC']= t.toIntList( options.get('capC',[]))
traj2ensemble.py -i |in_traj| -n |n_members| -o |out_traj| -pdb |PDBCode| ] o - out file name (default: replace input file) n - number of ensemble members to expect (default: 10) pdb - PDB code to be stored in trajectory """ sys.exit(0) ########## ## MAIN ## use() o = T.cmdDict({'n': 10}) f_in = T.absfile(o['i']) f_out = T.absfile(o.get('o', f_in)) n = int(o['n']) T.flushPrint("Loading...") t = T.load(f_in) T.flushPrint("Converting %i frames..." % len(t)) if isinstance(t, EnsembleTraj): T.flushPrint("Nothing to be done!\n") sys.exit(0) t = traj2ensemble(t, n)
return MS, AS, MS_sd, AS_sd ########################### # MAIN ########################### default = {'i':'1gxg_input.pdb', 'r':'~/GLY_pep/', 'l':'', 'mask':[0,1,0]} if len (sys.argv) < 2: _use( default ) options = T.cmdDict( default ) ## where to run the calculation base_folder = T.absfile( options['r'] )+'/' ## template gly-xxx-gly template = os.path.abspath( options['i'] ) ## label the result dictionaty files label = '_' + options['l'] ## mask to used to delete glycines mask = [ int(i) for i in T.toList( options['mask'] )] ## create random prptides from template #randomPeptides( template, base_folder )
t = '%4s : %4s %7s %7s %7s %7s %7s' %\ ('Rec','Lig','dG(kT)','solv','coul','ions','dG(kcal/mol)\n') s = '%(rec)4s : %(lig)4s %(dG_kt)7.2f %(solv)7.2f %(coul)7.2f %(ions)7.2f %(dG_kcal)7.2f\n' d = copy.copy(com['dG_delphi']) d.update( {'rec':com.rec_model.pdbCode, 'lig':com.lig_model.pdbCode} ) r = t r += s % d return r ### MAIN ### ############ options = T.cmdDict( {'ocom':'delphi.complex', 'o':'dg_delphi.out' } ) try: f_out = T.absfile( options['o'] ) f_ocom = T.absfile( options['ocom'] ) options['autocap'] = 'autocap' in options options['debug'] = 'debug' in options options['verbose'] = 'v' in options if 'nice' in options: options['nice'] = int( options['nice'] ) for key in ['indi', 'exdi', 'salt', 'ionrad', 'prbrad', 'bndcon', 'scale', 'perfil']: if key in options: options[key] = float( options[key] )
replaced += 1 return l, replaced def replace_import_statement( l, module, importas ): if importas == module: importas = '' else: importas = ' as ' + importas return l.replace( 'from '+module+' import *', 'import '+module+importas) options = t.cmdDict( {'m':'Numeric', 'as':'N', 'e':['Complex'] } ) module = options['m'] importas = options.get('as', module ) srcfiles = t.toList( options.get('i', None) ) exclude = t.toList( options['e'] ) try: exec('import '+module) for fname in srcfiles:
if len(sys.argv) < 2: print \ """ Restart a distributed calculation. Syntax: restartPVM.py -i |rst_file| [-a] Options: i .. restart file containing result of TrackingJobMaster.getRst() a .. add hosts to PVM """ sys.exit(0) ## MAIN ## use() cmd = T.cmdDict() T.flushPrint('Loading restart data...') rst = T.load(cmd['i']) hosts = [] if 'a' in cmd: hosts = [h['host'] for h in rst['hosts']] master = restart(rst, hosts=hosts) T.flushPrint('Master initialized for restart.') master.start()
addFrameNames(t, trajIndex) e = end or len(t) if start or end or (step != 1): t = t.takeFrames(range(start, e, step)) return t ############ ### MAIN ### use() o = T.cmdDict({'o': 'traj_ensemble.dat'}) out = T.absfile(o['o']) inLst = T.toList(o['i']) start = int(o.get('s', '0')) end = o.get('e', None) if end: end = int(end) step = int(o.get('step', 1)) ref = o.get('ref', None) if ref: ref = PDBModel(T.absfile(ref)) if 'prot' in o: ref = ref.compress(ref.maskProtein())
-? or help .. this help screen Default options: """ for key, value in o.items(): print "\t-", key, "\t", value sys.exit(0) def defaultOptions(): return {'o': '.', 'log': None, 'h': None} ### MAIN ### options = tools.cmdDict(defaultOptions()) outFolder = tools.absfile(options['o']) host = options['h'] sap = not 'nosap' in options log = None if options['log']: log = LogFile(outFolder + '/' + options['log'], 'a') if not (os.path.exists(outFolder + '/templates')): print 'Current directory is not a valid modeling folder (missing /templates).' _use(defaultOptions()) if '?' in options or 'help' in options: _use(defaultOptions())
return MS, AS, MS_sd, AS_sd ########################### # MAIN ########################### default = {'i':'1gxg_input.pdb', 'r':'~/GLY_pep/', 'l':'', 'mask':[0,1,0]} if len (sys.argv) < 2: _use( default ) options = T.cmdDict( default ) ## where to run the calculation base_folder = T.absfile( options['r'] )+'/' ## template gly-xxx-gly template = os.path.abspath( options['i'] ) ## label the result dictionaty files label = '_' + options['l'] ## mask to used to delete glycines mask = [ int(i) for i in T.toList( options['mask'] )] ## create random prptides from template #randomPeptides( template, base_folder )
r.reverse() for j in r: d.remove(j) if len(d)==0: print 'Nothing to align. Exiting.' sys.exit(0) return d if __name__ == '__main__': ## look for default cross-validation projects d = [] options = T.cmdDict({'h':10, 'd':d}) d=options['d'] or collect_project_folders( ) if (options['d'] is None) or ('help' in options or '?' in options): _use( options ) folders = T.toList(options['d']) hostNumber = int(options['h']) pdbFolder = options.get('pdb', None) fastaTemplates = options.get('ft', None) fastaSequences = options.get('fs', None) fastaTarget = options.get('fta', None) ferror = options.get('fe',None) show_output = 'w' in options
o['o'] = 'entropy_result.dic' ## uncomment for testing ## o['step'] = 2 ## o['start']= 100 ## o['stop'] = 400 ## o['ref'] = '~/interfaces/c15/com_wet/ref.complex' ## o['i'] = '~/interfaces/c15/rec_pcr_00/traj.dat+\ ## ~/interfaces/c15/lig_pcr_00/traj.dat' return o ########## ## MAIN ## options = t.cmdDict(defOptions()) if not ('i' in options): _use() ## convert command line parameters for k in [ 's', 'e', 'ss', 'se', 'step', 'fit_s', 'fit_e', 'nice', 'thin', 'ex_n', 'ex3', 'shift', 'border' ]: if k in options: options[k] = int(options[k]) for k in [ 'debug', 'verbose', 'cast', 'split', 'shuffle', 'shift', 'heavy', 'solvent', 'protein'
Default options: """ for key, value in options.items(): print "\t-", key, "\t", value sys.exit(0) ### MAIN ### ############ if len(sys.argv) < 3: _use({'o': 'traj.dat'}) options = tools.cmdDict({'o': 'traj.dat'}) ## get all PDBs and models directly from a directory (avoids shell limits) if 'd' in options: d = tools.absfile(options['d']) l = os.listdir(d) l = [ x for x in l if x[-4:].upper() == '.PDB' or x[-6:] == '.MODEL' \ or x[-7:].upper() == '.PDB.GZ' ] l = [os.path.join(d, f) for f in l] options['i'] = l if 'e' in options: t_class = EnsembleTraj else: t_class = Trajectory
-amber rename CYX -> CYS, HID/HIE/HIP -> HIS, unwrap atom names (this creates models with the same atom/res names as pdbs created with ambpdb -p top.parm -aatm -bres < some.crd > some.pdb ) -s sort atoms alphabetically within residues Default options: """ for key, value in o.items(): print "\t-", key, "\t", value sys.exit(0) if __name__ == '__main__': options = T.cmdDict({'h': 10, 'c': 5}) if len(sys.argv) < 2: _use(options) hostNumber = int(options['h']) chunk = int(options['c']) windows = options.has_key('w') amber = options.has_key('amber') sort = options.has_key('s') outFolder = None if options.has_key('o'): outFolder = T.absfile(options['o']) ## get all PDBs and models directly from a directory (avoids shell limits)