  Heavy polar molecules can be used to measure the electric dipole moment of
the electron, which is a sensitive probe of physics beyond the Standard Model.
The value is determined by measuring the precession of the molecule's spin in a
plane perpendicular to an applied electric field. The longer this precession
evolves coherently, the higher the precision of the measurement. For molecules
in a trap, this coherence time could be very long indeed. We evaluate the
sensitivity of an experiment where neutral molecules are trapped electrically,
and compare this to an equivalent measurement in a molecular beam. We consider
the use of a Stark decelerator to load the trap from a supersonic source, and
calculate the deceleration efficiency for YbF molecules in both strong-field
seeking and weak-field seeking states. With a 1s holding time in the trap, the
statistical sensitivity could be ten times higher than it is in the beam
experiment, and this could improve by a further factor of five if the trap can
be loaded from a source of larger emittance. We study some effects due to field
inhomogeneity in the trap and find that rotation of the electric field
direction, leading to an inhomogeneous geometric phase shift, is the primary
obstacle to a sensitive trap-based measurement.
