Ab initio calculations on the basis of quantum molecular dynamics CPMD (Car-Parrinello Molecular Dynamics) code are used to simulate the resistance-change in amorphous carbon. These simulations show that the resistance change is related to changes in the atomic structures of conducting dots due to thermal effects. Different scenarios of the temperature growth and possible annealing procedures are considered. The energy gap between two structural stages and the density of states at different temperatures are determined. The electronic density is used to identify conductive pathways through the system. A multiscale model of resistance switching based on the reduced Ehrenfest molecular dynamics is suggested. This computational model combines long-time-scale CPMD calculations of thermodynamic equilibrium states with the short-time-scale calculations of transitions to a new configurations using excited states of the electronic system. The simulations were performed on the IBM Blue Gene/P supercomputer at Moscow State University. © 2012 Published by Elsevier Ltd.