akesh wrote:
> I want to know that how to calculate atomic composition of the given
> sequence.
> Actully logic ?
for j := Carbon to Sulfur do { for all elements }
Count[j] := 0; { prepare count vector}
for n := 1 to SequenceLength { for entire protein }
for j := Carbon to Sulfur do { for all elements }
Count[j] := Count[j] + Composition[AminoAcid[n],j]
{ sum up number of various atoms }
Count[Hydrogen] := Count[Hydrogen] - 2 * pred(SequenceLength);
Count[Oxygen] := Count[Oxygen] - pred(SequenceLength);
{ take care of water lost in peptide
bond}
return(Count)
Composition of course is a two-dimensional array containing the number
of atoms of each element in each amino acid. Of course you need suitably
defined enumeration types for elements and amino acids (and in molecular
biology it helps to use a language that knows enumeration types, rather
than a PDP-11 macroassembler).
Oh, and don't forget the rare amino acids Sec and Pyl!