How to decide contribution percentages for authors of a paper which is based on a patent? Suppose four authors namely, A, B, C and D (in decreasing order of contribution) are inventors of a patent. The inventors agree to write and publish a research paper, however, authors B and C do most of the paper writing and experimental work. Author A provides them help while not directly indulging in the ground work. 

My question is, does author A still deserves to be primary author of the paper? Or, the contribution of authors for paper has to be evaluated separately from patent? Please guide.
It sounds like the project resulting in the paper began with the patent, but has since then required a large amount of additional technical work (the writing itself may count as well, but is generally much less important).

As such, it would be scientifically dishonest to pretend that the other work did not exist, and that authorship should be derived only from the patent, since the patent is clearly only part of the work being presented.  Authorship should thus be re-evaluated on the basis of the total contributions, both in the patent (since it does not count as a peer-reviewed publication) and in the subsequent work.

Without knowing exact details, however, it is impossible to know what order the authors should be in.  It may be that the patent work is so much more significant than the subsequent work it still makes sense to keep the same author order; just as easily, it may just as easily be that the subsequent work weighs more heavily, and that the order changes when the full work is taken into account.