a, Experimental results for chitosan films electrodeposited by a neutralization mechanism in the presence of varying levels of salt (reproduced with permission from Soft Matter17). b, The number of intermolecular hydrogen bonds per glucosamine residue as a function of simulation time in the presence of 0.0 and 0.5 M NaCl (top), and average lifetime of intermolecular hydrogen bonds as a function of simulation time at salt and no-salt conditions (bottom). c,d, Snapshots of the self-assembled structures at 300 ns in the presence of 0.0 and 0.5 M NaCl. Multiple periodic images are shown, with the primary simulation box outlined in black. Hydrogen, water, and ions are hidden for clarity. e, Distribution of angles between chitosan chains, averaged over the final 100 ns of the 3 independent runs. Angles are between the vectors joining the first and last glucosamine units of each chain.