Wetting plays a key role in the cleaning process to remove impurities as one of the essential processes for the fabrication of semiconductor device, where cleaning of trenches with water, replacement with IPA (isopropyl-alcohol) and its removal are iteratively carried out. This process is still required upon recent reduction of the line width under 10 nm; however, this size is already at the border of the continuum limit where the theories of fluid mechanics can be applied. The authors adopted molecular dynamics (MD) simulations to examine the liquid behavior, especially regarding wetting at the nanoscale with respect to simple Lennard-Jones fluid [1-3], water [4,5], methanol as well as IPA as the liquids [6,7], while simple non-polar crystal [1-3,6], silica partially terminated with OH as the solids [4,5,7]. In these series of studies, we have shown how the solid-liquid, solid-vapor and liquid-vapor interfacial tensions can be defined in nanoscale to be consistent with Young’s equation as the macroscopic description about wetting.In the presentation, we will discuss how the interfacial tensions as the free energy can be properly calculated by MD simulations from mechanical and thermodynamic viewpoints.[1] Y. Yamaguchi, H. Kusudo, D. Surblys, T. Omori and G. Kikugawa, J. Chem. Phys. 150 (2019), 044701.[2] H. Kusudo, T. Omori, Y. Yamaguchi, J. Chem. Phys. 151 (2019), 154501.[3] Y. Imaizumi, T. Omori, H. Kusudo, C. Bistafa, Y. Yamaguchi, J. Chem. Phys., 153 (2020), 034701.[4] D. Surblys, F. Leroy, Y. Yamaguchi, F. Mueller-Plathe, J. Chem. Phys. 148 (2018), 134707.[5] C. Bistafa, D. Surblys, H. Kusudo, Y. Yamaguchi, J. Chem. Phys., 155 (2021), 064703.[6] D. Surblys, Y. Yamaguchi, K. Kuroda, M. Kagawa, T. Nakajima, and H. Fujimura, J. Chem. Phys. 140 (2014), 034505.[7] Y. Yamaguchi, S. Nakaoka, T. Hayashi, M. Kawakami, D. Yano, ECS Trans. 92 (2019), 87.