Adam's changes
[unres.git] / source / unres / src-HCD-5D / MD_A-MTS.F
index 4498b4a..d82cf17 100644 (file)
@@ -1965,12 +1965,12 @@ c 8/22/17 AL Loop to produce a low-energy random conformation
                   cycle
                 endif
               endif
-#ifdef SEARCHSC
               if (me.eq.king.or..not.out1file) then
               write (iout,*) "Energies after removing overlaps"
               call etotal(energia(0))
               call enerprint(energia(0))
               endif
+#ifdef SEARCHSC
 ! Search for better SC rotamers if requested
               if (searchsc) then
                 call sc_move(2,nres-1,10,1d10,nft_sc,etot)
@@ -1987,6 +1987,21 @@ c 8/22/17 AL Loop to produce a low-energy random conformation
               iranconf=1
               goto 122
             endif
+          else
+! Remove SC overlaps if requested
+              if (overlapsc) then
+                write (iout,*) 'Calling OVERLAP_SC'
+                call overlap_sc(fail)
+                if (fail) then 
+                  write (iout,*) 
+     &            "Failed to remove overlap"
+                endif
+              endif
+              if (me.eq.king.or..not.out1file) then
+              write (iout,*) "Energies after removing overlaps"
+              call etotal(energia(0))
+              call enerprint(energia(0))
+              endif
           endif
 C 8/22/17 AL Minimize initial structure
           if (dccart) then