We describe a rigorous and yet computationally simple way of calculating conductance properties of molecular conductors, using self-energy matrices to partition the overall structure into a molecular device and contacts. The standard methods of quantum chemistry are combined self-consistently with a nonequilibrium Green's function formalism to describe transport in an open system under bias. We employ our method to demonstrate the transition between two limiting cases of molecular conduction: metallic conduction in a gold nanowire and resonant conduction in a phenyl dithiol molecule.