Hi Rongjian,
Here is some python that you can open in Chimera (File / Open) that will load an atomic model (PDB 1a0m) and density map (x-ray map for 1a0m) and print the density map grid index of each atom. The index is floating point since the atoms of course are not exactly at grid points.
The Chimera Python scripts web page has more example code
Tom