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) pad = 100.
# 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 'Surf', rSurf1.getMinMaxProteinSize()
# create HistoVol h1 = HistoVol() # create and add oganelles #=> how to do it interactively? #select a mesh, get Polygon information and create the Organelle, #but then dont need to draw it... #bb = helper.getCornerPointCube(selectedObject) #what about the organell #c4dorganlle = currentSelection #faces = c4dorganlle.get_polygons() #vertices = c4dorganlle.get_points() #vnormals = None """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) #again how interactively put ingrediants.... #maybe pred_displayFill can load everyavailable ingrediant....or at least create
from DejaVu.IndexedPolygons import IndexedPolygonsFromFile # create HistoVol h1 = HistoVol() # create and add oganelles #=> how to do it interactively? #select a mesh, get Polygon information and create the Organelle, #but then dont need to draw it... #bb = helper.getCornerPointCube(selectedObject) #what about the organell #c4dorganlle = currentSelection #faces = c4dorganlle.get_polygons() #vertices = c4dorganlle.get_points() #vnormals = None """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) #again how interactively put ingrediants.... #maybe pred_displayFill can load everyavailable ingrediant....or at least create