This is the code I wrote in Python3 that allows the user to calculate the electric field gradient (or EFG) from a point charge distribution in a crystal, in the desired position. Also, there is the possibility to add an impurity (vacancy, particle, ...) and calculate the EFG with this perturbation.
The main file is pocsi, while an example of the usage can be found in pocsi_example. Please, read the pocsi_example file carefully, to understand how the software works.
For physical details about what is the EFG, and what is the point charge approximation, please visit: https://en.wikipedia.org/wiki/Electric_field_gradient, https://en.wikipedia.org/wiki/Electric_potential
For a much deeper explanation, please have a look at README.