Beispiel #1
0
static int get_nharm(const gmx_mtop_t *mtop)
{
    int nh = 0;

    for (int j = 0; (j < mtop->nmolblock); j++)
    {
        int mt  = mtop->molblock[j].type;
        nh += mtop->molblock[j].nmol * get_nharm_mt(&(mtop->moltype[mt]));
    }
    return nh;
}
Beispiel #2
0
static int get_nharm(gmx_mtop_t *mtop, int *nvsites)
{
    int j, mt, nh, nv;

    nh = 0;
    nv = 0;
    for (j = 0; (j < mtop->nmolblock); j++)
    {
        mt  = mtop->molblock[j].type;
        nh += mtop->molblock[j].nmol * get_nharm_mt(&(mtop->moltype[mt]));
        nv += mtop->molblock[j].nmol * get_nvsite_mt(&(mtop->moltype[mt]));
    }
    *nvsites = nv;
    return nh;
}