Improving the efficiency of our first-principles calculation approach to the charge transport properties of nanoscale junctions, we consider an electronic device model based on the full rotaxane molecular structure including stoppers. We demonstrate that the conformational switching of molecules from the ground-state to the metastable-state conformation can be activated and the corresponding electrical switching from the OFF to the ON state can be observed in the rotaxane-based solid-state tunnel junctions.