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) #raw_input() if ANALYSIS: # h.placeMethod="RAPID" h.encapsulatingGrid=0 analyse = AnalyseAP(env=h, viewer=afviewer, result_file=None)
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) # h.loopThroughIngr(excludeIngr) # h.loopThroughIngr(excludeIngr) # h.loopThroughIngr(setJitter) # h.loopThroughIngr(setJitter) # h.loopThroughIngr(setJitter)
helper = helperClass(vi="nogui") autopack.helper = helper from autopack.Environment import Environment from autopack import transformation as tr import numpy as np filename = "/home/ludo/hivexp/HIVimature1.0.json" fileName, fileExtension = os.path.splitext(filename) n = os.path.basename(fileName) h = Environment(name=n) #h.helper = helper recipe = n h.loadRecipe(filename) h.smallestProteinSize = 40 resultfilename = h.resultfile = "/home/ludo/hivexp/hivfull" previousresult = "/home/ludo/hivexp/HIVimature_results.json" r = h.loadResult("/home/ludo/hivexp/HIVimature_results.json", transpose=False) # #ingredients = h.restore(*r) #env is 0:6 #if need to offset ENV thats here. #gag is 6: #every 4th gag try to place gag_pol #could try to rotate around a point mrot = [] angle = 0 for i in range(6):