Difference between revisions of "Walkthrough on placement of averages on table positions"
Jump to navigation
Jump to search
(Created page with "In this walkthrough we show: * how to create a triangulation that represents a density map, * how to repeat it at the positions and orientations expressed by a ''Dynamo'' t...") |
|||
Line 6: | Line 6: | ||
# through a single model for each copy of the density map | # through a single model for each copy of the density map | ||
# through a single mesh for the full scene | # through a single mesh for the full scene | ||
+ | |||
+ | |||
+ | == Creation of a density map == | ||
+ | |||
+ | We will just use the <tt>ribosome32.em</tt> template inside your ''Dynamo'' installation. | ||
+ | |||
+ | |||
+ | <nowiki> | ||
+ | % | ||
+ | % We create a tomogram with multiple copies of a ribosome template | ||
+ | % | ||
+ | |||
+ | r = dread('ribosome32.em'); | ||
+ | |||
+ | % just a normalization operation to | ||
+ | rbright = dynamo_normalize_roi(r); | ||
+ | |||
+ | % inverts and normalizesit | ||
+ | % protein is thus dark on bright ground | ||
+ | |||
+ | %% creates a mask | ||
+ | |||
+ | % prepare a black (zeros) volume of the size of the template | ||
+ | mask = zeros(size(rbright)); | ||
+ | |||
+ | % we select a threshold | ||
+ | threshold = - 0.1; | ||
+ | |||
+ | % and ellimiate densities below it | ||
+ | includedIndices = find(rbright>threshold); | ||
+ | mask(includedIndices) = rbright(includedIndices); | ||
+ | |||
+ | rbright = rbright.*mask; | ||
+ | |||
+ | % we show the density map as a series of orthoslices | ||
+ | dview(rbright); | ||
+ | |||
+ | </nowiki> | ||
+ | |||
+ | |||
+ | Now, our task is to create a triangulation (a mesh) that represents an isosurface to be rendered later. You could just use Chimera for this, by opening the map, choosing your threshold level visually and exporting and .stl file. Alternatively, you can do it directly form the ''Dynamo'' command line with the <tt>dynamo_isosurface</tt> command. | ||
+ | |||
+ | |||
+ | |||
+ | == Polishing the triangulation== | ||
+ | |||
+ | Here we show some functions in the <tt>mbgeom.triangulation</tt> package that can be used to polish the mesh. | ||
+ | |||
+ | |||
+ | == Repeating the density map along table positions == |
Revision as of 18:19, 8 March 2017
In this walkthrough we show:
- how to create a triangulation that represents a density map,
- how to repeat it at the positions and orientations expressed by a Dynamo table (placement operation)
- how to visualize the same scene in Chimera:
- through a single model for each copy of the density map
- through a single mesh for the full scene
Creation of a density map
We will just use the ribosome32.em template inside your Dynamo installation.
% % We create a tomogram with multiple copies of a ribosome template % r = dread('ribosome32.em'); % just a normalization operation to rbright = dynamo_normalize_roi(r); % inverts and normalizesit % protein is thus dark on bright ground %% creates a mask % prepare a black (zeros) volume of the size of the template mask = zeros(size(rbright)); % we select a threshold threshold = - 0.1; % and ellimiate densities below it includedIndices = find(rbright>threshold); mask(includedIndices) = rbright(includedIndices); rbright = rbright.*mask; % we show the density map as a series of orthoslices dview(rbright);
Now, our task is to create a triangulation (a mesh) that represents an isosurface to be rendered later. You could just use Chimera for this, by opening the map, choosing your threshold level visually and exporting and .stl file. Alternatively, you can do it directly form the Dynamo command line with the dynamo_isosurface command.
Polishing the triangulation
Here we show some functions in the mbgeom.triangulation package that can be used to polish the mesh.