try pytraj
online:
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
# load pytraj
import pytraj as pt
%matplotlib inline
%config InlineBackend.figure_format = 'retina' # high resolution
import matplotlib
from matplotlib import pyplot as plt
# load trajectory
traj = pt.load_sample_data('tz2')
traj
# perform RDF calculation for water
rdf_data = pt.rdf(traj, solvent_mask=':WAT@O', solute_mask=':WAT@O', bin_spacing=0.2, maximum=12.)
rdf_data
plt.plot(rdf_data[0], rdf_data[1])
plt.xlabel(r"r ( $\AA$ )")
plt.ylabel('g(r)')
#plt.savefig('rdf_tz2_ortho.png')
(radial_distribution_function_of_water.ipynb; radial_distribution_function_of_water_evaluated.ipynb; radial_distribution_function_of_water.py)