Nanoscale characterization of forces, structure, and mechanical properties of functional materials