def plot_random_rdf(): """ Will plot an rdf distribution against the radius for some random numbers. """ rand_coords = np.random.random((6000, 3)) r, rdf = RDF.calc_RDF(rand_coords) plt.plot(r, rdf) plt.title("g(r) of random points") plt.xlabel("R") plt.ylabel("g(R)") plt.show()
def plot_ordered_rdf(): """ Will plot the rdf of structured data. """ x, y, z = np.arange(0, 10, 1), np.arange(0, 10, 1), np.arange(0, 10, 1) crds = np.meshgrid(x, y, z) crds = [[crds[xyz][i, j, k] for xyz in range(len(crds))] for i in range(len(y)) for j in range(len(x)) for k in range(len(z))] crds = np.array(crds) r, rdf = RDF.calc_RDF(crds) plt.plot(r, rdf) plt.title("g(r) of points arranged in a grid") plt.xlabel("R") plt.ylabel("g(R)") plt.show()