Electronic transport mechanism of a molecular electronic device: structural effects and terminal atoms