Unverified Commit ce7c3e68 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1648 from athomps/add_w_l_orientorder

Add w l orientorder
parents df63a537 3ec9317d
Loading
Loading
Loading
Loading
+29 −6
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ keyword = {cutoff} or {nnn} or {degrees} or {components}
  {cutoff} value = distance cutoff
  {nnn} value = number of nearest neighbors
  {degrees} values = nlvalues, l1, l2,...
  {wl} value = yes or no
  {wl/hat} value = yes or no
  {components} value = ldegree  :pre

:ule
@@ -27,7 +29,8 @@ keyword = {cutoff} or {nnn} or {degrees} or {components}

compute 1 all orientorder/atom
compute 1 all orientorder/atom degrees 5 4 6 8 10 12 nnn NULL cutoff 1.5
compute 1 all orientorder/atom degrees 4 6 components 6 nnn NULL cutoff 3.0 :pre
compute 1 all orientorder/atom wl/hat yes
compute 1 all orientorder/atom components 6 :pre

[Description:]

@@ -48,7 +51,7 @@ neighbors of the central atom.
The angles theta and phi are the standard spherical polar angles
defining the direction of the bond vector {rij}.
The second equation defines {Ql}, which is a
rotationally invariant scalar quantity obtained by summing
rotationally invariant non-negative amplitude obtained by summing
over all the components of degree {l}.

The optional keyword {cutoff} defines the distance cutoff
@@ -63,7 +66,7 @@ specified distance cutoff are used.

The optional keyword {degrees} defines the list of order parameters to
be computed.  The first argument {nlvalues} is the number of order
parameters. This is followed by that number of integers giving the
parameters. This is followed by that number of non-negative integers giving the
degree of each order parameter. Because {Q}2 and all odd-degree order
parameters are zero for atoms in cubic crystals (see
"Steinhardt"_#Steinhardt), the default order parameters are {Q}4,
@@ -71,7 +74,20 @@ parameters are zero for atoms in cubic crystals (see
= sqrt(7/3)/8 = 0.19094....  The numerical values of all order
parameters up to {Q}12 for a range of commonly encountered
high-symmetry structures are given in Table I of "Mickel et
al."_#Mickel.
al."_#Mickel, and these can be reproduced with this compute

The optional keyword {wl} will output the third-order invariants {Wl} 
(see Eq. 1.4 in "Steinhardt"_#Steinhardt) for the same degrees as
for the {Ql} parameters. For the FCC crystal with {nnn} =12,
{W}4 = -sqrt(14/143).(49/4096)/Pi^1.5 = -0.0006722136...

The optional keyword {wl/hat} will output the normalized third-order 
invariants {Wlhat} (see Eq. 2.2 in "Steinhardt"_#Steinhardt) 
for the same degrees as for the {Ql} parameters. For the FCC crystal 
with {nnn} =12, {W}4hat = -7/3*sqrt(2/429) = -0.159317...The numerical
values of {Wlhat} for a range of commonly encountered high-symmetry
structures are given in Table I of "Steinhardt"_#Steinhardt, and these
can be reproduced with this keyword.

The optional keyword {components} will output the components of the
normalized complex vector {Ybar_lm} of degree {ldegree}, which must be
@@ -82,7 +98,7 @@ particles, as discussed in "ten Wolde"_#tenWolde2.

The value of {Ql} is set to zero for atoms not in the
specified compute group, as well as for atoms that have less than
{nnn} neighbors within the distance cutoff.
{nnn} neighbors within the distance cutoff, unless {nnn} is NULL.

The neighbor list needed to compute this quantity is constructed each
time the calculation is performed (i.e. each time a snapshot of atoms
@@ -108,6 +124,12 @@ This compute calculates a per-atom array with {nlvalues} columns,
giving the {Ql} values for each atom, which are real numbers on the
range 0 <= {Ql} <= 1.

If the keyword {wl} is set to yes, then the {Wl} values for each
atom will be added to the output array, which are real numbers.

If the keyword {wl/hat} is set to yes, then the {Wl_hat} 
values for each atom will be added to the output array, which are real numbers.
 
If the keyword {components} is set, then the real and imaginary parts
of each component of (normalized) {Ybar_lm} will be added to the
output array in the following order: Re({Ybar_-m}) Im({Ybar_-m})
@@ -130,7 +152,8 @@ hexorder/atom"_compute_hexorder_atom.html
[Default:]

The option defaults are {cutoff} = pair style cutoff, {nnn} = 12,
{degrees} = 5 4 6 8 10 12 i.e. {Q}4, {Q}6, {Q}8, {Q}10, and {Q}12.
{degrees} = 5 4 6 8 10 12 i.e. {Q}4, {Q}6, {Q}8, {Q}10, and {Q}12,
{wl} = no, {wl/hat} = no, and {components} off

:line

+91 −0
Original line number Diff line number Diff line
# Steinhardt-Nelson bond orientational order parameters for BCC

variable  	rcut equal 3.0

boundary	p p p

atom_style	atomic
neighbor	0.3 bin
neigh_modify	delay 5

# create geometry

lattice		bcc 1.0
region		box block 0 3 0 3 0 3
create_box	1 box
create_atoms	1 box

mass		1 1.0

# LJ potentials

pair_style	lj/cut ${rcut}
pair_coeff	* * 1.0 1.0 ${rcut}

# 14 neighbors, perfect crystal 

compute 	qlwlhat all orientorder/atom degrees 6 2 4 6 8 10 12 nnn 14 wl/hat yes
compute 	avql all reduce ave c_qlwlhat[1] c_qlwlhat[2] c_qlwlhat[3] c_qlwlhat[4] c_qlwlhat[5] c_qlwlhat[6] 
compute 	avwlhat all reduce ave c_qlwlhat[7] c_qlwlhat[8] c_qlwlhat[9] c_qlwlhat[10] c_qlwlhat[11] c_qlwlhat[12] 

thermo_style    custom step temp epair etotal c_avql[*] c_avwlhat[*]

run		0

# check Q_l values

print " "
print "*******************************************************************"
print " "
print "Comparison with reference values of Q_l "
print "   [Table I in W. Mickel, S. C. Kapfer," 
print "   G. E. Schroeder-Turkand, K. Mecke, "
print "   J. Chem. Phys. 138, 044501 (2013).]"
print " "

variable 	q2ref equal 0.0
variable 	q4ref equal 0.036
variable 	q6ref equal 0.511
variable 	q8ref equal 0.429
variable 	q10ref equal 0.195
variable 	q12ref equal 0.405

variable 	q2 equal c_avql[1]
variable 	q4 equal c_avql[2]
variable 	q6 equal c_avql[3]
variable 	q8 equal c_avql[4]
variable 	q10 equal c_avql[5]
variable 	q12 equal c_avql[6]

print "q2     = $(v_q2:%10.6f) delta = $(v_q2-v_q2ref:%10.4f)"
print "q4     = $(v_q4:%10.6f) delta = $(v_q4-v_q4ref:%10.4f)"
print "q6     = $(v_q6:%10.6f) delta = $(v_q6-v_q6ref:%10.4f)"
print "q8     = $(v_q8:%10.6f) delta = $(v_q8-v_q8ref:%10.4f)"
print "q10    = $(v_q10:%10.6f) delta = $(v_q10-v_q10ref:%10.4f)"
print "q12    = $(v_q12:%10.6f) delta = $(v_q12-v_q12ref:%10.4f)"

# check W_l_hat values

print " "
print "Comparison with reference values of W_l_hat"
print "   [Table I in P. Steinhardt, D. Nelson, and M. Ronchetti, "
print "   Phys. Rev. B 28, 784 (1983).]"
print " "

variable 	w4hatref equal 0.159317
variable 	w6hatref equal 0.013161
variable 	w8hatref equal -0.058455
variable 	w10hatref equal -0.090130

variable 	w4hat equal c_avwlhat[2]
variable 	w6hat equal c_avwlhat[3]
variable 	w8hat equal c_avwlhat[4]
variable 	w10hat equal c_avwlhat[5]

print "w4hat  = $(v_w4hat:%10.6f) delta = $(v_w4hat-v_w4hatref:%10.6f)"
print "w6hat  = $(v_w6hat:%10.6f) delta = $(v_w6hat-v_w6hatref:%10.6f)"
print "w8hat  = $(v_w8hat:%10.6f) delta = $(v_w8hat-v_w8hatref:%10.6f)"
print "w10hat = $(v_w10hat:%10.6f) delta = $(v_w10hat-v_w10hatref:%10.6f)"
print " "
print "*******************************************************************"
print " "
+88 −0
Original line number Diff line number Diff line
# Steinhardt-Nelson bond orientational order parameters for FCC

variable  	rcut equal 3.0

boundary	p p p

atom_style	atomic
neighbor	0.3 bin
neigh_modify	delay 5

# create geometry

lattice		fcc 1.0
region		box block 0 3 0 3 0 3
create_box	1 box
create_atoms	1 box

mass		1 1.0

# LJ potentials

pair_style	lj/cut ${rcut}
pair_coeff	* * 1.0 1.0 ${rcut}

# 12 neighbors, perfect crystal

compute 	qlwlhat all orientorder/atom wl/hat yes
compute 	avql all reduce ave c_qlwlhat[1] c_qlwlhat[2] c_qlwlhat[3] c_qlwlhat[4] c_qlwlhat[5] 
compute 	avwlhat all reduce ave c_qlwlhat[6] c_qlwlhat[7] c_qlwlhat[8] c_qlwlhat[9] c_qlwlhat[10]

thermo_style    custom step temp epair etotal c_avql[*] c_avwlhat[*]

run		0

# check Q_l values

print " "
print "*******************************************************************"
print " "
print "Comparison with reference values of Q_l "
print "   [Table I in W. Mickel, S. C. Kapfer," 
print "   G. E. Schroeder-Turkand, K. Mecke, "
print "   J. Chem. Phys. 138, 044501 (2013).]"
print " "

variable 	q4ref equal 0.190
variable 	q6ref equal 0.575
variable 	q8ref equal 0.404
variable 	q10ref equal 0.013
variable 	q12ref equal 0.600

variable 	q4 equal c_avql[1]
variable 	q6 equal c_avql[2]
variable 	q8 equal c_avql[3]
variable 	q10 equal c_avql[4]
variable 	q12 equal c_avql[5]

print "q4     = $(v_q4:%10.6f) delta = $(v_q4-v_q4ref:%10.4f)"
print "q6     = $(v_q6:%10.6f) delta = $(v_q6-v_q6ref:%10.4f)"
print "q8     = $(v_q8:%10.6f) delta = $(v_q8-v_q8ref:%10.4f)"
print "q10    = $(v_q10:%10.6f) delta = $(v_q10-v_q10ref:%10.4f)"
print "q12    = $(v_q12:%10.6f) delta = $(v_q12-v_q12ref:%10.4f)"

# check W_l_hat values

print " "
print "Comparison with reference values of W_l_hat"
print "   [Table I in P. Steinhardt, D. Nelson, and M. Ronchetti, "
print "   Phys. Rev. B 28, 784 (1983).]"
print " "

variable 	w4hatref equal -0.159316
variable 	w6hatref equal -0.013161
variable 	w8hatref equal 0.058454
variable 	w10hatref equal -0.090128

variable 	w4hat equal c_avwlhat[1]
variable 	w6hat equal c_avwlhat[2]
variable 	w8hat equal c_avwlhat[3]
variable 	w10hat equal c_avwlhat[4]

print "w4hat  = $(v_w4hat:%10.6f) delta = $(v_w4hat-v_w4hatref:%10.6f)"
print "w6hat  = $(v_w6hat:%10.6f) delta = $(v_w6hat-v_w6hatref:%10.6f)"
print "w8hat  = $(v_w8hat:%10.6f) delta = $(v_w8hat-v_w8hatref:%10.6f)"
print "w10hat = $(v_w10hat:%10.6f) delta = $(v_w10hat-v_w10hatref:%10.6f)"
print " "
print "*******************************************************************"
print " "
+106 −0
Original line number Diff line number Diff line
# Steinhardt-Nelson bond orientational order parameters for icosahedral cluster
# W_6_hat is sensitive to icosohedral order

variable        rcut equal 1.2 # a bit bigger than LJ Rmin 
variable        rcutred equal 0.75 # a bit bigger than 1/sqrt(2)

# create a perfect fcc crystallite

atom_style	atomic
boundary	s s s
lattice		fcc 1.0 # neighbors at LJ Rmin
region		box block 0 2 0 2 0 2
create_box	1 box
create_atoms	1 box
mass		1 1.0

region 		centralatom sphere 1 1 1 0.0 side in
group 		centralatom region centralatom

region 		mysphere sphere 1 1 1 ${rcutred} side out
delete_atoms 	region mysphere

# LJ potential

pair_style	lj/cut 100.0
pair_coeff	* * 1.0 1.0 100.0

# define output for central atom

compute 	qlwlhat all orientorder/atom wl/hat yes cutoff ${rcut} nnn NULL
compute 	avql centralatom reduce ave c_qlwlhat[1] c_qlwlhat[2] c_qlwlhat[3] c_qlwlhat[4] c_qlwlhat[5] 
compute 	avwlhat centralatom reduce ave c_qlwlhat[6] c_qlwlhat[7] c_qlwlhat[8] c_qlwlhat[9] c_qlwlhat[10] 
variable	q6 equal c_avql[2]
variable	w6hat equal c_avwlhat[2]

compute 	mype all pe/atom
compute 	centralatompe centralatom reduce ave c_mype

# gently equilibrate the crystallite

velocity     	all create 0.001 482748
fix	     	1 all nve
neighbor	0.3 bin
neigh_modify	every 1 check no delay 0
timestep	0.003
thermo_style    custom step temp epair etotal c_centralatompe v_q6 v_w6hat
thermo		10

run		10

# quench to icosehedral cluster

minimize      	1.0e-10 1.0e-6 100 1000

# check Q_l values

print " "
print "*******************************************************************"
print " "
print "Comparison with reference values of Q_l "
print "   [Table I in W. Mickel, S. C. Kapfer," 
print "   G. E. Schroeder-Turkand, K. Mecke, "
print "   J. Chem. Phys. 138, 044501 (2013).]"
print " "

variable 	q4ref equal 0.0
variable 	q6ref equal 0.663
variable 	q8ref equal 0.0
variable 	q10ref equal 0.363
variable 	q12ref equal 0.585

variable 	q4 equal c_avql[1]
variable 	q6 equal c_avql[2]
variable 	q8 equal c_avql[3]
variable 	q10 equal c_avql[4]
variable 	q12 equal c_avql[5]

print "q4     = $(v_q4:%10.6f) delta = $(v_q4-v_q4ref:%10.4f)"
print "q6     = $(v_q6:%10.6f) delta = $(v_q6-v_q6ref:%10.4f)"
print "q8     = $(v_q8:%10.6f) delta = $(v_q8-v_q8ref:%10.4f)"
print "q10    = $(v_q10:%10.6f) delta = $(v_q10-v_q10ref:%10.4f)"
print "q12    = $(v_q12:%10.6f) delta = $(v_q12-v_q12ref:%10.4f)"

# check W_l_hat values

print " "
print "Comparison with reference values of W_l_hat"
print "   [Table I in P. Steinhardt, D. Nelson, and M. Ronchetti, "
print "   Phys. Rev. B 28, 784 (1983).]"
print " "

variable 	w6hatref equal -0.169754
variable 	w10hatref equal -0.093967

variable 	w4hat equal c_avwlhat[1]
variable 	w6hat equal c_avwlhat[2]
variable 	w8hat equal c_avwlhat[3]
variable 	w10hat equal c_avwlhat[4]
variable 	w12hat equal c_avwlhat[5]

print "w6hat  = $(v_w6hat:%10.6f) delta = $(v_w6hat-v_w6hatref:%10.6f)"
print "w10hat = $(v_w10hat:%10.6f) delta = $(v_w10hat-v_w10hatref:%10.6f)"
print " "
print "*******************************************************************"
print " "
+405 −50

File changed.

Preview size limit exceeded, changes collapsed.

Loading