Synthesis of inorganic nanomaterials