Abstract Background Molecular dynamics simulations can complement experimental measures of structure and dynamics of biomolecules. The quality of such simulations can be tested by comparisons to models refined against experimental crystallographic data. Methods We report simulations of DNA and RNA duplexes in their crystalline environment. The calculations mimic the conditions for PDB entries 1D23 [d(CGATCGATCG)2] and 1RNA [(UUAUAUAUAUAUAA)2], and contain 8 unit cells, each with 4 copies of the Watson–Crick duplex; this yields in aggregate 64μs of duplex sampling for DNA and 16μs for RNA. Results The duplex structures conform much more closely to the average structure seen in the crystal than do structures extracted from a solution simulation with the same force field. Sequence-dependent variations in helical parameters, and in groove widths, are largely maintained in the crystal structure, but are smoothed out in solution. However, the integrity of the crystal lattice is slowly degraded in both simulations, with the result that the interfaces between chains become heterogeneous. This problem is more severe for the DNA crystal, which has fewer inter-chain hydrogen bond contacts than does the RNA crystal. Conclusions Crystal simulations using current force fields reproduce many features of observed crystal structures, but suffer from a gradual degradation of the integrity of the crystal lattice. General significance The results offer insights into force-field simulations that test their ability to preserve weak interactions between chains, which will be of importance also in non-crystalline applications that involve binding and recognition. This article is part of a Special Issue entitled Recent developments of molecular dynamics.