The two-phase method is a one used in linear programming [1], to extremise functions under certain linear conditions. In molecular-dynamics simulations one solves a set of equations of motions and by using the information contained in the trajectories thus obtained, extracts information about the system under investigation (more about this in the next paragraph). Clearly, there is no immediate link between the two-phase method and the molecular-dynamics simulations -- there is only a tangential link between the two in that classical equations of motions (that is, the Euler-Lagrange equations) follow from the extremisation of the underlying action functional under certain boundary conditions.
As regards the information extracted from the trajectories calculated in molecular-dynamics simulations, this is usually done by calculating the van Hove pair correlation function [2]. From the behaviour of this function amongst others the melting point can be inferred. For some relevant application, consult [3].
[1] RJ Vanderbei, Linear Programming: Foundations and Extensions, 4th edition (Springer, New York, 2014).
[2] L van Hove, Phys. Rev. 95, 249 (1954).
Article Correlations in Space and Time and Born Approximation Scatte...
[3] WD Luedtke and U Landman, Phys. Rev. B 37, 4656 (1988).
Article Preparation and Melting of Amorphous Silicon by Molecular Dy...
Uthpala Herath : I do not know previous answers areuseful for you. Melting point can be determined quite exactly using 2 phase method. In principles you need to perform series of NPT simulations (classical MD or DFT-MD to estimate upper limuit and lower limit of the melting point. Simulation cells include a half or solid and a half of liquid, let say aligned along z-direction, it means you have 2 interfaces between liquid and solid along z-direction. Due to disorder nature of liquid phase, you may have to create liquid phase with large enough number of atoms, therefore simulation cells are large and calculations are expensive (especially for DFT) . Assume that you want to determine melting point at pressure P, try to get an idea about melting temperature at this pressure, then run first NPT at temperature of your first guess. After the simulation done, try to visualize the simulation cell to see you have more liquid or more solid (sometime it is hard to distinguish and you need to consider different combinations of local parameters). If you have more solid, it means the first guessed temperature is lower than melting temperature, you should do 2nd run at higher temperature. If it is not the case (you have more liquid), the first guessed temperature is higher actual melting temperature, so the 2nd run will be done at lower temperature. Repeat the procedure until you have small difference between upper limit and lower limit of melting temperature. If you need melting curve for construct a phase diagram, use the same procedure at other pressures.