diff -Pur ProFitV2.2.orig/src/bioplib/PDB2Seq.c ProFitV2.2/src/bioplib/PDB2Seq.c --- ProFitV2.2.orig/src/bioplib/PDB2Seq.c Tue Aug 6 04:56:22 2002 +++ ProFitV2.2/src/bioplib/PDB2Seq.c Thu Feb 12 08:42:59 2004 @@ -129,9 +129,9 @@ /* First step through the pdb linked list to see how many residues and chains. */ - rescount = 1; - resnum = pdb->resnum; - insert = pdb->insert[0]; + rescount = 0; + resnum = -9999999; + insert = '+'; chain = pdb->chain[0]; for(p=pdb->next; p!=NULL; NEXT(p)) @@ -205,18 +205,23 @@ chain = p->chain[0]; } + /* 06.02.03 Fixed bug - was incrementing recount even when + it was NTER/CTER + */ if(strncmp(p->resnam,"NTER",4) && strncmp(p->resnam,"CTER",4)) + { sequence[rescount] = ((DoAsxGlx) ? thronex(p->resnam): throne(p->resnam)); - if((!ProtOnly) || (!gBioplibSeqNucleicAcid)) - rescount++; + if((!ProtOnly) || (!gBioplibSeqNucleicAcid)) + rescount++; - /* 02.10.00 Reset count if it's an X character and we are - ignoring them - */ - if(NoX && sequence[rescount-1] == 'X') - rescount--; + /* 02.10.00 Reset count if it's an X character and we are + ignoring them + */ + if(NoX && sequence[rescount-1] == 'X') + rescount--; + } resnum = p->resnum; insert = p->insert[0]; @@ -228,6 +233,5 @@ return(sequence); } - diff -Pur ProFitV2.2.orig/src/bioplib/align.c ProFitV2.2/src/bioplib/align.c --- ProFitV2.2.orig/src/bioplib/align.c Tue Aug 6 04:56:23 2002 +++ ProFitV2.2/src/bioplib/align.c Thu Feb 12 08:42:59 2004 @@ -3,11 +3,11 @@ Program: File: align.c - Version: V3.0 - Date: 06.03.00 + Version: V3.1 + Date: 06.02.03 Function: Perform Needleman & Wunsch sequence alignment - Copyright: (c) SciTech Software 1993-2000 + Copyright: (c) SciTech Software 1993-2003 Author: Dr. Andrew C. R. Martin Address: SciTech Software 23, Stag Leys, @@ -67,6 +67,7 @@ V3.0 06.03.00 Traceback code rewritten to use a trace matrix created while the main matrix is populated. New affinealign() routine implemented. align() is now a wrapper to that. + V3.1 06.02.03 Fixed for new version of GetWord() *************************************************************************/ /* Includes @@ -487,6 +488,7 @@ Also allows the list of aa types before or after the actual matrix 26.07.95 Removed unused variables + 06.02.03 Fixed for new version of GetWord() */ BOOL ReadMDM(char *mdmfile) { @@ -513,7 +515,7 @@ /* See how many fields there are in the buffer */ for(p = buffer, sMDMSize = 0; p!=NULL; sMDMSize++) - p = GetWord(p, word); + p = GetWord(p, word, 16); /* Allocate memory for the MDM and the AA List */ @@ -544,12 +546,12 @@ KILLLEADSPACES(p, buffer); if(strlen(p)) { - GetWord(buffer, word); + GetWord(buffer, word, 16); if(sscanf(word,"%d",&j)) /* A row of numbers */ { for(p = buffer, j = 0; p!=NULL && jBOOL matfit(COOR *x1, COOR *x2, REAL rm[3][3], int n, REAL *wt1, BOOL column) ----------------------------------------------------- - Input: COOR *x1 First array of coordinates - COOR *x2 Second array of coordinates + Input: COOR *x1 First (fixed) array of coordinates + COOR *x2 Second (mobile) array of coordinates int n Number of coordinates REAL *wt1 Weight array or NULL BOOL column TRUE: Output a column-wise matrix (as used @@ -91,7 +91,7 @@ Returns: BOOL TRUE: success FALSE: error - Fit coordinate array x1 to x2 both centred around the origin and of + Fit coordinate array x2 to x1 both centred around the origin and of length n. Optionally weighted with the wt1 array if wt1 is not NULL. If column is set the matrix will be returned column-wise rather than row-wise. @@ -100,6 +100,7 @@ 01.06.92 ANSIed & doc'd 17.06.93 various changes for release (including parameters) 11.03.94 column changed to BOOL + 25.11.02 Corrected header! */ BOOL matfit(COOR *x1, /* First coord array */ COOR *x2, /* Second coord array */ diff -Pur ProFitV2.2.orig/src/bioplib/general.h ProFitV2.2/src/bioplib/general.h --- ProFitV2.2.orig/src/bioplib/general.h Tue Aug 6 04:56:24 2002 +++ ProFitV2.2/src/bioplib/general.h Thu Feb 12 08:42:59 2004 @@ -84,7 +84,7 @@ void GetFilestem(char *filename, char *stem); int upstrcmp(char *word1, char *word2); int upstrncmp(char *word1, char *word2, int ncomp); -char *GetWord(char *buffer, char *word); +char *GetWord(char *buffer, char *word, int maxsize); BOOL OpenStdFiles(char *infile, char *outfile, FILE **in, FILE **out); FILE *OpenFile(char *filename, char *envvar, char *mode, BOOL *noenv); int countchar(char *string, char ch); @@ -109,4 +109,3 @@ void getfield(char *buffer, int start, int width, char *str); #endif -