diff -ur glmaid_dist.orig/assignseq.c++ glmaid_dist/assignseq.c++ --- glmaid_dist.orig/assignseq.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/assignseq.c++ 2005-12-15 08:36:47.000000000 -0800 @@ -2630,9 +2630,9 @@ if(ibestden <= 1) // 0.8 or 1.0 *maxngap = geo.maxngap; else if(ibestden ==2) // 1.2 - *maxngap = 1.5*geo.maxngap; + *maxngap = (int) (1.5*geo.maxngap); else if (ibestden >2) // 1.4 or 1.6 - *maxngap = 2.0 *geo.maxngap; + *maxngap = (int) (2.0 *geo.maxngap); } #endif diff -ur glmaid_dist.orig/bone.c++ glmaid_dist/bone.c++ --- glmaid_dist.orig/bone.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/bone.c++ 2005-12-15 08:31:26.000000000 -0800 @@ -815,7 +815,7 @@ } - bonemin = bone1.minden*maidfile.denscale; // lower limit used to make bone (round down) + bonemin = (int) (bone1.minden*maidfile.denscale); // lower limit used to make bone (round down) fprintf(fpout,"bonemin = %d\n",bonemin); defineiden(bone1,iden,den1,bonemin); // set point on boundary = REMOVE bsort(den1,bone1,sortv,bonemin,sortnum,&maxsize); // sort density into bins; sort[i] is vector of 1 ..... max diff -ur glmaid_dist.orig/checkfit.c++ glmaid_dist/checkfit.c++ --- glmaid_dist.orig/checkfit.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/checkfit.c++ 2005-12-15 08:22:14.000000000 -0800 @@ -2977,7 +2977,7 @@ *maxden = -1000.0; xtof(den1,pos,fd); /* convert from double word to float sccreen*/ for(k=0;k<=2;k++) - ir[k]=fd[k]+0.5; /*round to integer*/ + ir[k]=(int) (fd[k]+0.5); /*round to integer*/ for(ii=ir[0]-2;ii<=ir[0]+2;ii++){ if( (ii>=1)&& (ii<=den1.amax[0]-den1.amin[0]-1) ) for(jj=ir[1]-2;jj<=ir[1]+2;jj++) diff -ur glmaid_dist.orig/extend2.c++ glmaid_dist/extend2.c++ --- glmaid_dist.orig/extend2.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/extend2.c++ 2005-12-15 08:24:45.000000000 -0800 @@ -363,7 +363,7 @@ nend[3]=geo.nend[1]+3; #if 1 // Works well in most cases mrot[0]= 2*nrot; - mrot[1]= 1.5*nrot; + mrot[1]= (int) (1.5*nrot); mrot[2]= nrot; mrot[3]= nrot; #endif diff -ur glmaid_dist.orig/extendfit.c++ glmaid_dist/extendfit.c++ --- glmaid_dist.orig/extendfit.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/extendfit.c++ 2005-12-15 08:26:43.000000000 -0800 @@ -4024,7 +4024,7 @@ ext.usenfits = 3;// I do not think this makes any difference since it reset in other routines -Number of unassigned connected that must be linked to assigne seq. value geo.deldist = sqrt( dot(den1.delx,den1.delx) ); // length of den1.delx vector = 1.445 for shad , res = 2.5 if(geo.deldist < 1.445) - geo.gnmax = 7*(1.445/geo.deldist) +1; + geo.gnmax = (int) (7*(1.445/geo.deldist) +1); else geo.gnmax = 7; geo.maxugap = 8; //Maximum gap allowed to connect unassigned fits diff -ur glmaid_dist.orig/fit.c++ glmaid_dist/fit.c++ --- glmaid_dist.orig/fit.c++ 2005-12-15 08:15:43.000000000 -0800 +++ glmaid_dist/fit.c++ 2005-12-15 08:36:24.000000000 -0800 @@ -65,7 +65,7 @@ tordata.torconst=torconstorig; tordata2.torconst=torconstorig; tordata.rfor=rfororig; //-BE CAREFUL - MUST BE SURE rfororig defined/geo.maxside = origmaxside; -geo.maxside = origmaxside; +geo.maxside = (int) origmaxside; if (&client_data) { XtRemoveWorkProc (work_id); } diff -ur glmaid_dist.orig/initialize.c++ glmaid_dist/initialize.c++ --- glmaid_dist.orig/initialize.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/initialize.c++ 2005-12-15 08:34:02.000000000 -0800 @@ -300,7 +300,7 @@ nless=nless+1; dds= -MAXCHAR+1; } - den1.den[i][j][k]=dds; + den1.den[i][j][k]=(signed) dds; } } } Files glmaid_dist.orig/initialize.o and glmaid_dist/initialize.o differ diff -ur glmaid_dist.orig/mapmenu.c++ glmaid_dist/mapmenu.c++ --- glmaid_dist.orig/mapmenu.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/mapmenu.c++ 2005-12-15 08:35:53.000000000 -0800 @@ -430,7 +430,7 @@ { int i; for(i=0;i<3;i++) - map.crange[i] = fcontradius[item_no]/map.delx[i]; + map.crange[i] = (int) (fcontradius[item_no]/map.delx[i]); //printf("map radius = %d\n",map.crange[0]); } diff -ur glmaid_dist.orig/math.c++ glmaid_dist/math.c++ --- glmaid_dist.orig/math.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/math.c++ 2005-12-15 08:31:55.000000000 -0800 @@ -51,9 +51,9 @@ z=xx[2]/den1.cvz; y=(xx[1]-z*den1.cvy)/den1.singam; x=xx[0]-y*den1.cosgam-z*den1.cosbe; - ijk[0]=x/den1.delx[0] - den1.amin[0]; - ijk[1]=y/den1.delx[1] - den1.amin[1]; - ijk[2]=z/den1.delx[2] - den1.amin[2]; + ijk[0]=(int) (x/den1.delx[0] - den1.amin[0]); + ijk[1]=(int) (y/den1.delx[1] - den1.amin[1]); + ijk[2]=(int) (z/den1.delx[2] - den1.amin[2]); } void imcv(struct griddata& den1,int xi[3],float sx[3]) /*convert from integer xi,xj (grid point) diff -ur glmaid_dist.orig/menu.c++ glmaid_dist/menu.c++ --- glmaid_dist.orig/menu.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/menu.c++ 2005-12-15 08:35:15.000000000 -0800 @@ -321,7 +321,7 @@ { int i; sc.cubecol[0] += 0.01; - i= sc.cubecol[0]; + i= (int) sc.cubecol[0]; sc.cubecol[0]= sc.cubecol[0]-i;; draw_screen(client_data); return False; // Runs continually @@ -987,14 +987,14 @@ int i; for(i=0;i<=2;i++) // Use default contour radius - den1.crange[i]=sc.contourradius/den1.delx[i]; + den1.crange[i]=(int) (sc.contourradius/den1.delx[i]); den1.contonoff = -1; den1.selectcontonoff = -1; for(i=0;i<3;i++) den1.color[i]=bluev[i]; den1.conlevel = sc.conlevel*maidfile.denscale; // Set contourleve to default value // Allocate arrays for contour routines - den1.ntri = NTRI/(den1.delx[0]*den1.delx[1]*den1.delx[2]); // Scale ntri relative del = 1 + den1.ntri = (int) (NTRI/(den1.delx[0]*den1.delx[1]*den1.delx[2])); // Scale ntri relative del = 1 printf("Allocating arrays for contour routines ntriangles = %d\n",den1.ntri); imat2(den1.tri,den1.ntri,9); printf(" Done\n"); diff -ur glmaid_dist.orig/pdbtolev.c++ glmaid_dist/pdbtolev.c++ --- glmaid_dist.orig/pdbtolev.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/pdbtolev.c++ 2005-12-15 08:27:19.000000000 -0800 @@ -645,7 +645,7 @@ { int i,j,natot,bi; float bsqr; - natot=subst[snum].pos[0][0]; /*total # of atoms*/ + natot=(int) subst[snum].pos[0][0]; /*total # of atoms*/ bsqr=tsqr(bondlength); for(i=1;i<=natot;i++) cmat[i][0]=0; /*initally no connections to i*/ diff -ur glmaid_dist.orig/rankside.c++ glmaid_dist/rankside.c++ --- glmaid_dist.orig/rankside.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/rankside.c++ 2005-12-15 08:33:32.000000000 -0800 @@ -201,13 +201,13 @@ #endif tbad = fit.ibad[resn][a1] + fit.ibad[resn][a2] +fit.ibad[resn][a3]; if(tbad==0) - return 0+iadd; + return 0+(int) iadd; if(tbad ==1) - return 1+iadd; + return 1+(int) iadd; if(tbad==2) - return 2+iadd; + return 2+(int) iadd; if(tbad==3) - return 4+iadd; + return 4+(int) iadd; else if ((fit.ibad[resn][MET]==0)||(fit.ibad[resn][GLU]==0)||(fit.ibad[resn][GLN]==0) ) return 3; else @@ -245,11 +245,11 @@ iadd = iadd+1; #endif if(fit.ibad[resn][a1]==0 ) - return 0+iadd; + return 0+(int) iadd; else if( fit.ibad[resn][a2]==0 ) - return 1+iadd; + return 1+(int) iadd; else if( fit.ibad[resn][a3]==0 ) - return 1+iadd; + return 1+(int) iadd; else if ((fit.ibad[resn][MET]==0)||(fit.ibad[resn][GLU]==0)||(fit.ibad[resn][GLN]==0) ) return 3; else @@ -285,11 +285,11 @@ iadd = iadd+1; #endif if(fit.ibad[resn][a1]==0 ) - return 0+iadd; + return 0+(int) iadd; else if( fit.ibad[resn][a2]==0 ) - return 1+iadd; + return 1+(int) iadd; else if( fit.ibad[resn][a3]==0 ) - return 1+iadd; + return 1+(int) iadd; else if ((fit.ibad[resn][MET]==0)||(fit.ibad[resn][GLU]==0)||(fit.ibad[resn][GLN]==0) ) return 3; else @@ -316,11 +316,11 @@ if(valden> 1.1*ringden) //change2 iadd = iadd+1; if(fit.ibad[resn][a1]==0 ) - return 0+iadd; + return 0+(int) iadd; else if( fit.ibad[resn][a2]==0 ) - return 1+iadd; + return 1+(int) iadd; else if( fit.ibad[resn][a3]==0 ) - return 1+iadd; + return 1+(int) iadd; else if ((fit.ibad[resn][MET]==0)||(fit.ibad[resn][GLU]==0)||(fit.ibad[resn][GLN]==0) ) return 3; else Files glmaid_dist.orig/rankside.o and glmaid_dist/rankside.o differ diff -ur glmaid_dist.orig/refine.c++ glmaid_dist/refine.c++ --- glmaid_dist.orig/refine.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/refine.c++ 2005-12-15 08:26:15.000000000 -0800 @@ -67,8 +67,8 @@ */ { int ix,rnd; - ix = floor(x); - rnd = nn*(x-ix) + 0.5; + ix = (int) floor(x); + rnd = (int) (nn*(x-ix) + 0.5); printf("nn = %d x = %5.3f rnd = %d Grid point %5.3f\n",nn,x,rnd,ix+(float)rnd/nn); return rnd; } @@ -82,8 +82,8 @@ int k; for(k=0;k<=2;k++){ - ivec[k] = floor(fvec[k]); - ival[k] = nn*(fvec[k]-ivec[k]) + 0.5; + ivec[k] = (int) floor(fvec[k]); + ival[k] = (int) (nn*(fvec[k]-ivec[k]) + 0.5); } } @@ -115,9 +115,9 @@ } for(k=0;k<=2;k++) gzd.dvec[gzd.num][k] =ivec[k]; - gzd.den[gzd.num] = scalechar* exp(-rad*rad/bfact) +0.5; // mult by 100 and round + gzd.den[gzd.num] = (int) (scalechar* exp(-rad*rad/bfact) +0.5); // mult by 100 and round for(k=0;k<=2;k++) - gzd.forv[gzd.num][k] = 4.0*rad*gzd.den[gzd.num]*diffv[k]/bfact; + gzd.forv[gzd.num][k] = (int) (4.0*rad*gzd.den[gzd.num]*diffv[k]/bfact); } void assignforce(gzdhead) @@ -421,7 +421,7 @@ gzd[0].num = 0; oneatomgrid(den1,geo,ivec0,cenpos,gzd[0],bfact,countfunc); printf("totnum = %d\n",gzd[0].num); - maxgzd = gzd[0].num = 1.5*gzd[0].num; // increase by 15% + maxgzd = gzd[0].num = (int) (1.5*gzd[0].num); // increase by 15% allocategzd(gzd[0].num); del = 1.0/NDIV; for(i=0;i<=NDIV;i++){ diff -ur glmaid_dist.orig/sphere.c++ glmaid_dist/sphere.c++ --- glmaid_dist.orig/sphere.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/sphere.c++ 2005-12-15 08:36:06.000000000 -0800 @@ -95,7 +95,7 @@ fclose(fp); } // spherefile opened sc.isphere = maidfile.nsphere; // set active sphere to last read - sc.drawspheres =1.0; + sc.drawspheres =1; if (widget = XtNameToWidget (spheremenu,"button_0")) //DEFAULT: Turn off check box for label on/off button XtVaSetValues (widget, XmNset,TRUE, NULL); } diff -ur glmaid_dist.orig/tordyn.c++ glmaid_dist/tordyn.c++ --- glmaid_dist.orig/tordyn.c++ 2005-12-15 08:13:32.000000000 -0800 +++ glmaid_dist/tordyn.c++ 2005-12-15 08:28:27.000000000 -0800 @@ -337,8 +337,8 @@ xtof(den1,apos,fd); /* New version, interpolates all neighbors*/ for(k=0;k<=2;k++){ - ir[k]=fd[k]; /*round down*/ - irh[k]=fd[k]+0.5; /*round to next 1/2*/ + ir[k]=(int) fd[k]; /*round down*/ + irh[k]=(int) (fd[k]+0.5); /*round to next 1/2*/ if( (ir[k]<1)|| (irh[k]>den1.amax[k]-den1.amin[k]-1) ){ // if(verbose>=1) if(verbose>=2) // 30nov00 - do not print this line @@ -683,7 +683,7 @@ atomden = 0; xtof(den1,pos,fd); /* convert from double word to float sccreen*/ for(kc=0;kc<=2;kc++) - ir[kc]=fd[kc]; /*round down to integer*/ + ir[kc]=(int) fd[kc]; /*round down to integer*/ for(k=0;k<=2;k++){ // check if pos in density range if( (ir[k]<2)|| (ir[k]>den1.amax[k]-den1.amin[k]-2) ){ if(verbose>=2) @@ -2898,7 +2898,7 @@ //printf("oneside = %d geopos6(x) = geo.pos[geo.nend[0]+oneside][6][0] = %5.3f\n",geo.oneside,geo.pos[geo.nend[0]+geo.oneside][6][0]); } *returnden = bestden; // return best cterm density - *returnbad = bestbad; + *returnbad = (int) bestbad; }// quitcont <5 quitrout:; geo.fixend = origfixend; // set back to original value diff -ur glmaid_dist.orig/trace.c++ glmaid_dist/trace.c++ --- glmaid_dist.orig/trace.c++ 2005-12-15 08:09:55.000000000 -0800 +++ glmaid_dist/trace.c++ 2005-12-15 08:31:07.000000000 -0800 @@ -1079,7 +1079,7 @@ xtoi(den1,pos[resnum][atomnum],ig); for(k=0;k<=2;k++) - ig[k]=ig[k]+0.5; /*rounds to nearest grid point*/ + ig[k]=(int) (ig[k]+0.5); /*rounds to nearest grid point*/ for(k=0;k<=2;k++){ // check if pos in density range if( (ig[k]<2)|| (ig[k]>den1.amax[k]-den1.amin[k]-2) ) return 0; @@ -1099,7 +1099,7 @@ xtof(den1,pos,ijk); /*convert from world co-ord to floating grid i,j,k co-ord*/ for(k=0;k<=2;k++) - ig[k]=ijk[k]+0.5; /*rounds to nearest grid point*/ + ig[k]=(int) (ijk[k]+0.5); /*rounds to nearest grid point*/ for(k=0;k<=2;k++){ // check if pos in density range if( (ig[k]<1)|| (ig[k]>den1.amax[k]-den1.amin[k]-1) ){ if(verbose>=2) @@ -1127,7 +1127,7 @@ xtof(den1,pos,ijk); /*convert from world co-ord to floating grid i,j,k co-ord*/ for(k=0;k<=2;k++) - ig[k]=ijk[k]+0.5; /*rounds to nearest grid point*/ + ig[k]=(int) (ijk[k]+0.5); /*rounds to nearest grid point*/ for(k=0;k<=2;k++){ // check if pos in density range if( (ig[k]<1)|| (ig[k]>den1.amax[k]-den1.amin[k]-1) ){ if(verbose>=2) @@ -1204,7 +1204,7 @@ xtof(den1,pos,ijk); /*convert from world co-ord to floating grid i,j,k co-ord*/ for(k=0;k<=2;k++) - ig[k]=ijk[k]+0.5; /*rounds to nearest grid point*/ + ig[k]=(int) (ijk[k]+0.5); /*rounds to nearest grid point*/ for(k=0;k<=2;k++){ // check if pos in density range if( ((ig[k]-geo.setrad)<0)|| ((ig[k]+geo.setrad)>den1.griddim[k]-1) ){ if(verbose>=2) @@ -2543,7 +2543,7 @@ atomden = 0; xtof(den1,pos,fd); /* convert from double word to float sccreen*/ for(kc=0;kc<=2;kc++) - ir[kc]=fd[kc]; /*round down to integer*/ + ir[kc]=(int) fd[kc]; /*round down to integer*/ for(k=0;k<=2;k++){ // check if pos in density range if( (ir[k]<1)|| (ir[k]>den1.amax[k]-den1.amin[k]-1) ){ //if(verbose>=2) @@ -2569,7 +2569,7 @@ atomden = 0; xtof(den1,pos[inum][itype],fd); /* convert from double word to float sccreen*/ for(kc=0;kc<=2;kc++) - ir[kc]=fd[kc]; /*round down to integer*/ + ir[kc]=(int) fd[kc]; /*round down to integer*/ for(k=0;k<=2;k++){ // check if pos in density range if( (ir[k]<1)|| (ir[k]>den1.amax[k]-den1.amin[k]-1) ){ if(verbose>=2) @@ -3438,7 +3438,7 @@ dist =distv(pos[1][1],pos[n0+1][1]); // distance from Ca[geo.cafix] to Ca[1] dist = dist/2.0; thdel = rotdel/dist; // step size of theta rotation - mth =1+ thtot/thdel; // max # of theta steps - round up + mth =1+ (int) (thtot/thdel); // max # of theta steps - round up thdel = thtot/mth; // reset th del so that equal steps from 0 to thttot maxden = -10000.0; for(iaxis=0;iaxis<8;iaxis++){// rotate about origingalca1 caend axis @@ -3455,7 +3455,7 @@ } else{ delph = rotdel/(dist*sin(th));//the delta phi angle step - mphi = phitot/delph +1; // round up + mphi = (int) (phitot/delph) +1; // round up delph = phitot/mphi; // make phitot = mphi*delph } for(iph = 0;iph<=mphi;iph++){ // the phi step @@ -3545,7 +3545,7 @@ dist =distv(pos[1][1],pos[n0+1][1]); // distance from Ca[geo.cafix] to Ca[1] dist = dist/2.0; thdel = rotdel/dist; // step size of theta rotation - mth =1+ thtot/thdel; // max # of theta steps - round up + mth =1+ (int) (thtot/thdel); // max # of theta steps - round up thdel = thtot/mth; // reset th del so that equal steps from 0 to thttot maxden = -10000.0; for(iaxis=0;iaxis<8;iaxis++){// rotate about origingalca1 caend axis @@ -3562,7 +3562,7 @@ } else{ delph = rotdel/(dist*sin(th));//the delta phi angle step - mphi = phitot/delph +1; // round up + mphi = (int) (phitot/delph) +1; // round up delph = phitot/mphi; // make phitot = mphi*delph } for(iph = 0;iph<=mphi;iph++){ // the phi step @@ -6905,8 +6905,8 @@ for(i=0;i<=2;i++) avegrid = avegrid+den1.delx[i]; avegrid = avegrid/3.0; - geo.nihel = 0.5 + geo.curdist[1]/(1.414*avegrid); // 0.5 so that rounds to nearest int - geo.nisheet = geo.curdist[2]/(1.414*avegrid); + geo.nihel = (int) (0.5 + geo.curdist[1]/(1.414*avegrid)); // 0.5 so that rounds to nearest int + geo.nisheet = (int) (geo.curdist[2]/(1.414*avegrid)); printf("\nGRID SIZE: %5.3f %5.3f %5.3f avegrid = %5.3f nihel = %d\n", den1.delx[0],den1.delx[1],den1.delx[2],avegrid,geo.nihel); Files glmaid_dist.orig/trace.o and glmaid_dist/trace.o differ