Rdf calculation

i am calculating the rdf and coordination number of ethylene carbonate and LiPF6 system, the rdf value is 1.94 which is good value compared with literature but coordinate number is not even near 1, which is supposed to be 4 or 5.
compute gofr all rdf 300 2 6 4 6 4 7 6 6 6 7 #c2-Li oo-Li oo-p Li-Li Li-p
fix rdf all ave/time 1 100000 100000 c_gofr[*] file EC_0_rdf.dat mode vector
is the command that i have used, does anyone have any suggestion regarding how to get good coordination number. any reply would be great help
paart.txt (24.9 KB)

The radial distribution function is not a single number but a graph.

Also, your command is computing the rdf for 5 pairs of atom types, so to which of the 10 graphs you are referring to?

Furthermore, the compute rdf code has been thoroughly checked over the years, so you can assume that the results are correctly computed.

The results you get are thus the correct results for your system. If they don’t match your expectations, then there are two possible explanations: 1) your expectations are not correct or 2) your system setup and geometry is not correct. Neither is something that anybody here can fix.

so the input command that i am using is right and the results are also correct, but while looking at the lammpstrj file and dump file there are 4 or 5 Ethylene carbonate near Li. how to calculate those than, isn’t the highest peak of rdf graph the rdf value

I an not saying this. I don’t know your system. All I can say is that there is no syntax error and that I am certain that the compute rdf implementation is working correctly.

How to set up your system and interpret your data is not a LAMMPS problem, but something for which you need to study corresponding text books and discuss with your adviser or supervisor or tutor, i.e. people that know and care about your research. An online forum is not a substitute for that.

Already the name is: Radial Distribution Function. How can that be a “value”??
It is a well defined entity in statistical mechanics, just look it up in a corresponding text book.