Involved in the biosynthesis of isopentenyl diphosphate (IPP) and dimethylallyl diphosphate (DMAPP), two major building blocks of isoprenoid compounds. Catalyzes the conversion of 4-diphosphocytidyl-2-C-methyl-D-erythritol 2-phosphate (CDP-ME2P) to 2-C-methyl-D-erythritol 2,4-cyclodiphosphate (ME-CPP) with a corresponding release of cytidine 5-monophosphate (CMP). 4-CDP-2-C-methyl-D-erythritol 2-phosphate = 2-C-methyl-D-erythritol 2,4-cyclic diphosphate + CMP Binds 1 divalent metal cation per subunit. Isoprenoid biosynthesis; isopentenyl diphosphate biosynthesis via DXP pathway; isopentenyl diphosphate from 1-deoxy-D-xylulose 5-phosphate: step 4/6. Homotrimer. Belongs to the IspF family. Extended N-terminus. Extended N-terminus.