function DamVals = SitAIdam(SAcyto, SI_GT, SitA_FN, SitA_sN, LiveMat)

% DamVals is the size of live cells while SAcyto contains row number of whole maximal number of cells

DamVals = zeros(sum(LiveMat), 1);

ContNum = 1:length(LiveMat);
IDs = ContNum(LiveMat);

tox = 1;

rel = 0.9;   % Relief of toxin by immunity in the same familty (non-cognate)

for z0 = 1:sum(LiveMat)
    
    id0 = IDs(z0);
    
    ind_dam = 0;

    SitA_str = SAcyto(id0,:);
    SitI_ind = SI_GT(id0,:);

    for k = 1:SitA_FN

        start_pos = 1 + (k-1)*SitA_sN;
        termi_pos = k*SitA_sN;

        SAk = SitA_str(start_pos:termi_pos); % The SitA barcode (storage) of id0 organism (Family k of SitA)
        SIk =  SitI_ind(start_pos:termi_pos); % The SitI barcode (genogype) of id0 organism (Family k of SitI)

        T2I1_match = SAk.*SIk;

        UnpairedTox21 = sum( SAk(~T2I1_match)  );  % Unpaired toxin (SitA) from Cell 2 to Cell 1 (Not paired by the cognate SitI)
        ImNum1 = sum(SIk);   % It was assumed that unmatched immunity also confers partial protection


        addDam = UnpairedTox21*tox*(rel^ImNum1);

        ind_dam = ind_dam + addDam;


    end

    DamVals(z0) = ind_dam;

end