1
2units		real
3atom_style	full
4
5read_data	data.spce
6
7pair_style	lj/cut/coul/long 12.0 12.0
8kspace_style	pppm 1.0e-4
9
10pair_coeff	1 1 0.15535 3.166
11pair_coeff	* 2 0.0000 0.0000
12
13bond_style	harmonic
14angle_style	harmonic
15dihedral_style	none
16improper_style	none
17
18bond_coeff	1 1000.00 1.000
19angle_coeff	1 100.0 109.47
20
21special_bonds   lj/coul 0.0 0.0 1.0
22
23neighbor        2.0 bin
24
25fix		1 all shake 0.0001 20 0 b 1 a 1
26fix		2 all nvt temp 300.0 300.0 100.0
27
28# make certain that shake constraints are satisfied
29run 0 post no
30
31group		one molecule 1 2
32
33# the following section shows equivalences between using the force/tally compute and other computes and thermo keywords
34
35# compute pairwise force between two molecules and everybody
36compute		fpa one group/group all pair yes kspace no boundary no
37# tally pairwise force between two molecules and the all molecules
38compute		c1 one force/tally all
39# tally the force of all with all (should be zero)
40compute		c2 all force/tally all
41# collect per atom data. only reduce over the first group.
42compute		one one reduce sum c_c1[1] c_c1[2] c_c1[3]
43compute		red all reduce sum c_c2[1] c_c2[2] c_c2[3]
44# determine magnitude of force
45variable	fpa equal sqrt(c_fpa[1]*c_fpa[1]+c_fpa[2]*c_fpa[2]+c_fpa[3]*c_fpa[3])
46variable	for equal sqrt(c_one[1]*c_one[1]+c_one[2]*c_one[2]+c_one[3]*c_one[3])
47# round to 10**-10 absolute precision.
48variable	ref equal round(1e10*sqrt(c_red[1]*c_red[1]+c_red[2]*c_red[2]+c_red[3]*c_red[3]))*1e-10
49variable	all equal round(1e10*c_c2)*1e-10
50
51velocity	all create 300 432567 dist uniform
52
53timestep	2.0
54
55# v_fpa and v_for and c_c1, c_fpa[] and c_one[] should all each have the same value. v_ref and c_c2 should be zero
56thermo_style    custom step v_fpa v_for c_c1 c_fpa[1] c_one[1] c_fpa[2] c_one[2] c_fpa[3] c_one[3] v_ref v_all
57thermo		10
58
59run 50
60
61