From 13bff076067672a96884752daee32d54e9abca2f Mon Sep 17 00:00:00 2001 From: Sievers Date: Tue, 25 Feb 2020 15:32:37 -0700 Subject: [PATCH] Added documentation, added an example, avoided position round off, added in compute_pe's compute_scalar, now fix produces per-atom array instead of global array --- doc/src/fix_num_diff.rst | 78 +++ examples/numdiff/README.md | 13 + examples/numdiff/argon.lmp | 886 ++++++++++++++++++++++++++++++++++ examples/numdiff/ff-argon.lmp | 20 + examples/numdiff/in.numdiff | 28 ++ src/fix_num_diff.cpp | 274 ++++------- src/fix_num_diff.h | 20 +- 7 files changed, 1134 insertions(+), 185 deletions(-) create mode 100644 doc/src/fix_num_diff.rst create mode 100644 examples/numdiff/README.md create mode 100644 examples/numdiff/argon.lmp create mode 100644 examples/numdiff/ff-argon.lmp create mode 100644 examples/numdiff/in.numdiff diff --git a/doc/src/fix_num_diff.rst b/doc/src/fix_num_diff.rst new file mode 100644 index 0000000000..189b26e3f7 --- /dev/null +++ b/doc/src/fix_num_diff.rst @@ -0,0 +1,78 @@ +.. index:: fix numdiff + +fix numdiff command +==================== + +Syntax +"""""" + + +.. parsed-literal:: + + fix ID group-ID numdiff Nevery Delta + +* ID, group-ID are documented in :doc:`fix ` command +* numdiff = style name of this fix command +* Nevery = calculate force by finite difference every this many timesteps +* Delta = finite difference displacement length (distance units) + + +Examples +"""""""" + + +.. parsed-literal:: + + fix 1 all numdiff 1 0.0001 + fix 1 all numdiff 10 1e-6 + fix 1 all numdiff 100 0.01 + +Description +""""""""""" + +Calculate forces through finite difference of energy versus position. +The resulting per-atom forces can be used by :doc:`dump custom `. + +The group specified with the command means only atoms within the group +have their averages computed. Results are set to 0.0 for atoms not in +the group. + + +---------- + + +The *Nevery*\ argument specifies on what timesteps the force will +be used calculated by finite difference. + +The *Delta*\ argument specifies the positional displacement each +atom will undergo. + + +---------- + + +**Restart, fix\_modify, output, run start/stop, minimize info:** + +No information about this fix is written to :doc:`binary restart files `. None of the :doc:`fix_modify ` options +are relevant to this fix. No global scalar or vector quantities are +stored by this fix for access by various :doc:`output commands `. + +This fix produces a per-atom array which can be accessed by +various :doc:`output commands `. . This fix produces +a per-atom array of the forces calculated by finite difference. The +per-atom values should only be accessed on timesteps that are multiples +of *Nfreq* since that is when the finite difference forces are calculated. + +No parameter of this fix can be used with the *start/stop* keywords of +the :doc:`run ` command. This fix is invoked during :doc:`energy minimization `. + +Restrictions +"""""""""""" + none + +Related commands +"""""""""""""""" + +:doc:`dynamical_matrix `, + +**Default:** none diff --git a/examples/numdiff/README.md b/examples/numdiff/README.md new file mode 100644 index 0000000000..d88f66d65c --- /dev/null +++ b/examples/numdiff/README.md @@ -0,0 +1,13 @@ +# LAMMPS FIX NUMDIFF EXAMPLE + +## Numerical Difference Fix + +This directory contains the ingredients to run an NVE simulation using the numerical difference fix and calculate error in forces. + +Example: +``` +NP=4 #number of processors +mpirun -np $NP lmp_mpi -in.numdiff +``` + +## Required LAMMPS packages: MOLECULE package diff --git a/examples/numdiff/argon.lmp b/examples/numdiff/argon.lmp new file mode 100644 index 0000000000..00214b4c54 --- /dev/null +++ b/examples/numdiff/argon.lmp @@ -0,0 +1,886 @@ +LAMMPS description + + 864 atoms + 0 bonds + 0 angles + 0 dihedrals + 0 impropers + + 1 atom types + 0 bond types + 0 angle types + 0 dihedral types + 0 improper types + + + 0.0000000 32.146000 xlo xhi + 0.0000000 32.146000 ylo yhi + 0.0000000 32.146000 zlo zhi + + Atoms + + 1 1 1 0.0000000 0.0000000 2.6790000 2.6790000 + 2 2 1 0.0000000 0.0000000 2.6790000 8.0360000 + 3 3 1 0.0000000 0.0000000 2.6790000 13.3940000 + 4 4 1 0.0000000 0.0000000 2.6790000 18.7520000 + 5 5 1 0.0000000 0.0000000 2.6790000 24.1090000 + 6 6 1 0.0000000 0.0000000 2.6790000 29.4670000 + 7 7 1 0.0000000 0.0000000 8.0360000 2.6790000 + 8 8 1 0.0000000 0.0000000 8.0360000 8.0360000 + 9 9 1 0.0000000 0.0000000 8.0360000 13.3940000 + 10 10 1 0.0000000 0.0000000 8.0360000 18.7520000 + 11 11 1 0.0000000 0.0000000 8.0360000 24.1090000 + 12 12 1 0.0000000 0.0000000 8.0360000 29.4670000 + 13 13 1 0.0000000 0.0000000 13.3940000 2.6790000 + 14 14 1 0.0000000 0.0000000 13.3940000 8.0360000 + 15 15 1 0.0000000 0.0000000 13.3940000 13.3940000 + 16 16 1 0.0000000 0.0000000 13.3940000 18.7520000 + 17 17 1 0.0000000 0.0000000 13.3940000 24.1090000 + 18 18 1 0.0000000 0.0000000 13.3940000 29.4670000 + 19 19 1 0.0000000 0.0000000 18.7520000 2.6790000 + 20 20 1 0.0000000 0.0000000 18.7520000 8.0360000 + 21 21 1 0.0000000 0.0000000 18.7520000 13.3940000 + 22 22 1 0.0000000 0.0000000 18.7520000 18.7520000 + 23 23 1 0.0000000 0.0000000 18.7520000 24.1090000 + 24 24 1 0.0000000 0.0000000 18.7520000 29.4670000 + 25 25 1 0.0000000 0.0000000 24.1090000 2.6790000 + 26 26 1 0.0000000 0.0000000 24.1090000 8.0360000 + 27 27 1 0.0000000 0.0000000 24.1090000 13.3940000 + 28 28 1 0.0000000 0.0000000 24.1090000 18.7520000 + 29 29 1 0.0000000 0.0000000 24.1090000 24.1090000 + 30 30 1 0.0000000 0.0000000 24.1090000 29.4670000 + 31 31 1 0.0000000 0.0000000 29.4670000 2.6790000 + 32 32 1 0.0000000 0.0000000 29.4670000 8.0360000 + 33 33 1 0.0000000 0.0000000 29.4670000 13.3940000 + 34 34 1 0.0000000 0.0000000 29.4670000 18.7520000 + 35 35 1 0.0000000 0.0000000 29.4670000 24.1090000 + 36 36 1 0.0000000 0.0000000 29.4670000 29.4670000 + 37 37 1 0.0000000 5.3580000 2.6790000 2.6790000 + 38 38 1 0.0000000 5.3580000 2.6790000 8.0360000 + 39 39 1 0.0000000 5.3580000 2.6790000 13.3940000 + 40 40 1 0.0000000 5.3580000 2.6790000 18.7520000 + 41 41 1 0.0000000 5.3580000 2.6790000 24.1090000 + 42 42 1 0.0000000 5.3580000 2.6790000 29.4670000 + 43 43 1 0.0000000 5.3580000 8.0360000 2.6790000 + 44 44 1 0.0000000 5.3580000 8.0360000 8.0360000 + 45 45 1 0.0000000 5.3580000 8.0360000 13.3940000 + 46 46 1 0.0000000 5.3580000 8.0360000 18.7520000 + 47 47 1 0.0000000 5.3580000 8.0360000 24.1090000 + 48 48 1 0.0000000 5.3580000 8.0360000 29.4670000 + 49 49 1 0.0000000 5.3580000 13.3940000 2.6790000 + 50 50 1 0.0000000 5.3580000 13.3940000 8.0360000 + 51 51 1 0.0000000 5.3580000 13.3940000 13.3940000 + 52 52 1 0.0000000 5.3580000 13.3940000 18.7520000 + 53 53 1 0.0000000 5.3580000 13.3940000 24.1090000 + 54 54 1 0.0000000 5.3580000 13.3940000 29.4670000 + 55 55 1 0.0000000 5.3580000 18.7520000 2.6790000 + 56 56 1 0.0000000 5.3580000 18.7520000 8.0360000 + 57 57 1 0.0000000 5.3580000 18.7520000 13.3940000 + 58 58 1 0.0000000 5.3580000 18.7520000 18.7520000 + 59 59 1 0.0000000 5.3580000 18.7520000 24.1090000 + 60 60 1 0.0000000 5.3580000 18.7520000 29.4670000 + 61 61 1 0.0000000 5.3580000 24.1090000 2.6790000 + 62 62 1 0.0000000 5.3580000 24.1090000 8.0360000 + 63 63 1 0.0000000 5.3580000 24.1090000 13.3940000 + 64 64 1 0.0000000 5.3580000 24.1090000 18.7520000 + 65 65 1 0.0000000 5.3580000 24.1090000 24.1090000 + 66 66 1 0.0000000 5.3580000 24.1090000 29.4670000 + 67 67 1 0.0000000 5.3580000 29.4670000 2.6790000 + 68 68 1 0.0000000 5.3580000 29.4670000 8.0360000 + 69 69 1 0.0000000 5.3580000 29.4670000 13.3940000 + 70 70 1 0.0000000 5.3580000 29.4670000 18.7520000 + 71 71 1 0.0000000 5.3580000 29.4670000 24.1090000 + 72 72 1 0.0000000 5.3580000 29.4670000 29.4670000 + 73 73 1 0.0000000 10.7150000 2.6790000 2.6790000 + 74 74 1 0.0000000 10.7150000 2.6790000 8.0360000 + 75 75 1 0.0000000 10.7150000 2.6790000 13.3940000 + 76 76 1 0.0000000 10.7150000 2.6790000 18.7520000 + 77 77 1 0.0000000 10.7150000 2.6790000 24.1090000 + 78 78 1 0.0000000 10.7150000 2.6790000 29.4670000 + 79 79 1 0.0000000 10.7150000 8.0360000 2.6790000 + 80 80 1 0.0000000 10.7150000 8.0360000 8.0360000 + 81 81 1 0.0000000 10.7150000 8.0360000 13.3940000 + 82 82 1 0.0000000 10.7150000 8.0360000 18.7520000 + 83 83 1 0.0000000 10.7150000 8.0360000 24.1090000 + 84 84 1 0.0000000 10.7150000 8.0360000 29.4670000 + 85 85 1 0.0000000 10.7150000 13.3940000 2.6790000 + 86 86 1 0.0000000 10.7150000 13.3940000 8.0360000 + 87 87 1 0.0000000 10.7150000 13.3940000 13.3940000 + 88 88 1 0.0000000 10.7150000 13.3940000 18.7520000 + 89 89 1 0.0000000 10.7150000 13.3940000 24.1090000 + 90 90 1 0.0000000 10.7150000 13.3940000 29.4670000 + 91 91 1 0.0000000 10.7150000 18.7520000 2.6790000 + 92 92 1 0.0000000 10.7150000 18.7520000 8.0360000 + 93 93 1 0.0000000 10.7150000 18.7520000 13.3940000 + 94 94 1 0.0000000 10.7150000 18.7520000 18.7520000 + 95 95 1 0.0000000 10.7150000 18.7520000 24.1090000 + 96 96 1 0.0000000 10.7150000 18.7520000 29.4670000 + 97 97 1 0.0000000 10.7150000 24.1090000 2.6790000 + 98 98 1 0.0000000 10.7150000 24.1090000 8.0360000 + 99 99 1 0.0000000 10.7150000 24.1090000 13.3940000 + 100 100 1 0.0000000 10.7150000 24.1090000 18.7520000 + 101 101 1 0.0000000 10.7150000 24.1090000 24.1090000 + 102 102 1 0.0000000 10.7150000 24.1090000 29.4670000 + 103 103 1 0.0000000 10.7150000 29.4670000 2.6790000 + 104 104 1 0.0000000 10.7150000 29.4670000 8.0360000 + 105 105 1 0.0000000 10.7150000 29.4670000 13.3940000 + 106 106 1 0.0000000 10.7150000 29.4670000 18.7520000 + 107 107 1 0.0000000 10.7150000 29.4670000 24.1090000 + 108 108 1 0.0000000 10.7150000 29.4670000 29.4670000 + 109 109 1 0.0000000 16.0730000 2.6790000 2.6790000 + 110 110 1 0.0000000 16.0730000 2.6790000 8.0360000 + 111 111 1 0.0000000 16.0730000 2.6790000 13.3940000 + 112 112 1 0.0000000 16.0730000 2.6790000 18.7520000 + 113 113 1 0.0000000 16.0730000 2.6790000 24.1090000 + 114 114 1 0.0000000 16.0730000 2.6790000 29.4670000 + 115 115 1 0.0000000 16.0730000 8.0360000 2.6790000 + 116 116 1 0.0000000 16.0730000 8.0360000 8.0360000 + 117 117 1 0.0000000 16.0730000 8.0360000 13.3940000 + 118 118 1 0.0000000 16.0730000 8.0360000 18.7520000 + 119 119 1 0.0000000 16.0730000 8.0360000 24.1090000 + 120 120 1 0.0000000 16.0730000 8.0360000 29.4670000 + 121 121 1 0.0000000 16.0730000 13.3940000 2.6790000 + 122 122 1 0.0000000 16.0730000 13.3940000 8.0360000 + 123 123 1 0.0000000 16.0730000 13.3940000 13.3940000 + 124 124 1 0.0000000 16.0730000 13.3940000 18.7520000 + 125 125 1 0.0000000 16.0730000 13.3940000 24.1090000 + 126 126 1 0.0000000 16.0730000 13.3940000 29.4670000 + 127 127 1 0.0000000 16.0730000 18.7520000 2.6790000 + 128 128 1 0.0000000 16.0730000 18.7520000 8.0360000 + 129 129 1 0.0000000 16.0730000 18.7520000 13.3940000 + 130 130 1 0.0000000 16.0730000 18.7520000 18.7520000 + 131 131 1 0.0000000 16.0730000 18.7520000 24.1090000 + 132 132 1 0.0000000 16.0730000 18.7520000 29.4670000 + 133 133 1 0.0000000 16.0730000 24.1090000 2.6790000 + 134 134 1 0.0000000 16.0730000 24.1090000 8.0360000 + 135 135 1 0.0000000 16.0730000 24.1090000 13.3940000 + 136 136 1 0.0000000 16.0730000 24.1090000 18.7520000 + 137 137 1 0.0000000 16.0730000 24.1090000 24.1090000 + 138 138 1 0.0000000 16.0730000 24.1090000 29.4670000 + 139 139 1 0.0000000 16.0730000 29.4670000 2.6790000 + 140 140 1 0.0000000 16.0730000 29.4670000 8.0360000 + 141 141 1 0.0000000 16.0730000 29.4670000 13.3940000 + 142 142 1 0.0000000 16.0730000 29.4670000 18.7520000 + 143 143 1 0.0000000 16.0730000 29.4670000 24.1090000 + 144 144 1 0.0000000 16.0730000 29.4670000 29.4670000 + 145 145 1 0.0000000 21.4310000 2.6790000 2.6790000 + 146 146 1 0.0000000 21.4310000 2.6790000 8.0360000 + 147 147 1 0.0000000 21.4310000 2.6790000 13.3940000 + 148 148 1 0.0000000 21.4310000 2.6790000 18.7520000 + 149 149 1 0.0000000 21.4310000 2.6790000 24.1090000 + 150 150 1 0.0000000 21.4310000 2.6790000 29.4670000 + 151 151 1 0.0000000 21.4310000 8.0360000 2.6790000 + 152 152 1 0.0000000 21.4310000 8.0360000 8.0360000 + 153 153 1 0.0000000 21.4310000 8.0360000 13.3940000 + 154 154 1 0.0000000 21.4310000 8.0360000 18.7520000 + 155 155 1 0.0000000 21.4310000 8.0360000 24.1090000 + 156 156 1 0.0000000 21.4310000 8.0360000 29.4670000 + 157 157 1 0.0000000 21.4310000 13.3940000 2.6790000 + 158 158 1 0.0000000 21.4310000 13.3940000 8.0360000 + 159 159 1 0.0000000 21.4310000 13.3940000 13.3940000 + 160 160 1 0.0000000 21.4310000 13.3940000 18.7520000 + 161 161 1 0.0000000 21.4310000 13.3940000 24.1090000 + 162 162 1 0.0000000 21.4310000 13.3940000 29.4670000 + 163 163 1 0.0000000 21.4310000 18.7520000 2.6790000 + 164 164 1 0.0000000 21.4310000 18.7520000 8.0360000 + 165 165 1 0.0000000 21.4310000 18.7520000 13.3940000 + 166 166 1 0.0000000 21.4310000 18.7520000 18.7520000 + 167 167 1 0.0000000 21.4310000 18.7520000 24.1090000 + 168 168 1 0.0000000 21.4310000 18.7520000 29.4670000 + 169 169 1 0.0000000 21.4310000 24.1090000 2.6790000 + 170 170 1 0.0000000 21.4310000 24.1090000 8.0360000 + 171 171 1 0.0000000 21.4310000 24.1090000 13.3940000 + 172 172 1 0.0000000 21.4310000 24.1090000 18.7520000 + 173 173 1 0.0000000 21.4310000 24.1090000 24.1090000 + 174 174 1 0.0000000 21.4310000 24.1090000 29.4670000 + 175 175 1 0.0000000 21.4310000 29.4670000 2.6790000 + 176 176 1 0.0000000 21.4310000 29.4670000 8.0360000 + 177 177 1 0.0000000 21.4310000 29.4670000 13.3940000 + 178 178 1 0.0000000 21.4310000 29.4670000 18.7520000 + 179 179 1 0.0000000 21.4310000 29.4670000 24.1090000 + 180 180 1 0.0000000 21.4310000 29.4670000 29.4670000 + 181 181 1 0.0000000 26.7880000 2.6790000 2.6790000 + 182 182 1 0.0000000 26.7880000 2.6790000 8.0360000 + 183 183 1 0.0000000 26.7880000 2.6790000 13.3940000 + 184 184 1 0.0000000 26.7880000 2.6790000 18.7520000 + 185 185 1 0.0000000 26.7880000 2.6790000 24.1090000 + 186 186 1 0.0000000 26.7880000 2.6790000 29.4670000 + 187 187 1 0.0000000 26.7880000 8.0360000 2.6790000 + 188 188 1 0.0000000 26.7880000 8.0360000 8.0360000 + 189 189 1 0.0000000 26.7880000 8.0360000 13.3940000 + 190 190 1 0.0000000 26.7880000 8.0360000 18.7520000 + 191 191 1 0.0000000 26.7880000 8.0360000 24.1090000 + 192 192 1 0.0000000 26.7880000 8.0360000 29.4670000 + 193 193 1 0.0000000 26.7880000 13.3940000 2.6790000 + 194 194 1 0.0000000 26.7880000 13.3940000 8.0360000 + 195 195 1 0.0000000 26.7880000 13.3940000 13.3940000 + 196 196 1 0.0000000 26.7880000 13.3940000 18.7520000 + 197 197 1 0.0000000 26.7880000 13.3940000 24.1090000 + 198 198 1 0.0000000 26.7880000 13.3940000 29.4670000 + 199 199 1 0.0000000 26.7880000 18.7520000 2.6790000 + 200 200 1 0.0000000 26.7880000 18.7520000 8.0360000 + 201 201 1 0.0000000 26.7880000 18.7520000 13.3940000 + 202 202 1 0.0000000 26.7880000 18.7520000 18.7520000 + 203 203 1 0.0000000 26.7880000 18.7520000 24.1090000 + 204 204 1 0.0000000 26.7880000 18.7520000 29.4670000 + 205 205 1 0.0000000 26.7880000 24.1090000 2.6790000 + 206 206 1 0.0000000 26.7880000 24.1090000 8.0360000 + 207 207 1 0.0000000 26.7880000 24.1090000 13.3940000 + 208 208 1 0.0000000 26.7880000 24.1090000 18.7520000 + 209 209 1 0.0000000 26.7880000 24.1090000 24.1090000 + 210 210 1 0.0000000 26.7880000 24.1090000 29.4670000 + 211 211 1 0.0000000 26.7880000 29.4670000 2.6790000 + 212 212 1 0.0000000 26.7880000 29.4670000 8.0360000 + 213 213 1 0.0000000 26.7880000 29.4670000 13.3940000 + 214 214 1 0.0000000 26.7880000 29.4670000 18.7520000 + 215 215 1 0.0000000 26.7880000 29.4670000 24.1090000 + 216 216 1 0.0000000 26.7880000 29.4670000 29.4670000 + 217 217 1 0.0000000 2.6790000 5.3580000 2.6790000 + 218 218 1 0.0000000 2.6790000 5.3580000 8.0360000 + 219 219 1 0.0000000 2.6790000 5.3580000 13.3940000 + 220 220 1 0.0000000 2.6790000 5.3580000 18.7520000 + 221 221 1 0.0000000 2.6790000 5.3580000 24.1090000 + 222 222 1 0.0000000 2.6790000 5.3580000 29.4670000 + 223 223 1 0.0000000 2.6790000 10.7150000 2.6790000 + 224 224 1 0.0000000 2.6790000 10.7150000 8.0360000 + 225 225 1 0.0000000 2.6790000 10.7150000 13.3940000 + 226 226 1 0.0000000 2.6790000 10.7150000 18.7520000 + 227 227 1 0.0000000 2.6790000 10.7150000 24.1090000 + 228 228 1 0.0000000 2.6790000 10.7150000 29.4670000 + 229 229 1 0.0000000 2.6790000 16.0730000 2.6790000 + 230 230 1 0.0000000 2.6790000 16.0730000 8.0360000 + 231 231 1 0.0000000 2.6790000 16.0730000 13.3940000 + 232 232 1 0.0000000 2.6790000 16.0730000 18.7520000 + 233 233 1 0.0000000 2.6790000 16.0730000 24.1090000 + 234 234 1 0.0000000 2.6790000 16.0730000 29.4670000 + 235 235 1 0.0000000 2.6790000 21.4310000 2.6790000 + 236 236 1 0.0000000 2.6790000 21.4310000 8.0360000 + 237 237 1 0.0000000 2.6790000 21.4310000 13.3940000 + 238 238 1 0.0000000 2.6790000 21.4310000 18.7520000 + 239 239 1 0.0000000 2.6790000 21.4310000 24.1090000 + 240 240 1 0.0000000 2.6790000 21.4310000 29.4670000 + 241 241 1 0.0000000 2.6790000 26.7880000 2.6790000 + 242 242 1 0.0000000 2.6790000 26.7880000 8.0360000 + 243 243 1 0.0000000 2.6790000 26.7880000 13.3940000 + 244 244 1 0.0000000 2.6790000 26.7880000 18.7520000 + 245 245 1 0.0000000 2.6790000 26.7880000 24.1090000 + 246 246 1 0.0000000 2.6790000 26.7880000 29.4670000 + 247 247 1 0.0000000 2.6790000 32.1460000 2.6790000 + 248 248 1 0.0000000 2.6790000 32.1460000 8.0360000 + 249 249 1 0.0000000 2.6790000 32.1460000 13.3940000 + 250 250 1 0.0000000 2.6790000 32.1460000 18.7520000 + 251 251 1 0.0000000 2.6790000 32.1460000 24.1090000 + 252 252 1 0.0000000 2.6790000 32.1460000 29.4670000 + 253 253 1 0.0000000 8.0360000 5.3580000 2.6790000 + 254 254 1 0.0000000 8.0360000 5.3580000 8.0360000 + 255 255 1 0.0000000 8.0360000 5.3580000 13.3940000 + 256 256 1 0.0000000 8.0360000 5.3580000 18.7520000 + 257 257 1 0.0000000 8.0360000 5.3580000 24.1090000 + 258 258 1 0.0000000 8.0360000 5.3580000 29.4670000 + 259 259 1 0.0000000 8.0360000 10.7150000 2.6790000 + 260 260 1 0.0000000 8.0360000 10.7150000 8.0360000 + 261 261 1 0.0000000 8.0360000 10.7150000 13.3940000 + 262 262 1 0.0000000 8.0360000 10.7150000 18.7520000 + 263 263 1 0.0000000 8.0360000 10.7150000 24.1090000 + 264 264 1 0.0000000 8.0360000 10.7150000 29.4670000 + 265 265 1 0.0000000 8.0360000 16.0730000 2.6790000 + 266 266 1 0.0000000 8.0360000 16.0730000 8.0360000 + 267 267 1 0.0000000 8.0360000 16.0730000 13.3940000 + 268 268 1 0.0000000 8.0360000 16.0730000 18.7520000 + 269 269 1 0.0000000 8.0360000 16.0730000 24.1090000 + 270 270 1 0.0000000 8.0360000 16.0730000 29.4670000 + 271 271 1 0.0000000 8.0360000 21.4310000 2.6790000 + 272 272 1 0.0000000 8.0360000 21.4310000 8.0360000 + 273 273 1 0.0000000 8.0360000 21.4310000 13.3940000 + 274 274 1 0.0000000 8.0360000 21.4310000 18.7520000 + 275 275 1 0.0000000 8.0360000 21.4310000 24.1090000 + 276 276 1 0.0000000 8.0360000 21.4310000 29.4670000 + 277 277 1 0.0000000 8.0360000 26.7880000 2.6790000 + 278 278 1 0.0000000 8.0360000 26.7880000 8.0360000 + 279 279 1 0.0000000 8.0360000 26.7880000 13.3940000 + 280 280 1 0.0000000 8.0360000 26.7880000 18.7520000 + 281 281 1 0.0000000 8.0360000 26.7880000 24.1090000 + 282 282 1 0.0000000 8.0360000 26.7880000 29.4670000 + 283 283 1 0.0000000 8.0360000 32.1460000 2.6790000 + 284 284 1 0.0000000 8.0360000 32.1460000 8.0360000 + 285 285 1 0.0000000 8.0360000 32.1460000 13.3940000 + 286 286 1 0.0000000 8.0360000 32.1460000 18.7520000 + 287 287 1 0.0000000 8.0360000 32.1460000 24.1090000 + 288 288 1 0.0000000 8.0360000 32.1460000 29.4670000 + 289 289 1 0.0000000 13.3940000 5.3580000 2.6790000 + 290 290 1 0.0000000 13.3940000 5.3580000 8.0360000 + 291 291 1 0.0000000 13.3940000 5.3580000 13.3940000 + 292 292 1 0.0000000 13.3940000 5.3580000 18.7520000 + 293 293 1 0.0000000 13.3940000 5.3580000 24.1090000 + 294 294 1 0.0000000 13.3940000 5.3580000 29.4670000 + 295 295 1 0.0000000 13.3940000 10.7150000 2.6790000 + 296 296 1 0.0000000 13.3940000 10.7150000 8.0360000 + 297 297 1 0.0000000 13.3940000 10.7150000 13.3940000 + 298 298 1 0.0000000 13.3940000 10.7150000 18.7520000 + 299 299 1 0.0000000 13.3940000 10.7150000 24.1090000 + 300 300 1 0.0000000 13.3940000 10.7150000 29.4670000 + 301 301 1 0.0000000 13.3940000 16.0730000 2.6790000 + 302 302 1 0.0000000 13.3940000 16.0730000 8.0360000 + 303 303 1 0.0000000 13.3940000 16.0730000 13.3940000 + 304 304 1 0.0000000 13.3940000 16.0730000 18.7520000 + 305 305 1 0.0000000 13.3940000 16.0730000 24.1090000 + 306 306 1 0.0000000 13.3940000 16.0730000 29.4670000 + 307 307 1 0.0000000 13.3940000 21.4310000 2.6790000 + 308 308 1 0.0000000 13.3940000 21.4310000 8.0360000 + 309 309 1 0.0000000 13.3940000 21.4310000 13.3940000 + 310 310 1 0.0000000 13.3940000 21.4310000 18.7520000 + 311 311 1 0.0000000 13.3940000 21.4310000 24.1090000 + 312 312 1 0.0000000 13.3940000 21.4310000 29.4670000 + 313 313 1 0.0000000 13.3940000 26.7880000 2.6790000 + 314 314 1 0.0000000 13.3940000 26.7880000 8.0360000 + 315 315 1 0.0000000 13.3940000 26.7880000 13.3940000 + 316 316 1 0.0000000 13.3940000 26.7880000 18.7520000 + 317 317 1 0.0000000 13.3940000 26.7880000 24.1090000 + 318 318 1 0.0000000 13.3940000 26.7880000 29.4670000 + 319 319 1 0.0000000 13.3940000 32.1460000 2.6790000 + 320 320 1 0.0000000 13.3940000 32.1460000 8.0360000 + 321 321 1 0.0000000 13.3940000 32.1460000 13.3940000 + 322 322 1 0.0000000 13.3940000 32.1460000 18.7520000 + 323 323 1 0.0000000 13.3940000 32.1460000 24.1090000 + 324 324 1 0.0000000 13.3940000 32.1460000 29.4670000 + 325 325 1 0.0000000 18.7520000 5.3580000 2.6790000 + 326 326 1 0.0000000 18.7520000 5.3580000 8.0360000 + 327 327 1 0.0000000 18.7520000 5.3580000 13.3940000 + 328 328 1 0.0000000 18.7520000 5.3580000 18.7520000 + 329 329 1 0.0000000 18.7520000 5.3580000 24.1090000 + 330 330 1 0.0000000 18.7520000 5.3580000 29.4670000 + 331 331 1 0.0000000 18.7520000 10.7150000 2.6790000 + 332 332 1 0.0000000 18.7520000 10.7150000 8.0360000 + 333 333 1 0.0000000 18.7520000 10.7150000 13.3940000 + 334 334 1 0.0000000 18.7520000 10.7150000 18.7520000 + 335 335 1 0.0000000 18.7520000 10.7150000 24.1090000 + 336 336 1 0.0000000 18.7520000 10.7150000 29.4670000 + 337 337 1 0.0000000 18.7520000 16.0730000 2.6790000 + 338 338 1 0.0000000 18.7520000 16.0730000 8.0360000 + 339 339 1 0.0000000 18.7520000 16.0730000 13.3940000 + 340 340 1 0.0000000 18.7520000 16.0730000 18.7520000 + 341 341 1 0.0000000 18.7520000 16.0730000 24.1090000 + 342 342 1 0.0000000 18.7520000 16.0730000 29.4670000 + 343 343 1 0.0000000 18.7520000 21.4310000 2.6790000 + 344 344 1 0.0000000 18.7520000 21.4310000 8.0360000 + 345 345 1 0.0000000 18.7520000 21.4310000 13.3940000 + 346 346 1 0.0000000 18.7520000 21.4310000 18.7520000 + 347 347 1 0.0000000 18.7520000 21.4310000 24.1090000 + 348 348 1 0.0000000 18.7520000 21.4310000 29.4670000 + 349 349 1 0.0000000 18.7520000 26.7880000 2.6790000 + 350 350 1 0.0000000 18.7520000 26.7880000 8.0360000 + 351 351 1 0.0000000 18.7520000 26.7880000 13.3940000 + 352 352 1 0.0000000 18.7520000 26.7880000 18.7520000 + 353 353 1 0.0000000 18.7520000 26.7880000 24.1090000 + 354 354 1 0.0000000 18.7520000 26.7880000 29.4670000 + 355 355 1 0.0000000 18.7520000 32.1460000 2.6790000 + 356 356 1 0.0000000 18.7520000 32.1460000 8.0360000 + 357 357 1 0.0000000 18.7520000 32.1460000 13.3940000 + 358 358 1 0.0000000 18.7520000 32.1460000 18.7520000 + 359 359 1 0.0000000 18.7520000 32.1460000 24.1090000 + 360 360 1 0.0000000 18.7520000 32.1460000 29.4670000 + 361 361 1 0.0000000 24.1090000 5.3580000 2.6790000 + 362 362 1 0.0000000 24.1090000 5.3580000 8.0360000 + 363 363 1 0.0000000 24.1090000 5.3580000 13.3940000 + 364 364 1 0.0000000 24.1090000 5.3580000 18.7520000 + 365 365 1 0.0000000 24.1090000 5.3580000 24.1090000 + 366 366 1 0.0000000 24.1090000 5.3580000 29.4670000 + 367 367 1 0.0000000 24.1090000 10.7150000 2.6790000 + 368 368 1 0.0000000 24.1090000 10.7150000 8.0360000 + 369 369 1 0.0000000 24.1090000 10.7150000 13.3940000 + 370 370 1 0.0000000 24.1090000 10.7150000 18.7520000 + 371 371 1 0.0000000 24.1090000 10.7150000 24.1090000 + 372 372 1 0.0000000 24.1090000 10.7150000 29.4670000 + 373 373 1 0.0000000 24.1090000 16.0730000 2.6790000 + 374 374 1 0.0000000 24.1090000 16.0730000 8.0360000 + 375 375 1 0.0000000 24.1090000 16.0730000 13.3940000 + 376 376 1 0.0000000 24.1090000 16.0730000 18.7520000 + 377 377 1 0.0000000 24.1090000 16.0730000 24.1090000 + 378 378 1 0.0000000 24.1090000 16.0730000 29.4670000 + 379 379 1 0.0000000 24.1090000 21.4310000 2.6790000 + 380 380 1 0.0000000 24.1090000 21.4310000 8.0360000 + 381 381 1 0.0000000 24.1090000 21.4310000 13.3940000 + 382 382 1 0.0000000 24.1090000 21.4310000 18.7520000 + 383 383 1 0.0000000 24.1090000 21.4310000 24.1090000 + 384 384 1 0.0000000 24.1090000 21.4310000 29.4670000 + 385 385 1 0.0000000 24.1090000 26.7880000 2.6790000 + 386 386 1 0.0000000 24.1090000 26.7880000 8.0360000 + 387 387 1 0.0000000 24.1090000 26.7880000 13.3940000 + 388 388 1 0.0000000 24.1090000 26.7880000 18.7520000 + 389 389 1 0.0000000 24.1090000 26.7880000 24.1090000 + 390 390 1 0.0000000 24.1090000 26.7880000 29.4670000 + 391 391 1 0.0000000 24.1090000 32.1460000 2.6790000 + 392 392 1 0.0000000 24.1090000 32.1460000 8.0360000 + 393 393 1 0.0000000 24.1090000 32.1460000 13.3940000 + 394 394 1 0.0000000 24.1090000 32.1460000 18.7520000 + 395 395 1 0.0000000 24.1090000 32.1460000 24.1090000 + 396 396 1 0.0000000 24.1090000 32.1460000 29.4670000 + 397 397 1 0.0000000 29.4670000 5.3580000 2.6790000 + 398 398 1 0.0000000 29.4670000 5.3580000 8.0360000 + 399 399 1 0.0000000 29.4670000 5.3580000 13.3940000 + 400 400 1 0.0000000 29.4670000 5.3580000 18.7520000 + 401 401 1 0.0000000 29.4670000 5.3580000 24.1090000 + 402 402 1 0.0000000 29.4670000 5.3580000 29.4670000 + 403 403 1 0.0000000 29.4670000 10.7150000 2.6790000 + 404 404 1 0.0000000 29.4670000 10.7150000 8.0360000 + 405 405 1 0.0000000 29.4670000 10.7150000 13.3940000 + 406 406 1 0.0000000 29.4670000 10.7150000 18.7520000 + 407 407 1 0.0000000 29.4670000 10.7150000 24.1090000 + 408 408 1 0.0000000 29.4670000 10.7150000 29.4670000 + 409 409 1 0.0000000 29.4670000 16.0730000 2.6790000 + 410 410 1 0.0000000 29.4670000 16.0730000 8.0360000 + 411 411 1 0.0000000 29.4670000 16.0730000 13.3940000 + 412 412 1 0.0000000 29.4670000 16.0730000 18.7520000 + 413 413 1 0.0000000 29.4670000 16.0730000 24.1090000 + 414 414 1 0.0000000 29.4670000 16.0730000 29.4670000 + 415 415 1 0.0000000 29.4670000 21.4310000 2.6790000 + 416 416 1 0.0000000 29.4670000 21.4310000 8.0360000 + 417 417 1 0.0000000 29.4670000 21.4310000 13.3940000 + 418 418 1 0.0000000 29.4670000 21.4310000 18.7520000 + 419 419 1 0.0000000 29.4670000 21.4310000 24.1090000 + 420 420 1 0.0000000 29.4670000 21.4310000 29.4670000 + 421 421 1 0.0000000 29.4670000 26.7880000 2.6790000 + 422 422 1 0.0000000 29.4670000 26.7880000 8.0360000 + 423 423 1 0.0000000 29.4670000 26.7880000 13.3940000 + 424 424 1 0.0000000 29.4670000 26.7880000 18.7520000 + 425 425 1 0.0000000 29.4670000 26.7880000 24.1090000 + 426 426 1 0.0000000 29.4670000 26.7880000 29.4670000 + 427 427 1 0.0000000 29.4670000 32.1460000 2.6790000 + 428 428 1 0.0000000 29.4670000 32.1460000 8.0360000 + 429 429 1 0.0000000 29.4670000 32.1460000 13.3940000 + 430 430 1 0.0000000 29.4670000 32.1460000 18.7520000 + 431 431 1 0.0000000 29.4670000 32.1460000 24.1090000 + 432 432 1 0.0000000 29.4670000 32.1460000 29.4670000 + 433 433 1 0.0000000 2.6790000 2.6790000 5.3580000 + 434 434 1 0.0000000 2.6790000 2.6790000 10.7150000 + 435 435 1 0.0000000 2.6790000 2.6790000 16.0730000 + 436 436 1 0.0000000 2.6790000 2.6790000 21.4310000 + 437 437 1 0.0000000 2.6790000 2.6790000 26.7880000 + 438 438 1 0.0000000 2.6790000 2.6790000 32.1460000 + 439 439 1 0.0000000 2.6790000 8.0360000 5.3580000 + 440 440 1 0.0000000 2.6790000 8.0360000 10.7150000 + 441 441 1 0.0000000 2.6790000 8.0360000 16.0730000 + 442 442 1 0.0000000 2.6790000 8.0360000 21.4310000 + 443 443 1 0.0000000 2.6790000 8.0360000 26.7880000 + 444 444 1 0.0000000 2.6790000 8.0360000 32.1460000 + 445 445 1 0.0000000 2.6790000 13.3940000 5.3580000 + 446 446 1 0.0000000 2.6790000 13.3940000 10.7150000 + 447 447 1 0.0000000 2.6790000 13.3940000 16.0730000 + 448 448 1 0.0000000 2.6790000 13.3940000 21.4310000 + 449 449 1 0.0000000 2.6790000 13.3940000 26.7880000 + 450 450 1 0.0000000 2.6790000 13.3940000 32.1460000 + 451 451 1 0.0000000 2.6790000 18.7520000 5.3580000 + 452 452 1 0.0000000 2.6790000 18.7520000 10.7150000 + 453 453 1 0.0000000 2.6790000 18.7520000 16.0730000 + 454 454 1 0.0000000 2.6790000 18.7520000 21.4310000 + 455 455 1 0.0000000 2.6790000 18.7520000 26.7880000 + 456 456 1 0.0000000 2.6790000 18.7520000 32.1460000 + 457 457 1 0.0000000 2.6790000 24.1090000 5.3580000 + 458 458 1 0.0000000 2.6790000 24.1090000 10.7150000 + 459 459 1 0.0000000 2.6790000 24.1090000 16.0730000 + 460 460 1 0.0000000 2.6790000 24.1090000 21.4310000 + 461 461 1 0.0000000 2.6790000 24.1090000 26.7880000 + 462 462 1 0.0000000 2.6790000 24.1090000 32.1460000 + 463 463 1 0.0000000 2.6790000 29.4670000 5.3580000 + 464 464 1 0.0000000 2.6790000 29.4670000 10.7150000 + 465 465 1 0.0000000 2.6790000 29.4670000 16.0730000 + 466 466 1 0.0000000 2.6790000 29.4670000 21.4310000 + 467 467 1 0.0000000 2.6790000 29.4670000 26.7880000 + 468 468 1 0.0000000 2.6790000 29.4670000 32.1460000 + 469 469 1 0.0000000 8.0360000 2.6790000 5.3580000 + 470 470 1 0.0000000 8.0360000 2.6790000 10.7150000 + 471 471 1 0.0000000 8.0360000 2.6790000 16.0730000 + 472 472 1 0.0000000 8.0360000 2.6790000 21.4310000 + 473 473 1 0.0000000 8.0360000 2.6790000 26.7880000 + 474 474 1 0.0000000 8.0360000 2.6790000 32.1460000 + 475 475 1 0.0000000 8.0360000 8.0360000 5.3580000 + 476 476 1 0.0000000 8.0360000 8.0360000 10.7150000 + 477 477 1 0.0000000 8.0360000 8.0360000 16.0730000 + 478 478 1 0.0000000 8.0360000 8.0360000 21.4310000 + 479 479 1 0.0000000 8.0360000 8.0360000 26.7880000 + 480 480 1 0.0000000 8.0360000 8.0360000 32.1460000 + 481 481 1 0.0000000 8.0360000 13.3940000 5.3580000 + 482 482 1 0.0000000 8.0360000 13.3940000 10.7150000 + 483 483 1 0.0000000 8.0360000 13.3940000 16.0730000 + 484 484 1 0.0000000 8.0360000 13.3940000 21.4310000 + 485 485 1 0.0000000 8.0360000 13.3940000 26.7880000 + 486 486 1 0.0000000 8.0360000 13.3940000 32.1460000 + 487 487 1 0.0000000 8.0360000 18.7520000 5.3580000 + 488 488 1 0.0000000 8.0360000 18.7520000 10.7150000 + 489 489 1 0.0000000 8.0360000 18.7520000 16.0730000 + 490 490 1 0.0000000 8.0360000 18.7520000 21.4310000 + 491 491 1 0.0000000 8.0360000 18.7520000 26.7880000 + 492 492 1 0.0000000 8.0360000 18.7520000 32.1460000 + 493 493 1 0.0000000 8.0360000 24.1090000 5.3580000 + 494 494 1 0.0000000 8.0360000 24.1090000 10.7150000 + 495 495 1 0.0000000 8.0360000 24.1090000 16.0730000 + 496 496 1 0.0000000 8.0360000 24.1090000 21.4310000 + 497 497 1 0.0000000 8.0360000 24.1090000 26.7880000 + 498 498 1 0.0000000 8.0360000 24.1090000 32.1460000 + 499 499 1 0.0000000 8.0360000 29.4670000 5.3580000 + 500 500 1 0.0000000 8.0360000 29.4670000 10.7150000 + 501 501 1 0.0000000 8.0360000 29.4670000 16.0730000 + 502 502 1 0.0000000 8.0360000 29.4670000 21.4310000 + 503 503 1 0.0000000 8.0360000 29.4670000 26.7880000 + 504 504 1 0.0000000 8.0360000 29.4670000 32.1460000 + 505 505 1 0.0000000 13.3940000 2.6790000 5.3580000 + 506 506 1 0.0000000 13.3940000 2.6790000 10.7150000 + 507 507 1 0.0000000 13.3940000 2.6790000 16.0730000 + 508 508 1 0.0000000 13.3940000 2.6790000 21.4310000 + 509 509 1 0.0000000 13.3940000 2.6790000 26.7880000 + 510 510 1 0.0000000 13.3940000 2.6790000 32.1460000 + 511 511 1 0.0000000 13.3940000 8.0360000 5.3580000 + 512 512 1 0.0000000 13.3940000 8.0360000 10.7150000 + 513 513 1 0.0000000 13.3940000 8.0360000 16.0730000 + 514 514 1 0.0000000 13.3940000 8.0360000 21.4310000 + 515 515 1 0.0000000 13.3940000 8.0360000 26.7880000 + 516 516 1 0.0000000 13.3940000 8.0360000 32.1460000 + 517 517 1 0.0000000 13.3940000 13.3940000 5.3580000 + 518 518 1 0.0000000 13.3940000 13.3940000 10.7150000 + 519 519 1 0.0000000 13.3940000 13.3940000 16.0730000 + 520 520 1 0.0000000 13.3940000 13.3940000 21.4310000 + 521 521 1 0.0000000 13.3940000 13.3940000 26.7880000 + 522 522 1 0.0000000 13.3940000 13.3940000 32.1460000 + 523 523 1 0.0000000 13.3940000 18.7520000 5.3580000 + 524 524 1 0.0000000 13.3940000 18.7520000 10.7150000 + 525 525 1 0.0000000 13.3940000 18.7520000 16.0730000 + 526 526 1 0.0000000 13.3940000 18.7520000 21.4310000 + 527 527 1 0.0000000 13.3940000 18.7520000 26.7880000 + 528 528 1 0.0000000 13.3940000 18.7520000 32.1460000 + 529 529 1 0.0000000 13.3940000 24.1090000 5.3580000 + 530 530 1 0.0000000 13.3940000 24.1090000 10.7150000 + 531 531 1 0.0000000 13.3940000 24.1090000 16.0730000 + 532 532 1 0.0000000 13.3940000 24.1090000 21.4310000 + 533 533 1 0.0000000 13.3940000 24.1090000 26.7880000 + 534 534 1 0.0000000 13.3940000 24.1090000 32.1460000 + 535 535 1 0.0000000 13.3940000 29.4670000 5.3580000 + 536 536 1 0.0000000 13.3940000 29.4670000 10.7150000 + 537 537 1 0.0000000 13.3940000 29.4670000 16.0730000 + 538 538 1 0.0000000 13.3940000 29.4670000 21.4310000 + 539 539 1 0.0000000 13.3940000 29.4670000 26.7880000 + 540 540 1 0.0000000 13.3940000 29.4670000 32.1460000 + 541 541 1 0.0000000 18.7520000 2.6790000 5.3580000 + 542 542 1 0.0000000 18.7520000 2.6790000 10.7150000 + 543 543 1 0.0000000 18.7520000 2.6790000 16.0730000 + 544 544 1 0.0000000 18.7520000 2.6790000 21.4310000 + 545 545 1 0.0000000 18.7520000 2.6790000 26.7880000 + 546 546 1 0.0000000 18.7520000 2.6790000 32.1460000 + 547 547 1 0.0000000 18.7520000 8.0360000 5.3580000 + 548 548 1 0.0000000 18.7520000 8.0360000 10.7150000 + 549 549 1 0.0000000 18.7520000 8.0360000 16.0730000 + 550 550 1 0.0000000 18.7520000 8.0360000 21.4310000 + 551 551 1 0.0000000 18.7520000 8.0360000 26.7880000 + 552 552 1 0.0000000 18.7520000 8.0360000 32.1460000 + 553 553 1 0.0000000 18.7520000 13.3940000 5.3580000 + 554 554 1 0.0000000 18.7520000 13.3940000 10.7150000 + 555 555 1 0.0000000 18.7520000 13.3940000 16.0730000 + 556 556 1 0.0000000 18.7520000 13.3940000 21.4310000 + 557 557 1 0.0000000 18.7520000 13.3940000 26.7880000 + 558 558 1 0.0000000 18.7520000 13.3940000 32.1460000 + 559 559 1 0.0000000 18.7520000 18.7520000 5.3580000 + 560 560 1 0.0000000 18.7520000 18.7520000 10.7150000 + 561 561 1 0.0000000 18.7520000 18.7520000 16.0730000 + 562 562 1 0.0000000 18.7520000 18.7520000 21.4310000 + 563 563 1 0.0000000 18.7520000 18.7520000 26.7880000 + 564 564 1 0.0000000 18.7520000 18.7520000 32.1460000 + 565 565 1 0.0000000 18.7520000 24.1090000 5.3580000 + 566 566 1 0.0000000 18.7520000 24.1090000 10.7150000 + 567 567 1 0.0000000 18.7520000 24.1090000 16.0730000 + 568 568 1 0.0000000 18.7520000 24.1090000 21.4310000 + 569 569 1 0.0000000 18.7520000 24.1090000 26.7880000 + 570 570 1 0.0000000 18.7520000 24.1090000 32.1460000 + 571 571 1 0.0000000 18.7520000 29.4670000 5.3580000 + 572 572 1 0.0000000 18.7520000 29.4670000 10.7150000 + 573 573 1 0.0000000 18.7520000 29.4670000 16.0730000 + 574 574 1 0.0000000 18.7520000 29.4670000 21.4310000 + 575 575 1 0.0000000 18.7520000 29.4670000 26.7880000 + 576 576 1 0.0000000 18.7520000 29.4670000 32.1460000 + 577 577 1 0.0000000 24.1090000 2.6790000 5.3580000 + 578 578 1 0.0000000 24.1090000 2.6790000 10.7150000 + 579 579 1 0.0000000 24.1090000 2.6790000 16.0730000 + 580 580 1 0.0000000 24.1090000 2.6790000 21.4310000 + 581 581 1 0.0000000 24.1090000 2.6790000 26.7880000 + 582 582 1 0.0000000 24.1090000 2.6790000 32.1460000 + 583 583 1 0.0000000 24.1090000 8.0360000 5.3580000 + 584 584 1 0.0000000 24.1090000 8.0360000 10.7150000 + 585 585 1 0.0000000 24.1090000 8.0360000 16.0730000 + 586 586 1 0.0000000 24.1090000 8.0360000 21.4310000 + 587 587 1 0.0000000 24.1090000 8.0360000 26.7880000 + 588 588 1 0.0000000 24.1090000 8.0360000 32.1460000 + 589 589 1 0.0000000 24.1090000 13.3940000 5.3580000 + 590 590 1 0.0000000 24.1090000 13.3940000 10.7150000 + 591 591 1 0.0000000 24.1090000 13.3940000 16.0730000 + 592 592 1 0.0000000 24.1090000 13.3940000 21.4310000 + 593 593 1 0.0000000 24.1090000 13.3940000 26.7880000 + 594 594 1 0.0000000 24.1090000 13.3940000 32.1460000 + 595 595 1 0.0000000 24.1090000 18.7520000 5.3580000 + 596 596 1 0.0000000 24.1090000 18.7520000 10.7150000 + 597 597 1 0.0000000 24.1090000 18.7520000 16.0730000 + 598 598 1 0.0000000 24.1090000 18.7520000 21.4310000 + 599 599 1 0.0000000 24.1090000 18.7520000 26.7880000 + 600 600 1 0.0000000 24.1090000 18.7520000 32.1460000 + 601 601 1 0.0000000 24.1090000 24.1090000 5.3580000 + 602 602 1 0.0000000 24.1090000 24.1090000 10.7150000 + 603 603 1 0.0000000 24.1090000 24.1090000 16.0730000 + 604 604 1 0.0000000 24.1090000 24.1090000 21.4310000 + 605 605 1 0.0000000 24.1090000 24.1090000 26.7880000 + 606 606 1 0.0000000 24.1090000 24.1090000 32.1460000 + 607 607 1 0.0000000 24.1090000 29.4670000 5.3580000 + 608 608 1 0.0000000 24.1090000 29.4670000 10.7150000 + 609 609 1 0.0000000 24.1090000 29.4670000 16.0730000 + 610 610 1 0.0000000 24.1090000 29.4670000 21.4310000 + 611 611 1 0.0000000 24.1090000 29.4670000 26.7880000 + 612 612 1 0.0000000 24.1090000 29.4670000 32.1460000 + 613 613 1 0.0000000 29.4670000 2.6790000 5.3580000 + 614 614 1 0.0000000 29.4670000 2.6790000 10.7150000 + 615 615 1 0.0000000 29.4670000 2.6790000 16.0730000 + 616 616 1 0.0000000 29.4670000 2.6790000 21.4310000 + 617 617 1 0.0000000 29.4670000 2.6790000 26.7880000 + 618 618 1 0.0000000 29.4670000 2.6790000 32.1460000 + 619 619 1 0.0000000 29.4670000 8.0360000 5.3580000 + 620 620 1 0.0000000 29.4670000 8.0360000 10.7150000 + 621 621 1 0.0000000 29.4670000 8.0360000 16.0730000 + 622 622 1 0.0000000 29.4670000 8.0360000 21.4310000 + 623 623 1 0.0000000 29.4670000 8.0360000 26.7880000 + 624 624 1 0.0000000 29.4670000 8.0360000 32.1460000 + 625 625 1 0.0000000 29.4670000 13.3940000 5.3580000 + 626 626 1 0.0000000 29.4670000 13.3940000 10.7150000 + 627 627 1 0.0000000 29.4670000 13.3940000 16.0730000 + 628 628 1 0.0000000 29.4670000 13.3940000 21.4310000 + 629 629 1 0.0000000 29.4670000 13.3940000 26.7880000 + 630 630 1 0.0000000 29.4670000 13.3940000 32.1460000 + 631 631 1 0.0000000 29.4670000 18.7520000 5.3580000 + 632 632 1 0.0000000 29.4670000 18.7520000 10.7150000 + 633 633 1 0.0000000 29.4670000 18.7520000 16.0730000 + 634 634 1 0.0000000 29.4670000 18.7520000 21.4310000 + 635 635 1 0.0000000 29.4670000 18.7520000 26.7880000 + 636 636 1 0.0000000 29.4670000 18.7520000 32.1460000 + 637 637 1 0.0000000 29.4670000 24.1090000 5.3580000 + 638 638 1 0.0000000 29.4670000 24.1090000 10.7150000 + 639 639 1 0.0000000 29.4670000 24.1090000 16.0730000 + 640 640 1 0.0000000 29.4670000 24.1090000 21.4310000 + 641 641 1 0.0000000 29.4670000 24.1090000 26.7880000 + 642 642 1 0.0000000 29.4670000 24.1090000 32.1460000 + 643 643 1 0.0000000 29.4670000 29.4670000 5.3580000 + 644 644 1 0.0000000 29.4670000 29.4670000 10.7150000 + 645 645 1 0.0000000 29.4670000 29.4670000 16.0730000 + 646 646 1 0.0000000 29.4670000 29.4670000 21.4310000 + 647 647 1 0.0000000 29.4670000 29.4670000 26.7880000 + 648 648 1 0.0000000 29.4670000 29.4670000 32.1460000 + 649 649 1 0.0000000 0.0000000 5.3580000 5.3580000 + 650 650 1 0.0000000 0.0000000 5.3580000 10.7150000 + 651 651 1 0.0000000 0.0000000 5.3580000 16.0730000 + 652 652 1 0.0000000 0.0000000 5.3580000 21.4310000 + 653 653 1 0.0000000 0.0000000 5.3580000 26.7880000 + 654 654 1 0.0000000 0.0000000 5.3580000 32.1460000 + 655 655 1 0.0000000 0.0000000 10.7150000 5.3580000 + 656 656 1 0.0000000 0.0000000 10.7150000 10.7150000 + 657 657 1 0.0000000 0.0000000 10.7150000 16.0730000 + 658 658 1 0.0000000 0.0000000 10.7150000 21.4310000 + 659 659 1 0.0000000 0.0000000 10.7150000 26.7880000 + 660 660 1 0.0000000 0.0000000 10.7150000 32.1460000 + 661 661 1 0.0000000 0.0000000 16.0730000 5.3580000 + 662 662 1 0.0000000 0.0000000 16.0730000 10.7150000 + 663 663 1 0.0000000 0.0000000 16.0730000 16.0730000 + 664 664 1 0.0000000 0.0000000 16.0730000 21.4310000 + 665 665 1 0.0000000 0.0000000 16.0730000 26.7880000 + 666 666 1 0.0000000 0.0000000 16.0730000 32.1460000 + 667 667 1 0.0000000 0.0000000 21.4310000 5.3580000 + 668 668 1 0.0000000 0.0000000 21.4310000 10.7150000 + 669 669 1 0.0000000 0.0000000 21.4310000 16.0730000 + 670 670 1 0.0000000 0.0000000 21.4310000 21.4310000 + 671 671 1 0.0000000 0.0000000 21.4310000 26.7880000 + 672 672 1 0.0000000 0.0000000 21.4310000 32.1460000 + 673 673 1 0.0000000 0.0000000 26.7880000 5.3580000 + 674 674 1 0.0000000 0.0000000 26.7880000 10.7150000 + 675 675 1 0.0000000 0.0000000 26.7880000 16.0730000 + 676 676 1 0.0000000 0.0000000 26.7880000 21.4310000 + 677 677 1 0.0000000 0.0000000 26.7880000 26.7880000 + 678 678 1 0.0000000 0.0000000 26.7880000 32.1460000 + 679 679 1 0.0000000 0.0000000 32.1460000 5.3580000 + 680 680 1 0.0000000 0.0000000 32.1460000 10.7150000 + 681 681 1 0.0000000 0.0000000 32.1460000 16.0730000 + 682 682 1 0.0000000 0.0000000 32.1460000 21.4310000 + 683 683 1 0.0000000 0.0000000 32.1460000 26.7880000 + 684 684 1 0.0000000 0.0000000 32.1460000 32.1460000 + 685 685 1 0.0000000 5.3580000 5.3580000 5.3580000 + 686 686 1 0.0000000 5.3580000 5.3580000 10.7150000 + 687 687 1 0.0000000 5.3580000 5.3580000 16.0730000 + 688 688 1 0.0000000 5.3580000 5.3580000 21.4310000 + 689 689 1 0.0000000 5.3580000 5.3580000 26.7880000 + 690 690 1 0.0000000 5.3580000 5.3580000 32.1460000 + 691 691 1 0.0000000 5.3580000 10.7150000 5.3580000 + 692 692 1 0.0000000 5.3580000 10.7150000 10.7150000 + 693 693 1 0.0000000 5.3580000 10.7150000 16.0730000 + 694 694 1 0.0000000 5.3580000 10.7150000 21.4310000 + 695 695 1 0.0000000 5.3580000 10.7150000 26.7880000 + 696 696 1 0.0000000 5.3580000 10.7150000 32.1460000 + 697 697 1 0.0000000 5.3580000 16.0730000 5.3580000 + 698 698 1 0.0000000 5.3580000 16.0730000 10.7150000 + 699 699 1 0.0000000 5.3580000 16.0730000 16.0730000 + 700 700 1 0.0000000 5.3580000 16.0730000 21.4310000 + 701 701 1 0.0000000 5.3580000 16.0730000 26.7880000 + 702 702 1 0.0000000 5.3580000 16.0730000 32.1460000 + 703 703 1 0.0000000 5.3580000 21.4310000 5.3580000 + 704 704 1 0.0000000 5.3580000 21.4310000 10.7150000 + 705 705 1 0.0000000 5.3580000 21.4310000 16.0730000 + 706 706 1 0.0000000 5.3580000 21.4310000 21.4310000 + 707 707 1 0.0000000 5.3580000 21.4310000 26.7880000 + 708 708 1 0.0000000 5.3580000 21.4310000 32.1460000 + 709 709 1 0.0000000 5.3580000 26.7880000 5.3580000 + 710 710 1 0.0000000 5.3580000 26.7880000 10.7150000 + 711 711 1 0.0000000 5.3580000 26.7880000 16.0730000 + 712 712 1 0.0000000 5.3580000 26.7880000 21.4310000 + 713 713 1 0.0000000 5.3580000 26.7880000 26.7880000 + 714 714 1 0.0000000 5.3580000 26.7880000 32.1460000 + 715 715 1 0.0000000 5.3580000 32.1460000 5.3580000 + 716 716 1 0.0000000 5.3580000 32.1460000 10.7150000 + 717 717 1 0.0000000 5.3580000 32.1460000 16.0730000 + 718 718 1 0.0000000 5.3580000 32.1460000 21.4310000 + 719 719 1 0.0000000 5.3580000 32.1460000 26.7880000 + 720 720 1 0.0000000 5.3580000 32.1460000 32.1460000 + 721 721 1 0.0000000 10.7150000 5.3580000 5.3580000 + 722 722 1 0.0000000 10.7150000 5.3580000 10.7150000 + 723 723 1 0.0000000 10.7150000 5.3580000 16.0730000 + 724 724 1 0.0000000 10.7150000 5.3580000 21.4310000 + 725 725 1 0.0000000 10.7150000 5.3580000 26.7880000 + 726 726 1 0.0000000 10.7150000 5.3580000 32.1460000 + 727 727 1 0.0000000 10.7150000 10.7150000 5.3580000 + 728 728 1 0.0000000 10.7150000 10.7150000 10.7150000 + 729 729 1 0.0000000 10.7150000 10.7150000 16.0730000 + 730 730 1 0.0000000 10.7150000 10.7150000 21.4310000 + 731 731 1 0.0000000 10.7150000 10.7150000 26.7880000 + 732 732 1 0.0000000 10.7150000 10.7150000 32.1460000 + 733 733 1 0.0000000 10.7150000 16.0730000 5.3580000 + 734 734 1 0.0000000 10.7150000 16.0730000 10.7150000 + 735 735 1 0.0000000 10.7150000 16.0730000 16.0730000 + 736 736 1 0.0000000 10.7150000 16.0730000 21.4310000 + 737 737 1 0.0000000 10.7150000 16.0730000 26.7880000 + 738 738 1 0.0000000 10.7150000 16.0730000 32.1460000 + 739 739 1 0.0000000 10.7150000 21.4310000 5.3580000 + 740 740 1 0.0000000 10.7150000 21.4310000 10.7150000 + 741 741 1 0.0000000 10.7150000 21.4310000 16.0730000 + 742 742 1 0.0000000 10.7150000 21.4310000 21.4310000 + 743 743 1 0.0000000 10.7150000 21.4310000 26.7880000 + 744 744 1 0.0000000 10.7150000 21.4310000 32.1460000 + 745 745 1 0.0000000 10.7150000 26.7880000 5.3580000 + 746 746 1 0.0000000 10.7150000 26.7880000 10.7150000 + 747 747 1 0.0000000 10.7150000 26.7880000 16.0730000 + 748 748 1 0.0000000 10.7150000 26.7880000 21.4310000 + 749 749 1 0.0000000 10.7150000 26.7880000 26.7880000 + 750 750 1 0.0000000 10.7150000 26.7880000 32.1460000 + 751 751 1 0.0000000 10.7150000 32.1460000 5.3580000 + 752 752 1 0.0000000 10.7150000 32.1460000 10.7150000 + 753 753 1 0.0000000 10.7150000 32.1460000 16.0730000 + 754 754 1 0.0000000 10.7150000 32.1460000 21.4310000 + 755 755 1 0.0000000 10.7150000 32.1460000 26.7880000 + 756 756 1 0.0000000 10.7150000 32.1460000 32.1460000 + 757 757 1 0.0000000 16.0730000 5.3580000 5.3580000 + 758 758 1 0.0000000 16.0730000 5.3580000 10.7150000 + 759 759 1 0.0000000 16.0730000 5.3580000 16.0730000 + 760 760 1 0.0000000 16.0730000 5.3580000 21.4310000 + 761 761 1 0.0000000 16.0730000 5.3580000 26.7880000 + 762 762 1 0.0000000 16.0730000 5.3580000 32.1460000 + 763 763 1 0.0000000 16.0730000 10.7150000 5.3580000 + 764 764 1 0.0000000 16.0730000 10.7150000 10.7150000 + 765 765 1 0.0000000 16.0730000 10.7150000 16.0730000 + 766 766 1 0.0000000 16.0730000 10.7150000 21.4310000 + 767 767 1 0.0000000 16.0730000 10.7150000 26.7880000 + 768 768 1 0.0000000 16.0730000 10.7150000 32.1460000 + 769 769 1 0.0000000 16.0730000 16.0730000 5.3580000 + 770 770 1 0.0000000 16.0730000 16.0730000 10.7150000 + 771 771 1 0.0000000 16.0730000 16.0730000 16.0730000 + 772 772 1 0.0000000 16.0730000 16.0730000 21.4310000 + 773 773 1 0.0000000 16.0730000 16.0730000 26.7880000 + 774 774 1 0.0000000 16.0730000 16.0730000 32.1460000 + 775 775 1 0.0000000 16.0730000 21.4310000 5.3580000 + 776 776 1 0.0000000 16.0730000 21.4310000 10.7150000 + 777 777 1 0.0000000 16.0730000 21.4310000 16.0730000 + 778 778 1 0.0000000 16.0730000 21.4310000 21.4310000 + 779 779 1 0.0000000 16.0730000 21.4310000 26.7880000 + 780 780 1 0.0000000 16.0730000 21.4310000 32.1460000 + 781 781 1 0.0000000 16.0730000 26.7880000 5.3580000 + 782 782 1 0.0000000 16.0730000 26.7880000 10.7150000 + 783 783 1 0.0000000 16.0730000 26.7880000 16.0730000 + 784 784 1 0.0000000 16.0730000 26.7880000 21.4310000 + 785 785 1 0.0000000 16.0730000 26.7880000 26.7880000 + 786 786 1 0.0000000 16.0730000 26.7880000 32.1460000 + 787 787 1 0.0000000 16.0730000 32.1460000 5.3580000 + 788 788 1 0.0000000 16.0730000 32.1460000 10.7150000 + 789 789 1 0.0000000 16.0730000 32.1460000 16.0730000 + 790 790 1 0.0000000 16.0730000 32.1460000 21.4310000 + 791 791 1 0.0000000 16.0730000 32.1460000 26.7880000 + 792 792 1 0.0000000 16.0730000 32.1460000 32.1460000 + 793 793 1 0.0000000 21.4310000 5.3580000 5.3580000 + 794 794 1 0.0000000 21.4310000 5.3580000 10.7150000 + 795 795 1 0.0000000 21.4310000 5.3580000 16.0730000 + 796 796 1 0.0000000 21.4310000 5.3580000 21.4310000 + 797 797 1 0.0000000 21.4310000 5.3580000 26.7880000 + 798 798 1 0.0000000 21.4310000 5.3580000 32.1460000 + 799 799 1 0.0000000 21.4310000 10.7150000 5.3580000 + 800 800 1 0.0000000 21.4310000 10.7150000 10.7150000 + 801 801 1 0.0000000 21.4310000 10.7150000 16.0730000 + 802 802 1 0.0000000 21.4310000 10.7150000 21.4310000 + 803 803 1 0.0000000 21.4310000 10.7150000 26.7880000 + 804 804 1 0.0000000 21.4310000 10.7150000 32.1460000 + 805 805 1 0.0000000 21.4310000 16.0730000 5.3580000 + 806 806 1 0.0000000 21.4310000 16.0730000 10.7150000 + 807 807 1 0.0000000 21.4310000 16.0730000 16.0730000 + 808 808 1 0.0000000 21.4310000 16.0730000 21.4310000 + 809 809 1 0.0000000 21.4310000 16.0730000 26.7880000 + 810 810 1 0.0000000 21.4310000 16.0730000 32.1460000 + 811 811 1 0.0000000 21.4310000 21.4310000 5.3580000 + 812 812 1 0.0000000 21.4310000 21.4310000 10.7150000 + 813 813 1 0.0000000 21.4310000 21.4310000 16.0730000 + 814 814 1 0.0000000 21.4310000 21.4310000 21.4310000 + 815 815 1 0.0000000 21.4310000 21.4310000 26.7880000 + 816 816 1 0.0000000 21.4310000 21.4310000 32.1460000 + 817 817 1 0.0000000 21.4310000 26.7880000 5.3580000 + 818 818 1 0.0000000 21.4310000 26.7880000 10.7150000 + 819 819 1 0.0000000 21.4310000 26.7880000 16.0730000 + 820 820 1 0.0000000 21.4310000 26.7880000 21.4310000 + 821 821 1 0.0000000 21.4310000 26.7880000 26.7880000 + 822 822 1 0.0000000 21.4310000 26.7880000 32.1460000 + 823 823 1 0.0000000 21.4310000 32.1460000 5.3580000 + 824 824 1 0.0000000 21.4310000 32.1460000 10.7150000 + 825 825 1 0.0000000 21.4310000 32.1460000 16.0730000 + 826 826 1 0.0000000 21.4310000 32.1460000 21.4310000 + 827 827 1 0.0000000 21.4310000 32.1460000 26.7880000 + 828 828 1 0.0000000 21.4310000 32.1460000 32.1460000 + 829 829 1 0.0000000 26.7880000 5.3580000 5.3580000 + 830 830 1 0.0000000 26.7880000 5.3580000 10.7150000 + 831 831 1 0.0000000 26.7880000 5.3580000 16.0730000 + 832 832 1 0.0000000 26.7880000 5.3580000 21.4310000 + 833 833 1 0.0000000 26.7880000 5.3580000 26.7880000 + 834 834 1 0.0000000 26.7880000 5.3580000 32.1460000 + 835 835 1 0.0000000 26.7880000 10.7150000 5.3580000 + 836 836 1 0.0000000 26.7880000 10.7150000 10.7150000 + 837 837 1 0.0000000 26.7880000 10.7150000 16.0730000 + 838 838 1 0.0000000 26.7880000 10.7150000 21.4310000 + 839 839 1 0.0000000 26.7880000 10.7150000 26.7880000 + 840 840 1 0.0000000 26.7880000 10.7150000 32.1460000 + 841 841 1 0.0000000 26.7880000 16.0730000 5.3580000 + 842 842 1 0.0000000 26.7880000 16.0730000 10.7150000 + 843 843 1 0.0000000 26.7880000 16.0730000 16.0730000 + 844 844 1 0.0000000 26.7880000 16.0730000 21.4310000 + 845 845 1 0.0000000 26.7880000 16.0730000 26.7880000 + 846 846 1 0.0000000 26.7880000 16.0730000 32.1460000 + 847 847 1 0.0000000 26.7880000 21.4310000 5.3580000 + 848 848 1 0.0000000 26.7880000 21.4310000 10.7150000 + 849 849 1 0.0000000 26.7880000 21.4310000 16.0730000 + 850 850 1 0.0000000 26.7880000 21.4310000 21.4310000 + 851 851 1 0.0000000 26.7880000 21.4310000 26.7880000 + 852 852 1 0.0000000 26.7880000 21.4310000 32.1460000 + 853 853 1 0.0000000 26.7880000 26.7880000 5.3580000 + 854 854 1 0.0000000 26.7880000 26.7880000 10.7150000 + 855 855 1 0.0000000 26.7880000 26.7880000 16.0730000 + 856 856 1 0.0000000 26.7880000 26.7880000 21.4310000 + 857 857 1 0.0000000 26.7880000 26.7880000 26.7880000 + 858 858 1 0.0000000 26.7880000 26.7880000 32.1460000 + 859 859 1 0.0000000 26.7880000 32.1460000 5.3580000 + 860 860 1 0.0000000 26.7880000 32.1460000 10.7150000 + 861 861 1 0.0000000 26.7880000 32.1460000 16.0730000 + 862 862 1 0.0000000 26.7880000 32.1460000 21.4310000 + 863 863 1 0.0000000 26.7880000 32.1460000 26.7880000 + 864 864 1 0.0000000 26.7880000 32.1460000 32.1460000 + diff --git a/examples/numdiff/ff-argon.lmp b/examples/numdiff/ff-argon.lmp new file mode 100644 index 0000000000..b6f7bc931a --- /dev/null +++ b/examples/numdiff/ff-argon.lmp @@ -0,0 +1,20 @@ +############################# +#Atoms types - mass - charge# +############################# +#@ 1 atom types #!THIS LINE IS NECESSARY DON'T SPEND HOURS FINDING THAT OUT!# + +variable Ar equal 1 + +############# +#Atom Masses# +############# + +mass ${Ar} 39.903 + +########################### +#Pair Potentials - Tersoff# +########################### + +pair_style lj/cubic +pair_coeff * * 0.0102701 3.42 + diff --git a/examples/numdiff/in.numdiff b/examples/numdiff/in.numdiff new file mode 100644 index 0000000000..c42f80b94b --- /dev/null +++ b/examples/numdiff/in.numdiff @@ -0,0 +1,28 @@ +# Numerical difference calculation of error in forces + +units metal +atom_style full + +boundary p p p +read_data argon.lmp + +include ff-argon.lmp + +velocity all create 10 2357 mom yes dist gaussian + +neighbor 1 bin + +timestep 0.001 + +fix numdiff all numdiff 200 0.0001 +fix nve all nve + +variable errx atom fx-f_numdiff[1] +variable erry atom fy-f_numdiff[2] +variable errz atom fz-f_numdiff[3] + +dump forces all custom 200 force_error.dump v_errx v_erry v_errz +thermo 200 +run 2000 + + diff --git a/src/fix_num_diff.cpp b/src/fix_num_diff.cpp index 0c4ee073b5..1122b36410 100644 --- a/src/fix_num_diff.cpp +++ b/src/fix_num_diff.cpp @@ -12,14 +12,14 @@ ------------------------------------------------------------------------- */ #include "fix_num_diff.h" +#include #include #include -#include #include "atom.h" -#include "atom_masks.h" #include "update.h" #include "modify.h" #include "comm.h" +#include "compute.h" #include "domain.h" #include "region.h" #include "respa.h" @@ -37,9 +37,6 @@ #include "error.h" #include "force.h" #include "group.h" -#include - -//TODO: Add energy from potentials to single energy array and then reverse comm pack and unpack using namespace LAMMPS_NS; using namespace FixConst; @@ -49,12 +46,13 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ FixNumDiff::FixNumDiff(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), groupmap(NULL), local_forces(NULL), global_forces(NULL), temp_f(NULL) + Fix(lmp, narg, arg), numdiff_forces(NULL), temp_f(NULL), temp_x(NULL), id_pe(NULL) { respa_level_support = 1; ilevel_respa = 0; eflag = 1; - energy = 0; + energy = 0.0; + size_peratom_cols = 3; if (narg < 5) error->all(FLERR,"Illegal fix numdiff command"); @@ -62,7 +60,7 @@ FixNumDiff::FixNumDiff(LAMMPS *lmp, int narg, char **arg) : del = force->numeric(FLERR,arg[4]); if (nevery <= 0) - error->all(FLERR,"Illegal fix ave/atom command"); + error->all(FLERR,"Illegal fix numdiff command"); peratom_flag = 1; if (force->pair && force->pair->compute_flag) pair_compute_flag = 1; @@ -70,39 +68,45 @@ FixNumDiff::FixNumDiff(LAMMPS *lmp, int narg, char **arg) : if (force->kspace && force->kspace->compute_flag) kspace_compute_flag = 1; else kspace_compute_flag = 0; - igroup = group->find(arg[1]); - if (igroup == -1) error->all(FLERR,"Could not find numerical difference group ID"); - groupbit = group->bitmask[igroup]; - gcount = group->count(igroup); - flen = gcount*3; - memory->create(groupmap,atom->natoms,"total_group_map:total_group_map"); - local_forces = NULL; - global_forces = NULL; - array_flag = 1; - size_array_cols = 3; - size_array_rows = gcount; + numdiff_forces = NULL; - memory->create(local_forces,gcount,3,"fix_numdiff:local_forces"); - memory->create(global_forces,gcount,3,"fix_numdiff:global_forces"); - memory->grow(temp_f, atom->natoms, 3, "fix_numdiff:temporary_forces"); + maxatom1 = 0; - for (bigint i = 0; i < gcount; i++) - for (int j = 0; j < 3; j++) { - global_forces[i][j] = 0; - local_forces[i][j] = 0; - } + int n = strlen(id) + 6; + id_pe = new char[n]; + strcpy(id_pe,id); + strcat(id_pe,"_pe"); + + char **newarg = new char*[10]; + newarg[0] = id_pe; + newarg[1] = group->names[igroup]; + newarg[2] = (char *) "pe"; + newarg[3] = (char *) "pair"; + newarg[4] = (char *) "bond"; + newarg[5] = (char *) "angle"; + newarg[6] = (char *) "dihedral"; + newarg[7] = (char *) "improper"; + newarg[8] = (char *) "kspace"; + newarg[9] = (char *) "fix"; + modify->add_compute(3,newarg); + delete [] newarg; nmax = 0; + memory->create(numdiff_forces,atom->natoms,3,"numdiff:numdiff_force"); + force_clear(numdiff_forces); + array_atom = numdiff_forces; } /* ---------------------------------------------------------------------- */ FixNumDiff::~FixNumDiff() { - memory->destroy(groupmap); - memory->destroy(local_forces); - memory->destroy(global_forces); + memory->destroy(numdiff_forces); memory->destroy(temp_f); + memory->destroy(temp_x); + + modify->delete_compute(id_pe); + delete [] id_pe; } /* ---------------------------------------------------------------------- */ @@ -124,11 +128,10 @@ void FixNumDiff::init() { // check variables - if (gcount == atom->natoms) - for (bigint i=0; inatoms; i++) - groupmap[i] = i; - else - create_groupmap(); + int icompute = modify->find_compute(id_pe); + if (icompute < 0) + error->all(FLERR,"Compute ID for fix numdiff does not exist"); + pe = modify->compute[icompute]; if (strstr(update->integrate_style,"respa")) { ilevel_respa = ((Respa *) update->integrate)->nlevels-1; @@ -138,13 +141,6 @@ void FixNumDiff::init() /* ---------------------------------------------------------------------- */ -void FixNumDiff::min_setup(int vflag) -{ - post_force(vflag); -} - -/* ---------------------------------------------------------------------- */ - void FixNumDiff::post_force(int vflag) { if (update->ntimestep % nevery) return; @@ -180,45 +176,66 @@ void FixNumDiff::calculate_forces(int vflag) { int local_idx; // local index bigint natoms = atom->natoms; - bigint *gm = groupmap; double **f = atom->f; + double **x = atom->x; double temp = 1.0 / 2 / del; int nlocal = atom->nlocal; + int *mask = atom->mask; + int flag = 0; + int allflag = 0; + + if (atom->nmax > maxatom1) { + memory->destroy(numdiff_forces); + memory->destroy(temp_f); + memory->destroy(temp_x); + maxatom1 = atom->nmax; + memory->create(numdiff_forces,maxatom1,3,"numdiff:numdiff_force"); + memory->create(temp_f,maxatom1,3,"numdiff:temp_f"); + memory->create(temp_x,maxatom1,3,"numdiff:temp_x"); + array_atom = numdiff_forces; + } for (bigint i = 0; i < natoms; i++) for (int j = 0; j < 3; j++) temp_f[i][j] = f[i][j]; + for (bigint i = 0; i < natoms; i++) + for (int j = 0; j < 3; j++) + temp_x[i][j] = x[i][j]; + //initialize forces to all zeros - nd_force_clear(local_forces); - nd_force_clear(global_forces); + force_clear(numdiff_forces); for (bigint i=1; i<=natoms; i++){ local_idx = atom->map(i); - if (gm[i-1] < 0) - continue; + if (mask[local_idx] && groupbit) flag = 1; + else flag = 0; + MPI_Allreduce(&flag, &allflag,1, MPI_INT, MPI_SUM,world); + if (!allflag) continue; for (int alpha=0; alpha<3; alpha++){ displace_atom(local_idx, alpha, 1); - update_force(vflag); + update_energy(vflag); if (local_idx >= 0 && local_idx < nlocal) - local_forces[gm[i-1]][alpha] -= energy; + numdiff_forces[local_idx][alpha] -= energy; displace_atom(local_idx,alpha,-2); - update_force(vflag); + update_energy(vflag); if (local_idx >= 0 && local_idx < nlocal) { - local_forces[gm[i-1]][alpha] += energy; - local_forces[gm[i-1]][alpha] *= temp; + numdiff_forces[local_idx][alpha] += energy; + numdiff_forces[local_idx][alpha] *= temp; } displace_atom(local_idx,alpha,1); } - for (int k=0; kf); if (pair_compute_flag) { force->pair->compute(eflag,vflag); @@ -272,140 +289,49 @@ void FixNumDiff::update_force(int vflag) force->kspace->compute(eflag,vflag); timer->stamp(Timer::KSPACE); } - // if (force->newton) { - // comm->reverse_comm(); - // timer->stamp(Timer::COMM); - // } - compute_energy(); - -} - -/* ---------------------------------------------------------------------- - clear force on own & ghost atoms - clear other arrays as needed -------------------------------------------------------------------------- */ - -void FixNumDiff::force_clear() -{ - if (external_force_clear) return; - - // clear global force array - // if either newton flag is set, also include ghosts - - size_t nbytes = sizeof(double) * atom->nlocal; - if (force->newton) nbytes += sizeof(double) * atom->nghost; - - if (nbytes) { - memset(&atom->f[0][0],0,3*nbytes); - } + energy = pe->compute_scalar(); } /* ---------------------------------------------------------------------- clear forces needed ------------------------------------------------------------------------- */ -void FixNumDiff::nd_force_clear(double **forces) +void FixNumDiff::force_clear(double **forces) { - size_t nbytes = sizeof(double) * flen; - + size_t nbytes = sizeof(double) * atom->nlocal; + if (force->newton) nbytes += sizeof(double) * atom->nghost; if (nbytes) { - memset(&forces[0][0],0,nbytes); + memset(&forces[0][0],0,3*nbytes); } } -/* ---------------------------------------------------------------------- */ -void FixNumDiff::compute_energy() +/* ---------------------------------------------------------------------- + pack values in local atom-based array for exchange with another proc +------------------------------------------------------------------------- */ + +int FixNumDiff::pack_exchange(int i, double *buf) { - double one = 0.0; - if (pair_compute_flag) - one += force->pair->eng_vdwl + force->pair->eng_coul; - - if (atom->molecular) { - if (force->bond) one += force->bond->energy; - if (force->angle) one += force->angle->energy; - if (force->dihedral) one += force->dihedral->energy; - if (force->improper) one += force->improper->energy; - } - - MPI_Allreduce(&one,&energy,1,MPI_DOUBLE,MPI_SUM,world); - - if (kspace_compute_flag) energy += force->kspace->energy; - - if (pairflag && force->pair && force->pair->tail_flag) { - double volume = domain->xprd * domain->yprd * domain->zprd; - energy += force->pair->etail / volume; - } + int n = 0; + buf[n++] = numdiff_forces[i][0]; + buf[n++] = numdiff_forces[i][1]; + buf[n++] = numdiff_forces[i][2]; + return n; } -/* ---------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- + unpack values in local atom-based array from exchange with another proc +------------------------------------------------------------------------- */ -void FixNumDiff::create_groupmap() +int FixNumDiff::unpack_exchange(int nlocal, double *buf) { - //Create a group map which maps atom order onto group - // groupmap[global atom index-1] = output column/row - - int local_idx; // local index - int gid = 0; //group index - int nlocal = atom->nlocal; - int *mask = atom->mask; - bigint natoms = atom->natoms; - int *recv = new int[comm->nprocs]; - int *displs = new int[comm->nprocs]; - bigint *temp_groupmap = new bigint[natoms]; - - //find number of local atoms in the group (final_gid) - for (bigint i=1; i<=natoms; i++){ - local_idx = atom->map(i); - if ((local_idx >= 0) && (local_idx < nlocal) && mask[local_idx] & groupbit) - gid += 1; // gid at the end of loop is final_Gid - } - //create an array of length final_gid - bigint *sub_groupmap = new bigint[gid]; - - gid = 0; - //create a map between global atom id and group atom id for each proc - for (bigint i=1; i<=natoms; i++){ - local_idx = atom->map(i); - if ((local_idx >= 0) && (local_idx < nlocal) && mask[local_idx] & groupbit){ - sub_groupmap[gid] = i; - gid += 1; - } - } - - //populate arrays for Allgatherv - for (int i=0; inprocs; i++){ - recv[i] = 0; - } - recv[comm->me] = gid; - MPI_Allreduce(recv,displs,comm->nprocs,MPI_INT,MPI_SUM,world); - for (int i=0; inprocs; i++){ - recv[i]=displs[i]; - if (i>0) displs[i] = displs[i-1]+recv[i-1]; - else displs[i] = 0; - } - - //combine subgroup maps into total temporary groupmap - MPI_Allgatherv(sub_groupmap,gid,MPI_LMP_BIGINT,temp_groupmap,recv,displs,MPI_LMP_BIGINT,world); - std::sort(temp_groupmap,temp_groupmap+gcount); - - //populate member groupmap based on temp groupmap - bigint j = 0; - for (bigint i=1; i<=natoms; i++){ - // flag groupmap contents that are in temp_groupmap - if (j < gcount && i == temp_groupmap[j]) - groupmap[i-1] = j++; - else - groupmap[i-1] = -1; - } - - //free that memory! - delete[] recv; - delete[] displs; - delete[] sub_groupmap; - delete[] temp_groupmap; + int n = 0; + numdiff_forces[nlocal][0] = buf[n++]; + numdiff_forces[nlocal][1] = buf[n++]; + numdiff_forces[nlocal][2] = buf[n++]; + return n; } /* ---------------------------------------------------------------------- @@ -414,7 +340,7 @@ void FixNumDiff::create_groupmap() double FixNumDiff::compute_array(int i, int j) { - return global_forces[i][j]; + return numdiff_forces[i][j]; } /* ---------------------------------------------------------------------- @@ -424,8 +350,6 @@ double FixNumDiff::compute_array(int i, int j) double FixNumDiff::memory_usage() { bigint bytes = 0.0; - bytes += atom->natoms * 3 * sizeof(double); // temp_f - bytes += 2 * flen * sizeof(double); // local_f, global_f - bytes += gcount * sizeof(bigint); // groupmap + bytes += 3 * atom->natoms * 3 * sizeof(double); // temp_f, temp_x, numdiff_f return bytes; } diff --git a/src/fix_num_diff.h b/src/fix_num_diff.h index e49480437b..37806223cc 100644 --- a/src/fix_num_diff.h +++ b/src/fix_num_diff.h @@ -30,12 +30,13 @@ class FixNumDiff : public Fix { ~FixNumDiff(); int setmask(); void init(); - void min_setup(int); void post_force(int); void post_force_respa(int, int, int); void min_post_force(int); double compute_array(int, int); double memory_usage(); + int pack_exchange(int i, double *buf); + int unpack_exchange(int nlocal, double *buf); protected: int eflag; // flags for energy/virial computation @@ -47,17 +48,15 @@ protected: int pair_compute_flag; // 0 if pair->compute is skipped int kspace_compute_flag; // 0 if kspace->compute is skipped - double **local_forces; // local forces from numerical difference (this might be usefull for debugging) - double **global_forces; // global forces from numerical difference + double **numdiff_forces; // local forces from numerical difference (this might be usefull for debugging) - void update_force(int vflag); - void force_clear(); + void update_energy(int vflag); + void force_clear(double **forces); // virtual void openfile(const char* filename); private: void create_groupmap(); void displace_atom(int local_idx, int direction, int magnitude); - void nd_force_clear(double **forces); void calculate_forces(int vflag); void compute_energy(); @@ -65,14 +64,15 @@ protected: double del; int nmax; - int igroup,groupbit; - bigint gcount; // number of atoms in group - bigint flen; // rank of dynamical matrix int scaleflag; int me; - bigint *groupmap; double **temp_f; + double **temp_x; double energy; + int maxatom1; + + char *id_pe; + class Compute *pe; };