Nucleation mechanism for vapor-to-liquid transition from substrates with nanoscale pores opened at one end.