Generating electron density from protein coordinate (PDB) Normally protein coordinates are generated from electron density, such as that from X-ray scattering experiment. In my case, I want the reverse - PDB to electron density mesh. I thought it was more trivial and a program should be available. But Google did not give me any luck.

Is there any existing python library/program which converts protein coordinate (pdb) into electron density mesh (custom resolution)? If not, how should one proceed? The orbital and atomistic electron density varies among atom types.

Your suggestion appreciated.

Edited:

The precision of electron density I am interested in is ~ 1-2A so hopefully DFT level might not be necessary in my case. The aim is to visually resolve sidechain atoms. Since there could be manipulation of the PDB upstream, some crystal structure information could be lost.

Indeed the raw electron density might provide such information but a unified treatment of PDB coordinate homogenizes structures, making a more fair comparison between them, specifically in my case.
For the more recent structures, you can view the density (based on measured diffraction data and the model, so-called 2Fo-Fc density) directly in the protein data bank, e.g. http://www.rcsb.org/3d-view/6QU9?preset=electronDensityMaps:



For a theoretical model or a model without deposited diffraction data, you would first have to generate structure factors, and then calculate the electron density. In the simplest case, the electron density would just reflect the density of isolated atoms (i.e. no deformation density). Program suites such as CCP4 (originally in Fortran) or Phenix (in python) are available to do these steps.

In these calculations, the electron density of individual atoms is encoded in so-called atomic form factors (see e.g. http://lampx.tugraz.at/~hadley/ss1/crystaldiffraction/atomicformfactors/formfactors.php), which are fourier transform coefficients of the model electron density for each atom.