dyn_ss writing pdb and ihpb cleaning
[unres.git] / source / unres / src_MD / energy_p_new_barrier.F
index 156ef66..64dd328 100644 (file)
@@ -4279,12 +4279,13 @@ C 24/11/03 AL: SS bridges handled separately because of introducing a specific
 C    distance and angle dependent SS bond potential.
 cmc        if (ii.gt.nres .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then
 C 18/07/06 MC: Use the convention that the first nss pairs are SS bonds
-c          if (.not.dyn_ss .and. i.le.nss) then
-C 15/02/13 CC dynamic SSbond
-        if (.not.dyn_ss.and.
-     &   ii.gt.nres .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then 
+        if (.not.dyn_ss .and. i.le.nss) then
+C 15/02/13 CC dynamic SSbond - additional check
+         if (ii.gt.nres 
+     &       .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then 
           call ssbond_ene(iii,jjj,eij)
           ehpb=ehpb+2*eij
+         endif
 cd          write (iout,*) "eij",eij
         else if (ii.gt.nres .and. jj.gt.nres) then
 c Restraints from contact prediction