5 #include "gmx_qhop_db.h"
7 int main(int argc
,char *argv
[])
10 char *donors
[] = { "H3O+", "ACE" };
11 char *acceptors
[] = { "H2O", "GLU" };
15 if ((db
= gmx_qhop_db_read("ffoplsaa")) == NULL
)
16 gmx_fatal(FARGS
,"Can not read qhop database information");
17 if (gmx_qhop_db_write("koe.dat",db
) != 1)
18 gmx_fatal(FARGS
,"Can not write qhop database information");
20 for(i
=0; (i
<asize(donors
)); i
++) {
21 for(j
=0; (j
<asize(acceptors
)); j
++) {
22 if (gmx_qhop_db_get_parameters(db
,donors
[i
],acceptors
[j
],&qp
) == 1) {
23 printf("Found qhop parameters for donor %s and acceptor %s\n",
24 donors
[i
],acceptors
[j
]);
27 printf("Could not find qhop parameters for donor %s and acceptor %s\n",
28 donors
[i
],acceptors
[j
]);
33 if (gmx_qhop_db_done(db
) != 1)
34 gmx_fatal(FARGS
,"Error destroying qhop data");