  Using a first-principles-based approach, we determine the ferroelectric
pattern in PbZr$_{0.5}$Ti$_{0.5}$O$_3$ ultrathin film. It is found that vortex
stripes are formed in the system and they are responsible for the 180$^\circ$
domains observed. When a local external field is exerted, the vortex stripe
transforms into the vortex loop structure, which leads to the formation of a
smaller domain with the polarization antiparallel to the field in the center of
the field region. This may provide a convenient way to manipulate nanodomains
in thin films.
