The initial structure is built using simple hybridization guesses and standard angles: sp2 of 120 deg and sp3 109.5 deg. The bond lengths are set using tabulated covalent radii. This rough structure is geometry optimized using J. J. P. Stewart's MOPAC (United States Air Force Academy) with the PM3 Hamiltonian. The MOPAC structure and Hessian are then used as input to a density functional theory program. We use Alain St-Amant's DeFT program (University of Ottawa) at the LSDA/VWN scf level with the Becke exchange and Perdew 86 correlation non-local corrections applied as a perturbation at the end of the scf energy calculation. We use the TZVP triple-zeta basis set with polarization on heavy atoms and hydrogen (DZVP2 for Li and Be). The output of DeFT is used for the molecular orbital energies, electrostatic potential based charges (esp), and dipole moment. The optimized geometry from DeFT is then used for a single point calculation using M. W. Schmidt, K. K. Baldridge, J. A. Boatz, S. T. Elbert, M. S. Gordon, J. H. Jensen, S. Koseki, N. Matsunaga, K. A. Nguyen, S. J. Su, T. L. Windus, M. Dupuis, and J. A. Montgomery's GAMESS program (Iowa State University) with the TZV triple-zeta basis set with polarization functions on heavy atoms and hydrogen and diffuse functions on heavy atoms only. This basis set is comparable to 6-311+G**. The Mulliken bond order analysis is from GAMESS and the natural orbital analysis is done with the NBO code by E. D. Glendening, A. E. Reed, J. E. Carpenter, and F. Weinhold (University of Wisconsin).
Since the geometry is generated using DFT, which includes electron correlation, and the properties are calculated at the Hartree-Fock level, the bond orders are somewhat too small. However, I wanted to use DFT to get the molecular orbital energies in the correct order for diatomics like N2 and O2 and to do a good job with hydrogen bonding and Van der Waals complex formation.
The final DFT geometry is converted to MDL mol file format using P. Walters and M. Stahl's Babel conversion program (University of Arizona). The mol file is included in the output for display by ChemScape Chime from MDL (also free). Babel doesn't like to give triple bonds to things like CO, so in the example results files I have converted these bonds by hand when necessary. In the stick structures, horizontal triple bonds are denoted by E symbols, which is as close to three horizonal lines as I have been able to find in standard character sets.