continue #read the pdb #build proxy and mesh ingr = MultiSphereIngr(name=wid, pdb=pdbId, nbMol=int(eval(count)), positions=pos, radii=rad, encapsulatingRadius=R) rMatrix.addIngredient(ingr) print pdbId o.setInnerRecipe(rMatrix) #check lefty env.boundingBox = [[0, 0, 0], [2000, 2000, 2000]] env.name = "MycoplasmaGenitalium" env.saveRecipe("C:\\Users\\ludov\\Downloads\\MG_1.0.json", useXref=False, format_output="json") #save serialized from autopack.IOutils import serializedRecipe, saveResultBinary djson = serializedRecipe(env) f = open("C:\\Users\\ludov\\Downloads\\MG_1.0_serialized.json", "w") f.write(djson) f.close() saveResultBinary(env, "C:\\Users\\ludov\\Downloads\\MG_1.0_serialized.bin", False, True) #MG4 - nascent 753 #MG4 - processed I 753
# ingr.jitterMax =[ingr.encapsulatingRadius/(25.*1.1547),ingr.encapsulatingRadius/(25.*1.1547),0.0] # ingr.cutoff_boundary=ingr.encapsulatingRadius # ingr.cutoff_boundary=500+ingr.encapsulatingRadius ingr.nbJitter = 6 # h.loopThroughIngr(setCompartment) #setJitter #raw_input() if ANALYSIS: # h.placeMethod="RAPID" h.encapsulatingGrid=0 autopack.testPeriodicity = False analyse = AnalyseAP(env=h, viewer=afviewer, result_file=None) output="/Users/ludo/DEV/autoPACKresults/NM_Analysis_C2" analyse.g.Resolution = 1.0 h.boundingBox=numpy.array(h.boundingBox) fbox_bb=numpy.array(h.boundingBox) # h.boundingBox[0]-=numpy.array([500.0,500.0,0.0]) # h.boundingBox[1]+=numpy.array([500.0,500.0,0.0]) d=analyse.doloop(1000,h.boundingBox,wrkDir,output,rdf=True, render=False,twod=TWOD,use_file=True)#,fbox_bb=fbox_bb) # if not NOGUI : # afviewer.displayFill() else : gridfile = localdir+os.sep+"autoFillRecipeScripts/Mycoplasma/results/grid_store" h.placeMethod="RAPID" h.saveResult = True h.innerGridMethod = "bhtree"#jordan pure python ? sdf ? # h.boundingBox = [[-250.0, -6500.0/2.0, -250.0], [250.0, 6500.0/2.0, 250.0]] h.boundingBox =[[-2482, -2389.0, 100.0], [2495, 2466, 2181.0]] # h.buildGrid(boundingBox=h.boundingBox,gridFileIn=None,rebuild=True ,
# ingr.cutoff_boundary=ingr.encapsulatingRadius # ingr.cutoff_boundary=500+ingr.encapsulatingRadius ingr.nbJitter = 6 h.loopThroughIngr(setCompartment) #setJitter #raw_input() if ANALYSIS: h.placeMethod = "RAPID" h.encapsulatingGrid = 0 autopack.testPeriodicity = False analyse = AnalyseAP(env=h, viewer=afviewer, result_file=None) output = "/Users/ludo/DEV/autoPACKresults/NM_Analysis_C1" analyse.g.Resolution = 1.0 h.boundingBox = numpy.array(h.boundingBox) fbox_bb = numpy.array(h.boundingBox) # h.boundingBox[0]-=numpy.array([500.0,500.0,0.0]) # h.boundingBox[1]+=numpy.array([500.0,500.0,0.0]) d = analyse.doloop(5, h.boundingBox, wrkDir, output, rdf=True, render=False, twod=TWOD, use_file=True) #,fbox_bb=fbox_bb) # if not NOGUI : # afviewer.displayFill() else: global fluo_pos
fileName, fileExtension = os.path.splitext(setupfile) n=os.path.basename(fileName) h = Environment(name=n) h.loadRecipe(setupfile) afviewer=None h.placeMethod="pandaBullet" h.encapsulatingGrid=0 #default for periodicity h.use_periodicity = False autopack.testPeriodicity = True autopack.biasedPeriodicity = [1,1,0] analyse = AnalyseAP(env=h, viewer=afviewer, result_file=None) h.analyse = analyse analyse.g.Resolution = 1.0 #h.smallestProteinSize=30.0#get it faster? same result ? h.boundingBox=np.array(h.boundingBox) #============================================================================== # the parameter for a run #============================================================================== #all option can be access through a Dictionary that hold : #options name #options default value #options value range #options type e.g. Vector,Float, Int,String #to get the value for the current value we can use the python function getattr #to change the value of the option we can use the python function setattr #all the packing options (General Parameters) are found in h.OPTIONS #for k in h.OPTIONS.keys(): # print h.OPTIONS[k]
if ANALYSIS: # h.placeMethod="RAPID" h.encapsulatingGrid=0 analyse = AnalyseAP(env=h, viewer=afviewer, result_file=None) output=localdir+os.sep+"autoFillRecipeScripts/2DsphereFill/results/paper/" analyse.g.Resolution = 1.0 d=analyse.doloop(100,h.boundingBox,wrkDir,output,rdf=True,render=False,twod=TWOD) if not NOGUI : afviewer.displayFill() else : gridfile = localdir+os.sep+"autoFillRecipeScripts/Mycoplasma/results/grid_store" h.placeMethod="RAPID" h.saveResult = True h.innerGridMethod = "bhtree"#jordan pure python ? sdf ? # h.boundingBox = [[-250.0, -6500.0/2.0, -250.0], [250.0, 6500.0/2.0, 250.0]] h.boundingBox =[[-2482, -2389.0, 100.0], [2495, 2466, 2181.0]] # h.buildGrid(boundingBox=h.boundingBox,gridFileIn=None,rebuild=True , # gridFileOut=gridfile,previousFill=False) h.buildGrid(boundingBox=h.boundingBox,gridFileIn=gridfile,rebuild=True , gridFileOut=None,previousFill=False) h.fill5(verbose = 0,usePP=True) # if not NOGUI : # afviewer.displayFill() #analyse.grid_pack(h.boundingBox,wrkDir,seed=0, fill=1,vTestid = 0,vAnalysis = 1)#build grid and fill #for i in range(2): # print 'Collecting %d ...' % i # n = gc.collect() # print 'Unreachable objects:', n # print 'Remaining Garbage:',
d = analyse.doloop(100, h.boundingBox, wrkDir, output, rdf=True, render=False, twod=TWOD) if not NOGUI: afviewer.displayFill() else: gridfile = localdir + os.sep + "autoFillRecipeScripts/Mycoplasma/results/grid_store" h.placeMethod = "RAPID" h.saveResult = True h.innerGridMethod = "bhtree" #jordan pure python ? sdf ? # h.boundingBox = [[-250.0, -6500.0/2.0, -250.0], [250.0, 6500.0/2.0, 250.0]] h.boundingBox = [[-2482, -2389.0, 100.0], [2495, 2466, 2181.0]] # h.buildGrid(boundingBox=h.boundingBox,gridFileIn=None,rebuild=True , # gridFileOut=gridfile,previousFill=False) h.buildGrid(boundingBox=h.boundingBox, gridFileIn=gridfile, rebuild=True, gridFileOut=None, previousFill=False) h.fill5(verbose=0, usePP=True) # if not NOGUI : # afviewer.displayFill() #analyse.grid_pack(h.boundingBox,wrkDir,seed=0, fill=1,vTestid = 0,vAnalysis = 1)#build grid and fill #for i in range(2): # print 'Collecting %d ...' % i