Solid–liquid phase transition has been simulated by the molecular dynamics method, using isobaric–isoenthalpic ensemble. For interatomic potential, glue potential has been selected. The original algorithm for bookkeeping of the information on neighbouring relationships of the atoms has been developed and used in this research. Time consumption for calculation of interatomic forces has been reduced from o(N2) to o(N) by the use of this algorithm.Calculations show that phase transition from solid to liquid occurs between 1,000 K and 1,300 K. The simulated temperature of phase transition is higher than the experimental value due to the absence of crystal defects. If constant heat flux is supplied, temperature decreases during melting because the superheated state becomes unstable. During the cooling process, no significant changes of the observed variables were detected due to the high cooling rate, which prevents crystallisation.