A mineral is a naturally occurring inorganic chemical compound, which has a definite chemistry and a repeatable crystal structure. The 4,200 known minerals are individually called species. Minerals are composed of atoms arranged in specific repeating patterns in three dimensions. How the atoms are arranged determines properties such as crystal shape, fracture and cleavage, as well as optical properties. A rock is an aggregate of one or more minerals, and generally occurs in more extensive bedded deposits. A gemstone is a mineral that, when polished or faceted, is considered desirable for its beauty. For classification, minerals are divided into chemical groups of similar compounds, such as carbonates, nitrates, oxides, silicates and phosphates. Some minerals also occur as native chemical elements.