A method is presented for predicting one-particle energies for a molecule in a junction with one metal electrode, using density functional theory methods. In contrast to previous studies, in which restricted spin configurations were analyzed, we take spin polarization into account. Furthermore, in addition to junctions in which the molecule is weakly coupled, our method is also capable of describing junctions in which the molecule is chemisorbed to the metal contact. We implemented a fully self-consistent scissor operator to correct the highest occupied molecular orbital-lowest unoccupied molecular orbital gap in transport calculations for single molecule junctions. We present results for various systems and compare our results with those obtained by other groups.