[3dem] Re: Radius of Gyration from a single particle 3-D model
Sigworth Fred
fred.sigworth at yale.edu
Tue May 4 04:03:22 PDT 2010
Here are 9 lines of Matlab code to do it. To get your map into a Matlab array you can use my Matlab functions for EM file I/O at
http://www.mathworks.com/matlabcentral/fileexchange/27021-imagic-mrc-and-dm3-file-io
Then you call the attached function (also listed below) to get the center and radius of gyration in units of the voxel size.
-Fred Sigworth
function [center radgyr]=CenterOfMass(m)
% function [center radgyr]=CenterOfMass(m)
% Find the center of mass and radius of gyration of a 3D (cubic)
% density distribution. The distribution is assumed to be non-negative.
m=m/sum(m(:)); % scale so that it sums to unity.
n=size(m,1);
% First, compute center of mass
[x y z]=ndgrid(floor(-(n-1)/2):floor((n-1)/2));
xc=x(:)'*m(:);
yc=y(:)'*m(:);
zc=z(:)'*m(:);
center=[xc yc zc];
% Compute radius of gyration
R2=(x-xc).^2+(y-yc).^2+(z-zc).^2;
radgyr=sqrt(R2(:)'*m(:));
Fred J. Sigworth
Department of Cellular and Molecular Physiology
Yale School of Medicine
333 Cedar Street
New Haven, CT 06520
fred.sigworth at yale.edu
203 785 5773
On May 4, 2010, at 12:02 AM, Wang, Hongwei wrote:
> Dear Colleagues,
>
> I am wondering if there's a quick way to calculate the radius of gyration from the 3-D model of a single particle reconstruction.
>
> Thanks for your reply.
>
> Hongwei
>
> -------------------------------------
> Hongwei Wang, Ph.D.
> Assistant Professor
> Dept. Molecular Biophysics & Biochemistry
> Yale University School of Medicine
> 333 Cedar Street
> P.O. Box 208024
> New Haven, CT 06520-8024
> 203-785-3322 (O)
>
>
> _______________________________________________
> 3dem mailing list
> 3dem at ncmir.ucsd.edu
> https://mail.ncmir.ucsd.edu/mailman/listinfo/3dem
>
-------------- next part --------------
Skipped content of type multipart/mixed
More information about the 3dem
mailing list