Trifunctional enzyme that catalyzes the interconversion of three forms of one-carbon-substituted tetrahydrofolate: (6R)-5,10-methylene-5,6,7,8-tetrahydrofolate, 5,10-methenyltetrahydrofolate and (6S)-10-formyltetrahydrofolate. These derivatives of tetrahydrofolate are differentially required in nucleotide and amino acid biosynthesis, (6S)-10-formyltetrahydrofolate being required for purine biosynthesis while (6R)-5,10-methylene-5,6,7,8-tetrahydrofolate is used for serine and methionine biosynthesis for instance. (6R)-5,10-methylene-5,6,7,8-tetrahydrofolate + NADP(+) = 5,10-methenyltetrahydrofolate + NADPH 5,10-methenyltetrahydrofolate + H2O = (6S)-10-formyltetrahydrofolate + H(+) (6S)-5,6,7,8-tetrahydrofolate + ATP + formate = (6S)-10-formyltetrahydrofolate + ADP + phosphate One-carbon metabolism; tetrahydrofolate interconversion. Homodimer. The N-terminal methylenetetrahydrofolate dehydrogenase and methenyltetrahydrofolate cyclohydrolase (D/C) domain carries both the methylenetetrahydrofolate dehydrogenase and methenyltetrahydrofolate cyclohydrolase activities. The larger C-terminal formyltetrahydrofolate synthetase domain carries a third formyltetrahydrofolate synthetase activity. In the N-terminal section; belongs to the tetrahydrofolate dehydrogenase/cyclohydrolase family. In the C-terminal section; belongs to the formate--tetrahydrofolate ligase family.