# Interfacial water confers transcription factors with dinucleotide specificity

Ekaterina Morgunova, Gabor Nagy, Yimeng Yin, Fangjie Zhu, Sonali Priyadarshini Nayak, Tianyi Xiao, Ilya Sokolov, Alexander Popov, Charles Laughton, Helmut Grubmuller, et al.

<figure><img src="image_1.png" /></figure>

To cite this version:

Ekaterina Morgunova, Gabor Nagy, Yimeng Yin, Fangjie Zhu, Sonali Priyadarshini Nayak, et al. Interfacial water confers transcription factors with dinucleotide specificity. Nature Structural and Molecular Biology, 2025, 32 (4), pp.650-661. 10.1038/s41594-024-01449-6. hal-05149616

HAL Id: hal-05149616

https://hal.science/hal-05149616v1

Submitted on 8 Jul 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_3.png" /></figure>

# Interfacial water confers transcription factors with dinucleotide specificity

Received: 17 October 2023

Accepted: 12 November 2024

Published online: 3 January 2025

<figure><img src="image_4.png" /></figure>

Check for updates

Ekaterina Morgunova<sup>1</sup>, Gabor Nagy<sup>2</sup>, Yimeng Yin<sup>3,4</sup>, Fangjie Zhu<sup>5</sup>, Sonali Priyadarshini Nayak<sup>2,6</sup>, Tianyi Xiao<sup>3</sup>, Ilya Sokolov<sup>3</sup>, Alexander Popov<sup>7</sup>, Charles Laughton<sup>8</sup>, Helmut Grubmuller<sup>2</sup> & Jussi Taipale<sup>1,3,9,10</sup>

Transcription factors (TFs) recognize specific bases within their DNA-binding motifs, with each base contributing nearly independently to total binding energy. However, the energetic contributions of particular dinucleotides can deviate strongly from the additive approximation, indicating that some TFs can specifically recognize DNA dinucleotides. Here we solved high-resolution (<1 Å) structures of MYF5 and BARHL2 bound to DNAs containing sets of dinucleotides that have different affinities to the proteins. The dinucleotides were recognized either enthalpically, by an extensive water network that connects the adjacent bases to the TF, or entropically, by a hydrophobic patch that maintained interfacial water mobility. This mechanism confers differential temperature sensitivity to the optimal sites, with implications for thermal regulation of gene expression. Our results uncover the enigma of how TFs can recognize more complex local features than mononucleotides and demonstrate that water-mediated recognition is important for predicting affinities of macromolecules from their sequence.

Proteins can bind to DNA in a non-sequence-specific manner by binding to its backbone or recognize specific sequences by interactions with DNA bases. The DNA sequence can be directly read out by a TF through hydrogen bonding and/or hydrophobic interactions between protein amino acids and DNA bases<sup>1-4</sup>. Sequences can also be read indirectly through effects on DNA structure and shape<sup>4-8</sup> and by water-mediated contacts between TFs and DNA bases<sup>7,9-11</sup>.

Direct interactions are relatively insensitive to the local environment and result in the recognition of individual mononucleotides, with total binding energy being approximately additive<sup>6,10,12-17</sup>. This additive model holds very well for the majority of base positions across a broad range of structural TF families but often performs less well in predicting energy contributions of adjacent DNA bases and bases that

are recognized indirectly<sup>18</sup>. Owing to the influence of adjacent bases on each other, TF binding to DNA can be better approximated by models that use dinucleotide instead of mononucleotide features<sup>1,6,8,18-20</sup>. This improved performance is explained by the fact that dinucleotide content affects the local dynamics and structure of the DNA backbone and the relative orientation of the bases<sup>21</sup>. For example, nucleosomes bend DNA and preferentially bind to DNA sequences where particular dinucleotides are located at specific positions relative to the direction of the DNA bending<sup>22-24</sup>. Some TFs can also affect the conformation of the DNA backbone<sup>25-32</sup>, and their specificity towards dinucleotides could similarly be explained by the contribution of the dinucleotides to the structure and flexibility of the DNA backbone. However, given that the bending energy of nucleosomal DNA is only 0.14 kcal mol<sup>-1</sup>

<footnote n="1">¹Department of Medical Biochemistry and Biophysics, Karolinska Institutet, Stockholm, Sweden. ²Theoretical and Computational Biophysics Department, Max Planck Institute for Multidisciplinary Sciences, Göttingen, Germany. ³Department of Biochemistry, University of Cambridge, Cambridge, UK. ⁴State Key Laboratory of Cardiovascular Diseases and Medical Innovation Center, Shanghai East Hospital, School of Medicine, Tongji University, Shanghai, China. ⁵Haixia Institute of Science and Technology, Fujian Agriculture and Forestry University, Fuzhou, Fujian, China. ⁶Max Planck School Matter to Life, Heidelberg, Germany. ⁷ESRF Grenoble, Grenoble, France. ⁸School of Pharmacy and Biodiscovery Institute, University of Nottingham, Nottingham, UK. ⁹Applied Tumor Genomics Research Program, Faculty of Medicine, University of Helsinki, Helsinki, Finland. ¹⁰Generative and Synthetic Genomics Programme, Wellcome Sanger Institute, Hinxton, UK. ☎e-mail: jussi.taipale@ki.se</footnote>
per base pair<sup>33,34</sup>, the structural distortion caused by histone octamer or DNA-bending TFs can only result in relatively weak (less than two-fold) local dinucleotide preferences<sup>35-37</sup> and thus can not account for the highly specific recognition of dinucleotides observed for many TFs. Furthermore, many TFs with preferences for particular dinucleotides can bind to DNA without inducing major changes to its canonical B-form, suggesting the existence of additional mechanisms for the recognition of dinucleotides.

Previously, we have shown that binding of TFs to two distinct sequence optima can be caused by partial independence of the two contributions, ΔH and ΔS, to binding free energy, with different DNA sequences representing enthalpic and entropic optima for binding<sup>38</sup>. We also proposed that such a thermodynamic mechanism, resembling entropy-enthalpy compensation<sup>39-41</sup>, affects many other macromolecular interactions. To investigate the molecular interactions that contribute to the entropic and enthalpic optima and enable TFs to specifically recognize dinucleotides, in this work we have characterized the structures of MYF5 and BARHL2 bound to multiple different optimal and sub-optimal DNA sequences.

# Results

## Mechanism of MYF5 binding to dinucleotides

To investigate how basic helix-loop-helix (bHLH) proteins can recognize dinucleotides flanking the E-box core sequences and bind to two distinct DNA sequences with similar affinity<sup>18,38,42-45</sup>, we solved the structure of the bHLH domain of the MYF5 homodimer bound to two different DNA fragments representing the entropic and enthalpic<sup>38</sup> optima (Fig. 1a,b and Table 1). One sequence is palindromic and contains an E-box-like core, CAGCTG<sup>46</sup>, flanked by the entropically optimal GT (GTCAGCTGAC, with divergent dinucleotides shown in bold; hereafter MYF5-DNA<sup>GT</sup>), whereas the other sequence, AACAGCTGAC (hereafter MYF5-DNA<sup>AA</sup>) is non-palindromic, containing one enthalpic half-site (AACAG) and one entropic half-site (CTGAC, the reverse complement of GTCAG).

The structures were solved at 3.1 Å and 2.3 Å resolution using X-ray crystallography (see Methods). The overall fold of the bHLH domain is strikingly similar to that observed in other members of this family, including MyoD, MAX and c-Myc (Extended Data Fig. 1). Each MYF5 monomer forms two long helices connected by a nine-residue loop. The first helix (H1) contains the basic region that binds to DNA, whereas the second helix (H2) is responsible for dimerization<sup>47</sup> (Fig. 1a). As observed in all known bHLH-DNA complexes, the basic region fits into the major groove without significantly bending the DNA (Fig. 1a-e and Extended Data Fig. 1).

To determine whether strong binding to the two optimal sequences can be explained by their similar DNA backbone shape and the positions of the charged atoms, we performed a comparative analysis of the DNA shape with w3DNA<sup>48</sup> and DNaphi<sup>49</sup> (Supplementary Table 1 and Extended Data Fig. 2). This analysis revealed that although the DNA backbone shapes of both the MYF5-DNA<sup>GT</sup> and MYF5-DNA<sup>AA</sup> are similar to canonical B-DNA (Fig. 1d), the minor groove widths and calculated electrostatic potentials are markedly different between the GT and AA DNAs (Extended Data Fig. 2). Furthermore, the positioning of charged atoms in the major grooves of MYF5-DNA<sup>GT</sup> and MYF5-DNA<sup>AA</sup> are clearly different (Fig. 1e), suggesting that similarity of DNA backbone shape and charge distribution cannot explain the preference of MYF5 to flanking AA and GT dinucleotides.

In both MYF5 complexes, only two direct contacts are formed between the core E-box (CAGCTG) sequence and the MYF5 protein: the side-chain oxygen of Glu92 of one MYF5 monomer hydrogen-bonds to nitrogen 4 (N4) of the first cytosine (C<sub>7</sub>) and a symmetric contact is made by the other MYF5 monomer (Fig. 1h). In addition to the specific base contact, DNA affinity is increased by non-sequence-specific hydrogen bonds formed by Arg85, Thr89, Arg93 and Arg95, Asn100 and Lys120 with the ribose oxygens and phosphate moieties. The AA

flank in DNA<sup>AA</sup> is recognized by Arg91, which contacts the first A (A<sub>5</sub>) through a water molecule (Fig. 1g and Extended Data Fig. 1c-e). However, in DNA<sup>GT</sup>, Arg91 does not interact with water but instead makes direct hydrogen bond contact with the G<sub>5</sub> (Fig. 1h).

These results suggest that the dual specificity of MYF5 is not a result of similarities in DNA shape or charge distribution between the recognized dinucleotides. Instead, the two high-affinity sites appear to result from the entropic and enthalpic optima<sup>38</sup>; in the entropic optimum, the G in the GT dinucleotide is bound directly, freeing a water molecule, whereas in the enthalpic optimum, the first A of the AA dinucleotide is bound by a fixed water molecule. However, because of the relatively low resolution of the MYF5 structures, we were unable to determine why the G-bound state prefers an adjacent T while the A-bound state prefers an adjacent A.

## Mechanism of BARHL2 binding to dinucleotides

To study TF binding to dinucleotides in more molecular detail, we performed an extensive structural analysis of DNA binding by the homeodomain TF BARHL2. BARHL2 can recognize a canonical homeobox-like sequence (TAATTG) but, unlike most other homeodomain proteins, can also bind with even higher affinity to TAAACG, which contains a different dinucleotide, AC. To investigate BARHL2 specificity at the region containing the dinucleotides, we solved BARHL2 structures bound to eight different DNAs, including the enthalpic (TAAACG) and entropic (TAATTG) optima, two more weakly bound sequences that are within one substitution from both optima (TAAATG and TAATCG) and four sub-optimal sequences (TAATGG, TAAGTG, TAAGCG, TAACCG). The structures were of high to extremely high resolution (from 2.6 Å to 0.95 Å, Table 1), enabling detailed analysis of the interactions contributing to the binding affinity of each sequence. For clarity, we refer to the complexes using the variable dinucleotides hereafter (for example TAAACG is DNA<sup>AC</sup>). One BARHL2-DNA<sup>AC</sup> crystal diffracted to 0.95 Å, which is thus far the highest resolution for any TF-DNA complex. The high resolution revealed alternative conformations for most of the phosphates, sugars and bases of the DNA backbone (Fig. 2a and Extended Data Fig. 3), hitherto only observed in two previous TF-DNA complexes<sup>50,51</sup>.

Analysis of all the complexes confirmed that BARHL2 exhibits common homeobox features and encompasses a comparatively long, positively charged amino-terminal peptide and three α-helices connected by short loops (Fig. 2b-e and Extended Data Fig. 4). In all solved homeodomain-DNA complexes, the last A of the TAA sequence is recognized by an asparagine (Asn282 in BARHL2), which forms a hydrogen bond with A<sub>6</sub> (T<sub>4</sub>A<sub>5</sub>A<sub>6</sub>). In BARHL2, Thr278 also forms a hydrophobic contact with carbon atom C8 of the aromatic ring of the same adenine. The TAA sequence is also recognized by Arg233 and Arg236 via the minor groove, forming direct and water-mediated hydrogen bonds with all three base pairs (Fig. 2e). These results indicate that within the conserved TAA sequence, the interactions between BARHL2 and DNA are typical of those seen for the characterized anterior-type homeobox TFs.

We next analyzed the molecular basis of the sequence specificity of BARHL2 towards the dinucleotides following the TAA motif. First, we checked whether the high affinity of the two distinct optimal sequences DNA<sup>AC</sup> and DNA<sup>TT</sup> can be explained by a similarity in DNA backbone shape or electrostatic potential. However, DNAs in all structures had almost canonical B-shapes (for example, DNA<sup>TT</sup>; Fig. 2f). Comparison of the DNAs between the DNA<sup>AC</sup>, DNA<sup>TT</sup>, DNA<sup>AT</sup> and DNA<sup>TC</sup> revealed that the largest shift from B-shape was observed at the position of the variable dinucleotide between DNA<sup>AC</sup> and DNA<sup>TT</sup> (2.9 Å; Fig. 2g,h). Thus, the two high-affinity sequences were farther apart from each other than from the two lower-affinity sequences. Furthermore, calculated minor groove widths and electrostatic potentials of DNA<sup>AC</sup> and DNA<sup>TT</sup> were also markedly different (Extended Data Fig. 2), suggesting that the similarity of their affinity to BARHL2 is not caused by similarities in DNA backbone shape, minor groove width or electrostatic potential.
<figure><img src="image_5.png" /><figcaption>**Fig. 1** | Structures of MYF5-DNA complexes. a,b, Overview of two structures of MYF5 DNA-binding domains bound to non-symmetrical DNA **AACAGCTGAC** (a) and symmetrical DNA **GTCAGCTGAC** (b). Logos of the motifs of the homologous protein MYF6 are shown below the structures. Note that MYF6 prefers to bind to either the AA or GT flank before the E-box. c, Structural alignment of two MYF5 structures containing different DNA sequences. The symmetrical DNA **GTCAGCTGAC** is in magenta; the non-symmetrical DNA **GTCAGCTGTT** is in blue. d, Enlarged view of parts of DNA, showing the largest deviation of experimental DNA from B-shape DNA (shown in yellow). The measured distance between the</figcaption></figure>

corresponding phosphorus atoms is shown as green dashed lines. e, Charge distribution on the surface of the region containing the divergent dinucleotide (blue is positive, red is negative). Note that charge distribution is very different at the region of the GT and AA dinucleotides. f, A water molecule mediates the contact between Arg91 and $A_5$ of the AA dinucleotide. g, Direct contact is formed between Arg91 and $G_5$ of the GT dinucleotide. h, Schematic representation of the contacts formed by MYF5 with non-symmetrical DNA. Left and right sides show contacts to AA and GT, respectively.
<table><caption>Table 1 | X-ray data collection and refinement statistics</caption><thead><tr><th rowspan="2">Protein/core</th><th colspan="2">MYF5/CAGCTG</th><th colspan="7">BARHL2/TAA</th></tr><tr><th>AC/GT</th><th>AA/GT</th><th>AC</th><th>AC</th><th>TT</th><th>AT</th><th>TC</th><th>GC</th><th>CC</th><th>TG</th><th>GT</th></tr></thead><tbody><tr><td colspan="12"><strong>Data collection</strong></td></tr><tr><td>Space group</td><td>C 2</td><td>C 2</td><td>P2<sub>1</sub>2<sub>1</sub>2<sub>1</sub></td><td>P2<sub>1</sub>2<sub>1</sub>2<sub>1</sub></td><td>P 2<sub>1</sub></td><td>P 2<sub>1</sub></td><td>P 2<sub>1</sub></td><td>P 2<sub>1</sub></td><td>P 2<sub>1</sub></td><td>P 2<sub>1</sub>2<sub>1</sub>2<sub>1</sub></td><td>P 2<sub>1</sub></td></tr><tr><td colspan="12"><strong>Cell dimensions</strong></td></tr><tr><td>a, b, c (Å)</td><td>166.7, 33.9, 53.7</td><td>170.4, 33.8, 53.6</td><td>38.8, 47.3, 72.5</td><td>38.6, 47.1, 72.3</td><td>39.6, 123.1, 62.2</td><td>39.0, 134.3, 65.6</td><td>39.6, 123.8, 62.7</td><td>39.1, 133.7, 64.9</td><td>39.4, 134.5, 64.5</td><td>38.8, 46.8, 71.8</td><td>39.6, 123.7, 62.4</td></tr><tr><td>α, β, γ (°)</td><td>90, 91.04, 90</td><td>90, 91.9, 90</td><td>90, 90, 90</td><td>90, 90, 90</td><td>90, 94.2, 90</td><td>90, 92.6, 90</td><td>90, 93.5, 90</td><td>90, 92.7, 90</td><td>90, 93.2, 90</td><td>90, 90, 90</td><td>90, 93.9, 90</td></tr><tr><td>Resolution (Å)<sup>a</sup></td><td>41.67,3.0 (3.10–3.0)</td><td>46.00,2.28 (2.36–2.28)</td><td>28.78,0.95 (0.98–0.95)</td><td>29.89,1.30 (1.35–1.30)</td><td>39.49,1.85 (1.91–1.85)</td><td>46.91,2.4 (2.48–2.4)</td><td>39.55,1.7 (1.76–1.7)</td><td>39.04,2.1 (2.17–2.1)</td><td>39.37,2.6 (2.69–2.6)</td><td>35.88,1.45 (1.50–1.45)</td><td>39.43,2.05 (2.12–2.05)</td></tr><tr><td>R-merge</td><td>0.063 (1.062)</td><td>0.024 (0.72)</td><td>0.045 (2.89)</td><td>0.073 (1.96)</td><td>0.071 (2.70)</td><td>0.145 (2.71)</td><td>0.050 (1.77)</td><td>0.11 (4.61)</td><td>0.19 (1.54)</td><td>0.077 (1.41)</td><td>0.153 (2.00)</td></tr><tr><td>I/σI</td><td>8.46 (1.08)</td><td>17.5 (1.8)</td><td>15.3 (0.5)</td><td>10.2 (0.7)</td><td>8.5 (0.4)</td><td>8.8 (0.7)</td><td>9.5 (0.5)</td><td>7.0 (0.3)</td><td>5.9 (1.0)</td><td>13.6 (0.6)</td><td>7.7 (0.8)</td></tr><tr><td>Completeness (%)</td><td>90.1 (93.2)</td><td>94.1 (97.2)</td><td>99.5 (97.9)</td><td>99.5 (97.2)</td><td>99.3 (97.7)</td><td>99.03 (100)</td><td>99.3 (97.2)</td><td>99.6 (99.8)</td><td>99.3 (96.9)</td><td>99.2 (94.4)</td><td>99.6 (98.7)</td></tr><tr><td>Redundancy</td><td>2.8 (2.7)</td><td>5.0 (5.2)</td><td>6.5 (6.0)</td><td>7.1 (6.6)</td><td>3.8 (3.7)</td><td>7.2 (6.6)</td><td>3.8 (2.9)</td><td>5.7 (5.7)</td><td>3.8 (4.0)</td><td>7.9 (3.3)</td><td>5.2 (4.8)</td></tr><tr><td colspan="12"><strong>Refinement</strong></td></tr><tr><td>Resolution (Å)</td><td>3.0</td><td>2.28</td><td>0.95</td><td>1.3</td><td>1.85</td><td>2.4</td><td>1.7</td><td>2.1</td><td>2.6</td><td>1.45</td><td>2.05</td></tr><tr><td>No. of reflections</td><td>5,673</td><td>14,060</td><td>83,944</td><td>32,821</td><td>50,206</td><td>26,124</td><td>65,719</td><td>38,705</td><td>20,488</td><td>23,721</td><td>37,295</td></tr><tr><td>R<sub>work</sub> / R<sub>free</sub></td><td>0.23/0.28</td><td>0.24/0.22</td><td>0.14/0.17</td><td>0.15/0.20</td><td>0.23/0.26</td><td>0.23/0.28</td><td>0.22/0.25</td><td>0.24/0.27</td><td>0.24/0.27</td><td>0.18/0.22</td><td>0.23/0.26</td></tr><tr><td>No. of atoms</td><td>1,683</td><td>1,779</td><td>1,937</td><td>1,307</td><td>4,384</td><td>4,884</td><td>4,472</td><td>4,148</td><td>4,572</td><td>1,362</td><td>4,427</td></tr><tr><td>Protein and DNA</td><td>1,680</td><td>1,701</td><td>1,507</td><td>1,041</td><td>4,053</td><td>4,557</td><td>4,035</td><td>4,027</td><td>4,398</td><td>1,128</td><td>4,076</td></tr><tr><td>Water</td><td>3</td><td>78</td><td>430</td><td>266</td><td>331</td><td>327</td><td>437</td><td>121</td><td>174</td><td>234</td><td>351</td></tr><tr><td>B factors</td><td>106.02</td><td>84.13</td><td>17.59</td><td>24.03</td><td>45.18</td><td>48.82</td><td>42.33</td><td>65.87</td><td>56.94</td><td>23.28</td><td>43.38</td></tr><tr><td colspan="12"><strong>R.M.S.D.</strong></td></tr><tr><td>Bond lengths (Å)</td><td>0.016</td><td>0.005</td><td>0.018</td><td>0.015</td><td>0.013</td><td>0.014</td><td>0.012</td><td>0.015</td><td>0.015</td><td>0.016</td><td>0.016</td></tr><tr><td>Bond angles (°)</td><td>1.66</td><td>1.11</td><td>2.43</td><td>1.92</td><td>1.69</td><td>1.78</td><td>1.71</td><td>2.28</td><td>2.17</td><td>2.20</td><td>2.35</td></tr></tbody></table>

To investigate whether the dinucleotides would instead be recognized by networks of water molecules, we studied the arrangement of water molecules in the protein-DNA interfaces. We first assessed whether differences in resolution would affect the detection of the water molecules using the two BARHL2-DNA<sup>AC</sup> structures solved at 0.95 Å and 1.3 Å. Although overall more water molecules are seen in the protein-DNA interface in the 0.95 Å structure, inspection of the water content at the site of the variant dinucleotide at both resolutions showed conserved positions of all of the ten water molecules, indicating that at this range, resolution does not substantially affect detection of water molecules contributing to recognition of the dinucleotide (Extended Data Fig. 3g).

We then compared the water arrangements and molecular interactions between BARHL2 and the eight different DNA sequences (Fig. 3). Analysis of the highest-affinity complex, BARHL2-DNA<sup>AC</sup>, revealed that the high-affinity binding of BARHL to DNA<sup>AC</sup> is caused by a combination of indirect and direct recognition of DNA. Key amino acids involved in the recognition of the AC dinucleotide and its complementary bases are Asn282 and two threonines: Thr278 and Thr285. Thr278 is connected to DNA by two water chains (Fig. 3a). The first water chain contains three water molecules that together connect the side-chain oxygen of Thr278 with the side-chain oxygen of Asn282 and N7 of the A of the AC dinucleotide (A<sub>7</sub>). On the other side, Thr278 is connected to N4 of the C of AC (C<sub>8</sub>) by a second chain of four water molecules. Thus, Thr278 orders water molecules in such a way that they contact both bases of the AC dinucleotide. The two water chains are also connected by one water molecule,

which is within a hydrogen-bond distance from N6 of A<sub>7</sub> and O6 of G<sub>17</sub> opposite to C<sub>8</sub> of AC. The T<sub>18</sub> opposite to the A<sub>7</sub> of the AC dinucleotide is also recognized directly by a hydrophobic contact to the methyl group (CG2) of Thr285 (Fig. 3a). In addition, the side-chain oxygen of Thr285 contacts N7 of the G<sub>17</sub> opposite to the AC dinucleotide through a water molecule that is a part of the second water chain (Fig. 3a). Furthermore, the T<sub>18</sub> opposite to the A<sub>7</sub> of AC is connected through a water molecule to the side-chain oxygens of Asn282 and Thr285. This water molecule is in a network that includes another water that in turn is connected to N7 of G<sub>17</sub> opposite to C<sub>8</sub> of AC. Taken together, these results show that DNA<sup>AC</sup> is bound by a combination of a direct hydrophobic interaction and an extensive water network between the protein and DNA (Fig. 3a).

The molecular interactions observed in the structure of BARHL2 bound to DNA<sup>TT</sup>, which showed the next highest affinity in the SELEX experiments, were strikingly different from those of BARHL2-DNA<sup>AC</sup>. The extensive water network is lost because of a hydrophobic patch in the major groove, formed by the methyl groups of the two Ts (Fig. 3b). The hydrophobic contact with Thr285 is replaced by hydrophobic contact between the methyl group (CG2) of Thr278 and C<sub>7</sub> of the first T (T<sub>7</sub>) of TT. Only one water connecting the side-chain oxygen of Thr285 with the side-chain oxygen of Asn282 was observed in the region around Thr285. On the other side, Asn282 is connected to O4 of T<sub>7</sub> through one water and to O4 of the second T (T<sub>8</sub>) of TT through a water chain containing three molecules. Thus, most of the contacts in the complex BARHL2-DNA<sup>TT</sup> are shifted from the Thr285 region to the Thr278. An additional observation is that the side chain of Arg289 forms a

<footnote>a Statistics for the highest-resolution shell are shown in parentheses.</footnote>
<figure><img src="image_6.png" /><figcaption>**Fig. 2 | Structures of BARHL2-DNA complexes.** a, Sequence logos for the two distinct DNA-binding specificities of the BARHL2 protein. Note that BARHL2 binds to the dinucleotide after the TAA sequence, preferring either AC or TT. b, Overall structure of BARHL2 bound to the DNA C₁G₂C₃T₄A₅A₆A₇C₈G₉G₁₀T₁₁T₁₂ (BARHL2-DNA<sup>AC</sup>). The two conformations of the DNA backbone phosphates, sugars and bases observed in the ultra-high-resolution structure (0.95 Å) are indicated in green and yellow. The bases that only show a single conformation, A₅A₆ of the forward strand and C₁G₂ of the complementary strand, are presented as ball-and-stick models in red. The sequence of the double-stranded DNA is shown below. c,d, BARHL2 interacts with the TAA part of its recognition sequence using a similar mechanism as other homeodomains (c); close-up view of the</figcaption></figure>

interaction between A₆ (magenta) and the canonical Asn282 (d). The divergent dinucleotides are in orange. e, Close-up view of the interactions via the minor groove. The T₄A₅ sequence (blue) is bound by minor groove contacts formed between the amino-terminal tail residues Arg233 and Arg236. f, Structural alignment of four subunits of the complex BARHL2-DNA<sup>TT</sup>. The largest shift for DNA strands between four subunits is <1 Å. g, Alignment of four complexes with different DNAs. Color codes are red, DNA<sup>AT</sup>; blue, DNA<sup>TC</sup>; orange, DNA<sup>TT</sup>; green, DNA<sup>AC</sup>. The corresponding DNA sequences are written using the color code of the figure. h, Distance between the DNA backbones in the part of divergent dinucleotides of DNA<sup>TT</sup> and DNA<sup>AC</sup> is 2.9 Å.

hydrophobic contact with the methyl group of Thr285, in contrast to BARHL2-DNA<sup>AC</sup>, in which Arg289 shows two conformations, both of which are turned away from Thr285 (Fig. 3b).

To further examine the role of water molecules in the recognition of DNA<sup>AC</sup> and DNA<sup>TT</sup> by BARHL2, we performed crystal lattice molecular dynamics simulations of BARHL2-DNA<sup>AC</sup> and BARHL2-DNA<sup>TT</sup>. The number of low-mobility water molecules observed at the protein-DNA interface was significantly greater for BARHL2-DNA<sup>AC</sup> than BARHL2-DNA<sup>TT</sup>. To check the impact, if any, of the different packing arrangements of the complexes in the two different crystal lattices (P 2<sub>1</sub>2<sub>1</sub>2<sub>1</sub> for BARHL2-DNA<sup>AC</sup>, P 2<sub>1</sub> for BARHL2-DNA<sup>TT</sup>), simulations were additionally performed on BARHL2-DNA<sup>AC</sup> after in silico mutation of the sequence to DNA<sup>TT</sup>. A significant reduction in the number of

low-mobility waters was observed. However, simulations on BARHL2-DNA<sup>TT</sup> after in silico mutation to DNA<sup>AC</sup> did not show a significant change in the reverse direction (Fig. 3j; see Methods for details). These results suggest that the creation of high-affinity water binding sites requires both the 'right' DNA sequence and an ability to adopt the 'right' conformation, which (artificially) embedding in a sub-optimal crystal lattice can impede.

The ability of BARHL2 to specifically recognize dinucleotides is shown by the fact that it has the highest affinity to DNA<sup>AC</sup> and DNA<sup>TT</sup>, sequences that are separated by two base substitutions (Hamming distance of two). To understand why both possible single base substitutions of AC that make it more similar to TT (AT and TC) lead to a decrease in affinity, we first investigated why DNA<sup>AT</sup> has a lower affinity
<figure><img src="image_7.png" /><figcaption>**Fig. 3 |** *The role of water molecules in BARHL2-DNA complexes. a–h, The analysis of eight structures of BARHL2 containing the different dinucleotides: BARHL2-DNA<sup>AC</sup> (a), BARHL2-DNA<sup>TT</sup> (b), BARHL2-DNA<sup>AT</sup> (c), BARHL2-DNA<sup>TC</sup> (d), BARHL2-DNA<sup>TG</sup> (e), BARHL2-DNA<sup>GT</sup> (f), BARHL2-DNA<sup>GC</sup> (g) and BARHL2-DNA<sup>CC</sup> (h). The enrichment of the respective 8-mer relative to TAAACG is shown above the panels. The enrichment of a specific 8-mer relative to TAAACG is calculated as the percentage ratio of its fold change—defined as the ratio of normalized counts (count of the 8-mer divided by the total number of reads) in signal and background files—to the fold change of TAAACG. The water molecules are numbered for clarity. The hydrogen bond distances found in BARHL2-DNA complexes are presented as dashed lines and are listed in Extended Data Table 1. Panels b, c, d, g and h show the complexes containing the largest number of water molecules of the four complexes of the respective asymmetric units.*</figcaption></figure>

The structures in a and f contain only one complex in the asymmetric unit. i, Surface representation of the DNA-binding sites. Carbon, oxygen, nitrogen and phosphorus atoms are green, red, blue and orange, respectively and the CH3 group of thymidine is yellow. j, Analysis of interfacial water mobility using molecular dynamic simulation. Left, simulations run using the DNA<sup>AC</sup> lattice with or without in silico mutation of the AC dinucleotide to TT; right, simulations run using the DNA<sup>TT</sup> lattice with or without in silico mutation of the TT dinucleotide to AC. Note that in both cases, AC dinucleotide has a higher percentage of low-mobility waters at the protein-DNA interface. Data are presented as mean values; error bars, s.e.m. For DNA<sup>AC</sup> and DNA<sup>AC-TT</sup>, the sample size is four (dynamically independent copies of the protein-DNA complex within the crystallographic unit cell); similarly, for DNA<sup>TT</sup> and DNA<sup>TT-AC</sup>, the sample size is eight.

to BARHL2 than both optimal sequences. The DNA recognition pattern in the BARHL2-DNA<sup>AT</sup> complex is more similar to DNA<sup>AC</sup> than DNA<sup>TT</sup>. Compared to DNA<sup>AC</sup>, the hydrophobic contact between Thr285 and T<sub>18</sub> opposite to A<sub>7</sub> of AC is retained, but the extensive water network connecting both Thr285 and Thr278 with the AC region is almost completely lost. There is only one water molecule connecting the side-chain oxygen of Thr285 with the side-chain oxygen of Asn282 and one water molecule connecting Asn282 with N6 of A<sub>7</sub> of AC (Fig. 3c). In addition, the side chain of Arg289 has only one conformation, rotated away from the protein-DNA interface.

Another sequence, DNA<sup>TC</sup> is also only one Hamming distance away from both local optima but has an even weaker affinity to BARHL2 than

DNA<sup>AT</sup>. The recognition pattern appears to be a mixture of DNA<sup>TT</sup> and DNA<sup>AC</sup>, with the hydrophobic contact of DNA<sup>TT</sup> between C<sub>7</sub> of T<sub>7</sub> and the methyl group of Thr278 retained but at a sub-optimal distance (4.3 Å; Fig. 3d). The water molecules are arranged near Asn282 in a somewhat similar pattern to those observed in DNA<sup>AC</sup>, with the water net connecting the side-chain oxygens of Thr285 and Asn282 and N7 and O6 of G<sub>17</sub> (opposite to C of AC). Thus, DNA<sup>TC</sup> combines aspects of recognition from DNA<sup>TT</sup> and DNA<sup>AC</sup>, but both types of interactions are less optimal, explaining the relatively low affinity of the BARHL2-DNA<sup>TC</sup> complex.

To compare, we solved BARHL2 bound to four other sequences that are close to one but not the other optima. Mutations of the second T (T<sub>8</sub>) of DNA<sup>TT</sup> to G<sub>8</sub> decreased affinity less than the mutation to C. Overall,
the recognition pattern in the DNA<sup>TG</sup> complex is similar to that observed in the DNA<sup>TC</sup> (Fig. 3e). However, the non-polar contact between Thr278 and T<sub>7</sub> has a more optimal distance. The water network is also more extensive, with three more water molecules. Those water molecules connect the side-chain oxygen of Thr278 to both O6 and N7 of one of the observed conformations of G<sub>8</sub>. The DNA<sup>TG</sup> complex also shows very strong distortion of the DNA backbone, with a 3.7 Å shift between two conformations of the phosphate backbone at the position of the G nucleotide located after the TG sequence (Extended Data Fig. 3f). By contrast, the replacement of T<sub>7</sub> of DNA<sup>TT</sup> with G led to a substantial loss of affinity; in BARHL2-DNA<sup>GT</sup>, neither Thr278 nor Thr285 makes direct hydrophobic contact with bases. Instead, water molecules are spread rather equally near both amino acids. The side-chain oxygen atoms of Thr285, Asn282 and N4 of C<sub>18</sub> are in contact through one water, which is connected to the other one contacting N7 of A<sub>17</sub> and simultaneously participating in a five-water chain connecting both O6 and N7 of G<sub>7</sub> with the side-chain oxygen atoms of Asn282 and Thr278 (Fig. 3f).

Mutation of the AC sequence led to a much larger loss of affinity than mutation of TT. Mutating the A<sub>7</sub> to either G or C of DNA<sup>AC</sup> resulted in a loss of most water-mediated contacts and a very low affinity. Both DNA<sup>GC</sup> and DNA<sup>CC</sup> complexes showed only one water molecule in the interface connecting the side-chain oxygens of Thr285 and Asn282 with the N4 of C<sub>18</sub> or O6 of G<sub>18</sub>, respectively (Fig. 3g,h). Furthermore, neither complex retained the hydrophobic contacts involving either Thr278 or Thr285, further explaining their very low affinity.

## Role of hydrophobic interactions and water-mediated interactions

To determine the role of hydrophobic interactions and water-mediated bonds in BARHL2-DNA interactions, we mutated the two threonines (Thr278 and Thr285) that contribute to the hydrophobic interactions and water-chain organization to residues found in other homeodomain proteins (Extended Data Fig. 4). The protein-DNA affinities were measured using SELEX. As expected, binding of BARHL2 to the TAATT sequence, which is commonly recognized by homeodomains, was not abolished by most of the mutations (Fig. 4a). However, binding to the BARHL-family-specific TAAAC sequence was very sensitive to mutation. Significant binding to TAAAC was retained only in two cases, where Thr278 was mutated to residues that retained the methyl but not the hydroxyl group (isoleucine or valine, residues present in NKX1.2 and EMX1, respectively). These results support the importance of Thr278 and Thr285 in organizing the water network that recognizes the BARHL2-specific TAAAC sequence.

To further assess the role of hydrophobic contacts, we tested the effect of cytosine methylation. Introduction of a hydrophobic methyl group to the five position of C enables methyl-C to take part in similar hydrophobic interactions as a T. In addition, the methyl group destabilizes local water networks. To test the effect of methylation of Cs at all positions and dinucleotide contexts, we directly introduced 5-methylcytosine to DNA using PCR and then determined the enrichment of different sequences using SELEX. Two strong effects were detected: first, the methylation of C-base in DNA<sup>AC</sup> reduced BARHL2-DNA affinity (Fig. 4b). The lower affinity was probably a result of the methyl group interfering with the elaborate water network of the BARHL2-DNA<sup>AC</sup> complex (Fig. 4b). Second, methylation of the C on the complementary strand of DNA<sup>GT</sup> greatly increased the affinity, to a level even higher than that observed in both unmethylated optimal sequences (DNA<sup>AC</sup> and DNA<sup>TT</sup>). The high affinity is probably a result of the ability of mC but not unmethylated C to form a hydrophobic contact with Thr285 (Fig. 4b-d).

To test the role of enthalpic water-mediated interactions in BARHL2-DNA binding, we performed the HT-SELEX at a series of different temperatures (0 °C, 10 °C, 20 °C, 30 °C, 40 °C). As the entropic contribution to binding depends on temperature, comparing binding at different temperatures can reveal which sequences are bound

more entropically and which depend more on enthalpic contribution to affinity. A comparison of the effect of temperature on the relative binding affinity of the different sequences revealed that the affinity to the enthalpic TAAAC sequence decreased when the temperature was increased; a similar but less dramatic trend was also observed for TAAGT. However, the sequence representing the entropic optima TAATT was less affected by temperature (Fig. 4e). Taken together, these results are consistent with the role of extensive water networks in the binding of BARHL2 to the TAAAC and methylated TAAGT sequences and a dominant entropic contribution of binding to TAATT<sup>38</sup>.

## Molecular dynamics analysis of entropy

To assess the role of water entropy in the binding process of BARHL2 to DNA<sup>AC</sup> and DNA<sup>TT</sup>, we performed molecular dynamics simulations and calculated spatially resolved solvent entropies using Per|Mut<sup>52</sup>. Water molecules in a 1 nm thick solvation shell around the complexes were localized by permuting water identities<sup>52</sup>. This procedure does not change the physical properties of the water molecules but serves to estimate the rotational and translational freedom of individual waters at a given average position around the BARHL2-DNA complexes and thus allowed us to compute their individual solvent entropies as well as correlation corrections based on a mutual information expansion approach<sup>52</sup>.

The computed solvent entropies at given average water positions of BARHL2-DNA<sup>AC</sup> and BARHL2-DNA<sup>TT</sup> indicated that waters on both interfaces are more restrained than bulk water (118 J K<sup>-1</sup> mol<sup>-1</sup>; Fig. 5a,b). The BARHL2-DNA<sup>AC</sup> interface involves a subset of 10-15 very low-entropy waters (50-80 J K<sup>-1</sup> mol<sup>-1</sup>) as well as less restrained waters (80-100 J K<sup>-1</sup> mol<sup>-1</sup>). Most of the low-entropy waters form a stable hydrogen bond network connecting the recognition helix of BARHL2 with bases at the TAAAC site (Extended Data Fig. 6a), in good agreement with the water molecules observed in the two BARHL2-DNA<sup>AC</sup> structures resolved at 0.95 Å and 1.3 Å. The BARHL2-DNA<sup>TT</sup> complex simulations also show a water-mediated hydrogen bond network at the protein-DNA interface, formed by 20-35 medium-entropy (75-90 J K<sup>-1</sup> mol<sup>-1</sup>) water molecules (Extended Data Fig. 6e), in agreement with the results of the crystal lattice simulations (Fig. 3j). Consistent with the relatively high predicted mobility of these waters, the level of electron density seen in crystal structure of the BARHL2-DNA<sup>TT</sup> complex in this region (<1σ) appears similar to that of free solvent at the limit of resolution (1.85 Å), thus explaining why only few water molecules are seen in BARHL2-DNA<sup>TT</sup> crystal structure at the dinucleotide recognition site. Indeed, the number and positions of the water molecules seen in the simulations within this region (ten for BARHL2-DNA<sup>AC</sup> and six for BARHL2-DNA<sup>TT</sup>, four of which have low mobility; see Extended Data Fig. 7) agree very well with the numbers seen in the crystal structures.

Computing the average solvent entropy of 118 J K<sup>-1</sup> mol<sup>-1</sup> for bulk water (based on the simulations of pure optimal point charge water) also allowed us to estimate the total change of solvent entropy at the protein-DNA interface in the BARHL2-DNA<sup>AC</sup> and BARHL2-DNA<sup>TT</sup> complexes. The estimated solvent entropy loss upon binding is considerably larger (by -1,500 J K<sup>-1</sup> mol<sup>-1</sup>) for the BARHL2-DNA<sup>AC</sup> complex than for the BARHL2-DNA<sup>TT</sup> complex.

We also considered other contributions to the entropy, such as the flexibility and conformational entropy of the BARHL2 protein and the bound DNA in the respective complexes. Both the mean backbone positions of BARHL2 and the atom position root mean square fluctuations (RMSF) are very similar for the two complexes, explaining the relatively small 34 J K<sup>-1</sup> mol<sup>-1</sup> difference in BARHL2-DNA<sup>AC</sup> and BARHL2-DNA<sup>TT</sup> protein conformational entropies (Fig. 5c). This difference can be mostly attributed to the higher conformational entropy of DNA-binding side-chain residues in the BARHL2-DNA<sup>AC</sup> complex. The analysis of residue-wise RMSF values for the two DNA sequences (Fig. 5d) shows a larger difference in conformational flexibility, again in favor of
a

<figure><img src="image_8.png" /></figure>

b

<figure><img src="image_9.png" /></figure>

e

<figure><img src="image_10.png" /></figure>

c

<figure><img src="image_11.png" /></figure>

<figure><img src="image_12.png" /></figure>

<figure><img src="image_13.png" /></figure>

<figure><img src="image_14.png" /></figure>

d

<figure><img src="image_15.png" /></figure>

<figure><img src="image_16.png" /></figure>

<figure><img src="image_17.png" /></figure>

**Fig. 4 | Effects of mutations, methylation and temperature changes on BARHL2 binding to DNA.** **a,** The effect of mutation of Thr278 and Thr285 on the binding of BARHL2 to the different homeobox-like sequences. Color indicates relative enrichment of the indicated 6-mer in the fourth SELEX cycle compared to the initial DNA library. Yellow circles indicate that the 6-mer represents local maxima (enrichment is higher than that of related sequences). Labels indicate the amino acids into which Thr278 and Thr285 were mutated, and the TF that contains those residues. **b,** The effect of methylation of the homeobox-like sequences on affinity. Top and bottom panels show relative enrichment of TAANNG 8-mer containing the indicated dinucleotide in the NN position in the presence and absence of cytosine methylation, respectively. **c,** Effect of

methylation of the C in BARHL2-DNA<sup>AC</sup>. The five-methyl group of C<sub>8</sub> is shown in ball-and-stick and colored magenta. Note that the addition of a methyl group to DNA<sup>AC</sup> (left) makes the DNA<sup>AmC</sup> (middle) similar to DNA<sup>AT</sup> (right) and destabilizes the water network between BARHL2 and DNA. **d,** BARHL2 has relatively low affinity to DNA<sup>GT</sup> (left); however, methylation of C complementary to the G (middle) increases the affinity, probably because similar to the T complementary to the A of DNA<sup>AC</sup> (right), the five-methyl group of C<sub>18</sub> can form a hydrophobic contact to Thr285. **e,** Effect of temperature on BARHL2 affinity to different homeobox sequences. Note that temperature affects the affinity of *k*-mers containing AC (magenta) and TG (dark green) more than those containing TT (light green).
the BARHL2-DNA<sup>AC</sup> complex. Here, the increased flexibility of DNA<sup>AC</sup> can mostly be attributed to the base pairs downstream of the binding site (bases 11–14), amounting to an entropy difference of 88 J·K<sup>-1</sup>·mol<sup>-1</sup>.

The strongly localized and extensive water network that connects BARHL2 amino acids to the AC dinucleotide is enthalpically favorable for binding but entropically unfavorable. By contrast, the TT dinucleotide exposes a more hydrophobic surface to solvent molecules in the major groove, which leads to a more mobile water network at the complex interface that is entropically more favorable than that of the AC dinucleotide. These results are in line with the entropies obtained from the isothermal titration calorimetry (ITC) experiments<sup>38</sup> and support the notion that solvent entropy at the binding interface contributes markedly to the entropy difference between the BARHL2-DNA<sup>AC</sup> and BARHL2-DNA<sup>TT</sup> complexes. Note, however, that for a fully quantitative comparison, further terms would have to be included, such as the entropy of water molecules released during BARHL2 binding as well as the conformational entropies of unbound BARHL2 and free double-stranded DNA molecules.

Discussion

Here, we used structural biology to determine how two TFs, MYF5 and BARHL2, can specifically recognize dinucleotides. Extensive prior work has established the central mechanisms by which proteins interact with DNA<sup>4,6,7,10,53,54</sup>. Direct interactions between individual amino acids and DNA bases can differentiate between mononucleotides; however, because of their one-to-one nature, individual contacts are generally not very sensitive to neighboring base content. The influence of sequence on DNA conformation, in turn, can be used to recognize dinucleotides. For example, geometric aspects of DNA such as the width of the minor groove are affected by dinucleotide content, and narrowing of the minor groove caused by homopolymeric stretches of A or T can be sensed by arginine residues<sup>53</sup>. Furthermore, the bending modulus of the DNA helix towards a particular direction is sensitive to local dinucleotide content<sup>5,55</sup>, enabling proteins to indirectly read dinucleotides by bending DNA. However, the local effect of DNA bending on dinucleotide preference is relatively small within a short segment of DNA, such as that bound by TFs<sup>56</sup>. In a nucleosome, which binds much longer DNA segments, the small effects add up to allow the sequence to contribute to nucleosome positioning. However, a local bend, even as strong as what is seen in a nucleosome, would not cause dinucleotide preferences as strong as what are seen in BARHL2 and MYF5. Furthermore, the effect of a protein alpha-helix inserting into the major groove of DNA has a much smaller effect on DNA backbone shape than the formation of a nucleosome<sup>22,57</sup>. Therefore, a mechanism based on local DNA bending alone can not account for the dinucleotide specificity of both MYF5 and BARHL2. The results we present here strongly suggest that dinucleotide recognition critically depends on water molecules at the protein-DNA interface.

Both the free DNA and the interface between protein and DNA contain large numbers of water molecules. It is well established that DNA sequence can be read by water-mediated interactions<sup>3,7,9,39,58</sup>, and this mechanism has been observed in a large number of protein-DNA structures<sup>3,7</sup> and validated experimentally by mutagenesis<sup>59–61</sup>. Mutational evidence also suggests that a single water molecule can contribute to epistatic interactions at the trp repressor binding site by recognition of both CT (optimal sequence) and TC (-15-fold lower affinity) dinucleotides<sup>60</sup>. However, to our knowledge, no previous work has solved structures of TFs bound to two sites containing distinct dinucleotides that display similar binding affinity.

Importantly, the indirect nature of the water-mediated interactions commonly leads to large tradeoffs between entropy and enthalpy<sup>39–41</sup>. We have shown earlier that individual TFs can bind to two distinct locally optimal sequences: one representing entropic optima, where water molecules are more mobile, and the other representing enthalpic optima, where water molecules at the protein-DNA interface are less mobile and form complex networks<sup>38</sup>. We show here that these water correlations contribute to the recognition of a dinucleotide within the BARHL2 recognition sequence (Fig. 5), which is recognized either enthalpically by an extensive water network that links the two DNA nucleotides to the same amino acid (BARHL2-DNA<sup>AC</sup>) or entropically by formation of a local hydrophobic patch that repels water (BARHL2-DNA<sup>TT</sup>). In both cases, the dinucleotides are preferred because of the local collective action of the water molecules. Sequences between TT and AC lead to compromises that weaken affinity because water molecules have a strong influence on each other in the confined space between the protein and DNA. The two modes of dinucleotide recognition also lead to a different temperature sensitivity of binding of the same TF to two different motifs. This effect may result in differential gene expression of target genes that contain the entropic and enthalpic sites, enabling organisms to directly sense their body temperature at the level of individual genes<sup>2</sup>. This mechanism is likely to be particularly important in unicellular organisms, plants and poikilothermic animal species.

Recently, computer simulation methods that provide spatially resolved maps of hydration thermodynamics in protein-ligand systems have been developed. Spatial decomposition of translational water-water correlation entropy in Factor FXa<sup>62</sup> and Crambin<sup>52</sup> showed that thermodynamic driving forces linked to hydration can have an important role in protein folding and ligand binding<sup>63</sup>. In the case of Crambin, more than half of the solvent entropy contribution came from induced water correlations<sup>52</sup>, highlighting the importance of water-water interactions. Here, we used the PerMut algorithm to analyze the entropic contributions of solvent at the binding interface of the BARHL2-DNA<sup>AC</sup> and BARHL2-DNA<sup>TT</sup> complexes. Based on these solvent entropy calculations, we estimated that the solvent entropy loss is considerably larger for BARHL2-DNA<sup>AC</sup> than for BARHL2-DNA<sup>TT</sup>. The difference is a significant contribution to the free-energy budget of

**Fig. 5 | Analysis of entropic and enthalpic optima using molecular dynamics.**
*a*, Molecular dynamics analysis of entropies of resident water molecules at the BARHL2-DNA<sup>AC</sup> and BARHL2-DNA<sup>TT</sup> interface, colored according to their solvent entropy. Below, number of waters at the complex interface, their average (S<sub>avg</sub>) and total (S<sub>total</sub>) solvent entropy as well as the estimated solvent entropy loss (ΔS<sub>loss</sub>) of interfacial waters is shown for both complexes. **b**, Distribution of solvent entropies of interfacial water molecules compared to bulk solvent waters. **c**, Flexibility of BARHL2 protein main chain (solid lines) and all atoms (dotted lines) bound to DNA<sup>AC</sup> (magenta) and DNA<sup>TT</sup> (green). **d**, Flexibility of BARHL2 bound DNA<sup>AC</sup> (magenta) and DNA<sup>TT</sup> (green) DNA backbone (solid lines) and all DNA atoms (dotted lines). **e**, Partial contributions to the entropy difference of BARHL2-DNA complexes including the conformational (Schlitter) entropies for the protein and DNA as well as the entropy contribution of interfacial waters. **f,g**, Surface representation of the protein-DNA interface near the variable bases AC (**f**) and TT (**g**). Only the recognition helix from BARHL2 (wheat) is represented

for clarity. The variable bases are in yellow, and the methyl group (CH3) of T is in violet. The red and teal spheres represent the water molecules observed in the interface and minor groove, respectively. **h,i**, Schematic representation of the two optimal sites representing enthalpy (**h**) and entropy (**i**) optima. Only the recognition helices and the divergent dinucleotides are shown for clarity. The amino acid residues involved in the recognition are presented as sticks. The bases are color-coded as follows: adenine, green; thymine, red; cytosine, blue; guanine, yellow. Note that the high-entropy state (TT) has very few fixed water molecules whereas the enthalpic state (AC) contains several properly fixed water molecules that are used for the formation of the hydrogen bonds linking BARHL2 to DNA. The small panels in **h** and **i** show the distribution of the hydrogen bond partners on the surface of the optimal sequences. Positively charged atoms (nitrogen) are blue; negatively charged atoms (oxygen) are red; and carbon and phosphorus are green and orange, respectively.
<figure><img src="image_18.png" /></figure>

<figure><img src="image_19.png" /></figure>

<figure><img src="image_20.png" /></figure>

<figure><img src="image_21.png" /></figure>

<figure><img src="image_22.png" /></figure>

<table><thead><tr><th></th><th>AC<br>complex</th><th>TT<br>complex</th><th>Diff<br>(AC -TT)</th></tr></thead><tbody><tr><th>Protein<br>flexibility</th><td>10469.7</td><td>10434.8</td><td>34</td></tr><tr><th>DNA<br>flexibility</th><td>5194.9</td><td>5107.3</td><td>87.6</td></tr><tr><th>Solvent<br>mobility</th><td>-3601</td><td>-2127</td><td>-1474</td></tr></tbody></table>

<figure><img src="image_23.png" /></figure>

<figure><img src="image_24.png" /></figure>

<figure><img src="image_25.png" /></figure>
the BARHL2 binding, and probably the main source of binding entropy difference observed in the ITC measurements³⁸.

In summary, our work represents the largest high-resolution structural study of the effect of DNA sequence on protein-DNA interactions. The extensive analysis highlights the role of water in the molecular recognition of dinucleotides and in the recognition of features that are larger than those that can be bound by an individual chemical bond. Recent advances in the prediction of protein structures from sequence⁶⁴,⁶⁵ raise the possibility that another difficult problem—determining the affinity of macromolecular interactions from sequence—could also be addressed by machine learning. However, the non-additive nature of the solvent interactions increases the complexity of the problem and highlights the need for explicitly considering both enthalpy and entropy in building computational models of macromolecular recognition. Further work combining high-throughput methods described here, including temperature SELEX, with molecular dynamics simulation-based entropy calculations are promising avenues for generating the large-scale data necessary for building computational models that seek to solve the relationship between macromolecular sequence and affinity.

## Online content

Any methods, additional references, Nature Portfolio reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/s41594-024-01449-6.

## References

1. Chiu, T. P., Rao, S. & Rohs, R. Physicochemical models of protein-DNA binding with standard and modified base pairs. *Proc. Natl Acad. Sci. USA* **120**, e2205796120 (2023).

2. Aggarwal, A. K., Rodgers, D. W., Drottar, M., Ptashne, M. & Harrison, S. C. Recognition of a DNA operator by the repressor of phage 434: a view at high resolution. *Science* **242**, 899-907 (1988).

3. Rodgers, D. W. & Harrison, S. C. The complex between phage 434 repressor DNA-binding domain and operator site OR3: structural differences between consensus and non-consensus half-sites. *Structure* **1**, 227-240 (1993).

4. Pabo, C. O. & Sauer, R. T. Protein-DNA recognition. *Annu. Rev. Biochem.* **53**, 293-321 (1984).

5. Rohs, R. et al. The role of DNA shape in protein-DNA recognition. *Nature* **461**, 1248-1253 (2009).

6. Stormo, G. D. Modeling the specificity of protein-DNA interactions. *Quant. Biol.* **1**, 115-130 (2013).

7. Schwabe, J. W. The role of water in protein-DNA interactions. *Curr. Opin. Struct. Biol.* **7**, 126-134 (1997).

8. Rastogi, C. et al. Accurate and sensitive quantification of protein-DNA binding affinity. *Proc. Natl Acad. Sci. USA* **115**, E3692-E3701 (2018).

9. Otwinowski, Z. et al. Crystal structure of trp repressor/operator complex at atomic resolution. *Nature* **335**, 321-329 (1988).

10. Harrison, S. C. & Aggarwal, A. K. DNA recognition by proteins with the helix-turn-helix motif. *Annu. Rev. Biochem.* **59**, 933-969 (1990).

11. Chiu, T. K., Sohn, C., Dickerson, R. E. & Johnson, R. C. Testing water-mediated DNA recognition by the Hin recombinase. *EMBO J.* **21**, 801-814 (2002).

12. Hertz, D. et al. Comparison of DNA probe technology and automated continuous-monitoring blood culture systems in the detection of neonatal bacteremia. *J. Perinatol.* **19**, 290-293 (1999).

13. Jolma, A. & Taipale, J. Methods for analysis of transcription factor DNA-binding specificity in vitro. *Subcell. Biochem.* **52**, 155-173 (2011).

14. Badis, G. et al. Diversity and complexity in DNA recognition by transcription factors. *Science* **324**, 1720-1723 (2009).

15. Zhao, Y. & Stormo, G. D. Quantitative analysis demonstrates most transcription factors require only simple models of specificity. *Nat. Biotechnol.* **29**, 480-483 (2011).

16. Berg, O. G. & von Hippel, P. H. Selection of DNA binding sites by regulatory proteins. Statistical-mechanical theory and application to operators and promoters. *J. Mol. Biol.* **193**, 723-750 (1987).

17. Sahota, G. & Stormo, G. D. Novel sequence-based method for identifying transcription factor binding sites in prokaryotic genomes. *Bioinformatics* **26**, 2672-2677 (2010).

18. Jolma, A. et al. DNA-binding specificities of human transcription factors. *Cell* **152**, 327-339 (2013).

19. Zhao, Y., Ruan, S., Pandey, M. & Stormo, G. D. Improved models for transcription factor binding site identification using nonindependent interactions. *Genetics* **191**, 781-790 (2012).

20. Ge, W., Meier, M., Roth, C. & Soding, J. Bayesian Markov models improve the prediction of binding motifs beyond first order. *NAR Genom. Bioinform.* **3**, lqab026 (2021).

21. Rao, S. et al. Systematic prediction of DNA shape changes due to CpG methylation explains epigenetic effects on protein-DNA binding. *Epigenetics Chromatin* **11**, 6 (2018).

22. Biswas, A. & Basu, A. The impact of the sequence-dependent physical properties of DNA on chromatin dynamics. *Curr. Opin. Struct. Biol.* **83**, 102698 (2023).

23. Anselmi, C., Bocchinfuso, G., De Santis, P., Savino, M. & Scipioni, A. Dual role of DNA intrinsic curvature and flexibility in determining nucleosome stability. *J. Mol. Biol.* **286**, 1293-1301 (1999).

24. Struhl, K. & Segal, E. Determinants of nucleosome positioning. *Nat. Struct. Mol. Biol.* **20**, 267-273 (2013).

25. Stayrook, S., Jaru-Ampornpan, P., Ni, J., Hochschild, A. & Lewis, M. Crystal structure of the lambda repressor and a model for pairwise cooperative operator binding. *Nature* **452**, 1022-1025 (2008).

26. Tan, C. & Takada, S. Nucleosome allosteric in pioneer transcription factor binding. *Proc. Natl Acad. Sci. USA* **117**, 20586-20596 (2020).

27. Williams, D. C. Jr., Cai, M. & Clore, G. M. Molecular basis for synergistic transcriptional activation by Oct1 and Sox2 revealed from the solution structure of the 42-kDa Oct1-Sox2-Hoxb1-DNA ternary transcription factor complex. *J. Biol. Chem.* **279**, 1449-1457 (2004).

28. Michael, A. K. et al. Mechanisms of OCT4-SOX2 motif readout on nucleosomes. *Science* **368**, 1460-1465 (2020).

29. Remenyi, A. et al. Crystal structure of a POU/HMG/DNA ternary complex suggests differential assembly of Oct4 and Sox2 on two enhancers. *Genes Dev.* **17**, 2048-2059 (2003).

30. Dodonova, S. O., Zhu, F., Dienemann, C., Taipale, J. & Cramer, P. Nucleosome-bound SOX2 and SOX11 structures elucidate pioneer factor function. *Nature* **580**, 669-672 (2020).

31. Rogers, D. C. Type species designation for *Archaebranchinecta* Rogers & Coronel (Branchiopoda: Anostraca). *Zootaxa* **4700**, 299-300 (2019).

32. Pellegrini, L., Tan, S. & Richmond, T. J. Structure of serum response factor core bound to DNA. *Nature* **376**, 490-498 (1995).

33. Garcia, H. G. et al. Biological consequences of tightly bent DNA: the other life of a macromolecular celebrity. *Biopolymers* **85**, 115-130 (2007).

34. Privalov, P. L., Dragan, A. I. & Crane-Robinson, C. The cost of DNA bending. *Trends Biochem. Sci.* **34**, 464-470 (2009).

35. Morozov, A. V. et al. Using DNA mechanics to predict in vitro nucleosome positions and formation energies. *Nucleic Acids Res.* **37**, 4707-4722 (2009).
36. Vologodskii, A. & Frank-Kamenetskii, M. D. Strong bending of the DNA double helix. *Nucleic Acids Res.* **41**, 6785–6792 (2013).

37. Rosanio, G., Widom, J. & Uhlenbeck, O. C. In vitro selection of DNAs with an increased propensity to form small circles. *Biopolymers* **103**, 303–320 (2015).

38. Morgunova, E. et al. Two distinct DNA sequences recognized by transcription factors represent enthalpy and entropy optima. *eLife* **7**, e32963 (2018).

39. Dunitz, J. D. The entropic cost of bound water in crystals and biomolecules. *Science* **264**, 670 (1994).

40. Chodera, J. D. & Mobley, D. L. Entropy–enthalpy compensation: role and ramifications in biomolecular ligand recognition and design. *Annu. Rev. Biophys.* **42**, 121–142 (2013).

41. Fox, J. M., Zhao, M., Fink, M. J., Kang, K. & Whitesides, G. M. The molecular origin of enthalpy/entropy compensation in biomolecular recognition. *Annu. Rev. Biophys.* **47**, 223–250 (2018).

42. Grove, C. A. et al. A multiparameter network reveals extensive divergence between C. elegans bHLH transcription factors. *Cell* **138**, 314–327 (2009).

43. Nitta, K. R. et al. Conservation of transcription factor binding specificities across 600 million years of bilateria evolution. *eLife* **4**, e04837 (2015).

44. Yin, Y. et al. Impact of cytosine methylation on DNA binding specificities of human transcription factors. *Science* **356**, eaaj2239 (2017).

45. Gordan, R. et al. Genomic regions flanking E-box binding sites influence DNA binding specificity of bHLH transcription factors through DNA shape. *Cell Rep.* **3**, 1093–1104 (2013).

46. Blackwell, T. K. & Weintraub, H. Differences and similarities in DNA-binding preferences of MyoD and E2A protein complexes revealed by binding site selection. *Science* **250**, 1104–1110 (1990).

47. Ferre-D'Amare, A. R., Prendergast, G. C., Ziff, E. B. & Burley, S. K. Recognition by Max of its cognate DNA through a dimeric b/HLH/Z domain. *Nature* **363**, 38–45 (1993).

48. Li, S. X., Olson, W. K. & Lu, X. J. Web 3DNA 2.0 for the analysis, visualization, and modeling of 3D nucleic acid structures. *Nucleic Acids Res.* **47**, W26–W34 (2019).

49. Chiu, T. P., Rao, S., Mann, R. S., Honig, B. & Rohs, R. Genome-wide prediction of minor-groove electrostatic potential enables biophysical modeling of protein–DNA binding. *Nucleic Acids Res.* **45**, 12565–12576 (2017).

50. Liu, Y., Toh, H., Sasaki, H., Zhang, X. & Cheng, X. An atomic model of Zfp57 recognition of CpG methylation within a specific DNA sequence. *Genes Dev.* **26**, 2374–2379 (2012).

51. Pluta, R. et al. Molecular basis for DNA recognition by the maternal pioneer transcription factor FoxH1. *Nat. Commun.* **13**, 7279 (2022).

52. Heinz, L. P. & Grubmuller, H. Spatially resolved free-energy contributions of native fold and molten-globule-like Crambin. *Biophys. J.* **120**, 3470–3482 (2021).

53. Rohs, R. et al. Origins of specificity in protein–DNA recognition. *Annu. Rev. Biochem.* **79**, 233–269 (2010).

54. Morgunova, E. & Taipale, J. Structural insights into the interaction between transcription factors and the nucleosome. *Curr. Opin. Struct. Biol.* **71**, 171–179 (2021).

55. Olson, W. K., Gorin, A. A., Lu, X. J., Hock, L. M. & Zhurkin, V. B. DNA sequence-dependent deformability deduced from protein–DNA crystal complexes. *Proc. Natl Acad. Sci. USA* **95**, 11163–11168 (1998).

56. Liu, G., Xing, Y., Zhao, H., Cai, L. & Wang, J. The implication of DNA bending energy for nucleosome positioning and sliding. *Sci. Rep.* **8**, 8853 (2018).

57. Pavletich, N. P. & Pabo, C. O. Zinc finger–DNA recognition: crystal structure of a Zif268–DNA complex at 2.1Å. *Science* **252**, 809–817 (1991).

58. Spyrakis, F. et al. Energetics of the protein–DNA-water interaction. *BMC Struct. Biol.* **7**, 4 (2007).

59. Keller, W., Konig, P. & Richmond, T. J. Crystal structure of a bZIP/DNA complex at 2.2Å: determinants of DNA specific recognition. *J. Mol. Biol.* **254**, 657–667 (1995).

60. Joachimiak, A., Haran, T. E. & Sigler, P. B. Mutagenesis supports water mediated recognition in the trp repressor-operator system. *EMBO J.* **13**, 367–372 (1994).

61. Ho, K. L. et al. MeCP2 binding to DNA depends upon hydration at methyl-CpG. *Mol. Cell* **29**, 525–531 (2008).

62. Nguyen, C. N., Cruz, A., Gilson, M. K. & Kurtzman, T. Thermodynamics of water in an enzyme active site: grid-based hydration analysis of coagulation factor Xa. *J. Chem. Theory Comput.* **10**, 2769–2780 (2014).

63. Mukherjee, S. & Schafer, L. V. Spatially resolved hydration thermodynamics in biomolecular systems. *J. Phys. Chem. B* **126**, 3619–3631 (2022).

64. Jumper, J. et al. Highly accurate protein structure prediction with AlphaFold. *Nature* **596**, 583–589 (2021).

65. Baek, M., McHugh, R., Anishchenko, I., Baker, D. & DiMaio, F. Accurate prediction of nucleic acid and protein–nucleic acid complexes using RoseTTAFoldNA. *Nat. Methods* **21**, 117–121 (2024).

**Publisher's note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2025
# Methods

## Protein expression, purification and crystallization

Expression and purification of the DNA-binding domain fragment of human MYF5 (residues 82–136) as well as BARHL2 (residues 232–292) were performed as previously described⁴⁴,⁶⁶. The DNA fragments used in crystallization were obtained as single-strand oligonucleotides (Eurofins) and annealed in 20 mM HEPES (pH 7.5) containing 150 mM NaCl and 0.5 mM Tris (2-carboxyethyl) phosphine (TCEP) and 5% glycerol. For each complex, the purified and concentrated protein was first mixed with a solution of annealed DNA duplex at a molar ratio of 1:1.2 and, after 1 h on ice, subjected to the crystallization trials. The crystallization conditions for both MYF5 complexes were optimized using an in-house-developed crystal screening kit combining different polyethylene glycols (PEGs) with different additives. Complexes of MYF5 with symmetrical DNA were crystalized in sitting drops by a vapor diffusion technique from a solution containing 50 mM sodium acetate buffer at pH 4.5, 10% PEG (3350) and 2% 2-methyl-2,4-pentanediol (MPD). Complexes of MYF5 with non-symmetrical DNA were also crystallized from 0.05 M sodium acetate buffer at pH 4.5 but containing 11% PEG (1000), 2% MPD and 5% PEG (400). All crystals of BARHL2 complexes with different DNAs were obtained in the same conditions from the reservoir solution containing 100 mM sodium acetate buffer (pH 4.8), 34% PEG (1000) and 0.06 M sodium malonate (pH 7.0). All datasets were collected at the European Synchrotron Radiation Facility (ESRF) from a single crystal on beamline ID23-1, at 100 K using the reservoir solution as cryo-protectant. Data were integrated with the program XDS⁶⁷ and scaled with SCALA⁶⁸. Statistics of data collection are presented in Table 1.

## Structure determination and refinement

All structures were solved by molecular replacement using the program Phaser 2.8.3 as implemented in Phenix 1.20.1-4487⁶⁹ and CCP4 suits 7.1 and 8.0 (ref. 70) the structure of MYOD (PDB 1MDY) as a search model for MYF5 and the structure of *Drosophila* clawless homeodomain protein (PDB 3A01, chain A) as a search model for BARHL2. After the positioning of the protein, the density of DNA was clear and the molecule was built manually using COOT 0.9.6⁷¹. The rigid body refinement with REFMAC5 5.8.0267 was followed by restrain refinement with REFMAC5, as implemented in CCP4 (ref. 70) and Phenix refine⁷². The manual rebuilding of the model was done using COOT. The refinement statistics are presented in Table 1. In both MYF5 complexes, all residues as well as all DNA bases were well defined in the electron density maps. In the structure of MYF5GT/AC, only three water molecules were well defined, whereas in the structure of MYF5AA/AC, 71 water molecules were traced. All residues and bases on all BARHL2 complex structures were well visible in the maps. Figures showing structural representations were prepared using PyMOL 2.5.4⁷³.

## Molecular dynamics simulations in crystal lattice

The program Coot⁷¹ was used to in-silico mutate the TT dinucleotide to AC and vice versa at every monomer of the asymmetric unit and to energy minimize the resulting mutant structures before building the lattice for the simulations. The positions of the BARHL2 crystallographic water molecule oxygens were not changed from those of the initial crystal structure.

Four crystal lattice simulations (BARHL2-DNA<sup>AC</sup>, BARHL2-DNA<sup>AC->TT</sup>, BARHL2-DNA<sup>TT</sup>, BARHL2-DNA<sup>TT->AC</sup>) were then performed using AMBER21 (ref. 74); models of the complete unit cell were created using UCSF Chimera 1.0⁷⁵, neutralizing sodium ions added using the AMBER *AddToBox* tool, and then the same tool was used to add sufficient additional waters to achieve a final unit cell density of approximately 1.0. Control simulations of the DNA alone in water were prepared from the crystal structure coordinates using the Amber *tleap* tool, adding neutralizing sodium ions and enough water to fill a truncated octahedral periodic box extending a minimum of 10 Å beyond any

solute atom. Systems were parameterized using the FF14SB force field⁷⁶ for the protein component, with additional BSC1 parameters for the DNA⁷⁷. Waters and ions were modeled using the TIP3P and Joung-Cheatham⁷⁸ parameters, respectively.

Crystal lattice simulations were performed using *pmemd.cuda*. Unless specified otherwise, all simulations used default parameters. Systems were first energy-minimized with restraints (0.1 kcal mol⁻¹ Å⁻²) on all atoms except modeled waters (that is, waters observed in the crystal structures were in the restrained group) before a second energy-minimization step without restraints. Molecular dynamics simulations used Langevin dynamics with a collision frequency of 5 ps⁻¹ and a 2 fs timestep, with SHAKE on all bonds to hydrogen atoms. Non-bonded interactions were handled using the Particle Mesh Ewald method, with a direct space cutoff of 9 Å. Snapshots were saved every 100 ps. For the crystal lattice simulations, molecular dynamics began with a 10 ns NVT simulation, with a target temperature of 300 K and restraints of 0.01 kcal mol⁻¹ Å⁻² on all solute atoms, followed by a 50 ns NVT simulation in which only DNA atoms were restrained (same force constant). For the 50 ns production NVT simulation, only DNA Cl¹ atoms remained restrained. For reference simulations of the DNA alone in solution, molecular dynamics began with a 50 ns NPT simulation at 300 K (pressure coupling parameter 2 ps⁻¹) with restraints (0.01 kcal mol⁻¹ Å⁻²), followed by a 200 ns NPT production simulation in which the only restraints were on the Watson-Crick hydrogen bonds in the terminal base pairs (a flat-bottomed potential that was zero between 1.9 Å and 2.1 Å and had a force constant of 10 kcal mol⁻¹ Å⁻² outside this range).

DNA helical parameters were analyzed using the AMBER21 *cpptraj* tool⁷⁹. Other analyses and visualizations were performed in Jupyter notebooks, using the *MDTraj*⁸⁰ and Matplotlib packages. The method to analyze water molecule mobility involves first permuting the indices of the water oxygen atoms in each frame in the trajectory so that each remains within a small region of space. The mean position and fluctuation of each water can then be measured. The re-indexing is an iterative process using the linear sum assignment approach; the Python code to implement this procedure is available at http://github.com/CharlieLaughton/water_shuffel.

To determine the number of low-mobility water molecules at the protein-DNA interface, the RMSF of all interfacial waters was calculated. A water molecule was considered interfacial if its oxygen atom was simultaneously less than 5 Å of a protein atom and a DNA atom. Interfacial water molecules were considered of low mobility if the RMSF of their oxygen atom was smaller than 1.9 Å.

To check equilibration and sampling, this approach was applied independently to data for the first and second halves of the production phase of each simulation. Results are shown in Extended Data Fig. 5. There is no sign of systematic change in values between the first and second subsamples, and all trends between different molecular systems are maintained.

## Molecular dynamics simulations for analysis of entropy

To determine the entropic contributions of DNA, protein and water molecules, we performed all-atom molecular dynamics simulations of two BARHL2-DNA complexes with the sequences CGCTAAACGGTT (AC complex) and CGCTAATTGCTC (TT complex) in aqueous solution using the GROMACS 2019 simulation package⁸¹. Simulations of both complexes were performed in four replicates, starting from conformations derived from still unpublished crystallographic structures of the complexes, including crystallographic waters around the protein-DNA complexes. Each replicate trajectory was propagated using a leapfrog algorithm⁸² in 2 fs timesteps for 5 µs, resulting in a total 20 µs simulation time for each complex.

All simulations were kept at 298.15 K using a velocity rescale thermostat⁸³ and a coupling constant of 0.1 ps. The pressure during simulations was maintained at 101 kPa using an isotropic Parrinello-Rahman
barostat⁸⁴, an isothermal compressibility of 4.5 × 10⁻⁷ kPa⁻¹ and a coupling constant of 30 ps. The intramolecular and intermolecular interactions of the protein and DNA were described by the AMBER-19SB force field⁸⁵. All simulations were performed under periodic boundary conditions in a cubic simulation box of 7.8 nm edge length filled with optimal point charge waters⁸⁶, as well as Na⁺ and Cl⁻ ions appropriate for a 300 mM sodium chloride salt solution to match the experimental conditions of the ITC experiments. Electrostatic and van der Waals interactions were explicitly calculated within a 1.0 nm cutoff distance; long-range electrostatic interactions beyond this cutoff were calculated by Particle Mesh Ewald summation⁸⁷ with a grid spacing of 0.13 nm. Long-range van der Waals dispersion corrections⁸⁸ to the total energy of the system were applied in all simulations. Fast vibrational degrees of freedom were removed by using the LINCS algorithm⁸⁹ as implemented in GROMACS 2019 using a fourth-order iterative restraint on the bond angles.

For this calculation, four ×500 conformations per BARHL2-DNA complex were taken from molecular dynamics simulation trajectories at 10 ns intervals. Local protein and DNA flexibility was analyzed by calculating the atom position RMSF for each solute atom using the gmx rmsf program of the GROMACS 2019 simulation package⁸¹ and computing residue-averaged RMSF values for protein amino acids and DNA nucleic acids. Solute entropies were estimated from the same conformations by first computing the atom position covariance matrix using the gmx covar program. The maximum solute entropy of both protein and DNA was estimated from the covariance matrix using Schlitter's entropy formula⁹⁰ as implemented in the gmx anaeg program of GROMACS 2019 (ref. 81).

Entropies of the solvent shell around the BARHL2-DNA complexes were computed from the simulation trajectories using the PerlMut software⁹¹. In brief, 2,490 water molecules nearest to the protein-DNA complex (approximately a water shell of 1 nm thickness) were extracted from the molecular dynamics trajectories and subjected to permutation reduction. This procedure permutes the labels of the water molecules such that these always remain closest to their initial reference position without changing the underlying physics, thereby vastly reducing the amount of sampling required to converge solvent entropy calculations for N water molecules by the Gibbs factor (N!). The permuted water trajectories were used to compute solvent entropy estimates for particular water positions around the BARHL2 complexes, including first-order and second-order correlation terms for rotational and translational degrees of freedom of pairs of water molecules. We used the first-order translational entropy of waters to estimate their mobility at given positions, which is expected to determine their visibility in crystallographic structures.

The computed solvent entropies of individual water positions were mapped to the mean position of that given water around the BARHL2-DNA complex and analyzed further to determine the solvent entropy at the complex interface. Water molecules were identified as interfacial waters of the BARHL2-DNA complex if their mean position was simultaneously within 4 Å distance of both a protein atom and a DNA atom of the reference structure. Selection of the interfacial waters was performed with the software PyMol (v.2.5.4)⁷³, using the initial (crystallographic) structure as a reference.

The change of solvent entropy at the BARHL2-DNA complex interface $\Delta S_{\text{solv}}$ relative to bulk was computed according to:

$$ \Delta S_{\text{solv}} = N(\langle \langle \text{sint}_{\text{solv}} \rangle \rangle - \langle \langle \text{bulk}_{\text{solv}} \rangle \rangle), $$

where N is the number of water molecules at the complex interface, and $\langle \langle \text{sint}_{\text{solv}} \rangle \rangle$ and $\langle \langle \text{bulk}_{\text{solv}} \rangle \rangle$ = 118 J K⁻¹ mol⁻¹ are the mean solvent entropies of water molecules at the interface and in bulk water, respectively. The latter was computed using a separate simulation of bulk water using the same simulation parameters as used for the protein-DNA complexes, where PerlMut was applied to a 1 nm sphere of bulk water in the middle of the box to obtain the mean solvent entropies.

Water bridges between the BARHL2 and its bound DNA were identified and characterized using the water-bridge analysis module of the Python⁹² MDAnalysis package⁹³. This analysis identified hydrogen bond networks between hydrogen donors and acceptors of BARHL2 and its bound DNA, either by direct hydrogen bonding (0th-order water bridges) or by one or two water molecules (1st-order, 2nd-order and 3rd-order water bridges). In brief, possible hydrogen bond acceptors (A) included all nitrogen and oxygen atoms of the protein, DNA or solvent with less than four covalent bonds; hydrogen bond donors (D) additionally required a chemically bound hydrogen (H) atom; a hydrogen bond between a donor, hydrogen and acceptor was recognized if the D-A distance was smaller than 3 Å and the D-H-A angle was larger than 120°.

The hydrogen bond network analysis on the molecular dynamics trajectories was restricted to stable intermolecular hydrogen bond networks between BARHL2 amino acids and nucleotides of its DNA-binding partner. The occurrence of intermolecular hydrogen bond networks (including specific waters) was averaged over the simulation trajectories and summed by amino acid nucleotide pair. Intermolecular hydrogen bonding between a residue pair was considered stable if the summed occurrence of related hydrogen bond networks was observed in more than 5% of all molecular dynamics conformations of the complex.

## Mutational analysis and HT-SELEX

The pETG20A_SPB vectors with BARHL2 and its mutant sequences (GenScript) were expressed in Rosetta(DE3)pLysS E. coli strain (Milipore). In brief, the bacteria were grown overnight at 37 °C in LB Broth medium (Gibco) with carbenicillin (0.1 mg ml⁻¹) and chloramphenicol (34 µg ml⁻¹) and then transferred to the induction medium consisting of the previous medium with additional reagents at the following final concentrations: 1 mM MgSO₄, metal mixture (50 µM FeCl₃, 20 µM CaCl₂, 10 µM each of MgCl₂ and ZnSO₄, 2 µM each of CoCl₂, CuCl₂, NiCl₂, Na₂MoO₄, Na₂SeO₃ and H₃BO₃), 60 µM HCl, NPS (50 mM KH₂PO₄, 50 mM Na₂HPO₄, 25 mM (NH₄)₂SO₄) and 5052 (0.5% glycerol, 0.05% glucose and 0.2% alpha-lactose)⁹⁴. The cells were then incubated for 8 h at 37 °C, followed by 40 h at 17 °C. The cells were then collected by centrifugation and lysed by shaking for 20 min in 100 µl of lysis buffer (0.5 mg ml⁻¹ lysozyme, 1 mM phenylmethyl sulfonyl fluoride (PMSF), 400 mM NaCl, 100 mM KCl, 10% glycerol, 0.5% Triton X-100, 10 mM imidazole in 50 mM potassium phosphate buffer pH 7.8) and stored overnight at -80 °C. After thawing, the lysate was incubated for 45 min with 20 µl of Ni-Sepharose 6 Fast Flow beads (GE Healthcare), washed and resuspended in 100 µl of buffer A (30 mM NaCl, 10 mM imidazole in 50 mM Tris-HCl pH 7.5). For digestion of bacterial DNA, DNase I and MgSO₄ were added to 10 µg ml⁻¹ and 15 mM final concentration, respectively. After incubation for 45 min at 22 °C (room temperature), the beads were washed two times with 600 µl of buffer A and two times with 600 µl of buffer A containing 50 mM imidazole. The proteins were eluted in 100 µl of buffer A with 500 mM imidazole. Protein concentration was then measured using a Bradford assay (Sigma-Aldrich, no. B6916), after which the proteins were diluted in Promega buffer (50 mM NaCl, 10 mM MgCl₂, 4% glycerol in 10 mM Tris-HCl pH 7.5) to 30-100 µg ml⁻¹ concentration.

SELEX experiments were performed as previously described⁹⁵. In brief, 100-250 ng of proteins were mixed with 200-500 ng of DNA ligands and incubated at room temperature for 20 min; the incubation buffer contained 51.4 mM NaCl, 1.4 mM MgCl₂, 4% glycerol, 100 µM EGTA, 0.7 mM 1,4-dithiothreitol, 3.7 µg ml⁻¹ poly-dI-dC, 1.4 µM ZnSO₄ in 10.4 mM Tris-HCl pH 7.5 (SELEX buffer). Magnetic Ni-Sepharose beads (GE Healthcare) were washed in Promega buffer containing 0.2% BSA and suspended in 25 µl of SELEX buffer. For each protein-DNA mixture, 1.75 µl of the bead suspension was added, followed by incubation for 40 min at room temperature. The beads were then washed in wash buffer (5 mM EDTA, 1 mM 1,4-dithiothreitol in 5 mM
Tris-HCl pH 7.5) using a Tecan HydroSpeed plate washer, followed by suspension of the beads to 35 µl of elution buffer (1 mM MgCl₂, 0.1% Tween-20 in 10 mM Tris-HCl pH 7.8) followed by incubation for 10 min at 80 °C. To ensure that the ligands were double-stranded, the eluted DNA ligands were amplified twice. First, the products were amplified to completion (33 PCR cycles for the first SELEX cycle and 26 for all subsequent cycles). Then, the PCR products were diluted tenfold and amplified for two PCR cycles to ensure that single-stranded DNA and annealed products containing mismatched random sequences were fully converted to double-stranded form. The PCR reaction was performed with Phusion Hot Start II DNA Polymerase (Thermo Scientific). The DNA concentration was controlled by qPCR with 1× SYBR Green I Nucleic Acid Gel Stain (Invitrogen) using LightCycler 480 Instrument II (Roche). Amplified DNA ligands were used for incubation with proteins in the next SELEX cycle. A total of four SELEX cycles were performed. The DNA ligands from the 0, 3rd and 4th SELEX cycles were sequenced (Illumina HiSeq 2000) and analyzed as previously described¹³. For the in silico mutagenesis described above, the program Coot was used to methylate in silico the cytosine bases present in the corresponding solved structures for Fig. 4c,d.

## Motif and k-mer analysis

For Figs. 1 and 2, the position weight matrix models were generated from cycle four of MYF6 HT-SELEX (from ref. 18) and cycle four of the new BARHL2 (unmutated ctrl in Fig. 4a) HT-SELEX reads, using the multinomial (setting = 1) method75 with the following seeds: MYF6 AA... AC flank: AACAGCTGAC and GT...AC flank: GTCAGCTGAC; BARHL2 TT: NTAATTGN and AC: NTAAACGN. k-mer counts were generated using spacek40 (https://github.com/jttoivon/moder2/blob/master/myspacek40.c) for BARHL2 methylated and non-methylated SELEX data.

## Temperature HT-SELEX

To examine how the DNA-binding specificity of BARHL2 changes with temperature, HT-SELEX of BARHL2 was performed under five different temperatures 0°C, 10°C, 20°C, 30°C and 40°C. For Temperature HT-SELEX, the DNA ligands were designed according to Illumina's Truseq library (Supplementary Table 2; 101N SELEX Ligand) and synthesized from IDT as Ultramer DNA oligonucleotides. The oligonucleotides contain a 101 bp region with randomized nucleotides, flanked by adapters of fixed sequences for amplification. First, double-stranded ligands (the input of SELEX) were synthesized from the oligonucleotides by PCR amplification with primers that match the adapters (Supplementary Table 2; PCR primers). The PCR primers were also used to amplify the library between SELEX cycles. Before sequencing, the ligands were further amplified with primers (Supplementary Table 2; PE primers) containing multiplexing indices and sequences of the Illumina flow cell (P5 or P7).

HT-SELEX was performed in microplates according to the previous protocol¹⁸,⁹⁶. First, 100–200 ng double-stranded DNA ligand was mixed with 20–200 ng purified His-tagged TFs in 20 µl volume of the incubation buffer (140 mM KCl, 5 mM NaCl, 2 mM MgSO₄, 3 µM ZnSO₄, 100 µM EGTA, 1 mM K₂HPO₄, 20 mM HEPES pH 7.0). The mixture was incubated for 20 min on a PCR incubator (Bio-Rad S1000 Thermal Cycler) for temperature control. Then, 1.8 µl of magnetic Ni-Sepharose beads (28–9799–17, GE Healthcare; pre-blocked with 25 mM Tris-HCl, 0.5% BSA, 0.1% Tween-20, 0.02% NaN₃) was added into the mixture to pull down the TFs and their associated DNA ligands. After mixing at 1,900 rpm with a microplate shaker (13500-890, VWR), the plates were washed 15 times on a microplate washer (Tecan HydroSpeed) with the washing buffer (10 mM EDTA in 5 mM Tris-HCl pH 7.5, kept under 4 °C before use). Suspension of the washed beads was then PCR-amplified to produce DNA ligands for the next SELEX cycle. After repeating SELEX for four cycles, the ligands from each cycle and the input were sequenced and analyzed.

## Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

## Data availability

The atomic coordinates and diffraction data have been deposited to the Protein Data Bank (PDB) with accession codes PDB 7Z5I and PDB 7Z5K for MYF5 bound to symmetrical DNA and MYF5 bound to non-symmetrical DNA, respectively; PDB 8PMF for BARHL2-DNA<sup>AC</sup> at the resolution of 0.95 Å and PDB 8PMN for BARHL2-DNA<sup>AC</sup> at the resolution of 1.3 Å; and PDB 8PMC, PDB 8PM5, PDB 8PM7, PDB 8PMV, PDB 8PN4, PDB 8PNA and PDB 8PNC for BARHL2-DNA<sup>TT</sup>, BARHL2-DNA<sup>AT</sup>, BARHL2-DNA<sup>TC</sup>, BARHL2-DNA<sup>TAAGC</sup>, BARHL2-DNA<sup>CC</sup>, BARHL2-DNA<sup>TG</sup> and BARHL2-DNA<sup>GT</sup>, respectively. All sequence reads have been deposited to the European Nucleotide Archive under accession number PRJEB65950. Source data are provided with this paper.

## Code availability

The Python code used for implementing re-indexing as an iterative process using the linear summation method is available at https://github.com/CharlieLaughton/water shufle.

## References

66. Savitsky, P. et al. High-throughput production of human proteins for crystallization: the SGC experience. *J. Struct. Biol.* **172**, 3–13 (2010).

67. Kabsch, W. XDS. *Acta Crystallogr. D Biol. Crystallogr.* **66**, 125–132 (2010).

68. Collaborative Computational Project, Number 4. The CCP4 suite: programs for protein crystallography. *Acta Crystallogr. D Biol. Crystallogr.* **50**, 760–763 (1994).

69. Liebschner, D. et al. Macromolecular structure determination using X-rays, neutrons and electrons: recent developments in Phenix. *Acta Crystallogr. D Struct. Biol.* **75**, 861–877 (2019).

70. Winn, M. D. et al. Overview of the CCP4 suite and current developments. *Acta Crystallogr. D. Biol. Crystallogr.* **67**, 235–242 (2011).

71. Emsley, P., Lohkamp, B., Scott, W. G. & Cowtan, K. Features and development of Coot. *Acta Crystallogr. D Biol. Crystallogr.* **66**, 486–501 (2010).

72. Afonine, P. V. et al. Towards automated crystallographic structure refinement with phenix.refine. *Acta Crystallogr. D Biol. Crystallogr.* **68**, 352–367 (2012).

73. The PyMOL molecular graphics system, v.2.5.5 (Schrödinger, L. L. C., 2023).

74. Amber 2021 (University of California, 2021).

75. Pettersen, E. F. et al. UCSF Chimera—a visualization system for exploratory research and analysis. *J. Comput. Chem.* **25**, 1605–1612 (2004).

76. Maier, J. A. et al. ff14SB: improving the accuracy of protein side chain and backbone parameters from ff99SB. *J. Chem. Theory Comput.* **11**, 3696–3713 (2015).

77. Ivani, I. et al. Parmbsc1: a refined force field for DNA simulations. *Nat. Methods* **13**, 55 (2016).

78. Joung, I. S. & Cheatham, T. E. Molecular dynamics simulations of the dynamic and energetic properties of Alkali and Halide ions using water-model-specific ion parameters. *J. Phys. Chem. B* **113**, 13279–13290 (2009).

79. Roe, D. R. & Cheatham, T. E. PTRAJ and CPPTRAJ: software for processing and analysis of molecular dynamics trajectory data. *J. Chem. Theory Comput.* **9**, 3084–3095 (2013).

80. McGibbon, R. T. et al. MDTraj: a modern open library for the analysis of molecular dynamics trajectories. *Biophys. J.* **109**, 1528–1532 (2015).
81. Abraham, M. J. et al. GROMACS: high performance molecular simulations through multi-level parallelism from laptops to supercomputers. *SoftwareX* **1–2**, 19–25 (2015).

82. Van Gunsteren, W. F. & Berendsen, H. J. C. A leap-frog algorithm for stochastic dynamics. *Mol. Simul.* **1**, 173–185 (1988).

83. Bussi, G., Donadio, D. & Parrinello, M. Canonical sampling through velocity rescaling. *J. Chem. Phys.* **126**, 014101 (2007).

84. Parrinello, M. & Rahman, A. Polymorphic transitions in single-crystals—a new molecular-dynamics method. *J. Appl. Phys.* **52**, 7182–7190 (1981).

85. Tian, C. et al. ff19SB: amino-acid-specific protein backbone parameters trained against quantum mechanics energy surfaces in solution. *J. Chem. Theory Comput.* **16**, 528–552 (2020).

86. Izadi, S., Anandakrishnan, R. & Onufriev, A. V. Building water models: a different approach. *J. Phys. Chem. Lett.* **5**, 3863–3871 (2014).

87. Darden, T., York, D. & Pedersen, L. Particle Mesh Ewald: an N·log(N) method for Ewald sums in large systems. *J. Chem. Phys.* **98**, 10089–10092 (1993).

88. Allen, M. P. & Tildesley, D. *J. Computer Simulation of Liquids* (Oxford University Press, 1989).

89. Hess, B. P-LINCS: a parallel linear constraint solver for molecular simulation. *J. Chem. Theory Comput.* **4**, 116–122 (2008).

90. Schlitter, J. Estimation of absolute and relative entropies of macromolecules using the covariance-matrix. *Chem. Phys. Lett.* **215**, 617–621 (1993).

91. Heinz, L. P. & Grubmüller, H. PerMut: spatially resolved hydration entropies from atomistic simulations. *J. Chem. Theory Comput.* **17**, 2090–2098 (2021).

92. van Rossum, G. *Python Tutorial* v.1.2 (CWI, 1995).

93. Michaud-Agrawal, N., Denning, E. J., Woolf, T. B. & Beckstein, O. Software news and updates MDAnalysis: a toolkit for the analysis of molecular dynamics simulations. *J. Comput. Chem.* **32**, 2319–2327 (2011).

94. Studier, F. W. Protein production by auto-induction in high density shaking cultures. *Protein Expr. Purif.* **41**, 207–234 (2005).

95. Morgunova, E. et al. Structural insights into the DNA-binding specificity of E2F family transcription factors. *Nat. Commun.* **6**, 10050 (2015).

96. Echols, N. et al. Graphical tools for macromolecular crystallography in PHENIX. *J. Appl. Crystallogr.* **45**, 581–586 (2012).

## Acknowledgements

We thank I. Sur, C. Rogerson and B. Luisi for the critical review of the manuscript, L. Malinina for the fruitful discussion of the DNA structure at high resolution, P. Das and the Karolinska Institutet Protein Science

Facility for protein production and M. Kling Pilström for technical assistance. This work was supported by the Swedish Research Council (D0815201), BBSRC/UKRI (G107673), Cancer Research UK (RG99643) and Medical Research Council (G105296). The molecular dynamics analysis of entropy was conducted within the Max Planck School Matter to Life, supported by the German Federal Ministry of Education and Research (BMBF) in collaboration with the Max Planck Society. We apologize to the authors of other structural studies of protein-DNA complexes that we unfortunately can not cite because of a limit on the number of references.

## Author contributions

E.M. performed data curation, formal analysis, investigation, visualization, writing of the original draft and reviewing and editing the final paper. Y.Y., F.Z., T.X., I.S., S.P.N., G.N. and H.G. curated the data and performed formal analysis. A.P. and C.L. performed data curation. J.T. conceptualized the project and was responsible for data curation, supervision, project administration and review and editing of the paper.

## Funding

Open access funding provided by Karolinska Institute.

## Competing interests

The authors declare no competing interests.

## Additional information

*Extended data* is available for this paper at https://doi.org/10.1038/s41594-024-01449-6.

**Supplementary information** The online version contains supplementary material available at https://doi.org/10.1038/s41594-024-01449-6.

**Correspondence and requests for materials** should be addressed to Jussi Taipale.

**Peer review information** *Nature Structural & Molecular Biology* thanks Remo Rohs and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Primary Handling Editor: Sara Osman, in collaboration with the *Nature Structural & Molecular Biology* team. Peer reviewer reports are available.

**Reprints and permissions information** is available at

www.nature.com/reprints.
a

<figure><img src="image_26.png" /></figure>

MYF5/USF/MYOD/SCL/E47/CLOCK/BMAL1/TCF4

b

<figure><img src="image_27.png" /></figure>

MYF5/SREBP/MAX/MYC/MAD

c

MYF5
MYF6
USF
MYOD
SCL
E47
CLOCK
BMAL1
TCF4
SREBP
MAX
MYC
MAD

ENLYFQS------MDRRKAATM-ERRRLKKVNGAFETLKRCT-TTN-P--NQRLPKVEILRNAIYIESLQE--------------------------
ENLYFQSKRKSAPTDRRKAATLERRRLKKINEAFELKRRT-VAN-P--NQRLPKVEILRSAIYIERLQD--------------------------
------------MDEKRRAQHNEVERRRRDKINNWIVQLSKIIPDSSMESTKSGSKGGILSKASDYIQELRQSNHR--------------------------
--------MELKRKTTNADRRKAATMERRRLRSKNEAFETLKYST-SSN-P--NQRLPKVEILRNAIYIEGLQALLRD--------------------------
SQDPEISDGPHTKVVRIFTNSERWRQONVNGAFAELRKLIPTH-P--DKKLSKNEILRLAMKYINFLAKLLND--QEEEGTQR--------------------------
MADLSLEKDLRDRERRMANNARERVRVDINEAFRELGRCMQMHLKS--DKAQTKLLILQQAVQVILGLEQQVRE--RNLPNKAA--------------------------
--------MDDKDKAKRVRSNKSEKRIRRDPQNVLILKELGSMLPGN------ARKMDKSTVLQKSIDFLRKHKEITAW--------------------------
--------MHQGRIKNAREAHSQEKRRRDDKMNSFIDELASLVPTCNAM--SRKLDKLTVLRMAVQHMKTLRG--AW--------------------------
------------HMRRMANNAERLRVRDINEAFKELGRMVQLHLKS--DKPQTKLLILHQAVAVILSLEQQVRE--R--------------------------
------------QSRGEKRTAHNAIEKRYRSSINDKIIELKDLVVGTT--EAKLNKSAVLRKIAIDYIRFLQHSNQKLKQENLSLRTAV-HKSLSLKDL-
------------KRAHHNALEKRIRRDDHIKDSFHLRSDSVPSLQGE---KASRAQILDKATEYIQYMRRKNHTHQODIDDLKRQNALLEQQV----
------------GHMNVKRRTHNVLEQRFFNELKRSFFALRDQIPELENN---EKAPKVVIL TKAKLHIKKLEDSRKAHVHQIDQLREQRHLKRQLEKL
------------SRSTHNEMEKNRRRAHLRLSLEKLGKLVP LGPD S---SRHTTLSLL TKAKLHIKKLEDSRKAHVHQIDQLREQRHLKRQLEKL

d

MYF5 (this study)
MYF5 (this study)
USF (1AN4)
MYOD (1MDY)
SCL/E47 (2YPB)
CLOCK/BMAL (4H10)
TCF4 (6OD3)
SREBP (1AM9)
MAX/MAD (1NLW)
MAX/MYC (1NKP)

GCGCAA CAGCTGACGCGG
GCGCGTCAGCTGACGCGG
CACCCGGTCACGTGGCCTACA
CACCCGGTCACGTGGCCTACA
ACCATCTGTTC
AGGAACACGTGACCC
CATACACGTGTAT
CATGAGATCACCCCACTGCAA
GAGTAGCACGTGCTACTC
CGAGTAGCACGTGCTACTC

e

<figure><img src="image_28.png" /></figure>

91
MYF5 MRERRRL
MYOD MRERRRR
SCL SRERRRL
E47 ARERVRV
TCF4 ARERLRV

Extended Data Fig. 1 | See next page for caption.
**Extended Data Fig. 1** | **Comparison of the structure of MYF5 solved in this study with different representatives of bHLH (basic helix-loop-helix) and bZIP (basic helix-loop-helix-zipper) families.** a, Structural alignment of DBD of MYF5 homodimer (red) with USF homodimer (cyan, 1AN4.pdb), MYOD homodimer (yellow, 1MDY.pdb), SCL-E47 complex (light blue, 2YPB.pdb), CLOCK-BMAL1 complex (orange, 4H10.pdb) and TCF4 homodimer (green, 6OD3.pdb). b, Structural alignment of MYF5 homodimer with SREBP1 homodimer (light green, 1AM9.pdb), MAX homodimer (magenta, 1HLO.pdb), MYC-MAX complex (salmon, 1NKP.pdb) and MAD/MAX complex (gray, 1NLW.pdb). The proteins used for structural alignments in a and b are listed under the figure. The DNA bases involved in the binding are presented as sticks. c, Sequence alignment of the DBD of proteins, used for the structural alignment in a and b with MYF6 in addition. The numbering on the top corresponds to MYF5

numbering. The helixes observed in the MYF5 structure are highlighted in light yellow. The light green box underlines the binding site. The color code for the amino acids is kept according to Clustal Omega server used for the sequence alignment (https://www.ebi.ac.uk/Tools/msa/clustalo/). Hydrophobic amino acids are colored red, polar - green, negatively charged - blue and positively charged - magenta. d, The DNA sequences used in the structural studies. The binding sites are highlighted with the light green box. e, Close view of the alignment of MYF5/MYOD/SCL/E47/TCF4 structures which are known to recognize the flanking dinucleotides. The sequence alignment shows that those bHLH TFs contain arginine residue (Arg91 in MYF5) in the specific position which is responsible for that recognition, conversely the MAX/MYC/MAD/CLOCK/ BMAL1/USF/SREBP structures and sequences where arginine is replaced by different residues which are not suitable for the flank recognition.
a

<figure><img src="image_29.png" /></figure>

b

<figure><img src="image_30.png" /></figure>

c

<figure><img src="image_31.png" /></figure>

d

<figure><img src="image_32.png" /></figure>

e

<figure><img src="image_33.png" /></figure>

Extended Data Fig. 2 | See next page for caption.
**Extended Data Fig. 2** | Results of the prediction of minor groove width and electrostatic potential with DNaphi server (https://rohslab.usc.edu/DNaphi/serverBackend.php). a and b, the predictions made for the four DNA sequences included in the study interacting with MYF5 DNA-binding domain. The violet line corresponds to the GCGCAA CAGCTGACGCGC sequence (MYF5_aAaC), the green line corresponds to GCGCGTCAGCTGACGCGC sequence (MYF5_gTaC); the blue line corresponds to the GCGCATCAGCTGACGCGC sequence (MYF5_aTaC), and the yellow line corresponds to GCGCGACAGCTGACGCGC sequence (MYF5_gAaC).

The different nucleotides are labeled as **N** on the X-axis of the figure. c, d, the predictions made for the 8 different DNA sequences included in the study of BARHL2 DBD bound to different DNAs. Different nucleotides are labeled as **N**. The lines corresponding to different sequences are colored differently. The color legend is presented in the upper right corner and labeled by the nucleotide sequences. e, the minor groove width calculated with w3DNA 2.0 server (http://web.x3dna.org/) for the BARHL2 structures solved in this study. The color legend is presented under X-axis.
a

<figure><img src="image_34.png" /></figure>

b

<figure><img src="image_35.png" /></figure>

c

<figure><img src="image_36.png" /></figure>

d

<figure><img src="image_37.png" /></figure>

e

<figure><img src="image_38.png" /></figure>

f

<figure><img src="image_39.png" /></figure>

G<sub>8</sub>
C<sub>1</sub> G<sub>2</sub> C<sub>3</sub> T<sub>4</sub> A<sub>5</sub> A<sub>6</sub> T<sub>7</sub> G<sub>8</sub> G<sub>9</sub> G<sub>10</sub> T<sub>11</sub> T<sub>12</sub>
G<sub>12</sub> C<sub>11</sub> G<sub>10</sub> A<sub>9</sub> T<sub>8</sub> T<sub>7</sub> A<sub>6</sub> C<sub>5</sub> C<sub>4</sub> C<sub>3</sub> A<sub>2</sub> A<sub>1</sub>

g

<figure><img src="image_40.png" /></figure>

Extended Data Fig. 3 | See next page for caption.
**Extended Data Fig. 3** | **High resolution structures of BARHL2 showed double conformations of the DNA.** *a*, Electron density map of the backbone phosphates in the structure with DNA TAAAAC at 1.3 Å resolution. *b, c*, Electron density map observed for the BARHL2–DNA<sup>GC</sup> (G<sub>12</sub>C<sub>11</sub>G<sub>10</sub>) and BARHL2–DNA<sup>CC</sup> (G<sub>5</sub>C<sub>4</sub>C<sub>5</sub>), respectively. *d*, The structure of the nonamer (GCGAATTCG) solved at 0.89 Å resolution showed the similar double conformation feature of the backbone phosphates (Soler-Lopez et al., 2000). The figure is created from the coordinates of 1ENN.pdb file. The backbone phosphates observed in the double conformations are colored in magenta. *e*, An example of the alternative conformation observed in the structure of protein–DNA complex. The figure is created from the coordinates of mouse Znf57-DNA complex obtained from 4GZN.pdb file. The protein moiety is colored in beige, two Zn atoms are presented in

gray balls, the different DNA strands are colored in magenta and orange.
Note that the most phosphates on the top strand show double conformation
(Liu et.al., 2012). **f**, Double conformation of phosphates for G<sub>8</sub>G<sub>9</sub> observed in
complex BARHL2–DNA<sup>TG</sup>. The distance between two phosphorous atoms is 3.7 Å.
**g**, Structural alignment of two structures of BARHL2–DNA<sup>AC</sup> at the resolutions
1.3 Å (raspberry) and 0.95 Å (green). The water molecules represented as small
spheres and coloured respectively to the complex. Note that the water molecules
in the interface are very well conserved, particularly all 10 waters are conserved
in the protein:DNA interface at the site of the variant dinucleotide, small light
blue ring presents the position of the variant dinucleotides in the structure
and the anel on the top right corner shows the close view of 10 conserved water
molecules.
<figure><img src="image_41.png" /><figcaption>b</figcaption></figure>

<figure><img src="image_42.png" /><figcaption>c</figcaption></figure>

<figure><img src="image_43.png" /><figcaption>d</figcaption></figure>

<table><caption>e</caption><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td>BARHL2</td><td>RAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVKTWYQNRTTKWKRQTAVGLELLAE</td><td>278 282 285 289</td></tr><tr><td>HOXB1</td><td>GLGPSGLRTNFTTRQLTELEKEFHFNKYLSRARRVEIAATLELNETQVKIWFWQNRRMKQKKREREGG</td><td></td></tr><tr><td>HOXA9</td><td>HARSTRKKRCPYTKHQTLEKEKEFLFNMYLTRDRRYEVARLLNLTERQVKIWFWQNRRMKMKKINKD</td><td></td></tr><tr><td>BARHL2</td><td>RAKKPRKARTAFSDHQLNQL---ERSFERQKYLSVQDRMDLAAALNLTDTQVKTWYQNRTTKWKRQTAVGLELLAE</td><td></td></tr><tr><td>UBX</td><td>TNGLRRGRQTYTRYQTLEL---EKEFHTNHYLTRRRRIEMAHALSLTERQIKIWFWNTRMKLKTOA</td><td></td></tr><tr><td>EDX</td><td>---ARRKRRNFSKQASEILNEYFYSHLSNYPSEEAKEELARKCGITVSOVSNWFGNKRIRYKKNI</td><td></td></tr><tr><td>Clawless</td><td>-MRTPPKKRKPTSFTRIQUAELEKRFHKQYLASAERAALARGLKMTDAQVKTWFWNRTKWRWOTAFEREAERQ</td><td></td></tr><tr><td>Aristaless</td><td>--APRKQRQRYRTFTSFQLELEKAFSRTHYPDVFTREELAMKIGLTERAQVFWQNRRAKWRKQEKV</td><td></td></tr><tr><td>BARHL2</td><td>RAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVKTWYQNRTTKWKRQTAVGLELLAE</td><td></td></tr><tr><td>MEIS1</td><td>--AFPKVATNI---MRAWLFQHLTHYPSEEQKKQLAQDTGLTILQVNNWFINARRRIVQPM</td><td></td></tr><tr><td>LHX4</td><td>GA---KRPTTTAKOLETLKNAYKNSPKPARHVREQLSSETGLDMRVVQVFWQNRRKEKRLK</td><td></td></tr><tr><td>HOXB13</td><td>-----RKKRIPYSKGQLRELEREYAANKFITDKDRRKISAATSLSERQITIWFWNRRVKEKKVLAKVK</td><td></td></tr></tbody></table>

<table><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td>BARHL2</td><td>223</td><td>278 282 285</td></tr><tr><td>1. HOXB13</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>TWYQNRT KWKRTAVGLELLAE</td></tr><tr><td>2. HOXA3</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>IWYQNRRV KWKRTAVGLELLAE</td></tr><tr><td>3. HMX3</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>IWYQNRRM KWKRYAVGLELLAE</td></tr><tr><td>4. MEOX2</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>IWYQNRRN KWKRYAVGLELLAE</td></tr><tr><td>5. ALX4</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>VWYQNRRM KWKRTAVGLELLAE</td></tr><tr><td>6. NKX12</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>VWYQNRRRA KWKRTAVGLELLAE</td></tr><tr><td>7. DLX1</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>IWYQNRRS KWKRTAVGLELLAE</td></tr><tr><td>8. LBX1</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>TWYQNRRRA KWKRTAVGLELLAE</td></tr><tr><td>9. EMX1</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>VWYQNRRT KWKRTAVGLELLAE</td></tr><tr><td>10. CDX1</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>IWYQNRRRA KWKRTAVGLELLAE</td></tr><tr><td>11. NANOG</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>TWYQNRRM KWKRTAVGLELLAE</td></tr><tr><td>12. PKNOX1</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>NWYQNRRR KWKRTAVGLELLAE</td></tr><tr><td>13. SIX6</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>NWYQNRRQ KWKRTAVGLELLAE</td></tr><tr><td>14. PBX1</td><td>ESPPVRAKKPRKARTAFSDHQLNQLERSFERQKYLSVQDRMDLAAALNLTDTQVK</td><td>NWYQNRRI KWKRTAVGLELLAE</td></tr></tbody></table>

**Extended Data Fig. 4 | Comparison of BARHL2-DNA<sup>AC</sup> structure with the representatives of different homeobox TF families.** Structural alignment of BARHL2-DNA<sup>AC</sup> complex (green) with the complexes of anterior HOXB1-DNA<sup>TGAT</sup> (blue) and posterior HOXA9-DNA<sup>TTAC</sup> (violet) **a**, Structural alignment of BARHL2-DNA<sup>AC</sup> complex (green) with UBX-DNA<sup>AT</sup> (pink), EXD-DNA<sup>AT</sup> (dark green), Clawless-DNA<sup>TAAT</sup> (light green) and Aristaless-DNA<sup>TAAT</sup> (brown) **b**, Structural alignment of BARHL2-DNA<sup>AC</sup> complex (green) with LHX4-DNA<sup>AT</sup> (yellow), MEIS1-DNA<sup>TGAC</sup> (dark blue) and HOXB13-DNA<sup>TTATT</sup> (salmon) **c**, (All structures are solved in Taipale lab). The key residues ASN and ARG as well as the key bases T and A involved in binding are labeled. **d**, Sequence alignment of the structures

presented in (a-c). The recognition helix is highlighted in yellow, the recognizing residues colored red. The numbering on the top of the sequence corresponds to BARHL2 numbering. **e**, The DNA-binding domain sequences of fourteen mutants designed to test the role of the threonine (Thr278 and Thr285) in the DNA sequence recognition. In the BARHL2 DNA-binding domain sequence we mutated the Thr278 and Thr285 to the corresponding residues of 14 different homeobox proteins. Thr278 and Thr285 are colored green in the original BARHL2 sequence (on the top) and in the mutated sequences if they belong to the original sequence of other homeobox protein. The mutations are colored red.
<figure><img src="image_44.png" /><figcaption>**Extended Data Fig. 5** | Assessment of convergence for the molecular dynamics analysis of water mobility in the protein-DNA interfacial region.</figcaption></figure>

(see main paper Fig. 3j). Data generated by applying the same methodology independently to the first and second halves of each simulation. Absolute numbers of predicted low-mobility waters are higher, due to the shorter sample window, however there is no sign of systematic change in values between the

first and second subsamples, and all trends between different molecular systems are maintained. Data are presented as mean values +/- SEM. For DNA<sup>AC</sup> and DNA<sup>AC-TT</sup> the sample size is 4 (dynamically independent copies of the protein-DNA complex within the crystallographic unit cell), while similarly, for DNA<sup>TT</sup> and DNA<sup>TT-AC</sup>, the sample size is 8.
<figure><img src="image_45.png" /><figcaption>b</figcaption></figure>

<figure><img src="image_46.png" /><figcaption>c</figcaption></figure>

<figure><img src="image_47.png" /><figcaption>d</figcaption></figure>

<figure><img src="image_48.png" /><figcaption>e</figcaption></figure>

<figure><img src="image_49.png" /><figcaption>f</figcaption></figure>

<figure><img src="image_50.png" /><figcaption>g</figcaption></figure>

<figure><img src="image_51.png" /></figure>

Extended Data Fig. 6 | See next page for caption.
**Extended Data Fig. 6** | **Further analysis of interfacial water.** *a,* Water molecules in BARHL2-DNA<sup>AC</sup> (purple) and BARHL2-DNA<sup>TT</sup> (green) complex interfaces involved in stable, water-mediated hydrogen bond networks connecting protein (gray) amino acids to DNA nucleotides. The waters (spheres) are colored according to their solvent entropy. The number of water molecules in water-bridge networks, as well as the average solvent entropy (*S*<sub>avg</sub>) of these waters, and their estimated total solvent entropy loss compared to bulk (*S*<sub>loss</sub>) are shown below. *b,* Solvent entropy distribution of all interfacial waters (solid lines) and the solvent entropy distribution of waters involved in water mediated hydrogen bonding (dashed lines). *c,* Conserved water positions (spheres) representing low mobility water positions at the BARHL2-DNA interface that were also observed in the crystallographic structures. The color of the waters indicates their first order translational entropy in MD simulations. The total number of observed crystallographic waters within 1 nm of the complex, the number crystallographic waters at BARHL2-DNA interface, and the number of conserved water positions in MD simulations are shown below. *d,* The distribution of the

translational solvent entropy of water molecules (solid lines) in the interface of the BARHL2-DNA<sup>AC</sup> and BARHL2-DNA<sup>TT</sup> complexes. Occurrence of all (solid lines) and conserved (dashed lines) interfacial waters with a given translational entropy in MD simulations are shown. *e,* The fraction of conserved interfacial waters in the crystal structures of the BARHL2-DNA<sup>AC</sup> and BARHL2-DNA<sup>TT</sup> divided by all interfacial waters in MD simulations as the function of translational entropy of water (from values in *d*). Translational entropy of crystallographic interfacial water molecules were estimated from MD water with the nearest mean position within 2 Å. Top right: best achieved resolution of the respective crystal structures. Note that low-mobility water positions can be more readily identified from the electron density, but the identification of low mobility waters may be limited by the crystallographic resolution. *f, g,* Changes in the number of stable hydrogen bonds (*f*) and the number of waters participating in hydrogen bond networks (*g*) as a function of a cutoff value (minimum fraction of time, hydrogen bond networks exist between protein amino acids and DNA bases during MD simulations).
<figure><img src="image_52.png" /></figure>

**Extended Data Fig. 7** | Water molecules at BARHL2-variable dinucleotide interface. DNA for the **BARHL2-DNA**<sup>AC</sup> (purple) and **BARHL2-DNA**<sup>TT</sup> (dark green) complexes are shown as cartoon representations for the backbone and the variable base pairs as sticks. BARHL2 backbone (cartoon) and sidechains (sticks) are shown in gray. The average position of water molecules at the dinucleotide

interface in molecular dynamics (MD) simulations is shown as spheres colored according to their estimated translational entropy. Crystallographic water positions for the two BARHL2-DNA complexes are shown as light blue spheres. The number of water molecules around the variable dinucleotides are shown below the image in black (MD) and blue (crystal structure) respectively.
<table><caption>Extended Data Table 1 | Hydrogen bond distances found in BARHL2-DNA complexes presented on Fig. 3 as dash-lines</caption><thead><tr><th></th><th>T285 Og1-<br>water mol.<br>(Å)</th><th>N282Od1<br>- water<br>mol. (Å)</th><th>N282Nd2<br>-water<br>mol. (Å)</th><th>T278Og1 -<br>water mol.<br>(Å)</th><th>Dinucleotides -<br>water mol. (Å)</th><th>Water mol. -<br>water mol.<br>(Å)</th></tr></thead><tbody><tr><td rowspan="2">BARHL2:DNA<sup>AC</sup></td><td>1 2.7</td><td>1 2.7</td><td rowspan="2">-</td><td>4 2.8</td><td>G<sub>17</sub>N7 - 2 2.8</td><td>2 - 6 2.7</td></tr><tr><td>2 3.6</td><td>3 3.0</td><td>5 2.8</td><td>G<sub>17</sub>O6 - 6 2.8</td><td>6 - 9 2.8</td></tr><tr><td rowspan="5">BARHL2:DNA<sup>TT</sup></td><td rowspan="5">1 2.7</td><td>1 2.8</td><td rowspan="5">-</td><td rowspan="5">1 3.5</td><td>T<sub>18</sub>O4 - 1 2.7</td><td>9 - 10 2.7</td></tr><tr><td>2 3.4</td><td>T<sub>18</sub>O2 - 7 2.9</td><td>10 - 5 2.7</td></tr><tr><td></td><td>A<sub>7</sub>N6 - 3 3.0</td><td>3 - 8 2.9</td></tr><tr><td></td><td>A<sub>7</sub>N7 - 8 2.7</td><td>8 - 4 2.8</td></tr><tr><td></td><td>A<sub>18</sub>N3 - 4 2.5</td><td>3 - 6 2.8</td></tr><tr><td rowspan="3">BARHL2:DNA<sup>AT</sup></td><td rowspan="3">1 2.5</td><td>2 2.7</td><td rowspan="3">2 3.6</td><td rowspan="3">-</td><td>A<sub>7</sub>N6 - 2 3.0</td><td rowspan="3">-</td></tr><tr><td>1 3.0</td><td>T<sub>8</sub>O2 - 3 2.8</td></tr><tr><td></td><td>T<sub>18</sub>O2 - 3 2.8</td></tr><tr><td rowspan="7">BARHL2:DNA<sup>TC</sup></td><td rowspan="7">1 2.7</td><td>1 2.8</td><td rowspan="7">-</td><td rowspan="7">-</td><td>T<sub>18</sub>O4 - 1 2.9</td><td>1 - 5 3.4</td></tr><tr><td>2 3.0</td><td>T<sub>7</sub>O4 - 2 2.8</td><td>5 - 3 2.9</td></tr><tr><td></td><td>T<sub>7</sub>O4 - 3 3.3</td><td>3 - 2 3.0</td></tr><tr><td></td><td>C<sub>8</sub>O2 - 4 2.9</td><td></td></tr><tr><td></td><td>G<sub>17</sub>N7 - 5 2.8</td><td></td></tr><tr><td></td><td>G<sub>17</sub>N7 - 3 2.7</td><td></td></tr><tr><td></td><td>G<sub>17</sub>N2 - 4 3.6</td><td></td></tr><tr><td></td><td>A<sub>18</sub>N3 - 4 2.7</td><td></td></tr><tr><td rowspan="10">BARHL2:DNA<sup>TG</sup></td><td rowspan="10">1 2.7</td><td>1 2.8</td><td rowspan="10">-</td><td rowspan="10">3 3.4</td><td>C<sub>5</sub>N4 - 2 3.1</td><td>1 - 4 2.7</td></tr><tr><td>2 2.9</td><td>A<sub>6</sub>N7 - 4 2.9</td><td>2 - 3 2.7</td></tr><tr><td></td><td>A<sub>6</sub>N6 - 1 3.3</td><td>3 - 8 2.7</td></tr><tr><td></td><td>A<sub>6</sub>N3 - 5 2.7</td><td>5 - 9 2.7</td></tr><tr><td></td><td>T<sub>7</sub>O2 - 6 2.6</td><td>9 - 6 3.0</td></tr><tr><td></td><td>T<sub>7</sub>O4 - 2 2.7</td><td>7 - 8 2.7</td></tr><tr><td></td><td>G<sub>8</sub>O6 - 7 2.7</td><td></td></tr><tr><td></td><td>G<sub>8</sub>N7 - 7 2.7</td><td></td></tr><tr><td></td><td>A<sub>5</sub>N7 - 8 2.6</td><td>6 - 4 2.6</td></tr><tr><td rowspan="6">BARHL2:DNA<sup>GT</sup></td><td rowspan="6">1 2.8</td><td>1 2.7</td><td rowspan="6">-</td><td rowspan="6">3 2.8</td><td>C<sub>6</sub>N4 - 1 2.9</td><td>2 - 7 3.4</td></tr><tr><td>2 2.8</td><td>C<sub>6</sub>O2 - 4 2.7</td><td>2 - 5 2.9</td></tr><tr><td></td><td>G<sub>7</sub>O6 - 2 2.7</td><td>3 - 5 2.1</td></tr><tr><td></td><td>G<sub>7</sub>N7 - 5 2.7</td><td>8 - 7 2.5</td></tr><tr><td></td><td>T<sub>8</sub>O2 - 6 2.4</td><td>8 - 1 3.0</td></tr><tr><td></td><td>C<sub>6</sub>N4 - 1 3.0</td><td>-</td></tr><tr><td>BARHL2:DNA<sup>GC</sup></td><td>1 2.8</td><td>1 3.3</td><td>-</td><td>-</td><td>G<sub>18</sub>O6 - 1 3.1</td><td>-</td></tr><tr><td>BARHL2:DNA<sup>CC</sup></td><td>1 3.4</td><td>1 3.8</td><td>-</td><td>-</td><td></td><td></td></tr></tbody></table>

The water molecules involved in the interactions are numbered in respect of Fig. 3. All distances are presented in Angstrom (Å). The first column represents the H-bonds formed between the oxygen atom Og1 of the side chain of Thr285 and the water molecules, the second column represents the H-bond formed between the oxygen atom Od1 of Asn282 and the water molecules, the third column shows the H-bonds formed between the nitrogen atom Nd2 and the water molecules; the fourth column represents the H-bonds formed between the oxygen atom Og1 of Thr278 and the water molecules; the fifth column represents the H-bonds formed between varied dinucleotide and the water molecules; the last column represents the bridges formed between the water molecules.
## Reporting Summary

Nature Portfolio wishes to improve the reproducibility of the work that we publish. This form provides structure for consistency and transparency in reporting. For further information on Nature Portfolio policies, see our [Editorial Policies](#) and the [Editorial Policy Checklist](#).

## Statistics

For all statistical analyses, confirm that the following items are present in the figure legend, table legend, main text, or Methods section.

n/a | Confirmed

☐ ☑ The exact sample size (n) for each experimental group/condition, given as a discrete number and unit of measurement

☐ ☑ A statement on whether measurements were taken from distinct samples or whether the same sample was measured repeatedly

☑ ☐ The statistical test(s) used AND whether they are one- or two-sided
*Only common tests should be described solely by name; describe more complex techniques in the Methods section.*

☑ ☐ A description of all covariates tested

☑ ☐ A description of any assumptions or corrections, such as tests of normality and adjustment for multiple comparisons

☐ ☑ A full description of the statistical parameters including central tendency (e.g. means) or other basic estimates (e.g. regression coefficient) AND variation (e.g. standard deviation) or associated estimates of uncertainty (e.g. confidence intervals)

☑ ☐ For null hypothesis testing, the test statistic (e.g. *F*, *t*, *r*) with confidence intervals, effect sizes, degrees of freedom and *P* value noted
*Give *P* values as exact values whenever suitable.*

☑ ☐ For Bayesian analysis, information on the choice of priors and Markov chain Monte Carlo settings

☑ ☐ For hierarchical and complex designs, identification of the appropriate level for tests and full reporting of outcomes

☑ ☐ Estimates of effect sizes (e.g. Cohen's *d*, Pearson's *r*), indicating how they were calculated

*Our web collection on statistics for biologists contains articles on many of the points above.*

## Software and code

Policy information about [availability of computer code](#)

Data collection

Crystallographic data were collected using the software developed in synchrotron beam-line ID23-1 in ESRF and listed in Material and Method section

Data analysis

Crystallographic data analysis: XDS and CCP4 suits 7.1 and 8.0; MR and refinement: Phaser and Refmac5 as implemented in CCP4 and Phenix.refine; Model building: Coot (versions 0.9.6 and 0.9.8.92 (EL)) as implemented in CCP4 and Phenix; Structural visualisation: PyMol 2.5.4; HT-SELEX data analysis: spacek40 (http://github.com/jttoivon/moder2/blob/master/myspacek40.c); Molecular Dynamic simulations in crystal lattice and analysis: AMBER21, UCSF Chimera, Amber 14SB force field and BSC1 parameters for DNA, TIP3P and Young-Cheatham for water and ions parameters, pmemd.cuda, cpptraj tool, MDTraj, MATplotlib; Multiple Sequence alignment: Clustal Omega (https://www.ebi.ac.uk/jdispatcher/); Molecular Dynamic simulations for analysis of entropy: GROMACS 2019 simulation package with LINCS algorithm implemented into GROMACS 2019, AMBER-19SB forcefield with OL15 modified parameters for DNA, Per | Mut for calculations of spatially resolved solvent entropies (https://gitlab.gwdg.de/lheinz/hydration_entropy), Python 3.11.8 and modules: NumPy 1.26.4, MDAnalysis 2.7.0, Matplotlib 3.8.4, and Pandas 2.2.2

For manuscripts utilizing custom algorithms or software that are central to the research but not yet described in published literature, software must be made available to editors and reviewers. We strongly encourage code deposition in a community repository (e.g. GitHub). See the Nature Portfolio [guidelines for submitting code & software](#) for further information.
## Policy information about availability of data

All manuscripts must include a data availability statement. This statement should provide the following information, where applicable:

- Accession codes, unique identifiers, or web links for publicly available datasets

- A description of any restrictions on data availability

- For clinical datasets or third party data, please ensure that the statement adheres to our policy

Crystal structures were deposited to the protein data bank (PDB) with accession codes: 7Z5I and 7Z5K for crystal structures of MYF5. The PDB code 1MDY was used for the Molecular replacement. The accession codes 8PMF, 8PMN, 8PMC, 8PM5, 8PM7, 8PMV, 8PN4, 8PNA and 8PNC are for BARHL2 structures. The accession code 3A01 was used for structure determination. The details are presented in Table 1. All sequence reads are deposited to the European Nucleotide Archive under the accession number PRJEB65950. The DNA ligands used in the Temperature HT-SELEX experiments are presented in Extended Data Table 3. The details are described in the Material& Method section.

## Research involving human participants, their data, or biological material

Policy information about studies with human participants or human data. See also policy information about sex, gender (identity/presentation), and sexual orientation and race, ethnicity and racism.

Reporting on sex and gender

This study did not involve human participants

Reporting on race, ethnicity, or other socially relevant groupings

This study did not involve human participants

Population characteristics

This study did not involve human participants

Recruitment

This study did not involve human participants

Ethics oversight

Ethics permissions were not applicable to this study

Note that full information on the approval of the study protocol must also be provided in the manuscript.

## Field-specific reporting

Please select the one below that is the best fit for your research. If you are not sure, read the appropriate sections before making your selection.

<figure><img src="image_53.png" /></figure>

Life sciences

<figure><img src="image_54.png" /></figure>

Behavioural & social sciences

<figure><img src="image_55.png" /></figure>

Ecological, evolutionary & environmental sciences

For a reference copy of the document with all sections, see [nature.com/documents/nr-reporting-summary-flat.pdf](https://nature.com/documents/nr-reporting-summary-flat.pdf)

## Life sciences study design

All studies must disclose on these points even when the disclosure is negative.

Sample size

Our study did not perform a formal sample size calculation. For solving crystal structures: a few dozens crystallization conditions were tested and at least 50 crystals of each complex were tested at the synchrotron beam-line to find the best diffraction. The data sets were collected from one crystal of each complex. For mutational analysis 14 single and double mutants were designed, synthesized and added to the HT-SELEX experiments.

Data exclusions

No data were excluded from the analysis

Replication

The X-ray data were collected from a single crystals of each complex. The structure of BARHL2/DNAAC was solved at two different resolution to be sure that the 0.95 Å resolution structure is the same as the structure at 1.3 Å resolution. The statistics of data collections and refinements are presented in Table 1. The DNA motif data were obtained from the multiple cycles of SELEX experiments. A total of four SELEX cycles were performed. The DNA ligands from 0, 3rd, and 4th SELEX cycles were sequenced. In the experiments with Temperature SELEX the ligands from each cycle of four cycles and the input were sequenced and analyzed. The conclusions drawn were supported by all SELEX cycles and/or replicates.

Randomization

No grouping was involved in the experiments - no randomization was conducted as a result.

Blinding

There were no groups or human or animal participants involved in the experiments - no blinding was required
# Reporting for specific materials, systems and methods

We require information from authors about some types of materials, experimental systems and methods used in many studies. Here, indicate whether each material, system or method listed is relevant to your study. If you are not sure if a list item applies to your research, read the appropriate section before selecting a response.

## Materials & experimental systems

<table><thead><tr><th>n/a</th><th>Involved in the study</th></tr></thead><tbody><tr><td>☑</td><td>☐ Antibodies</td></tr><tr><td>☑</td><td>☐ Eukaryotic cell lines</td></tr><tr><td>☑</td><td>☐ Palaeontology and archaeology</td></tr><tr><td>☑</td><td>☐ Animals and other organisms</td></tr><tr><td>☑</td><td>☐ Clinical data</td></tr><tr><td>☑</td><td>☐ Dual use research of concern</td></tr><tr><td>☑</td><td>☐ Plants</td></tr></tbody></table>

## Methods

<table><thead><tr><th>n/a</th><th>Involved in the study</th></tr></thead><tbody><tr><td>☑</td><td>☐ ChIP-seq</td></tr><tr><td>☑</td><td>☐ Flow cytometry</td></tr><tr><td>☑</td><td>☐ MRI-based neuroimaging</td></tr></tbody></table>

## Plants

Seed stocks no

Novel plant genotypes no

Authentication no