Abstract: The development of sensors capable of efficient 2,4,6-trinitrotoluene detection is evolving into an important research field due to mounting threats to public safety. Molecularly imprinted polymers are receiving intensifying attention as a potential recognition element. Currently, there is limited understanding as to how the solvent impacts the crucial complexation stage in the imprinted polymer production. Here we investigate whether solvent interactions during the complexation stage should be considered in the optimal design of such sensors. The approach adopted uses molecular dynamics to simulate the interactions, between all relevant molecules, in the pre-polymerization mixture with different porogenic solvents: pure acetonitrile, dimethyl sulfoxide, water, and binary mixtures at different compositions of the former two. Molecular dynamics provide an excellent opportunity to gain an accurate insight into the behaviour of the porogen molecules with the target molecule and functional monomers. The results showed conclusive evidence towards solvent interactions impacting the complex's quality in the studied system. A porogen mixture acetonitrile:dimethyl sulfoxide of 75:25 mol ratio is suggested for the optimal trinitrotoluene and methacrylic acid complexation