[AMBER] Need help regarding calculation of Coordination number from RDF Profile

From: Bharat Manna <bharatmanna.gmail.com>
Date: Fri, 24 Aug 2018 15:51:02 +0530

Dear All,

Using cpptraj 'rdf' attribute I have got an RDF profile of solute-solvent
interaction. Then I have used a simple python code to integrate the g(r) up
to first minima with the formula:

Integral = r^2 * g(r) * dr
CN = 4 * pi * density * Integral

However, I am getting too high coordination number as 149. Can anyone help
me to troubleshoot the issue? I have provided the code and RDF data file
below..

#the python code
import numpy as np

rdf=[]
r=[]
#rdf and r are the two lists created from Column 2 and Column 1 data
respectively.
f = open('rdf_input.txt')
lines = f.readlines()
for each in lines:
    splitdata=each.split()
    rdf.append(float(splitdata[1]))
    r.append(float(splitdata[0]))
dens=1.05

imax = np.argmax(rdf)
imin = imax + np.argmin(rdf[imax:])
dr = r[1]-r[0]

integral = 0.0
for i in range(imin):
    integral += r[i] * r[i] * dr * rdf[i]
CN = 4 * 3.14 * dens * integral


Thanks,
Bharat Manna
PhD Scholar
IIT Kharagpur


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber

Received on Fri Aug 24 2018 - 03:30:02 PDT
Custom Search