Added option to gmx nmeig to print ZPE.
[alexxy/gromacs.git] / src / gromacs / gmxlib / nonbonded / nb_kernel_sparc64_hpc_ace_double / nb_kernel_ElecNone_VdwLJ_GeomP1P1_sparc64_hpc_ace_double.c
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2012,2013,2014,2015,2017, by the GROMACS development team, led by
5  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6  * and including many others, as listed in the AUTHORS file in the
7  * top-level source directory and at http://www.gromacs.org.
8  *
9  * GROMACS is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public License
11  * as published by the Free Software Foundation; either version 2.1
12  * of the License, or (at your option) any later version.
13  *
14  * GROMACS is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with GROMACS; if not, see
21  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23  *
24  * If you want to redistribute modifications to GROMACS, please
25  * consider that scientific software is very special. Version
26  * control is crucial - bugs must be traceable. We will be happy to
27  * consider code for inclusion in the official distribution, but
28  * derived work must not be called official GROMACS. Details are found
29  * in the README & COPYING files - if they are missing, get the
30  * official version at http://www.gromacs.org.
31  *
32  * To help us fund GROMACS development, we humbly ask that you cite
33  * the research papers on the package. Check out http://www.gromacs.org.
34  */
35 /*
36  * Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
37  */
38 #include "gmxpre.h"
39
40 #include "config.h"
41
42 #include <math.h>
43
44 #include "../nb_kernel.h"
45 #include "gromacs/gmxlib/nrnb.h"
46
47 #include "kernelutil_sparc64_hpc_ace_double.h"
48
49 /*
50  * Gromacs nonbonded kernel:   nb_kernel_ElecNone_VdwLJ_GeomP1P1_VF_sparc64_hpc_ace_double
51  * Electrostatics interaction: None
52  * VdW interaction:            LennardJones
53  * Geometry:                   Particle-Particle
54  * Calculate force/pot:        PotentialAndForce
55  */
56 void
57 nb_kernel_ElecNone_VdwLJ_GeomP1P1_VF_sparc64_hpc_ace_double
58                     (t_nblist                    * gmx_restrict       nlist,
59                      rvec                        * gmx_restrict          xx,
60                      rvec                        * gmx_restrict          ff,
61                      struct t_forcerec           * gmx_restrict          fr,
62                      t_mdatoms                   * gmx_restrict     mdatoms,
63                      nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
64                      t_nrnb                      * gmx_restrict        nrnb)
65 {
66     /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
67      * just 0 for non-waters.
68      * Suffixes A,B refer to j loop unrolling done with double precision SIMD, e.g. for the two different
69      * jnr indices corresponding to data put in the four positions in the SIMD register.
70      */
71     int              i_shift_offset,i_coord_offset,outeriter,inneriter;
72     int              j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
73     int              jnrA,jnrB;
74     int              j_coord_offsetA,j_coord_offsetB;
75     int              *iinr,*jindex,*jjnr,*shiftidx,*gid;
76     real             rcutoff_scalar;
77     real             *shiftvec,*fshift,*x,*f;
78     _fjsp_v2r8       tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
79     int              vdwioffset0;
80     _fjsp_v2r8       ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
81     int              vdwjidx0A,vdwjidx0B;
82     _fjsp_v2r8       jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
83     _fjsp_v2r8       dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
84     int              nvdwtype;
85     _fjsp_v2r8       rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
86     int              *vdwtype;
87     real             *vdwparam;
88     _fjsp_v2r8       one_sixth   = gmx_fjsp_set1_v2r8(1.0/6.0);
89     _fjsp_v2r8       one_twelfth = gmx_fjsp_set1_v2r8(1.0/12.0);
90     _fjsp_v2r8       itab_tmp;
91     _fjsp_v2r8       dummy_mask,cutoff_mask;
92     _fjsp_v2r8       one     = gmx_fjsp_set1_v2r8(1.0);
93     _fjsp_v2r8       two     = gmx_fjsp_set1_v2r8(2.0);
94     union { _fjsp_v2r8 simd; long long int i[2]; } vfconv,gbconv,ewconv;
95
96     x                = xx[0];
97     f                = ff[0];
98
99     nri              = nlist->nri;
100     iinr             = nlist->iinr;
101     jindex           = nlist->jindex;
102     jjnr             = nlist->jjnr;
103     shiftidx         = nlist->shift;
104     gid              = nlist->gid;
105     shiftvec         = fr->shift_vec[0];
106     fshift           = fr->fshift[0];
107     nvdwtype         = fr->ntype;
108     vdwparam         = fr->nbfp;
109     vdwtype          = mdatoms->typeA;
110
111     /* Avoid stupid compiler warnings */
112     jnrA = jnrB = 0;
113     j_coord_offsetA = 0;
114     j_coord_offsetB = 0;
115
116     outeriter        = 0;
117     inneriter        = 0;
118
119     /* Start outer loop over neighborlists */
120     for(iidx=0; iidx<nri; iidx++)
121     {
122         /* Load shift vector for this list */
123         i_shift_offset   = DIM*shiftidx[iidx];
124
125         /* Load limits for loop over neighbors */
126         j_index_start    = jindex[iidx];
127         j_index_end      = jindex[iidx+1];
128
129         /* Get outer coordinate index */
130         inr              = iinr[iidx];
131         i_coord_offset   = DIM*inr;
132
133         /* Load i particle coords and add shift vector */
134         gmx_fjsp_load_shift_and_1rvec_broadcast_v2r8(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
135
136         fix0             = _fjsp_setzero_v2r8();
137         fiy0             = _fjsp_setzero_v2r8();
138         fiz0             = _fjsp_setzero_v2r8();
139
140         /* Load parameters for i particles */
141         vdwioffset0      = 2*nvdwtype*vdwtype[inr+0];
142
143         /* Reset potential sums */
144         vvdwsum          = _fjsp_setzero_v2r8();
145
146         /* Start inner kernel loop */
147         for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
148         {
149
150             /* Get j neighbor index, and coordinate index */
151             jnrA             = jjnr[jidx];
152             jnrB             = jjnr[jidx+1];
153             j_coord_offsetA  = DIM*jnrA;
154             j_coord_offsetB  = DIM*jnrB;
155
156             /* load j atom coordinates */
157             gmx_fjsp_load_1rvec_2ptr_swizzle_v2r8(x+j_coord_offsetA,x+j_coord_offsetB,
158                                               &jx0,&jy0,&jz0);
159
160             /* Calculate displacement vector */
161             dx00             = _fjsp_sub_v2r8(ix0,jx0);
162             dy00             = _fjsp_sub_v2r8(iy0,jy0);
163             dz00             = _fjsp_sub_v2r8(iz0,jz0);
164
165             /* Calculate squared distance and things based on it */
166             rsq00            = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
167
168             rinvsq00         = gmx_fjsp_inv_v2r8(rsq00);
169
170             /* Load parameters for j particles */
171             vdwjidx0A        = 2*vdwtype[jnrA+0];
172             vdwjidx0B        = 2*vdwtype[jnrB+0];
173
174             /**************************
175              * CALCULATE INTERACTIONS *
176              **************************/
177
178             /* Compute parameters for interactions between i and j atoms */
179             gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
180                                          vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
181
182             /* LENNARD-JONES DISPERSION/REPULSION */
183
184             rinvsix          = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
185             vvdw6            = _fjsp_mul_v2r8(c6_00,rinvsix);
186             vvdw12           = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
187             vvdw             = _fjsp_msub_v2r8( vvdw12,one_twelfth, _fjsp_mul_v2r8(vvdw6,one_sixth) );
188             fvdw             = _fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw12,vvdw6),rinvsq00);
189
190             /* Update potential sum for this i atom from the interaction with this j atom. */
191             vvdwsum          = _fjsp_add_v2r8(vvdwsum,vvdw);
192
193             fscal            = fvdw;
194
195             /* Update vectorial force */
196             fix0             = _fjsp_madd_v2r8(dx00,fscal,fix0);
197             fiy0             = _fjsp_madd_v2r8(dy00,fscal,fiy0);
198             fiz0             = _fjsp_madd_v2r8(dz00,fscal,fiz0);
199             
200             gmx_fjsp_decrement_fma_1rvec_2ptr_swizzle_v2r8(f+j_coord_offsetA,f+j_coord_offsetB,fscal,dx00,dy00,dz00);
201
202             /* Inner loop uses 35 flops */
203         }
204
205         if(jidx<j_index_end)
206         {
207
208             jnrA             = jjnr[jidx];
209             j_coord_offsetA  = DIM*jnrA;
210
211             /* load j atom coordinates */
212             gmx_fjsp_load_1rvec_1ptr_swizzle_v2r8(x+j_coord_offsetA,
213                                               &jx0,&jy0,&jz0);
214
215             /* Calculate displacement vector */
216             dx00             = _fjsp_sub_v2r8(ix0,jx0);
217             dy00             = _fjsp_sub_v2r8(iy0,jy0);
218             dz00             = _fjsp_sub_v2r8(iz0,jz0);
219
220             /* Calculate squared distance and things based on it */
221             rsq00            = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
222
223             rinvsq00         = gmx_fjsp_inv_v2r8(rsq00);
224
225             /* Load parameters for j particles */
226             vdwjidx0A        = 2*vdwtype[jnrA+0];
227
228             /**************************
229              * CALCULATE INTERACTIONS *
230              **************************/
231
232             /* Compute parameters for interactions between i and j atoms */
233             gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
234                                          vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
235
236             /* LENNARD-JONES DISPERSION/REPULSION */
237
238             rinvsix          = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
239             vvdw6            = _fjsp_mul_v2r8(c6_00,rinvsix);
240             vvdw12           = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
241             vvdw             = _fjsp_msub_v2r8( vvdw12,one_twelfth, _fjsp_mul_v2r8(vvdw6,one_sixth) );
242             fvdw             = _fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw12,vvdw6),rinvsq00);
243
244             /* Update potential sum for this i atom from the interaction with this j atom. */
245             vvdw             = _fjsp_unpacklo_v2r8(vvdw,_fjsp_setzero_v2r8());
246             vvdwsum          = _fjsp_add_v2r8(vvdwsum,vvdw);
247
248             fscal            = fvdw;
249
250             fscal            = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
251
252             /* Update vectorial force */
253             fix0             = _fjsp_madd_v2r8(dx00,fscal,fix0);
254             fiy0             = _fjsp_madd_v2r8(dy00,fscal,fiy0);
255             fiz0             = _fjsp_madd_v2r8(dz00,fscal,fiz0);
256             
257             gmx_fjsp_decrement_fma_1rvec_1ptr_swizzle_v2r8(f+j_coord_offsetA,fscal,dx00,dy00,dz00);
258
259             /* Inner loop uses 35 flops */
260         }
261
262         /* End of innermost loop */
263
264         gmx_fjsp_update_iforce_1atom_swizzle_v2r8(fix0,fiy0,fiz0,
265                                               f+i_coord_offset,fshift+i_shift_offset);
266
267         ggid                        = gid[iidx];
268         /* Update potential energies */
269         gmx_fjsp_update_1pot_v2r8(vvdwsum,kernel_data->energygrp_vdw+ggid);
270
271         /* Increment number of inner iterations */
272         inneriter                  += j_index_end - j_index_start;
273
274         /* Outer loop uses 7 flops */
275     }
276
277     /* Increment number of outer iterations */
278     outeriter        += nri;
279
280     /* Update outer/inner flops */
281
282     inc_nrnb(nrnb,eNR_NBKERNEL_VDW_VF,outeriter*7 + inneriter*35);
283 }
284 /*
285  * Gromacs nonbonded kernel:   nb_kernel_ElecNone_VdwLJ_GeomP1P1_F_sparc64_hpc_ace_double
286  * Electrostatics interaction: None
287  * VdW interaction:            LennardJones
288  * Geometry:                   Particle-Particle
289  * Calculate force/pot:        Force
290  */
291 void
292 nb_kernel_ElecNone_VdwLJ_GeomP1P1_F_sparc64_hpc_ace_double
293                     (t_nblist                    * gmx_restrict       nlist,
294                      rvec                        * gmx_restrict          xx,
295                      rvec                        * gmx_restrict          ff,
296                      struct t_forcerec           * gmx_restrict          fr,
297                      t_mdatoms                   * gmx_restrict     mdatoms,
298                      nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
299                      t_nrnb                      * gmx_restrict        nrnb)
300 {
301     /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
302      * just 0 for non-waters.
303      * Suffixes A,B refer to j loop unrolling done with double precision SIMD, e.g. for the two different
304      * jnr indices corresponding to data put in the four positions in the SIMD register.
305      */
306     int              i_shift_offset,i_coord_offset,outeriter,inneriter;
307     int              j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
308     int              jnrA,jnrB;
309     int              j_coord_offsetA,j_coord_offsetB;
310     int              *iinr,*jindex,*jjnr,*shiftidx,*gid;
311     real             rcutoff_scalar;
312     real             *shiftvec,*fshift,*x,*f;
313     _fjsp_v2r8       tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
314     int              vdwioffset0;
315     _fjsp_v2r8       ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
316     int              vdwjidx0A,vdwjidx0B;
317     _fjsp_v2r8       jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
318     _fjsp_v2r8       dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
319     int              nvdwtype;
320     _fjsp_v2r8       rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
321     int              *vdwtype;
322     real             *vdwparam;
323     _fjsp_v2r8       one_sixth   = gmx_fjsp_set1_v2r8(1.0/6.0);
324     _fjsp_v2r8       one_twelfth = gmx_fjsp_set1_v2r8(1.0/12.0);
325     _fjsp_v2r8       itab_tmp;
326     _fjsp_v2r8       dummy_mask,cutoff_mask;
327     _fjsp_v2r8       one     = gmx_fjsp_set1_v2r8(1.0);
328     _fjsp_v2r8       two     = gmx_fjsp_set1_v2r8(2.0);
329     union { _fjsp_v2r8 simd; long long int i[2]; } vfconv,gbconv,ewconv;
330
331     x                = xx[0];
332     f                = ff[0];
333
334     nri              = nlist->nri;
335     iinr             = nlist->iinr;
336     jindex           = nlist->jindex;
337     jjnr             = nlist->jjnr;
338     shiftidx         = nlist->shift;
339     gid              = nlist->gid;
340     shiftvec         = fr->shift_vec[0];
341     fshift           = fr->fshift[0];
342     nvdwtype         = fr->ntype;
343     vdwparam         = fr->nbfp;
344     vdwtype          = mdatoms->typeA;
345
346     /* Avoid stupid compiler warnings */
347     jnrA = jnrB = 0;
348     j_coord_offsetA = 0;
349     j_coord_offsetB = 0;
350
351     outeriter        = 0;
352     inneriter        = 0;
353
354     /* Start outer loop over neighborlists */
355     for(iidx=0; iidx<nri; iidx++)
356     {
357         /* Load shift vector for this list */
358         i_shift_offset   = DIM*shiftidx[iidx];
359
360         /* Load limits for loop over neighbors */
361         j_index_start    = jindex[iidx];
362         j_index_end      = jindex[iidx+1];
363
364         /* Get outer coordinate index */
365         inr              = iinr[iidx];
366         i_coord_offset   = DIM*inr;
367
368         /* Load i particle coords and add shift vector */
369         gmx_fjsp_load_shift_and_1rvec_broadcast_v2r8(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
370
371         fix0             = _fjsp_setzero_v2r8();
372         fiy0             = _fjsp_setzero_v2r8();
373         fiz0             = _fjsp_setzero_v2r8();
374
375         /* Load parameters for i particles */
376         vdwioffset0      = 2*nvdwtype*vdwtype[inr+0];
377
378         /* Start inner kernel loop */
379         for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
380         {
381
382             /* Get j neighbor index, and coordinate index */
383             jnrA             = jjnr[jidx];
384             jnrB             = jjnr[jidx+1];
385             j_coord_offsetA  = DIM*jnrA;
386             j_coord_offsetB  = DIM*jnrB;
387
388             /* load j atom coordinates */
389             gmx_fjsp_load_1rvec_2ptr_swizzle_v2r8(x+j_coord_offsetA,x+j_coord_offsetB,
390                                               &jx0,&jy0,&jz0);
391
392             /* Calculate displacement vector */
393             dx00             = _fjsp_sub_v2r8(ix0,jx0);
394             dy00             = _fjsp_sub_v2r8(iy0,jy0);
395             dz00             = _fjsp_sub_v2r8(iz0,jz0);
396
397             /* Calculate squared distance and things based on it */
398             rsq00            = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
399
400             rinvsq00         = gmx_fjsp_inv_v2r8(rsq00);
401
402             /* Load parameters for j particles */
403             vdwjidx0A        = 2*vdwtype[jnrA+0];
404             vdwjidx0B        = 2*vdwtype[jnrB+0];
405
406             /**************************
407              * CALCULATE INTERACTIONS *
408              **************************/
409
410             /* Compute parameters for interactions between i and j atoms */
411             gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
412                                          vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
413
414             /* LENNARD-JONES DISPERSION/REPULSION */
415
416             rinvsix          = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
417             fvdw             = _fjsp_mul_v2r8(_fjsp_msub_v2r8(c12_00,rinvsix,c6_00),_fjsp_mul_v2r8(rinvsix,rinvsq00));
418
419             fscal            = fvdw;
420
421             /* Update vectorial force */
422             fix0             = _fjsp_madd_v2r8(dx00,fscal,fix0);
423             fiy0             = _fjsp_madd_v2r8(dy00,fscal,fiy0);
424             fiz0             = _fjsp_madd_v2r8(dz00,fscal,fiz0);
425             
426             gmx_fjsp_decrement_fma_1rvec_2ptr_swizzle_v2r8(f+j_coord_offsetA,f+j_coord_offsetB,fscal,dx00,dy00,dz00);
427
428             /* Inner loop uses 30 flops */
429         }
430
431         if(jidx<j_index_end)
432         {
433
434             jnrA             = jjnr[jidx];
435             j_coord_offsetA  = DIM*jnrA;
436
437             /* load j atom coordinates */
438             gmx_fjsp_load_1rvec_1ptr_swizzle_v2r8(x+j_coord_offsetA,
439                                               &jx0,&jy0,&jz0);
440
441             /* Calculate displacement vector */
442             dx00             = _fjsp_sub_v2r8(ix0,jx0);
443             dy00             = _fjsp_sub_v2r8(iy0,jy0);
444             dz00             = _fjsp_sub_v2r8(iz0,jz0);
445
446             /* Calculate squared distance and things based on it */
447             rsq00            = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
448
449             rinvsq00         = gmx_fjsp_inv_v2r8(rsq00);
450
451             /* Load parameters for j particles */
452             vdwjidx0A        = 2*vdwtype[jnrA+0];
453
454             /**************************
455              * CALCULATE INTERACTIONS *
456              **************************/
457
458             /* Compute parameters for interactions between i and j atoms */
459             gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
460                                          vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
461
462             /* LENNARD-JONES DISPERSION/REPULSION */
463
464             rinvsix          = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
465             fvdw             = _fjsp_mul_v2r8(_fjsp_msub_v2r8(c12_00,rinvsix,c6_00),_fjsp_mul_v2r8(rinvsix,rinvsq00));
466
467             fscal            = fvdw;
468
469             fscal            = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
470
471             /* Update vectorial force */
472             fix0             = _fjsp_madd_v2r8(dx00,fscal,fix0);
473             fiy0             = _fjsp_madd_v2r8(dy00,fscal,fiy0);
474             fiz0             = _fjsp_madd_v2r8(dz00,fscal,fiz0);
475             
476             gmx_fjsp_decrement_fma_1rvec_1ptr_swizzle_v2r8(f+j_coord_offsetA,fscal,dx00,dy00,dz00);
477
478             /* Inner loop uses 30 flops */
479         }
480
481         /* End of innermost loop */
482
483         gmx_fjsp_update_iforce_1atom_swizzle_v2r8(fix0,fiy0,fiz0,
484                                               f+i_coord_offset,fshift+i_shift_offset);
485
486         /* Increment number of inner iterations */
487         inneriter                  += j_index_end - j_index_start;
488
489         /* Outer loop uses 6 flops */
490     }
491
492     /* Increment number of outer iterations */
493     outeriter        += nri;
494
495     /* Update outer/inner flops */
496
497     inc_nrnb(nrnb,eNR_NBKERNEL_VDW_F,outeriter*6 + inneriter*30);
498 }