On Tue, Oct 4, 2011 at 11:21 AM, Adam Ralph <adam.ra...@nuim.ie> wrote:
> Dear Brigitte, > > > Looking at the formulae it could be possible to get those results. > Take an example > below > > > Rho_cal = -0.11, 0.0, 0.05, 0.05 > Rho_obs = -0.08, 0.01, 0.04, 0.04 > > > R-fac = 0.02/0.0 = undefined > > > Correl = 0.0032 - (-0.0025*0.0025) > -------------------------------------- = 0.99 > sqrt(0.0043 * 0.0024) > > Did the calculations quickly so hope they are OK. However, I designed the > data so > that the denominator in the R-fac is zero i.e. the sum of Rho_cal = - sum > of Rho_obs. > It would imply that the ATMMAP from sfall does not cover the correct set of > grid points > for the ligand. You expect the Fc map to be positive in this region. You > need to generate > a new ATMMAP for each different ligand conformation. > > Adam > > Hi Adam That doesn't look right to me, the formula according to Jones et al is: RSR = sum(| rho_obs - rho_calc |) / sum(| rho_obs + rho_calc |) So for your example we have RSR = (.03 + .01 + .01 + .01) / (.19 + .01 + .09 + .09) = .13 which is obviously quite a reasonable number. If you want some numbers which will cause a zero divide you have to make rho_obs = - rho_calc for every point so each term in the sum in the denominator above is zero, and therefore obviously the denominator itself would be zero. Here are the relevant code snippets from OVERLAPMAP: iave(j,i)=0 xave(j,i)=0. yave(j,i)=0. iave(jj,ii)=iave(jj,ii)+1 xave(jj,ii)=xave(jj,ii)+xwork yave(jj,ii)=yave(jj,ii)+ywork xave(jj,ii)=xave(jj,ii)/iave(jj,ii) yave(jj,ii)=yave(jj,ii)/iave(jj,ii) rfac(jj,ii) = (abs(xave(jj,ii)- yave(jj,ii))) / (abs(xave(jj,ii)+ yave(jj,ii))) This looks wrong to me since the absolute value is being taken after the summation instead of before, i.e. it should be forming sums of abs(xwork-ywork) and abs(xwork+ywork). The absolute value of a sum is not the same as the sum of absoiute values! Note that the division throughout by the no of points (iave(jj,ii)) has no effect on the result. I didn't check the formula for the correlation coefficient. But your broad conclusion (that the data is garbage) is very probably correct! Cheers -- Ian