do i=ithet_start,ithet_end
C Zero the energy function and its derivative at 0 or pi.
call splinthet(theta(i),0.5d0*delta,ss,ssd)
-<<<<<<< HEAD
- it=iabs(itype(i-1))
-=======
it=itype(i-1)
ichir1=isign(1,itype(i-2))
ichir2=isign(1,itype(i))
ichir21=isign(1,itype(i))
ichir22=isign(1,itype(i))
endif
->>>>>>> bartek2
if (i.gt.3) then
#ifdef OSF
phii=phi(i)