double precision dcdv,dxdv,dxds,gradx,gradc,gvdwc,gelc,gelc_long & gvdwpp,gel_loc,gel_loc_long,gvdwc_scpp,gliptranc,gliptranx, & gradx_scp,gvdwc_scp,ghpbx,ghpbc,gloc,gloc_x,dtheta,dphi,dalpha, & domega,gscloc,gsclocx,gradcorr,gradcorr_long,gradcorr5_long, & gradcorr6_long,gcorr6_turn_long,gvdwx,gshieldx,gradafm, & gg_tube,gg_tube_SC, & gshieldc, gshieldc_loc, gshieldx_ec, gshieldc_ec, & gshieldc_loc_ec, gshieldx_t3,gshieldc_t3,gshieldc_loc_t3, & gshieldx_t4, gshieldc_t4,gshieldc_loc_t4,gshieldx_ll, & gshieldc_ll, gshieldc_loc_ll integer nfl,icg common /derivat/ dcdv(6,maxdim),dxdv(6,maxdim),dxds(6,maxres), & gradx(3,-1:maxres,2),gradc(3,-1:maxres,2),gvdwx(3,-1:maxres), & gvdwc(3,-1:maxres),gelc(3,-1:maxres),gelc_long(3,-1:maxres), & gvdwpp(3,-1:maxres),gvdwc_scpp(3,-1:maxres), & gliptranc(3,-1:maxres), & gliptranx(3,-1:maxres), & gshieldx(3,-1:maxres), gshieldc(3,-1:maxres), & gshieldc_loc(3,-1:maxres), & gshieldx_ec(3,-1:maxres), gshieldc_ec(3,-1:maxres), & gshieldc_loc_ec(3,-1:maxres), & gshieldx_t3(3,-1:maxres), gshieldc_t3(3,-1:maxres), & gshieldc_loc_t3(3,-1:maxres), & gshieldx_t4(3,-1:maxres), gshieldc_t4(3,-1:maxres), & gshieldc_loc_t4(3,-1:maxres), & gshieldx_ll(3,-1:maxres), gshieldc_ll(3,-1:maxres), & gshieldc_loc_ll(3,-1:maxres), & gradafm(3,-1:maxres),gg_tube(3,-1:maxres), & gg_tube_sc(3,-1:maxres), & gradx_scp(3,-1:maxres),gvdwc_scp(3,-1:maxres), & ghpbx(3,-1:maxres), & ghpbc(3,-1:maxres),gloc(maxvar,2),gradcorr(3,-1:maxres), & gradcorr_long(3,-1:maxres),gradcorr5_long(3,-1:maxres), & gradcorr6_long(3,-1:maxres),gcorr6_turn_long(3,-1:maxres), & gradxorr(3,-1:maxres),gradcorr5(3,-1:maxres), & gradcorr6(3,-1:maxres), & gloc_x(maxvar,2),gel_loc(3,-1:maxres),gel_loc_long(3,-1:maxres), & gcorr3_turn(3,-1:maxres), & gcorr4_turn(3,-1:maxres),gcorr6_turn(3,-1:maxres), & gradb(3,-1:maxres), & gradbx(3,-1:maxres),gel_loc_loc(maxvar),gel_loc_turn3(maxvar), & gel_loc_turn4(maxvar),gel_loc_turn6(maxvar), & gcorr_loc(maxvar), & g_corr5_loc(maxvar),g_corr6_loc(maxvar),gsccorc(3,-1:maxres), & gsccorx(3,-1:maxres),gsccor_loc(-1:maxres), & dtheta(3,2,-1:maxres), & gscloc(3,-1:maxres),gsclocx(3,-1:maxres), & dphi(3,3,-1:maxres),dalpha(3,3,-1:maxres),domega(3,3,-1:maxres), & nfl, & icg double precision derx,derx_turn common /deriv_loc/ derx(3,5,2),derx_turn(3,5,2) double precision dXX_C1tab(3,maxres),dYY_C1tab(3,maxres), & dZZ_C1tab(3,maxres),dXX_Ctab(3,maxres),dYY_Ctab(3,maxres), & dZZ_Ctab(3,maxres),dXX_XYZtab(3,maxres),dYY_XYZtab(3,maxres), & dZZ_XYZtab(3,maxres) common /deriv_scloc/ dXX_C1tab,dYY_C1tab,dZZ_C1tab,dXX_Ctab, & dYY_Ctab,dZZ_Ctab,dXX_XYZtab,dYY_XYZtab,dZZ_XYZtab integer igrad_start,igrad_end,jgrad_start(maxres), & jgrad_end(maxres) common /mpgrad/ igrad_start,igrad_end,jgrad_start,jgrad_end