Recreating the natural evolutionary trend in key microdomains provides an effective strategy for engineering of a thermomicrobial N-demethylase

N-demethylases have been reported to remove the methyl groups on primary or secondary amines, which could further affect the properties and functions of biomacromolecules or chemical compounds; however, the substrate scope and the robustness of N-demethylases have not been systematically investigated. Here we report the recreation of natural evolution in key microdomains of the Thermomicrobium roseum sarcosine oxidase (TrSOX), an N-demethylase with marked stability (melting temperature over 100 °C) and enantioselectivity, for enhanced substrate scope and catalytic efficiency on -C-N- bonds. We obtained the structure of TrSOX by crystallization and X-ray diffraction (XRD) for the initial framework. The natural evolution in the nonconserved residues of key microdomains—including the catalytic loop, coenzyme pocket, substrate pocket, and entrance site—was then identified using ancestral sequence reconstruction (ASR), and the substitutions that accrued during natural evolution were recreated by site-directed mutagenesis. The single and double substitution variants catalyzed the N-demethylation of N-methyl-L-amino acids up to 1800- and 6000-fold faster than the wild type, respectively. Additionally, these single substitution variants catalyzed the terminal N-demethylation of non-amino-acid compounds and the oxidation of the main chain -C-N- bond to a -C=N- bond in the nitrogen-containing heterocycle. Notably, these variants retained the enantioselectivity and stability of the initial framework. We conclude that the variants of TrSOX are of great potential use in N-methyl enantiomer resolution, main-chain Schiff base synthesis, and alkaloid modification or degradation.

N-demethylases have been reported to remove the methyl groups on primary or secondary amines, which could further affect the properties and functions of biomacromolecules or chemical compounds; however, the substrate scope and the robustness of N-demethylases have not been systematically investigated. Here we report the recreation of natural evolution in key microdomains of the Thermomicrobium roseum sarcosine oxidase (TrSOX), an N-demethylase with marked stability (melting temperature over 100 C) and enantioselectivity, for enhanced substrate scope and catalytic efficiency on -C-Nbonds. We obtained the structure of TrSOX by crystallization and X-ray diffraction (XRD) for the initial framework. The natural evolution in the nonconserved residues of key microdomains-including the catalytic loop, coenzyme pocket, substrate pocket, and entrance site-was then identified using ancestral sequence reconstruction (ASR), and the substitutions that accrued during natural evolution were recreated by sitedirected mutagenesis. The single and double substitution variants catalyzed the N-demethylation of N-methyl-L-amino acids up to 1800-and 6000-fold faster than the wild type, respectively. Additionally, these single substitution variants catalyzed the terminal N-demethylation of non-amino-acid compounds and the oxidation of the main chain -C-N-bond to a -C=N-bond in the nitrogen-containing heterocycle. Notably, these variants retained the enantioselectivity and stability of the initial framework. We conclude that the variants of TrSOX are of great potential use in N-methyl enantiomer resolution, main-chain Schiff base synthesis, and alkaloid modification or degradation.
Sarcosine oxidase (SOX, EC. 1.5.3.1) oxidizes the -C-Nbond of sarcosine (N-methyl-Gly) or L-abrine (N-methyl-L-Trp) into the -C=N-bond and finally exposes the primary amine (Fig. 2, 1→2a→2b and 3→4a→4b), using a covalently linked FAD or flavin mononucleotide (FMN) as the cofactor (21). Recently, most members of the SOX family were screened from fungi and bacteria and have been used in the detection of serum creatinine for clinical diagnosis of kidney diseases or in the monitoring of glycerol or organic acid in the food industry (22,23). SOXs have not been well investigated in terms of other potential substrates except N-methyl-Gly or N-methyl-L-Trp. In addition, L-abrine is an acute toxic alkaloid (24), and it can be converted into L-Trp by SOXs without toxicity. Recently, because the alkaloid compounds have been widely used in the chemical and pharmaceutical industry (25,26), they have become significant pollutants in food (27), pharmaceuticals, plant extracts, municipal and hospital wastewaters (24,28), and they have also been considered a potential risk for bioterrorism (29). Alkaloids contain different types of terminal and main chain -C-N-bonds (30,31), and the N-demethylation or break down of -C-N-bonds could help to produce the corresponding compounds or promote their degradation (16). Therefore, the N-demethylation activity of SOXs can be a potential method for detoxification treatment after alkaloid pollution.
In our previous studies, the SOX enzyme (TrSOX, Gen-Bank: ACM06094.1) was obtained from Thermomicrobium roseum surviving in the basic hot springs of the Yellowstone National Park, and it had outstanding resistance against temperature (T m > 100 C), pH, and organic solvents; however, the poor recombinant expression level was a challenge for the characterization and application of this enzyme; and through surface design, a single mutant-TrSOX (S320R) far from the catalytic center was built with an over 20-fold promotion in soluble expression (22,23). Although the structures of several modern SOXs from Escherichia coli or Bacillus have been elucidated (32)(33)(34)(35), the structural details of TrSOX are still unclear because of the low sequence identity between TrSOX and these homologs (no more than 40%).
To optimize the structural and catalytic properties of enzymes, directed evolution and rational design are considered universal protocols. Directed evolution requires large-scale mutant libraries and high-throughput screening protocols. The rational design is more efficient for regulating the folding-unfolding equilibrium by destabilizing unfolding and stabilizing the folded conformation (36), localizing potential hotspots for rational design, or using semirational and de novo design (37) and the B-FIT-directed evolution method (38). However, significantly promoting the stability of a specific enzyme is always a challenge. Recently, starting from the sequences of well-studied modern enzymes, ancestral sequence reconstruction (ASR) has been applied to studying the evolutionary history of homologous families because ancestors in older nodes may possess specific properties produced in certain environments over billions of years of evolution, enhancing the thermostability of target enzymes (39)(40)(41). Properties of ancestors have previously been used as references to promote the stability of modern enzymes (42).
In most of the ASR-associated studies, some fractional features of ancestral enzymes were introduced into modern ones in order to promote the stability, but it did not always work. We supposed that the stability of an enzyme should be associated with the whole framework but not only several limited sites; therefore, in this work, a different strategy was employed. After the structure of TrSOX was elucidated using crystallization and XRD, the stable framework of TrSOX was used as the starting model. The natural evolutionary trends of nonconserved residues in the catalytic loop, substrate pocket, coenzyme pocket, and entrance site were identified by ASR, using approximately 100 homologous sequences, including modern and hypothetical SOXs. Furthermore, site-directed mutations were employed to recreate the substitutions occurring in these four regions during evolution, and the structural and catalytic properties were characterized.

Results
The structure of TrSOX and the natural evolutionary trends in key microdomains The structure of TrSOX (S320R) was solved by molecular replacement at 1.42 Å resolution, using a homologous model (PDB ID: 2GF3) as reference, and the data were deposited in the RCSB Protein Data Bank (PDB ID: 7EXS) (Fig. 3A). In sequence alignment and ASR, almost all the homologous enzymes sharing over 50% sequence identities with TrSOX were Engineering of TrSOX by tracing the natural evolution uncharacterized ones (Fig. 3B). The low sequence identities of TrSOX with homologous enzymes, e.g., PDB ID: 2UZZ (35.10%), 2A89 (39.90%), 3BHF (40.18%), 2GF3 (40.00%), 3M13 (40.18%), and 1ZOV (39.67%), indicated that there were significant evolutionary distances. In our previous work, the model of TrSOX was simulated using the above structures, and the low-soluble expression level of TrSOX was attributed to the high hydrophobic area (over 40%) on the solventaccessible surface (23); however, in the crystal structure of TrSOX, hydrophobic area on the surface was less than 30%almost the same as those of the modern homologs. This difference indicated that the models with significant evolutionary distances could not help to understand the structure of an unsolved one. Therefore, in this work, the structural resolution of TrSOX helped fill the informational gaps in the phylogenetic tree of this family, and it could be considered as the reference for the research of other homologs with closer evolutionary distances (Fig. 3B).
In the structure of TrSOX, there were four Cys residues at sites 153, 158, 274, and 312, C312 was covalently linked with FAD, and there was no disulfide bridge (Fig. 3C). To maintain the stable framework of TrSOX, we hope to bring as few changes as possible to limited sites. Through ASR, the natural evolutionary process of nonconserved residuals in key microdomains, which should play vital roles in enzymatic reactions, including catalytic loop, coenzyme pocket, substrate pocket, and entrance site, were identified (Fig. 3, C and D).

Recreation of natural evolution in catalytic loop
Ten of the 18 identified substitutions accruing in natural evolution in the catalytic loop (residues 57-62: -YFESPE-) (Fig. 3, C and D) were prepared and characterized (Table S1). In Figure 4, A-D, as for the native TrSOX, none of the mutants were active against N-methyl-D-amino acids; all these substitutions showed outstanding thermostability similar to the initial frame work, with T m at 100 C, ΔH above 500 kJ/ mol, optimal reaction temperature at 80 C, and the 80 C active half-lives at 72 h. F58G and P61E could promote the catalytic efficiency against most of the initial substrates (Fig. 2, 3→4a, 5→6a, 7→8a, 9→10a, 11→12a and 17→18a). However, Engineering of TrSOX by tracing the natural evolution S60G led to an over 40-fold enhanced activity against N-methyl-L-Asp (Fig. 2, 9→10a), with a dramatic decrease in activity for substrates with hydrophobic side chains (Fig. 2, 3→4a, 7→8a, 11→12a). The benzene ring of F58 was close to the substrate pocket, while S60 and P61 were relatively distanced (Fig. 4E). The substitution of Phe by Gly at site-58 might reduce the steric hindrance outside of the substrate cavity and enlarge its volume (Fig. 4F) and then promote the accessibility of most of the initial substrates except N-methyl-Gly and N-methyl-L-Phe, as F58G showed increased K m values for these two substrates; furthermore, the expanded substrate cavity led to the enhanced catalytic ratio (Table S1). S60G and P61E were unable to affect the size of the substrate pocket (Fig. 4, G and H), and they may act as navigators of the substrate outside of the pocket, as described in our previous study (23). Phe and Pro at site-58 and 61 were hydrophobic and rigid residues (43), and they should play vital roles in the structure and function of the catalytic loop. Double substitutions containing one of these two residues, e.g., F58G/S60G and S60G/ P61E, exhibited higher K m values and lower catalytic efficiency against substrates with hydrophobic side chains (Tables 1 and S1). Another double substitution, F58G/P61E was not as efficient as the two single substitutions; it should be attributed to the substitutions of these two rigid and hydrophobic residues by soft and hydrophilic ones, which might promote the flexibility and vibration of the catalytic loop.

The natural evolution in coenzyme pocket
Ten of the 15 substitutions accruing in natural evolution in the coenzyme pocket (Fig. 3, C and D) were prepared and characterized (Table S2). Of note, the enantioselectivity for substrates and thermostability were always retained (Fig. 5, A-D); S46T promoted the catalytic efficiency against substrates with large and hydrophobic side chains (Fig. 2, 3→4a, 7→8a, 11→12a); I52V and L209V revealed activity against L-Pro (Fig. 2, 15→16), L209V showed a 67-fold promotion against N-methyl-L-Asp (Fig. 2, 9→10a), while V174A revealed activity against (R)-2-methylpyrrolidine (Fig. 2, 21→22) ( Table 1). For the nonconserved sites . Structural resolution and ancestral sequence reconstruction. A, to resolve the crystal structure of TrSOX (S320R), the rod-shaped crystal was subjected to X-ray diffraction, and the structure was resolved at 1.42 Å by molecular replacement, using 2GF3 as reference. FAD was covalently linked with Cys312, α-helixes were labeled in red, β-sheets were labeled in light blue, β-turns were labeled in green. The structure of TrSOX (S320R) was overlapped with 3BHF (In white). B, molecular phylogenetic analysis was performed by Maximum Likelihood method, ▾ TrSOX, • homologous sequences with 3D structures. C, the catalytic loop was labeled in yellow, the residuals in 4 Å from the coenzyme (FAD) were labeled in purple, the residuals in 3 Å from the substrate pocket (green mesh surface) were labeled in red, and S320 at the entrance site was labeled in green, and four Cys residues were labeled in blue. D, in ancestral sequence reconstruction, the natural evolutionary trends of the nonconserved residues in the catalytic loop, coenzyme pocket, substrate pocket, and entrance site were identified. TrSOX, Thermomicrobium roseum sarcosine oxidase.
Engineering of TrSOX by tracing the natural evolution in coenzyme pocket, S46T (Fig. 5F), V174A (Fig. 5H), and L209V ( Fig. 5I) were relatively far away and resulted in no significant differences in substrate pocket, and they might affect the whole structure of the enzyme by binding with the cofactor and regulate catalytic properties by affecting the electron transfer chain through FAD; the detailed mechanism should be investigated through crystallization and XRD in our further work; I52 ( Fig. 5G) was located at the bottom of the substrate pocket, and it could enlarge the volume of substrate pocket. Double mutants including S46T/V174A, S46T/L209V, and V174A/L209V were designed; however, these could not be expressed in the soluble form as FAD was covalently linked with the enzyme, and it may play a vital role in the natural folding process, multiple mutants close to the coenzyme might have disrupted the entire structure of the enzyme.

Rebuilding the natural evolution in substrate pocket
Thirty one of the 41 substitutions accruing in natural evolution in substrate pocket (Fig. 3, C and D) were prepared and characterized (Table S3). Notably, the enantioselectivity for substrates and thermostability were also always maintained (Fig. 6, A-D); F243Y and I244T dramatically enhanced the catalytic efficiency against N-methyl-L-amino acids except for N-methyl-L-Trp (Fig. 2, 3→4a); F243Y brought a 750-fold enhanced activity for N-methyl-L-Asp (Fig. 2, 9→10a), while I244T showed activities against both of L-and D-Pro without enantioselectivity. Mutants at residues 245, 251, and 253 showed significantly decreased activity against N-methyl-L-Gly (Fig. 2, 1→2a); however, the substrate scope was enlarged, and especially for E251V, which could recognize non-amino-acid compounds or nitrogen-containing heterocycles, including N-Methyl-1-naphthalenemethylamine (  Table 1).
E251 and Y253 were located in one beta-sheet next to the substrate pocket, while F243 and I244 were in another parallel sheet (Fig. 6E). F243Y was positioned at the bottom of the substrate pocket, and it resulted in no significant difference in the volume of the pocket; but Y243 was closer to V92 (carbon hydrogen bond) and Y253 (newly formed amide-Pi stacked), which might affect the arrangement of the two-parallel betasheets in substrate pocket (Fig. 6F). With the enlarged substrate pocket volume (Fig. 6G), I244T promoted the activity except for N-methyl-L-Trp (Fig. 2, 3→4a), and D or L-Pro could both be recognized. E251V was positioned at the top of the substrate pocket, and it led to the decreasing of the pocket volume and the hydrophilicity (Fig. 6H), which could promote the accessibility of substrates with hydrophobic side chains. Y253A was positioned at the bottom of the substrate pocket, which enlarged the volume of the pocket (Fig. 6I). As the above four sites were all Engineering of TrSOX by tracing the natural evolution located on two parallel beta-sheets (Fig. 6E), the proximity of the multiple substitutions might disrupt the corrected folding, the double mutants designed of these sites could not be expressed in soluble form. As reported (21), the carboxylic acid group might participate in the reaction catalyzed by SOXs; and in this work, TrSOX (E251V) catalyzed the terminal N-demethylation of N-Methyl-1-naphthalenemethylamine (Fig. 2, 13→14a→14b), which suggested that the carboxylic acid group in the substrate should not be necessary for this reaction.

Multiple substitutions across the key microdomains
Multiple substitution variants across the key microdomains were prepared and characterized (Table S5). Regarding Figure 7H and Table 2, most S320K-containing substitutions promoted catalytic efficiency against N-methyl-L-amino acids, and S320K/F243Y was the most remarkable one; it significantly enhanced the N-demethylation of N-methyl-L-amino acids (Fig. 2, 1→2b (11.4-fold), 3→4b (1.58-fold), 5→6b (8.38-fold), 7→8b (478-fold), 9→10b (6230-fold), 11→12b (93.4-fold)) and the Schiff base formation of L-Pro associated compounds (Fig. 2, 15→16 (11.4-fold), 17→18 (128-fold)). In addition, E251V-containing substitutions revealed the novel activities against nitrogen-containing heterocycles; it suggested that the native residues inside the active pocket could recognize and catalyze these substrates; however, they were rejected by the hydrophilic Glu 251 residues on the top of the pocket, while the substitution by a hydrophobic and soft residues-Val could promote the entering of nitrogencontaining heterocycles. Furthermore, the combined triple substitutions, S320K/E251V/P61E and S320K/E251V/V174A, could enhance the catalytic efficiency against some nitrogencontaining heterocycles. In addition, multiple mutagenesis did not decrease the marked thermostability of TrSOX (Fig. 7, I-K). However, these novel activities against the main chain -C-N-bonds in nitrogen-containing heterocycles were relatively lower, and these substrates were seldom reported in the Table 1 The specific catalytic efficiency of positive mutants in key microdomains  Engineering of TrSOX by tracing the natural evolution whole homologous family, which might be attributed to the natural evolution. In future studies, artificial evolution of the conserved residues in key microdomains will be carried out to enhance these novel activities.

Characterization of the products
Regarding the TLC, LC-MS, NMR, and optical rotation assays, except for N-methyl-Gly, TrSOX variants presented specific enantioselectivity for substrates and products, and there was no racemization in the reactions. N-methyl-L-amino acids were finally converted to L-amino acids (Fig. 2, 1→2b, 3→4b, 5→6b, 7→8b, 9→10b, and 11→12b) (Figs. S1, S8-S13; Table S6), and this indicated that TrSOXs should be of great potential for the enantio-separation of N-methyl-substrates. As reported, Nmethyl-D-Asp is an essential molecule in the development of the brain and nervous system, mediating different signal pathways (44,45), and has been widely used in neurological research and the synthesis of anticancer drugs or used as a functional food and feed additive (46). In this study, the S320K/F243Y variant significantly promoted N-demethylation activity against Nmethyl-L-Asp, and it might be of great potential in the preparation of N-methyl-D-Asp by enantio-separation from Nmethyl-DL-Asp. In addition, in previous studies (21), SOXs converted N-methyl-glycine to 2-(methyleneamino)acetic acid (Fig. 2, 1→2a) as an intermediate product. However, because of the fast nonenzymatic hydrolysis reaction, all the Schiff bases in the intermediate states of the N-methyl-L-amino acids (Fig. 2,  2a, 4a, 6a, 8a, 10a, 12a) could not be detected here. Similar to amino-acid-associated substrates, catalyzed by TrSOX (E251V), N-Methyl-1-naphthalenemethylamine was converted to naphthalene-1-ylmethanamine (Fig. 2, 13→14b) (Figs. S3 and S17), and resulting from the nonenzymatic hydrolysis process (Fig. 2,  14a→14b), the intermediate product, N-(naphthalen-1ylmethyl)methanimine (Fig. 2, 14a) could not be detected. The terminal N-demethylation activity of TrSOXs with specific enantioselectivity could be employed in the detoxification treatment for alkaloid pollution, such as the N-demethylation of L-abrine (N-methyl-L-Trp) (24).

Engineering of TrSOX by tracing the natural evolution
In the Pro-associated metabolism processes of the human body, L-Pro and L-homoproline could be converted to Δ1pyrroline-5-carboxylate (P5C) and Δ1-piperideine-6carboxylate (P6C) (Fig. 2, 15→16a and 17→18a) and were associated with the development of diseases; however, without efficient preparation protocol and commercial standards, they could only be detected by LC-MS in previous studies (47,48). In this study, these two products were prepared, recovered, and confirmed by TLC, LC-MS, and NMR assays (Figs. S2, S14, and S15). Although the activity for L-hydroxyproline, a typical derivative of L-Pro, was relatively low, and the product was not enough for NMR analysis, LC-MS assays suggested that L-hydroxyproline was converted to (2S)-3-hydroxy-3,4dihydro-2H-pyrrole-2-carboxylic acid (Fig. 2, 19→20) (Figs. S2 and S16). In addition, the main chain Schiff-base in P5C and P6C were more stable than the terminal ones, and there was no hydrolysis in enzymatic reaction and recovery. However, after incubation at 37 C and pH 5.0 (adjusted by 0.1 M HCl) for 12 h, the hydrolyzed P5C and P6C were detected (Fig. 2, 16a→16b and 18a→18b), while the substrates were stable (Figs. S14 and S15). These results suggested that TrSOXs could promote the degradation of nitrogencontaining heterocycles.
Similar to L-Pro, the pyrrolidine ring was the key structure of (R)-2-methyl-pyrrolidine and 3(R)-(+)-3-(ethylamino)pyrrolidine, and they were converted to 2-methyl-1-pyrroline (Fig. 2, 21→22) (Figs. S4 and S18) and (R)-N-ethyl-3,4dihydro-2H-pyrrol-4-amine (Fig. 2, 23→24) (Figs. S5 and S19), respectively. Notably, the -C=N-bonds of these two products were close to the side chain, opposite to those of P5C and P6C. Regarding the CDOCKER results, on the binding of L-Pro and L-homoproline with E251V (Fig. 8, A and B), the guanidine group of the conserved residues R54 could hold the position of both substrates. In contrast, for the binding of (R)-2-methyl-pyrrolidine and 3(R)-(+)-3-(ethylamino)pyrrolidine (Fig. 8, C and D), the hydrophobic side chains were rejected by R54 and were positioned on an opposing site. These results indicated that R54 should play a vital role in substrate binding and could also determine the sites of -C=N-bonds in nitrogencontaining heterocycles. In addition, there was much more , and Y253 were labeled in red, yellow, blue, and green, respectively; the substrate pocket volume was 112.875. There was direct interaction between F243 and surrounding residues, including V92, G254, L240, and L299. F, in F243Y, Y243 was labeled in red, and the volume of the substrate pocket was 112.875; Y253 and V92 were closer to Y243. G, in I244T, T244 was labeled in yellow, and the volume of the substrate pocket was 197.125. H, in E251V, V251 was labeled in blue, and the volume of the substrate pocket was 107.000. I, in Y253A, A253 was labeled in green, and the volume was 234.750. TrSOX, Thermomicrobium roseum sarcosine oxidase.
Engineering of TrSOX by tracing the natural evolution direct interaction between L-homoproline and surrounding residues in the substrate pocket compared with those of L-Pro, (R)-2-methyl-pyrrolidine, and 3(R)-(+)-3-(ethylamino)pyrrolidine, which should be associated with the relatively higher activity.
As reported, the -C=N-bonds in Schiff bases play a unique role in conferring broad-spectrum biological activities, and compounds containing Schiff bases have been widely used in chemical or pharmaceutical applications (49). Additionally, alkaloids are now widely used in the agricultural, chemical, and pharmaceutical industries, and the alkaloids residue in exhausted wastewater have been considered as an environmental risk (24)(25)(26)(27)(28). We believe that the biofunctions of TrSOXs should be of great value for these problems. Furthermore, in our recent work, using nicotine and atropinol, several specific mutants might work as morphinan N-demethylases to release the methyl group on tertiary amines (50). The coproduct (H 2 O 2 ) has been detected using a colorimetric method in the reaction, and product extraction and identification are still in progress.

The enantioselective conversion of -C-N-bonds containing substrates
Regarding Table 3, S320K/F243Y could completely convert 100 mM of most of the N-methyl-L-amino acids to demethylated products in 2 h, but it was always inactive to D-form substrates. L-homoproline was completely converted into P6C in 2 h while L-Pro required 72 h, and this suggested that this variant was efficient in the enantio-separation of these kinds of racemic compounds.
In a 72-h reaction with E251V, the conversion ratio of N-methyl-1-naphthalenemethylamine, 1,2,3,4-tetrahydroisoquinoline, and hexamethyleneimine were over 90% (Fig. 2, 12, 25, and 29), while those of other substrate was not efficient. The conversion ratio of 1-methyl-1,2,3,4-tetrahydroisoquinoline (Fig. 2, 27) was 45%, which should be attributed to the enantioselectivity of this enzyme. These results indicated that E251V should be of great potential in the enantioselective Schiff base synthesis or the degradation of nitrogen-containing heterocycles. To promote these activities, the artificial evolution of conserved residues in key microdomains would be considered in further work.

Engineering of TrSOX by tracing the natural evolution
On the other hand, enzymatic N-demethylation reactions are seldom reported. Owing to their oxidation activity on terminal -C-N-bonds of N-methyl-Gly, we supposed that SOXs should be of great potential in the N-demethylation; however, the systematic investigation of SOXs on substrate scope has not been reported. Therefore, the aim of this work is to build robust enzymes for N-demethylation through protein engineering. For protein engineering, direct evolution and design are the most widely used strategy. And the universal protocol is to start from an efficient enzyme and to promote its stability through different drive forces; however, it is a challenge to maintain the balance between the catalytic efficiency and stability, and the uncertainty of these kinds of work sometimes brings results out of design (36)(37)(38). Recently, ASR has been applied in enzymatic engineering; after the ancestors are simulated from modern enzymes, some residues would be introduced to modern enzyme to promote the stability (39)(40)(41)(42).
However, in this work, we supposed that the stability of a protein was associated with the whole framework but not only several limited sites; the structural resolution of TrSOX, a hypothetical SOX from the genome of T. roseum surviving in basic hot spring in Yellowstone, was in good accordance with this hypothesis, although this enzyme showed outstanding stability against temperature, pH, and organic solvents (21)(22)(23), it was overlapped with homologous models, without significant structural differences (Fig. 3A). Therefore, we hoped to start from a stable model, to expand the substrate scope, and to promote the catalytic efficiency. Additionally, in order not to disrupt the stable framework, as few mutant sites as possible should be considered. ASR was used to trace the natural evolutionary trends in key microdomains, which were necessary for the recognition and binding of substrates and for the reaction, including catalytic loop, coenzyme pocket, substrate pocket, and entrance site, and characterized or hypothetical homologues with close or far evolutionary distances were used as references. Of note, TrSOX was not an ancestral enzyme, but a homolog on a special branch.
Fortunately, this strategy did narrow the screening scale and shorten the experiment, and some variants with initial stability were built together with promoted catalytic efficiency or expanded substrate adaptivity. However, not all the sites predicted by ASR worked, some of the designed substitutions led to misfolding and partially or completely inactivation; this phenomenon might be attributed to the limited coverage ratio of homologs in ASR, because there should always be unknown ones in natural environment. In addition, recreating the natural evolutionary substitutions in key microdomains might not alter some specific properties in the homologous family, e.g., the enantioselectivity; and our further work will be focused on conserved residues in key microdomains to alter the enantioselectivity for substrates.
The TrSOX variants could catalyze the terminal N-demethylation and form main-chain Schiff bases in nitrogen-containing heterocycles with significant enantioselectivity. In addition, in these reactions, the electron was transferred to O 2 through FAD; therefore, an additional coenzyme regeneration system was not required. These reactions required mild conditions, low energy consumption, without toxic reagents, and they should be of great potential in chemical synthesis, pharmaceutical design, and the synthesis, modification, or degradation of alkaloids.

Engineering of TrSOX by tracing the natural evolution
The natural environment on earth provides different possibilities for structural or functional evolution. Enzymes of organisms from specific conditions might reveal associated traits, such as resistance to high or low temperature, high or low pressure, acidic or basic environments, which may play vital roles in their large-scale application. Introducing substitutions that occurred during natural evolution into such a specific homolog is a good protein engineering strategy to expand its substrate scope and increase its catalytic activity.

Materials
The TrSOX gene (GeneBank: ACM06094.1) was cloned in a pMA5-Pxyl-trsox plasmid and kept in our laboratory. The

Engineering of TrSOX by tracing the natural evolution
HisTrap HP Ni-column was purchased from GE Healthcare; AmiconUltra centrifugal filter tube (10 kDa) was from Merck Millipore; Thin-layer chromatography (TLC) plates (Merck, 105626, 105729, 105721 and 105554) were purchased from Merck Millipore; Q5 Site-Directed Mutagenesis Kit was from NEB Inc.; NeXtal Tubes JCSG Core Suites I-IV, NeXtal Tubes Classics Suite, NeXtal Tubes Classics II Suite, and NeXtal Tubes Cryos Suite were from Qiagen; and Pierce BCA Protein Assay Kit was from Thermo Scientific. N-methyl or alkaloid substrates were from MACKLIN and ALADDIN. Other reagents and chemicals were purchased from local companies and were of superior analytical grade.

Structural resolution of TrSOX
In our previous work, the expression of TrSOX was promoted with a single mutant-S320R (23). The crystallization of TrSOX (S320R) was screened using the hanging-drop vapor diffusion method with NeXtal Tubes JCSG Core Suites I-IV, NeXtal Tubes Classics Suite, NeXtal Tubes Classics II Suite, and NeXtal Tubes Cryos Suite (Qiagen). Diffraction datasets were collected at the Beamline 17U, Shanghai Synchrotron Radiation Facility (SSRF). The crystal structure of TrSOX (S320R) was resolved by molecular replacement and further refinement using the CCP4 Program Suite 6.1.3. The models of native TrSOX and the mutants were built and refined using the "Mutate Protein" module in the software Discovery Studio 2019, and the "Receptor-Ligand Interactions" module was employed to screen the substrate pocket and to investigate the interaction between FAD and the residues in the coenzyme pocket, and the "CDOCKER" module of Discovery Studio 2019 was employed to simulate the binding of substrates in the substrate pocket.

Ancestral sequence reconstruction analysis
The amino acid sequence of TrSOX was interrogated using BLAST (Basic Local Alignment Search Tool, nih.gov), and Blastp (protein-protein BLAST) was employed to search database nr. From the result of BLAST, approximately 100 homologous enzymes showing 25% to 99% sequence identities with TrSOX were applied for ancestral sequence reconstruction analysis using the Maximum Likelihood method in MEGA-X (51).

Site-directed mutagenesis
The TrSOX gene sequence was reconstructed in a pMA5-Pxyl-trsox plasmid in our previous work (23). The primers for each site were designed and synthesized (Tables S7-S10), and a Q5 Site-Directed Mutagenesis Kit (NEB) was used for the designed substitutions according to the manufacturer's recommendations. The mutants were expressed in Bacillus subtilis W600 and prepared as described in our previous study (23).

Activity assay
As described in our previous study (22,23), to detect N-demethylation-associated activities, the amount of coproduct (H 2 O 2 ) was measured using a real-time colorimetric method at 37 C and pH 8.0; to detect the catalytic constants, enzyme (5-50 μg) was added to a 1 ml reaction mixture containing substrates (1-200 mM). The produced H 2 O 2 in the reaction was calculated with A 500nm , and each experiment was repeated at least three times. K m and k cat were calculated through "Nonlinear Curve Fit" using the Michaelis-Menten equation in Origin software. The optimal reaction temperature and the half-lives of the activities were also investigated.

Nano-DSC assay
According to the Nano-DSC (TA Instruments) instructions, 300 μl of Tris-HCl (20 mM, pH 8) buffer was used as control, and then an equal volume of purified TrSOX (1 mg/ml) was injected into the sample bath for the experiment. The scanning  Engineering of TrSOX by tracing the natural evolution was performed at −10 to 130 C at 2 C/min, and the response time was 5 s with a built-in pressurization perturbation of up to 6 atm. The melting temperature (T m ) and enthalpy of denaturation (ΔH) of the samples were then measured (22,23,52).

TLC analysis
After the enzymatic reaction with TrSOXs, the products of N-methyl-amino acids/non-amino-acid compounds and nitrogen-containing heterocycles were applied to TLC assays (Table 4), and most of the product dots containing -C=Nbonds revealed fluorescent signals under 365 nm. For preparation, the products were applied to classical silica TLC plates (20 × 20 cm) (Merck, 105721) or silica TLC plates F254 (20 × 20 cm) (Merck, 105554), using substrates as references, and the products were extracted using ddH 2 O, methanol or chloroform.

LS-MS analysis
Using a Waters MALDI SYNAPT MS spectrometer, 5 μl of recovered products (0.5 mg/ml) was injected into a C 18 column (Waters BEH 2.1 mm × 1 50 mm, 1.7 μm) at 0.3 ml/ min and 45 C. Monitored at 200 to 400 nm, the compounds were eluted in a 6 min linear gradient of A (CH 3 CN) 2% and B (0.1% HCOOH), ionized using a 3.5 kV capillary voltage, 30 V cone voltage, and 100 C source block temperature, and further scanned using an m/z scanning range of 20 to 1000, 1 s scan time, 0.1 s interscan delay, and 50 l/h cone gas flow rate. The MS data were obtained and analyzed using Mass Lynx software (version 4.1).

NMR analysis
The 1 H-NMR and 13 C-NMR spectra of products recovered from TLC plates were analyzed using a Bruker Advance 400 MHz spectrometer (51,53).

Optical rotation assay
The products of N-methyl-amino acids extracted from the TLC plate were applied to a Rudolph Autopol IV Polarimeter for optical rotation assay.

Enzymatic conversion
TrSOXs were employed for the bioconversion of N-methylamino acids and nitrogen-containing heterocycles, respectively. The enzyme (10-50 μg/ml) was added to a 20 ml reaction solution (100 mM substrate, 20 mM Tris-HCl, pH 8.0), and the mixtures were incubated at 37 C for 2 to 72 h. The reactions were monitored by detecting the coproduced H 2 O 2 and LC-MS.

Data availability
The structure presented in this article has been deposited in the Protein Data Bank (PDB) with the following code: 7EXS. All remaining data are contained within the article.  Engineering of TrSOX by tracing the natural evolution