double precision gcart, gxcart, gradcag,gradxag common /mdgrad/ gcart(3,0:MAXRES), gxcart(3,0:MAXRES), & gradcag(3,MAXRES),gradxag(3,MAXRES)