  We introduce an interatomic potential for hexagonal boron nitride (hBN) based
on the Gaussian approximation potential (GAP) machine learning methodology. The
potential is based on a training set of configurations collected from density
functional theory (DFT) simulations and is capable of treating bulk and
multilayer hBN as well as nanotubes of arbitrary chirality. The developed force
field faithfully reproduces the potential energy surface predicted by DFT while
improving the efficiency by several orders of magnitude. We test our potential
by comparing formation energies, geometrical properties, phonon dispersion
spectra and mechanical properties with respect to benchmark DFT calculations
and experiments. In addition, we use our model and a recently developed
graphene-GAP to analyse and compare thermally and mechanically induced rippling
in large scale two-dimensional (2D) hBN and graphene. Both materials show
almost identical scaling behaviour with an exponent of $\eta \approx 0.85$ for
the height fluctuations agreeing well with the theory of flexible membranes.
Based on its lower resistance to bending, however, hBN experiences slightly
larger out-of-plane deviations both at zero and finite applied external strain.
Upon compression a phase transition from incoherent ripple motion to
soliton-ripples is observed for both materials. Our potential is freely
available online at [http://www.libatoms.org].
