Hi Jan,
Did you run your DEN refinement with optimize=True? If you haven't run the grid optimization, it's unlikely that you found the optimal gamma/weight pair for your specific case.
Also, I would recommend not using reference model restraints while running DEN refinement. This could potentially prevent your model from "deforming", if you are restraining it to be the same as a reference model.
To use a reference file with DEN, you would use:
den.reference_file="path_to_reference_file"
That will handle the chainID/resID matching automatically, and correctly use your reference in a DEN context.
Jeff