!!!!sample code, not a method yet
IF (tresidue .GE. t_V_stim_start .AND. tresidue .LT. t_V_stim_end) THEN
             IF (tresidue .LE. t_V_stim_start + ramp_time) THEN
                Vm = (tresidue-t_V_stim_start)/ramp_time * (V_stim - V_rest) + V_rest
             ELSE IF (tresidue .LE. t_V_stim_end-ramp_time .AND. (.NOT. is_being_clamped)) THEN
                Vm = V_stim
                is_being_clamped = .TRUE.
             ELSE IF (tresidue .GT. t_V_stim_end-ramp_time) THEN
                Vm = (t_V_stim_end-tresidue)/ramp_time * (V_stim - V_rest) + V_rest
             END IF
             IF (tresidue .LE. t_V_stim_start + ramp_time) THEN
!!$                Vm = (tresidue-t_V_stim_start)/ramp_time * (V_stim - V_rest) + V_rest
                Vm = Vm + dt * (V_stim-Vm)/ramp_time
             ELSE IF (tresidue .LE. t_V_stim_end-ramp_time .AND. (.NOT. is_being_clamped)) THEN
                Vm = V_stim
                is_being_clamped = .TRUE.
             ELSE IF (tresidue .GT. t_V_stim_end-ramp_time) THEN
!!$                Vm = (t_V_stim_end-tresidue)/ramp_time * (V_stim - V_rest) + V_rest
                Vm = Vm + dt * (V_rest-Vm)/ramp_time
             END IF
          ELSE IF (is_being_clamped .EQ. .TRUE.) THEN
             Vm = V_rest
             Vm = Vm + dt * (V_rest-Vm)/ramp_time
             
             is_being_clamped = .FALSE.
             INCLUDE "Vm_dependent.inc"  !!kva,kvi
             INCLUDE "dp_args.inc"  !! dp_arg1, dp_arg2
          END IF
       INCLUDE "Vm_dependent.inc"  !!kva,kvi
       INCLUDE "dp_args.inc"  !! dp_arg1, dp_arg2
          
