snew(top, 1);
/* TODO: Get rid of the const casts below, e.g. by using a reference */
- top->idef.ntypes = top_global->ffparams.numTypes();
- top->idef.atnr = top_global->ffparams.atnr;
- top->idef.functype = const_cast<t_functype *>(top_global->ffparams.functype.data());
- top->idef.iparams = const_cast<t_iparams *>(top_global->ffparams.iparams.data());
- top->idef.fudgeQQ = top_global->ffparams.fudgeQQ;
- top->idef.cmap_grid = top_global->ffparams.cmap_grid;
-
- top->idef.ilsort = ilsortUNKNOWN;
+ top->idef.ntypes = top_global->ffparams.numTypes();
+ top->idef.atnr = top_global->ffparams.atnr;
+ top->idef.functype = const_cast<t_functype *>(top_global->ffparams.functype.data());
+ top->idef.iparams = const_cast<t_iparams *>(top_global->ffparams.iparams.data());
+ top->idef.fudgeQQ = top_global->ffparams.fudgeQQ;
+ top->idef.cmap_grid = new gmx_cmap_t;
+ *top->idef.cmap_grid = top_global->ffparams.cmap_grid;
+
+ top->idef.ilsort = ilsortUNKNOWN;
return top;
}