Robert McLachlan Structure in the algebra of rooted trees When the vector field f is canonical Hamiltonian, the algebra of elementary differentials generated by f has special structure. For example, f''(f,f) - 2 f'(f'(f)) is Hamiltonian and f'(f'(f)) is energy-preserving. There are subalgebras of Hamiltonian (resp. energy-preserving) B-series corresponding to symplectic (resp. energy-preserving) integrators. In this talk I will introduce and describe these subalgebras and their relationships and also the more complicated sets of B-series that are conjugate to Hamiltonian or energy-preserving.