Our first-principles calculations demonstrate that C 60-n B n /C 60-m Nm molecules could be engineered acceptor/donor pair needed for molecular electronics by properly controlling the number n and m of the substitutional dopants in C 60 . As an example, we propose that acceptor C 48 B 12 and donor C48 N12 can be promising components for molecular rectifiers, nanotube-based p-type, n-type and n-p-n transistors and p-n junctions