The interaction of TEX (an explosive recently attracts attention) with Mg and Ca atom(s) has been investigated within the limitations of density functional theory at the level of B3LYP/6-311++G(d, p). The effect of Mg in 1:1 mol ratio is very drastic on TEX and one of the NO2 moieties is expelled as preform of nitrite ion. The second Mg atom in the composite (1: 2 mol ratio of TEX: Mg) shows balancing effect of the first Mg atom, thus no bond cleavage occurs but some distortions happen. As for the effect of calcium, in 1:1 and 1:2 (TEX: Ca) ratios nitramine bond cleavage(s) occur(s) drastically. Some structural and quantum chemical data are presented. (C) 2017 Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license.