Molecular simulations of silica based sensors interacting with explosive molecules in the presence of humidity are reported. In order to investigate how surface details affect sensing performance, three models of silica are obtained by tuning the number of various functional groups present at their surface to make them consistent with available data. These models are validated against experimental nitrogen isotherms. The number of water molecules to be introduced in the system in order to mimic a given value of relative humidity is established. Finally, preliminary simulations of 2,4,6-trinitrotoluene (TNT) molecules interacting with wet surfaces show that TNT molecules lie parallel to the surface while interacting strongly with the hydroxyl group of the silanol.