name='0ABL kinase0', nbJitter=20, meshFile=wrkDir+'/recipes/cyto/1ABL_centered', packingMode='close') rCyto1.addIngredient( kinase0 ) # create HistoVol h1 = HistoVol() # create and add oganelles from DejaVu.IndexedPolygons import IndexedPolygonsFromFile geomS = IndexedPolygonsFromFile(wrkDir+'/organelles/vesicle_r20nm', 'vesicle') faces = geomS.getFaces() vertices = geomS.getVertices() vnormals = geomS.getVNormals() o1 = Organelle(vertices, faces, vnormals) h1.addOrganelle(o1) # set recipe o1.setSurfaceRecipe(rSurf1) o1.setInnerRecipe(rCyto1) h1.setMinMaxProteinSize() print('Surf', rSurf1.getMinMaxProteinSize()) print('Cyto', rCyto1.getMinMaxProteinSize()) print('o1', o1.getMinMaxProteinSize()) print('smallest', h1.smallestProteinSize) print('largest', h1.largestProteinSize) print('Bounding box', h1.boundingBox)
# meshFile='recipes/cyto/1TWV_centered', # color=cornflowerblue, packingPriority=1) #rCyto.addIngredient( ingr1TWV ) # vesicle from DejaVu.IndexedPolygons import IndexedPolygonsFromFile # create HistoVol h1 = HistoVol() # create and add oganelles geomS = IndexedPolygonsFromFile(wrkDir+'/organelles/vesicle_r20nm', 'vesicle') faces = geomS.getFaces() vertices = geomS.getVertices() vnormals = geomS.getVNormals() o1 = Organelle(vertices, faces, vnormals) h1.addOrganelle(o1) # set recipes h1.setExteriorRecipe(rCyto) o1.setSurfaceRecipe(rSurf1) #o1.setInnerRecipe(rMatrix1) h1.setMinMaxProteinSize() print 'Cyto', rCyto.getMinMaxProteinSize() print 'Surf', rSurf1.getMinMaxProteinSize() print 'Matrix', rMatrix1.getMinMaxProteinSize() print 'o1', o1.getMinMaxProteinSize() print 'smallest', h1.smallestProteinSize print 'largest', h1.largestProteinSize
h1 = HistoVol() # set recipes h1.setExteriorRecipe(rCyto) #o1.setSurfaceRecipe(rSurf1) #o1.setInnerRecipe(rMatrix1) from Pmv.hostappInterface.cinema4d_dev import helperC4D as helper #display the organel, the box, and prepare the hierachy... doc = helper.getCurrentScene() sel = doc.GetSelection() c4dorganlle = sel[0] helper.triangulate(c4dorganlle) faces,vertices,vnormals = helper.DecomposeMesh(c4dorganlle,edit=True,copy=True,tri=True) o1 = Organelle(vertices, faces, vnormals) h1.addOrganelle(o1) o1.setSurfaceRecipe(rSurf1) #o1.setInnerRecipe(rCyto) #define the viewer type dejavu,c4d,blender ViewerType='c4d' afviewer = AFViewer(ViewerType=ViewerType) #make some option here afviewer.doPoints = False afviewer.doSpheres = False afviewer.quality = 1 #lowest quality for sphere and cylinder h1.setMinMaxProteinSize() print 'Cyto', rCyto.getMinMaxProteinSize()
## print 'time to fill', time()-t1 ## h1.printFillInfo() ## execfile('displayFill.py') from Pmv.hostappInterface.cinema4d import helperC4D as helper #display the organel, the box, and prepare the hierachy... doc = helper.getCurrentScene() sel = doc.get_selection() c4dorganlle = sel[0] helper.triangulate(c4dorganlle) faces = c4dorganlle.get_polygons() c4dvertices = c4dorganlle.get_points() vertices = map(helper.vc4d,c4dvertices) vnormals = helper.GetFaces(c4dorganlle) o1 = Organelle(vertices, faces, vnormals) h1.addOrganelle(o1) o1.setSurfaceRecipe(rSurf1) # add padding bb = h1.boundingBox pad = 100. x,y,z = bb[0] bb[0] = [x-pad, y-pad, z-pad] x,y,z = bb[1] bb[1] = [x+pad, y+pad, z+pad] print 'Bounding box with padding', h1.boundingBox h1.setMinMaxProteinSize() print 'Cyto', rCyto.getMinMaxProteinSize()
# color=cornflowerblue, packingPriority=1) #rCyto.addIngredient( ingr1TWV ) # vesicle from DejaVu.IndexedPolygons import IndexedPolygonsFromFile # create HistoVol h1 = HistoVol() # create and add oganelles geomS = IndexedPolygonsFromFile(wrkDir + '/organelles/vesicle_r20nm', 'vesicle') faces = geomS.getFaces() vertices = geomS.getVertices() vnormals = geomS.getVNormals() o1 = Organelle(vertices, faces, vnormals) h1.addOrganelle(o1) # set recipes h1.setExteriorRecipe(rCyto) o1.setSurfaceRecipe(rSurf1) #o1.setInnerRecipe(rMatrix1) h1.setMinMaxProteinSize() print 'Cyto', rCyto.getMinMaxProteinSize() print 'Surf', rSurf1.getMinMaxProteinSize() print 'Matrix', rMatrix1.getMinMaxProteinSize() print 'o1', o1.getMinMaxProteinSize() print 'smallest', h1.smallestProteinSize print 'largest', h1.largestProteinSize