#include "stride.h" /************************************************************************* ** ** ** Calculate the number of individual secondary structure elements of ** ** type SecStrType and length not less than ElemLength that are: ** ** - Present in Asn1 and Asn2 and absent in Asn3 (YYN) ** ** - Present in Asn2 and Asn3 and absent in Asn1 (NYY) ** ** - Absent in Asn2 and Asn3 and present in Asn1 (YYN) ** ** - Absent in Asn1 and Asn2 and present in Asn3 (YYN) ** ** ** *************************************************************************/ int FullElement(char *Asn1, char *Asn2, char *Asn3, int Length, char SecStrType, int ElemLength, char EditChar, int *YYN, int *NYY, int *YNN, int *NNY) { register int i, j, Count1, Count2, Count3; int Beg, ElLength; *YYN = 0; *NYY = 0; *YNN = 0; *NNY = 0; if( ElemLength >= Length ) return(0); ElLength = ElemLength-1; Count1 = 0; Count2 = 0; Count3 = 0; Beg = -1; for( i=1; i 0 && ( Asn1[i] != Asn1[i-1] || Asn2[i] != Asn2[i-1] || Asn3[i] != Asn3[i-1] ) ) || i == Length-1 ) { if( Count1 >= ElLength && Count2 >= ElLength && Count3 < ElLength ) (*YYN)++; else if( Count1 < ElLength && Count2 >= ElLength && Count3 >= ElLength ) (*NYY)++; else if( Count1 >= ElLength && Count2 < ElLength && Count3 < ElLength ) (*YNN)++; else if( Count1 < ElLength && Count2 < ElLength && Count3 >= ElLength ) (*NNY)++; /* if( Count1 >= ElLength || Count2 >= ElLength || Count3 >= ElLength ) { * for( j=Beg-1; j= ElLength && ( Count2 < ElLength || Count3 < ElLength ) ) for( j=Beg-1; j= ElLength && ( Count1 < ElLength || Count3 < ElLength ) ) for( j=Beg-1; j= ElLength && ( Count1 < ElLength || Count2 < ElLength ) ) for( j=Beg-1; j Count2 ) (*Worse)++; else if( Count2 > Count1 ) (*Better)++; Beg = -1; } } return(TotalNumber); }