struc = RNAStructure(args.file) output = str(struc.is_nmr(args.verbose)) sys.stdout.write(output + '\n') #edit if args.edit: if list != type(args.file): args.file = [args.file] ################################## for f in args.file: if args.verbose: print(f) if args.inplace: shutil.copy(f, f + '~') output = edit_pdb(f, args) if args.inplace: with open(f, 'w') as f: f.write(output) else: # write: to stdout try: sys.stdout.write(output) sys.stdout.flush() except IOError: pass if args.fetch: fn = fetch(args.file) if args.fetch_chain:
struc = RNAStructure(args.file) output = str(struc.is_nmr(args.verbose)) sys.stdout.write(output + '\n') #edit if args.edit: if list != type(args.file): args.file = [args.file] ################################## for f in args.file: if args.verbose: print(f) if args.inplace: shutil.copy(f, f + '~') output = edit_pdb(f, args) if args.inplace: with open(f, 'w') as f: f.write(output) else: # write: to stdout try: sys.stdout.write(output) sys.stdout.flush() except IOError: pass if args.fetch: fetch(args.file)