LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Testing radial distribution function (rdf) calculation results
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Testing radial distribution function (rdf) calculation results


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Wed, 22 Nov 2017 18:19:40 -0500



On Wed, Nov 22, 2017 at 4:57 PM, Ali Morshedi <morshedi1370@...36.....24...> wrote:
Sorry, I sent the mail accidentally half done before. The complete version:

Dear all,

My own rdf calculations show different results from lammps. Here is a simple test case:

I have 4 atoms at positions x=[1,2,3,4] and y=0 z=0 for all.
box dimensions so that we have no pbc contribution:
-5   10     xlo  xhi
-5    5      ylo  yhi
-5    5      zlo  zhi
we have vol=1500 and number density is: rho=4/1500
If rmax=1.5 and nbin=2  --> rbin=0.75.

The relative number density for each bin and each atom:
0   30.3152
0   60.6305
0   60.6305
0   30.3152
where the columns correspond to bins and rows to atoms. The mean for the second bin: 45.4728

using:
compute 1 all rdf 2
fix 2 all ave/time 1 1 1 c_1[*] file tmp.rdf mode vector

Lammps gives:

# Time-averaged data for fix 2
# TimeStep Number-of-rows
# Row c_1[1] c_1[2] c_1[3]
0 2
1 0.375 0 0
2 1.125 60.6305 1.5

(60.635=~45.4728) As you can see, it's as if lammps is not considering the first and last atoms and is computing the average for two atoms. The coordination number is correct however.

​that is self-inflicted, since your pair style cutoff is 1.5, thus compute rdf will also use that as a cutoff.
please re-read the documentation for compute rdf.

axel.

 

I'm attaching the runfile and data file that reproduce this. I'm using 11Aug2017 version of lammps.

Thank you and best regards,
Ali

On Wed, Nov 22, 2017 at 1:35 PM, Ali Morshedi <morshedi1370@...24...> wrote:
Dear all,

My own rdf calculations show different results from lammps. Here is a simple test case:

I have 4 atoms at positions x=[1,2,3,4] and y=0 z=0 for all.
box dimensions:

Assume a large simulation box (no pbc contribution).

If rmax=1.5 and nbin=2,


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...12...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.