Home > FR3DSource > zStandardBases.m

zStandardBases

PURPOSE ^

zStandardBases reads optimized bases, then centers and rotates them

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 zStandardBases reads optimized bases, then centers and rotates them

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % zStandardBases reads optimized bases, then centers and rotates them
0002 
0003 % Variables returned to the rest of the programs:
0004 %
0005 % StandardLoc      16 x 3 x 4 matrix of standard atom locations, all 4 bases
0006 % AtomNames     16 x 4 cell array of names of atoms in standard bases
0007 % Lim               2 x 4 matrix telling how many base atoms, total atoms
0008 %                         (including hydrogen) the 4 bases have
0009 %
0010 % A_Stand, C_Stand, G_Stand, U_Stand: rotated versions of standard bases
0011 
0012 % ------------------------------------------------------------------------
0013 [A_Atoms, zX, zY, zZ] = zStandardBase('A');
0014 
0015 Q = [zX zY zZ];
0016 Q = Q - ones(length(zX),1)*Q(7,:);    % center base atoms at N9
0017 v = Q(13,:) - Q(1,:);
0018 c = v(2)/norm(v);
0019 s = v(1)/norm(v);
0020 Q = -Q * [[c s 0]; [-s c 0]; [0 0 1]]; % rotate
0021 A_Stand = Q;
0022 
0023 % ------------------------------------------------------------------------
0024 [C_Atoms, zX, zY, zZ] = zStandardBase('C');
0025 
0026 Q = [zX -zY zZ];
0027 Q = Q - ones(length(zX),1)*Q(2,:);
0028 v = Q(9,:) - Q(1,:);
0029 c = v(2)/norm(v);
0030 s = v(1)/norm(v);
0031 Q = -Q * [[c s 0]; [-s c 0]; [0 0 1]];
0032 C_Stand = Q;
0033 
0034 % ------------------------------------------------------------------------
0035 [G_Atoms, zX, zY, zZ] = zStandardBase('G');
0036 
0037 Q = [zX -zY zZ];
0038 Q = Q - ones(length(zX),1)*Q(10,:);
0039 v = Q(14,:) - Q(1,:);
0040 c = v(2)/norm(v);
0041 s = v(1)/norm(v);
0042 Q = -Q * [[c s 0]; [-s c 0]; [0 0 1]];
0043 G_Stand = Q;
0044 
0045 % ------------------------------------------------------------------------
0046 [U_Atoms, zX, zY, zZ] = zStandardBase('U');
0047 
0048 Q = [zX -zY zZ];
0049 Q = Q - ones(length(zX),1)*Q(3,:);
0050 v = Q(10,:) - Q(1,:);
0051 c = v(2)/norm(v);
0052 s = v(1)/norm(v);
0053 Q = -Q * [[c s 0]; [-s c 0]; [0 0 1]];
0054 U_Stand = Q;
0055 
0056 %----------------------------------------------------------------------------
0057 StandardLoc = zeros(16,3,4);
0058 
0059 % Center bases at glycosidic atom
0060 
0061 StandardLoc(1:15,:,1)= A_Stand-ones(size(A_Stand(:,1)))*A_Stand(1,:);
0062 StandardLoc(1:13,:,2)= C_Stand-ones(size(C_Stand(:,1)))*C_Stand(1,:);
0063 StandardLoc(1:16,:,3)= G_Stand-ones(size(G_Stand(:,1)))*G_Stand(1,:);
0064 StandardLoc(1:12,:,4)= U_Stand-ones(size(U_Stand(:,1)))*U_Stand(1,:);
0065 
0066 Lim(1,:) = [10 8 11 8];       % number of base atoms, excluding hydrogen
0067 Lim(2,:) = [15 13 16 12];     % total number of atoms, including hydrogen
0068 Lim(3,:) = [13  9 14 10];     % locations of fictitious hydrogens
0069 
0070 AtomNames = cell(16,4);
0071 
0072 AtomNames(1:Lim(2,1),1) = A_Atoms;   % provide a list of atom names
0073 AtomNames(1:Lim(2,2),2) = C_Atoms;
0074 AtomNames(1:Lim(2,3),3) = G_Atoms;
0075 AtomNames(1:Lim(2,4),4) = U_Atoms;
0076

Generated on Fri 03-Apr-2009 09:52:35 by m2html © 2003