forked from lijiext/lammps
Eliminated another initialization error and tweaked rdf-adf example
This commit is contained in:
parent
8aecefe233
commit
8223f5e0a3
|
@ -133,7 +133,7 @@ arguments are specified.
|
|||
|
||||
The first ADF value for a bin is calculated from the histogram count by
|
||||
dividing by the total number of triples satisfying the criteria,
|
||||
so that the integral of the ADF w.r.t. angle is one i.e. the ADF
|
||||
so that the integral of the ADF w.r.t. angle is 1, i.e. the ADF
|
||||
is a probability density function.
|
||||
|
||||
The second ADF value is reported as a cumulative sum of
|
||||
|
@ -147,9 +147,15 @@ number radial distribution function.
|
|||
The {ordinate} optional keyword determines
|
||||
whether the bins are of uniform angular size from zero
|
||||
to 180 ({degree}), zero to Pi ({radian}), or the
|
||||
cosine of the angle uniform in the range \[-1,1\] ({cosine}).
|
||||
Regardless of which is chosen, the first ADF will be normalized
|
||||
so that the integral w.r.t. the ordinate is one.
|
||||
cosine of the angle uniform in the range \[-1,1\] ({cosine}).
|
||||
{cosine} has the advantage of eliminating the {acos()} function
|
||||
call, which speeds up the compute by 2-3x, and it is also preferred
|
||||
on physical grounds, because the for uniformly distributed particles
|
||||
in 3D, the angular probability density w.r.t dtheta is
|
||||
sin(theta)/2, while for d(cos(theta)), it is 1/2,
|
||||
Regardless of which ordinate is chosen, the first column of ADF
|
||||
values is normalized w.r.t. the range of that ordinate, so that
|
||||
the integral is 1.
|
||||
|
||||
The simplest way to output the results of the compute adf calculation
|
||||
to a file is to use the "fix ave/time"_fix_ave_time.html command, for
|
||||
|
@ -177,7 +183,7 @@ the angle in degrees or radians, or the cosine of the angle. Each
|
|||
subsequent pair of columns gives the first and second kinds of ADF
|
||||
for a specific set of ({itypeN},{jtypeN},{ktypeN}). The values
|
||||
in the first ADF column are normalized numbers >= 0.0,
|
||||
whose integral w.r.t. the ordinate is one,
|
||||
whose integral w.r.t. the ordinate is 1,
|
||||
i.e. the first ADF is a normalized probability distribution.
|
||||
The values in the second ADF column are also numbers >= 0.0.
|
||||
They are the cumulative density distribution of angles per atom.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Liquid water RDFs and ADFs (~12 O-O-O/atom, ~1 O-H...O/atom)
|
||||
|
||||
units real
|
||||
atom_style full
|
||||
|
||||
|
@ -35,8 +37,8 @@ run 500
|
|||
reset_timestep 0
|
||||
|
||||
compute gofr all rdf 100 1 1 2 2 1 2 # O-O, H-H, O-H
|
||||
compute gofa all adf 45 1 1 1 2.0 3.5 2.0 3.5 &
|
||||
1 2 1 0.0 1.2 1.5 2.5
|
||||
compute gofa all adf 45 1 1 1 2.0 3.5 2.0 3.5 &
|
||||
2 1 1 0.0 1.2 1.5 2.5 # O-O-O, O-H...O
|
||||
fix rdf all ave/time 100 10 1000 c_gofr[*] file spce-rdf.dat mode vector
|
||||
fix adf all ave/time 10 100 1000 c_gofa[*] file spce-adf.dat mode vector
|
||||
|
||||
|
|
|
@ -2,48 +2,48 @@
|
|||
# TimeStep Number-of-rows
|
||||
# Row c_gofa[1] c_gofa[2] c_gofa[3] c_gofa[4] c_gofa[5]
|
||||
1000 45
|
||||
1 2 0 0 0.570997 4.0364e-06
|
||||
2 6 0 0 1.34922 1.33246e-05
|
||||
3 10 0 0 0.844388 1.94267e-05
|
||||
4 14 0 0 0.476996 2.34028e-05
|
||||
5 18 0 0 0.161187 2.46115e-05
|
||||
6 22 0 0 0.0477465 2.47703e-05
|
||||
7 26 0 0 0.00511569 2.48353e-05
|
||||
8 30 0 0 0 2.48353e-05
|
||||
9 34 0 0 0 2.48353e-05
|
||||
10 38 0 0 0.0179049 2.497e-05
|
||||
11 42 0.00139303 0.00112 0 2.497e-05
|
||||
12 46 0.0970866 0.0791067 0 2.497e-05
|
||||
13 50 0.421047 0.417227 0 2.497e-05
|
||||
14 54 0.503109 0.821333 0 2.497e-05
|
||||
15 58 0.403317 1.14533 0 2.497e-05
|
||||
16 62 0.384523 1.45431 0 2.497e-05
|
||||
17 66 0.425895 1.79643 0 2.497e-05
|
||||
18 70 0.494575 2.1937 0 2.497e-05
|
||||
19 74 0.547429 2.63327 0.00716197 2.50218e-05
|
||||
20 78 0.584521 3.10253 0.0119366 2.51428e-05
|
||||
21 82 0.612285 3.59409 0.0966866 2.56506e-05
|
||||
22 86 0.643119 4.1105 0.0868815 2.64003e-05
|
||||
23 90 0.669958 4.64829 0.245468 2.77959e-05
|
||||
24 94 0.685175 5.19837 0.318537 3.01911e-05
|
||||
25 98 0.68985 5.75207 0.608171 3.48379e-05
|
||||
26 102 0.681411 6.29909 0.825076 4.16049e-05
|
||||
27 106 0.660197 6.82903 1.2987 5.06221e-05
|
||||
28 110 0.644879 7.34685 1.58753 6.12867e-05
|
||||
29 114 0.613281 7.83923 1.1185 6.98041e-05
|
||||
30 118 0.572272 8.29867 0.961282 7.65158e-05
|
||||
31 122 0.534702 8.72795 0.546058 8.08946e-05
|
||||
32 126 0.496697 9.12669 0.64867 8.51981e-05
|
||||
33 130 0.453138 9.49045 0.518561 8.86029e-05
|
||||
34 134 0.41004 9.81964 0.561575 9.23251e-05
|
||||
35 138 0.36701 10.1143 0.355285 9.51805e-05
|
||||
36 142 0.328717 10.3782 0.297648 9.74977e-05
|
||||
37 146 0.294236 10.6145 0.0749449 9.81639e-05
|
||||
38 150 0.261134 10.8242 0.0856879 9.87562e-05
|
||||
39 154 0.223727 11.0039 0.0537574 9.9216e-05
|
||||
40 158 0.19037 11.1567 0.0827037 9.95624e-05
|
||||
41 162 0.156173 11.2822 0.0149208 9.97358e-05
|
||||
42 166 0.119999 11.3785 0.00895247 9.98317e-05
|
||||
43 170 0.0853136 11.447 0.00596831 9.98799e-05
|
||||
44 174 0.0502058 11.4873 0 9.98799e-05
|
||||
45 178 0.0171616 11.5011 0 9.98799e-05
|
||||
1 2 0 0 0 0
|
||||
2 6 0 0 0 0
|
||||
3 10 0 0 0 0
|
||||
4 14 0 0 0 0
|
||||
5 18 0 0 0 0
|
||||
6 22 0 0 0 0
|
||||
7 26 0 0 0 0
|
||||
8 30 0 0 0 0
|
||||
9 34 0 0 0 0
|
||||
10 38 0 0 0 0
|
||||
11 42 0.00152868 0.00123333 0 0
|
||||
12 46 0.096401 0.07888 0 0
|
||||
13 50 0.418453 0.41588 0 0
|
||||
14 54 0.506477 0.82378 0 0
|
||||
15 58 0.408265 1.15264 0 0
|
||||
16 62 0.39048 1.46717 0 0
|
||||
17 66 0.43199 1.81511 0 0
|
||||
18 70 0.495001 2.21377 0 0
|
||||
19 74 0.549314 2.65613 0 0
|
||||
20 78 0.586929 3.12873 0.000290833 2e-05
|
||||
21 82 0.619347 3.62739 0.00150483 0.000123333
|
||||
22 86 0.644793 4.14651 0.00573476 0.000516667
|
||||
23 90 0.664615 4.68151 0.00996515 0.0012
|
||||
24 94 0.680251 5.22921 0.0147164 0.00221
|
||||
25 98 0.679622 5.77635 0.0195919 0.00355333
|
||||
26 102 0.675331 6.32011 0.0279862 0.00547333
|
||||
27 106 0.659266 6.85083 0.0431972 0.00843667
|
||||
28 110 0.640721 7.36672 0.0679453 0.0130967
|
||||
29 114 0.609075 7.85709 0.0903345 0.0192933
|
||||
30 118 0.578386 8.32278 0.12826 0.0280933
|
||||
31 122 0.535658 8.75409 0.169594 0.0397267
|
||||
32 126 0.494864 9.15256 0.208251 0.05401
|
||||
33 130 0.4498 9.51475 0.275366 0.0728967
|
||||
34 134 0.40817 9.8434 0.354045 0.09718
|
||||
35 138 0.362856 10.1356 0.459385 0.12869
|
||||
36 142 0.328968 10.4005 0.606056 0.170257
|
||||
37 146 0.291793 10.6354 0.796038 0.224857
|
||||
38 150 0.259831 10.8446 1.04618 0.296613
|
||||
39 154 0.2281 11.0283 1.34162 0.38863
|
||||
40 158 0.191749 11.1827 1.62681 0.500213
|
||||
41 162 0.15663 11.3088 1.86309 0.627997
|
||||
42 166 0.121865 11.407 1.89445 0.757927
|
||||
43 170 0.0881334 11.4779 1.67713 0.872957
|
||||
44 174 0.0523029 11.52 1.17909 0.953827
|
||||
45 178 0.0169789 11.5337 0.417313 0.98245
|
||||
|
|
|
@ -384,7 +384,7 @@ void ComputeADF::compute_array()
|
|||
// zero the central atom counts
|
||||
|
||||
for (i = 0; i < ntriples; i++)
|
||||
iatomcount[m] = 0;
|
||||
iatomcount[i] = 0;
|
||||
|
||||
// tally the ADFs
|
||||
// all three atoms i, j, and k must be in fix group
|
||||
|
|
Loading…
Reference in New Issue