c & " constr_dist",constr_dist," link_start_peak",link_start_peak,
c & " link_end_peak",link_end_peak
if (link_end.eq.0.and.link_end_peak.eq.0) return
+ if (link_end_peak.ne.0) then
do i=link_start_peak,link_end_peak
ehpb_peak=0.0d0
c print *,"i",i," link_end_peak",link_end_peak," ipeak",
enddo
enddo
enddo
+ endif
do i=link_start,link_end
C If ihpb(i) and jhpb(i) > NRES, this is a SC-SC distance, otherwise a
C CA-CA distance used in regularization of structure.
if (ii.gt.nres .and. iabs(itype(iii)).eq.1 .and.
& iabs(itype(jjj)).eq.1) then
call ssbond_ene(iii,jjj,eij)
- ehpb=ehpb+2*eij
+ ehpb=ehpb+eij
endif
cd write (iout,*) "eij",eij
cd & ' waga=',waga,' fac=',fac