Home > FR3DSource > zBasePhosphateText.m

zBasePhosphateText

PURPOSE ^

zBasePhosphateText(e) converts internal code e for a base-phosphate interaction to text for human use. If edge = 1, it lists the active edge as well

SYNOPSIS ^

function [EE] = zBasePhosphateText(e,edge)

DESCRIPTION ^

 zBasePhosphateText(e) converts internal code e for a base-phosphate interaction to text for human use.  If edge = 1, it lists the active edge as well

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % zBasePhosphateText(e) converts internal code e for a base-phosphate interaction to text for human use.  If edge = 1, it lists the active edge as well
0002 
0003 function [EE] = zBasePhosphateText(e,edge)
0004 
0005 if nargin < 2,
0006   edge = 0;
0007 end
0008 
0009 
0010 E = [];
0011 EE = [];
0012 
0013 % The following vector converts internal FR3D codes to Base-phosphate categories0 to 9.  To change the categories, change here and in xGetEdgeNums.m
0014 
0015 BPCat = [2 6 7 0 6 7 8 9 0 1 3 4 5 0 5 9 0 7 4];  % updated 8-19-2008
0016 ae    = {'SW',' W',' H',' H',' W',' H',' H',' H',' H',' S',' W',' W',' W',' H',' W',' H',' H',' H',' W'};
0017 
0018 for i=1:length(e),
0019   if e(i) > 100,
0020     E = [E 'n'];
0021     a = e(i) - 100;
0022   elseif e(i) < -100,
0023     E = [E 'n'];
0024     a = e(i) + 100;
0025   else
0026     E = [E ' '];
0027     a = e(i);
0028   end
0029 
0030   if a > 0,
0031     E = [E num2str(BPCat(a)) 'BPh'];
0032   elseif a < 0,
0033     E = [E num2str(BPCat(-a)) 'PhB'];
0034   else
0035     E = [E '  -'];
0036   end
0037 
0038   if edge > 0,
0039     if E(1) == ' ',
0040       E(1) = '_';
0041     end
0042     E = [ae{a} E];
0043   end
0044 
0045   EE = [EE E];
0046 end

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