A crystal chemical approach to the formulation of self-lubricating nanocomposite coatings