Systematic study on quantum confinement and waveguide effects for elastic and inelastic currents in atomic gold wire: importance of the phase factor for modeling electrodes.