Thermal conductivity of a material can be comprehended as being composed of microscopic building blocks relevant to the energy transfer due to a specific microscopic process or structure. The building block is called the partial thermal conductivity (PTC). The concept of PTC is essential to evaluate the contributions of various molecular mechanisms to heat conduction and has been providing detailed knowledge of the contribution. The PTC can be evaluated by equilibrium molecular dynamics (EMD) and non-equilibrium molecular dynamics (NEMD) in different manners: the EMD evaluation utilizes the autocorrelation of spontaneous heat fluxes in an equilibrium state whereas the NEMD one is based on stationary heat fluxes in a non-equilibrium state. However, it has not been fully discussed whether the two methods give the same PTC or not. In the present study, we formulate a Green-Kubo relation, which is necessary for EMD to calculate the PTCs equivalent to those by NEMD. Unlike the existing theories, our formulation is based on the local equilibrium hypothesis to describe a clear connection between EMD and NEMD simulations. The equivalence of the two derivations of PTCs is confirmed by the numerical results for liquid methane and butane. The present establishment of the EMD-NEMD correspondence makes the MD analysis of PTCs a robust way to clarify the microscopic origins of thermal conductivity.