Roger needs 46/230 points to end the year at #1 with Nadal not able to catch him. If he defends Basel he will have 50/250 points. Nadal isn't playing this week so Roger can only gain on him in the race, but in terms of the ranking he's defending, so nothing to gain.
In ranking points Roger has 7,205 and Nadal has 5,385 with the Madrid results. If we subtract the points that each one has to defend that's 1,000 for Roger and 200 for Nadal.
That gives them absolute points for 2007 as Roger = 6,205 and Nadal = 5,185.
That still gives Roger a lead of 1,020 for this year if neither guy gained any more points. So then it boils down in how likely is it that Nadal would gain 1,020 while Roger would fail to defend any of his remaining points.
At the start of Madrid, Roger mentioned that the only place he could gain points would be in Paris. I wonder if he will feel it's a good idea to try to pick up some points there even if he were not to win the tournment.