Terpene cyclase that catalyzes the cyclization of farnesyl diphosphate (FPP) to pentalenene as a major product, as well as caryophyllene. (2E,6E)-farnesyl diphosphate = diphosphate + pentalenene The conserved DDXXD and NSE/DTE motifs are important for the catalytic activity, presumably through binding to Mg(2+). Belongs to the terpene synthase family.