function atomdischeck(names,coord)
%
%  $BEGIN
%  $HEADER atomdischeck
%
%  Find some typical bond lengths found in my
%  phosphorylated residues:
%    CA-N 
%    CA-C 
%    CA-CB
%    N-HN 
%    C-O
%    PS-OPA
%    PS-OPB
%    PS-OPC
%    OS-PS
%
%  Remember that this script used hard coded nomenclature
%
%  $HEADER REFERENCE
%
%  $HEADER PROGRAMMER
%  John W. Craft, Jr.
%  University of Houston, (2005)
%
%  $HEADER VERSION
%  1.0.0
%
%  Example
%  atomdischeck(names,coord)
%
%  See Also atomfind atomdis
%  
%  $END
%

fprintf(1,'Bond Distance Checking\n');

first = atomfind(names,'CA')
second = atomfind(names,'N')
dist = norm(coord(first,:)-coord(second,:));
fprintf(1,'N-CA: %f\n',dist);

first = atomfind(names,'C');
second = atomfind(names,'CA');
dist = norm(coord(first,:)-coord(second,:));
fprintf(1,'CA-C: %f\n',dist);

first = atomfind(names,'CB');
second = atomfind(names,'CA');
dist = norm(coord(first,:)-coord(second,:));
fprintf(1,'CA-CB: %f\n',dist);

first = atomfind(names,'H');
second = atomfind(names,'N');
dist = norm(coord(first,:)-coord(second,:));
fprintf(1,'N-HN: %f\n',dist);

first = atomfind(names,'O');
second = atomfind(names,'C');
dist = norm(coord(first,:)-coord(second,:));
fprintf(1,'C-O: %f\n',dist);

first = atomfind(names,'OPA');
second = atomfind(names,'PS');
dist = norm(coord(first,:)-coord(second,:));
fprintf(1,'PS-OPA: %f\n',dist);

first = atomfind(names,'OPB');
second = atomfind(names,'PS');
dist = norm(coord(first,:)-coord(second,:));
fprintf(1,'PS-OPB: %f\n',dist);

first = atomfind(names,'OPC');
second = atomfind(names,'PS');
dist = norm(coord(first,:)-coord(second,:));
fprintf(1,'PS-OPC: %f\n',dist);

first = atomfind(names,'OS');
second = atomfind(names,'PS');
dist = norm(coord(first,:)-coord(second,:));
fprintf(1,'PS-OS: %f\n',dist);


return

