We present HylleraasMD
(HyMD), a comprehensive implementation of
the recently proposed Hamiltonian formulation of hybrid particle-field
molecular dynamics. The methodology is based on a tunable, grid-independent
length-scale of coarse graining, obtained by filtering particle densities
in reciprocal space. This enables systematic convergence of energies
and forces by grid refinement, also eliminating nonphysical force
aliasing. Separating the time integration of fast modes associated
with internal molecular motion from slow modes associated with their
density fields, we enable the first time-reversible, energy-conserving
hybrid particle-field simulations. HyMD comprises the optional use
of explicit electrostatics, which, in this formalism, corresponds
to the long-range potential in particle-mesh Ewald. We demonstrate
the ability of HyMD to perform simulations in the microcanonical and
canonical ensembles with a series of test cases, comprising lipid
bilayers and vesicles, surfactant micelles, and polypeptide chains,
comparing our results to established literature. An on-the-fly increase
of the characteristic coarse-grain length significantly speeds up
dynamics, accelerating self-diffusion and leading to expedited aggregation.
Exploiting this acceleration, we find that the time scales involved
in the self-assembly of polymeric structures can lie in the tens to
hundreds of picoseconds instead of the multimicrosecond regime observed
with comparable coarse-grained models.