Example #1
0
    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 ,
#                          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()
Example #2
0
#h.loopThroughIngr(setJitter)
#raw_input()
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()
Example #3
0
        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:
        #        h.saveResult = True
        h.innerGridMethod = "floodfill"
        h.buildGrid(boundingBox=h.boundingBox,
                    gridFileIn=None,
                    rebuild=True,
                    gridFileOut=None,
                    previousFill=False)
        h.fill5(verbose=0, usePP=False)
        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:',
Example #4
0
    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 :
    autopack.testPeriodicity = False
    gridfile = "D:\\Data\\cellPACK_data\\Mycoplasma\\grid_store"
    h.placeMethod="RAPID"
    h.saveResult = True
    resultfilename = h.resultfile = "D:\\Data\\cellPACK_data\\Mycoplasma\\Mpn_Results_july"
    h.innerGridMethod = "trimesh" 
    h.smallestProteinSize = 80.0
    h.freePtsUpdateThrehod=0.0
    #remove HUE,RIBO,DNAPOLY,PEPTIDE,RNA,DNA,Lipo
    filterOutFiber(h)        
    h.loopThroughIngr(setJitter)
    h.buildGrid(boundingBox=h.boundingBox,gridFileIn=gridfile,rebuild=True ,gridFileOut=gridfile,previousFill=False)
    h.fill5(verbose = 0,usePP=usePP)
    h.collectResultPerIngredient()
    h.saveRecipe("D:\\Data\\cellPACK_data\\Mycoplasma\\Mpn_Results_H_1.json",useXref=False,mixed=True, kwds=["source","name"],result=True, transpose = True,  grid=False,packing_options=False,indent=False,quaternion=True) 
    h.saveRecipe("D:\\Data\\cellPACK_data\\Mycoplasma\\Mpn_Results_H_2.json",useXref=False,mixed=True, kwds=["source","name"],result=True, transpose = False, grid=False,packing_options=False,indent=False,quaternion=True) 

    from autopack.IOutils import serializedRecipe, saveResultBinary, toBinary
    djson, all_pos, all_rot = serializedRecipe(h,False,True,True,True)#transpose, use_quaternion, result=False, lefthand=False
    with open("D:\\Data\\cellPACK_data\\Mycoplasma\\Mpn_Results_serialized.json","w") as f:
        f.write(djson)