  We present analysis of the magnetic field in seven solar flare regions
accompanied by the pulsations of hard X-ray (HXR) emission. These flares were
studied by Kuznetsov et al. (2016) (Paper~I), and chosen here because of the
availability of the vector magnetograms for their parent active regions (ARs)
obtained with the SDO/HMI data. In Paper~I, based on the observations only, it
was suggested that a magnetic flux rope (MFR) might play an important role in
the process of generation of the HXR pulsations. The goal of the present paper
is to test this hypothesis by using the extrapolation of magnetic field with
the non-linear force-free field (NLFFF) method. Having done this, we found that
before each flare indeed there was an MFR elongated along and above a magnetic
polarity inversion line (MPIL) on the photosphere. In two flare regions the
sources of the HXR pulsations were located at the footpoints of different
magnetic field lines wrapping around the central axis, and constituting an MFR
by themselves. In five other flares the parent field lines of the HXR
pulsations were not a part of an MFR, but surrounded it in the form of an
arcade of magnetic loops. These results show that, at least in the analyzed
cases, the "single flare loop" models do not satisfy the observations and
magnetic field modeling, while are consistent with the concept that the HXR
pulsations are a consequence of successive episodes of energy release and
electron acceleration in different magnetic flux tubes (loops) of a complex AR.
An MFR could generate HXR pulsations by triggering episodes of magnetic
reconnection in different loops in the course of its non-uniform evolution
along an MPIL. However, since three events studied here were confined flares,
actual eruptions may not be required to trigger sequential particle
acceleration episodes in the magnetic systems containing an MFR.
