Nonribosomal peptide synthase; part of the gene cluster that mediates the biosynthesis of the dimeric diketopiperazine alkaloid ditryptophenaline (PubMed:24677498). The nonribosomal peptide synthase dtpA accepts L-tryptophan and L-phenylalanine as its substrates and forms the phenylalanyl-tryptophanyl cyclic dipeptide product cyclophenylalanyltryptophenyl (PubMed:24677498). The N-methyltransferase dtpB is responsible for the N-methylation of cyclophenylalanyltryptophenyl to yield cyclo-N-methylphenylalanyltryptophenyl (PubMed:24677498). The cytochrome P450 monooxygenase is responsible not only for pyrroloindole ring formation but also for concurrent dimerization of N-methylphenylalanyltryptophanyl diketopiperazine monomers into a homodimeric product (PubMed:24677498). Alkaloid biosynthesis. NRP synthetases are composed of discrete domains (adenylation (A), thiolation (T) or peptidyl carrier protein (PCP) and condensation (C) domains) which when grouped together are referred to as a single module (By similarity). Each module is responsible for the recognition (via the A domain) and incorporation of a single amino acid into the growing peptide product (By similarity). Thus, an NRP synthetase is generally composed of one or more modules and can terminate in a thioesterase domain (TE) that releases the newly synthesized peptide from the enzyme (By similarity). Occasionally, epimerase (E) domains (responsible for L- to D-amino acid conversion) are present within the NRP synthetase (By similarity). The presence of two intact modules suggests that the two modules condense L-tryptophan and L-phenylalanine together (PubMed:24677498). The C-terminal condensation domain might be responsible for cyclization of the dipeptide to form the diketopiperazine structure (PubMed:24677498). Abolishes the production of ditryptophenaline (PubMed:24677498). Belongs to the NRP synthetase family.