In this work, we developed a mechanical model to address the problem of DNA structure and energy under deformation. DNA in nucleosome core particle is described as an example. The structure and energy of nucleosomal DNA is calculated based on its sequence and positioning state. Our theory is on the level of base pair step parameters. A quadratic elastic energy function describes the deformational energy of the molecule in which sequence dependency appears in a matrix of coupling constants. This rigidity matrix has been evaluated based on molecular dynamics simulation data and X-ray crystallography structures of DNA. The inferred structure has been calculated through minimization of the energy and the results show remarkable similarity with X-ray data. Figure 1 compares the base pair step parameters of a typical nucleosomal DNA (NCP147: PDB id 1kx5) with its inferred structure. Although there is no sequence-specific interaction of bases and the histone core, we found considerable sequence dependency for nucleosomal DNA positioning. The wrapping affinity for 5S rRNA, 601 positioning, TATA box, TGGA repeat, and NCP147 sequences are calculated and compared with the experimental data. The structural energy differences, ΔΔG, are in good agreement with the data obtained by calorimetric approaches for natural sequences (Table 1). We argue that structural energy determines the natural state of nucleosomal DNA and is the main reason for affinity differences in vitro. This theory can be utilized for the DNA structure and energy determination in protein–DNA complexes in general.