State-of-the art experimental techniques such as scanning tunneling microscopy have great difficulties in extracting detailed structural information about molecules adsorbed on surfaces. By combining atomic force microscopy and Kelvin probe force microscopy with ab initio calculations, we demonstrate that we can obtain a wealth of detailed structural information about the molecule itself and its environment. Studying an FFPB molecule on a gold surface, we are able to determine its exact location on the surface, the nature of its bonding properties with neighboring molecules that lead to the growth of one-dimensional strips, and the internal torsions and bendings of the molecule.