Contacting molecular nanostructures. Molecular mechanics, charge Transfer, and transport properties