anchor.diff:  
         ! Case 3-3: move in amorphous substance (big input angles)
         ! Modified for transition vram daniele
  -      if(xp_rel > L_chan/c_rcurv + two*xpcrit .or. xp_rel < -xpcrit) then
  +      write(*,*) 'Transition VRAM check'
  +      write(*,*) 'xp_rel', xp_rel
  +      write(*,*) 'tdefl', tdefl
  +      write(*,*) 'miscut', c_miscut
  +      write(*,*) 'tdefl-miscut', tdefl-c_miscut
  +      write(*,*) 'xp_rel >', L_chan/r+two*xpcrit, 'or xp_rel <', -xpcrit
  +      if(xp_rel > tdefl-c_miscut + two*xpcrit .or. xp_rel < -xpcrit) then
  +        write(*,*) 'Amorphous'
           iProc = proc_AM
           x     = x + (half*s_length)*xp
           y     = y + (half*s_length)*yp
  
positive.code:           x = x + (half*xp)*(s_length - Srefl)
            y = y + (half*yp)*(s_length - Srefl)
          else
            iProc = proc_TRAM
            x = x + xp*Srefl
            y = y + yp*Srefl
            Dxp = ((((-one*(13.6_fPrec/pc))*sqrt(s_length/dlri(is)))*c1m3)*xp_rel)/(two*xpcrit) + &
              (((13.6_fPrec/pc)*sqrt(s_length/DLRi(is)))*c1m3)*(one+(L_chan/c_rcurv)/(two*xpcrit))
            xp = xp+Dxp
            x  = x + (half*xp)*(s_length-Srefl)
            y  = y + (half*yp)*(s_length-Srefl)
  
negative.code:         x = x + (half*s_length)*xp
          y = y + (half*s_length)*yp
        else
          Pvr = (xp_rel-(tdefl-c_miscut))/(two*xpcrit)
          if(rndm4() > Pvr) then
            write(*,*) 'TRVR'
            iProc = proc_TRVR
            x     = x + xp*Srefl
            y     = y + yp*Srefl
  
            Dxp = (((-three*Ang_rms)*xp_rel)/(two*xpcrit) + Ang_avr) + ((three*Ang_rms)*(tdefl-c_miscut))/(two*xpcrit)
            xp  = xp + Dxp
            x   = x + (half*xp)*(s_length-Srefl)
            y   = y + (half*yp)*(s_length-Srefl)
  