ionic crystals

Dear All Users

I am newcomer in lammps and i want to simulate ionic crystals for example CaCo3, but I have a problem, I can not understand, how can i define coordination of atoms? and How can i construct a

CaCo3 crystal, for example: hexagonal ?

Is there any tutorials for this case?