function m = addInputTwo2Zero(m, inFrom, stateFrom, fwd)
% ADDINPUTTWO2ZERO adds a reaction of the form u + x(1) -> 0
%
% m = addInputTwo2One(m, inFrom, stateFrom, to, fwd) adds a reaction of 
% the form:
%
%                           p(fwd)
% u(inFrom) + x(stateFrom) --------> 0
%
% See also
%   addInputTwo2OneRev
%   addInputOne2One
%   addTwo2One

% This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative 
% Works 3.0 United States License. To view a copy of this license, visit 
% http://creativecommons.org/licenses/by-nc-nd/3.0/us/ or send a letter to Creative Commons,
% 171 Second Street, Suite 300, San Francisco, California, 94105, USA.

    m = b2add(m, inFrom, stateFrom, stateFrom, fwd, -1);
    
    % add term to stoichiometry matrix    
    m.nR            = m.nR+1;
    [m.spinds.i_S, m.spinds.j_S, m.spinds.x_S, m.spinds.n_S] = ...
            sparse_vec(m.spinds.i_S, m.spinds.j_S, m.spinds.x_S, m.spinds.n_S, stateFrom, m.nR, -1);
end