+#ifdef SC_END
+ allocate(nterm_scend(2,ntyp))
+ allocate(arotam_end(0:6,2,ntyp))
+ nterm_scend=0
+ arotam_end=0.0d0
+ read (irotam_end,*) ijunk
+!c write (iout,*) "ijunk",ijunk
+ do i=1,ntyp
+ if (i.eq.10) cycle
+ do j=1,2
+ read (irotam_end,'(a)')
+ read (irotam_end,*) nterm_scend(j,i)
+!c write (iout,*) "i",i," j",j," nterm",nterm_scend(j,i)
+ do k=0,nterm_scend(j,i)
+ read (irotam_end,*) ijunk,arotam_end(k,j,i)
+!c write (iout,*) "k",k," arotam",arotam_end(k,j,i)
+ enddo
+ enddo
+ enddo
+!c lprint=.true.
+ if (lprint) then
+ write (iout,'(a)') &
+ "Parameters of the local potentials of sidechain ends"
+ do i=1,ntyp
+ write (iout,'(5x,9x,2hp-,a3,6x,9x,a3,2h-p)')&
+ restyp(i,1),restyp(i,1)
+ do j=0,max0(nterm_scend(1,i),nterm_scend(2,i))
+ write (iout,'(i5,2f20.10)') &
+ j,arotam_end(j,1,i),arotam_end(j,2,i)
+ enddo
+ enddo
+ endif
+!c lprint=.false.
+#endif
+