Esempio n. 1
0
filename = "/Users/ludo/DEV/autopack_git/autoPACK_database_1.0.0/recipes/NM_Analysis_FigureC1.3.xml"
fileName, fileExtension = os.path.splitext(filename)
n=os.path.basename(fileName)
h = Environment(name=n)
#h.helper = helper
recipe=n
h.load_XML(filename)
afviewer=None
if not NOGUI :
    print h,helper
    setattr(h,"helper",helper)
    afviewer = AFViewer(ViewerType=h.helper.host,helper=h.helper)
    afviewer.SetHistoVol(h,20.0,display=False)
    h.host=h.helper.host
    afviewer.displayPreFill()
h.saveResult = False

#resultfilename = h1.resultfile = wrkDir+os.sep+"autoFillRecipeScripts"+os.sep+"2DsphereFill"+os.sep+"results"+os.sep+"SpherefillResult.afr"
#resultfilename = h.resultfile = wrkDir+os.sep+"autoFillRecipeScripts/2DsphereFill/results/2DsphereFill_1.1.apr"
#resultfilename = h.resultfile = wrkDir+os.sep+"autoFillRecipeScripts/Mycoplasma/results/MycoplasmaPackResult_3"
resultfilename = h.resultfile = "/Users/ludo/DEV/autoPACKresults/NM_Analysis_C2/NM_Analysis_C"

#h.smallestProteinSize=15
#h.exteriorRecipe.ingredients[0].uLength = 100.0
#overwrite the jiterMax usin jitterMax = [d[k]["rad"]/(15.*1.1547),d[k]["rad"]/(15.*1.1547),0.0]
#loopThroughIngr
def setJitter(ingr):
    ingr.jitterMax =[ingr.encapsulatingRadius,ingr.encapsulatingRadius,0.0]
#    if ingr.packingMode != "gradient":
#        ingr.molarity = 0.0
#        ingr.nbMol = 0
Esempio n. 2
0
#filename = "/Users/ludo/Desktop/cell_hack.xml"
fileName, fileExtension = os.path.splitext(filename)
n=os.path.basename(fileName)
h = Environment(name=n)
#h.helper = helper
recipe=n
h.load_XML(filename)
afviewer=None
if not NOGUI :
    print h,helper
    setattr(h,"helper",helper)
    afviewer = AFViewer(ViewerType=h.helper.host,helper=h.helper)
    afviewer.SetHistoVol(h,20.0,display=False)
    h.host=h.helper.host
    afviewer.displayPreFill()
h.saveResult = False

#resultfilename = h1.resultfile = wrkDir+os.sep+"autoFillRecipeScripts"+os.sep+"2DsphereFill"+os.sep+"results"+os.sep+"SpherefillResult.afr"
#resultfilename = h.resultfile = wrkDir+os.sep+"autoFillRecipeScripts/2DsphereFill/results/2DsphereFill_1.1.apr"
resultfilename = h.resultfile = wrkDir+os.sep+"autoFillRecipeScripts/Mycoplasma/results/MycoplasmaPackResult_3"
h.smallestProteinSize=25
#h.exteriorRecipe.ingredients[0].uLength = 100.0
#overwrite the jiterMax usin jitterMax = [d[k]["rad"]/(15.*1.1547),d[k]["rad"]/(15.*1.1547),0.0]
#loopThroughIngr
def setJitter(ingr):
#    ingr.jitterMax =[ingr.encapsulatingRadius/(25.*1.1547),ingr.encapsulatingRadius/(25.*1.1547),0.0]
    if ingr.packingMode != "gradient":
        ingr.molarity = 0.0
        ingr.nbMol = 0
        print ingr.name
#h.loopThroughIngr(setJitter)
Esempio n. 3
0
     setupfile = autopack.retrieveFile(filename, cache="recipes")
 else:
     setupfile = filename
 #overwrite result file
 resultfile = "output_autopack_test"
 print("ok use ", setupfile, filename)
 fileName, fileExtension = os.path.splitext(setupfile)
 print fileName
 n = os.path.basename(fileName)
 recipe = n
 h = Environment(name=n)
 h.loadRecipe(setupfile)
 h.setupfile = filename
 if resultfile is not None:
     h.resultfile = resultfile
 h.saveResult = False
 #    h.overwriteSurfacePts = False
 #    h.compartments[0].overwriteSurfacePts = False
 #build the grid
 #change the grid size ?
 h.smallestProteinSize = 80.0
 h.freePtsUpdateThrehod = 0.0
 if doit:
     #h.boundingBox=[[ -2482, -2389, -500.26],[ 2495, 2466, 500.02]]
     h.buildGrid(boundingBox=h.boundingBox,
                 gridFileIn=None,
                 rebuild=True,
                 gridFileOut=None,
                 previousFill=False)
     #    h.loopThroughIngr(excludeIngr)
     #    h.loopThroughIngr(excludeIngr)
Esempio n. 4
0
 if load:
     rfile = h.resultfile
     resultfilename = autopack.retrieveFile(rfile, cache="results")
     if resultfilename is None:
         print("no result for " + n + " " + h.version + " " + rfile)
         sys.exit()
     print("get the result file from ", resultfilename)
     result, orgaresult, freePoint = h.loadResult(
         resultfilename=resultfilename)
     #                                             restore_grid=False,backward=True)#load text ?#this will restore the grid
     ingredients = h.restore(result, orgaresult, freePoint)
 elif pack:
     #pack
     gridfile = "/home/ludo/Dev/bdbox/grid_store"
     h.placeMethod = "RAPID"  #does it use all vertices ?
     h.saveResult = True
     h.resultfile = "/home/ludo/Dev/bdbox/" + n + v
     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=gridfile,
                 rebuild=True,
                 gridFileOut=None,
                 previousFill=False)
     h.fill5(verbose=0, usePP=True)
     h.collectResultPerIngredient()
     h.saveRecipe(h.resultfile + "_mixed.json",
                  useXref=True,
                  mixed=True,
                  kwds=["compNum", "encapsulatingRadius"],