Walkthrough on placement of averages on table positions

From Dynamo
Jump to navigation Jump to search

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:
  1. through a single model for each copy of the density map
  2. 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.


Repeating the density map along table positions