1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_p8vector_ok } */
4 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
5 /* { dg-options "-mcpu=power8 -O3 -funroll-loops" } */
12 typedef long unsigned int size_t;
13 typedef struct _IO_FILE
FILE;
16 typedef real matrix
[3][3];
17 typedef real tensor
[3][3];
20 F_BONDS
, F_G96BONDS
, F_MORSE
, F_CUBICBONDS
, F_CONNBONDS
, F_HARMONIC
,
21 F_ANGLES
, F_G96ANGLES
, F_PDIHS
, F_RBDIHS
, F_IDIHS
, F_LJ14
, F_COUL14
, F_LJ
,
22 F_BHAM
, F_LJLR
, F_DISPCORR
, F_SR
, F_LR
, F_WPOL
, F_POSRES
, F_DISRES
,
23 F_DISRESVIOL
, F_ORIRES
, F_ORIRESDEV
, F_ANGRES
, F_ANGRESZ
, F_SHAKE
,
24 F_SHAKENC
, F_SETTLE
, F_DUMMY2
, F_DUMMY3
, F_DUMMY3FD
, F_DUMMY3FAD
,
25 F_DUMMY3OUT
, F_DUMMY4FD
, F_EQM
, F_EPOT
, F_EKIN
, F_ETOT
, F_TEMP
, F_PRES
,
26 F_DVDL
, F_DVDLKIN
, F_NRE
36 real rA
, krA
, rB
, krB
;
68 eoPres
, eoEpot
, eoVir
, eoDist
, eoMu
, eoForce
, eoFx
, eoFy
, eoFz
, eoPx
, eoPy
,
69 eoPz
, eoPolarizability
, eoDipole
, eoObsNR
, eoMemory
=
70 eoObsNR
, eoInter
, eoUseVirial
, eoNR
72 extern char *eoNames
[eoNR
];
86 real act_value
[eoObsNR
];
87 real av_value
[eoObsNR
];
88 real ref_value
[eoObsNR
];
89 int bObsUsed
[eoObsNR
];
90 int nLJ
, nBU
, nQ
, nIP
;
95 real
calc_deviation ();
98 pr_ff (t_coupl_rec
* tcr
, real time
, t_idef
* idef
, t_commrec
* cr
, int nfile
,
102 static FILE **out
= ((void *) 0);
103 static FILE **qq
= ((void *) 0);
104 static FILE **ip
= ((void *) 0);
111 if ((prop
== ((void *) 0)) && (out
== ((void *) 0)) && (qq
== ((void *) 0))
112 && (ip
== ((void *) 0)))
114 for (i
= j
= 0; (i
< eoObsNR
); i
++)
116 if (tcr
->bObsUsed
[i
])
120 (__builtin_constant_p (eoNames
[i
])
121 && ((size_t) (const void *) ((eoNames
[i
]) + 1) -
122 (size_t) (const void *) (eoNames
[i
]) ==
123 1) ? (((const char *) (eoNames
[i
]))[0] ==
124 '\0' ? (char *) calloc ((size_t) 1,
143 )): __strdup (eoNames
[i
])));
146 (__builtin_constant_p (buf
)
147 && ((size_t) (const void *) ((buf
) + 1) -
148 (size_t) (const void *) (buf
) ==
149 1) ? (((const char *) (buf
))[0] ==
150 '\0' ? (char *) calloc ((size_t) 1,
168 )): __strdup (buf
)));
173 for (i
= 0; (i
< tcr
->nLJ
); i
++)
175 if (tcr
->tcLJ
[i
].bPrint
)
177 xvgr_legend (out
[i
], (sizeof (leg
) / sizeof ((leg
)[0])),
186 do_coupling (FILE * log
, int nfile
, t_filenm fnm
[], t_coupl_rec
* tcr
, real t
,
187 int step
, real ener
[], t_forcerec
* fr
, t_inputrec
* ir
,
188 int bMaster
, t_mdatoms
* md
, t_idef
* idef
, real mu_aver
,
189 int nmols
, t_commrec
* cr
, matrix box
, tensor virial
,
190 tensor pres
, rvec mu_tot
, rvec x
[], rvec f
[], int bDoIt
)
192 int i
, j
, ati
, atj
, atnr2
, type
, ftype
;
193 real deviation
[eoObsNR
], prdev
[eoObsNR
], epot0
, dist
, rmsf
;
194 real ff6
, ff12
, ffa
, ffb
, ffc
, ffq
, factor
, dt
, mu_ind
;
196 t_coupl_iparams
*tip
;
199 pr_ff (tcr
, t
, idef
, cr
, nfile
, fnm
);
201 for (i
= 0; (i
< eoObsNR
); i
++)
204 calc_deviation (tcr
->av_value
[i
], tcr
->act_value
[i
],
206 prdev
[i
] = tcr
->ref_value
[i
] - tcr
->act_value
[i
];
209 pr_dev (tcr
, t
, prdev
, cr
, nfile
, fnm
);
210 for (i
= 0; (i
< atnr2
); i
++)
212 factor
= dt
* deviation
[tip
->eObs
];
216 if (fabs (tip
->xi
.harmonic
.krA
) > 1.2e-38)
217 idef
->iparams
[type
].harmonic
.krA
*=
218 (1 + factor
/ tip
->xi
.harmonic
.krA
);