cl = contact(cl, ref, fout + 'cont.cl', add_hosts=add_hosts) cl = filter_zero_contacts(cl) ## happened in one case ## cl = cl.filter( 'fnac_10', (0., 0.) ) cl = cl.filter('fnarc_10', (0., 0.)) flushPrint('%i orientations removed because of fnarc > 0.0\n' % (n_cl - len(cl))) cg = group(cl, 0.001, 0.0001) dump(cg, fout + 'grouped.cg') ## final selection nr_cl = selectClusters(cg, 10) flushPrint( 'dumping %i non-redundant, non-overlapping, non-native complexes\n'\ % len( nr_cl ) ) dump(nr_cl, fout + 'nr.cl') flushPrint('Dumping random complexes.') saveComplexes(nr_cl, com_out) ## for visualisation flushPrint('\nPreparing trajectory...') t = Trajectory([c.model() for c in nr_cl]) t.ref.addChainId() t.ref.writePdb(fout + 'nr_traj_ref.pdb', ter=2) t.writeCrd(fout + 'nr_traj.crd')
out = absfile( options['o'] ) n = int( options['n'] ) traj= absfile( options.get('traj', None) ) finp= absfile( options.get('debug', None)) debug = ( finp is not None ) except: print "Missing or wrong option:" print lastError() _use() cr = ComplexRandomizer( rec, lig, ro, lo, debug=debug ) result = ComplexList() flushPrint('generating...') for i in range( n ): result.append( cr.random_complex( inp_mirror=finp ) ) flushPrint('#') flushPrint('\nDumping result...') dump( result, out ) if traj: flushPrint('\nWriting trajectory...') t = Trajectory( [ c.model() for c in result ] ) t.ref.writePdb( traj + '.pdb' ) t.writeCrd( traj + '.crd' ) flushPrint('done')
lo = absfile(options['lo']) out = absfile(options['o']) n = int(options['n']) traj = absfile(options.get('traj', None)) finp = absfile(options.get('debug', None)) debug = (finp is not None) except: print "Missing or wrong option:" print lastError() _use() cr = ComplexRandomizer(rec, lig, ro, lo, debug=debug) result = ComplexList() flushPrint('generating...') for i in range(n): result.append(cr.random_complex(inp_mirror=finp)) flushPrint('#') flushPrint('\nDumping result...') dump(result, out) if traj: flushPrint('\nWriting trajectory...') t = Trajectory([c.model() for c in result]) t.ref.writePdb(traj + '.pdb') t.writeCrd(traj + '.crd') flushPrint('done')
cl = contact( cl, ref, fout + 'cont.cl', add_hosts=add_hosts ) cl = filter_zero_contacts( cl ) ## happened in one case ## cl = cl.filter( 'fnac_10', (0., 0.) ) cl = cl.filter( 'fnarc_10', (0., 0.) ) flushPrint('%i orientations removed because of fnarc > 0.0\n' % (n_cl-len(cl))) cg = group( cl, 0.001, 0.0001 ) dump( cg, fout+'grouped.cg' ) ## final selection nr_cl = selectClusters( cg, 10 ) flushPrint( 'dumping %i non-redundant, non-overlapping, non-native complexes\n'\ % len( nr_cl ) ) dump( nr_cl, fout+'nr.cl') flushPrint('Dumping random complexes.') saveComplexes( nr_cl, com_out ) ## for visualisation flushPrint('\nPreparing trajectory...') t = Trajectory( [ c.model() for c in nr_cl ] ) t.ref.addChainId() t.ref.writePdb( fout+'nr_traj_ref.pdb', ter=2 ) t.writeCrd( fout+'nr_traj.crd')