Ideal and real structures of different forms of carbon, with some remarks on their geological significance