Streamline dielectric modules
Changes made in this Pull Request:
- Made sure the calculation of
m
andM
are consistent with theory, i.e.m
is always calculated from the atomgroup,M
is taken from the whole system. For cylindrical and spherical systems that means that we have to calculate the dipole density a second time. Comments on that are welcome! - Changed the histogramming to use
np.bincount
, which scales better thannp.histogram
and more than makes up for the fact we have to calculate more histograms. - Added more tests to check the quantities we calculate are correct.