Exemplo n.º 1
0
/* add a bunch of samples - note fep_state is double to allow for better data storage */
void mde_delta_h_coll_add_dh(t_mde_delta_h_coll *dhc,
                             double fep_state,
                             double energy,
                             double pV,
                             int bExpanded,
                             int bPrintEnergy,
                             int bPressure,
                             int ndhdl,
                             int nlambda,
                             double *dhdl,
                             double *foreign_dU,
                             double time)
{
    int i,n;

    if (!dhc->start_time_set)
    {
        dhc->start_time_set=TRUE;
        dhc->start_time=time;
    }

    n = 0;
    if (bExpanded)
    {
        mde_delta_h_add_dh(dhc->dh+n,fep_state,time);
        n++;
    }
    if (bPrintEnergy)
    {
        mde_delta_h_add_dh(dhc->dh+n,energy,time);
        n++;
    }
    for (i=0;i<ndhdl;i++)
    {
        mde_delta_h_add_dh(dhc->dh+n, dhdl[i], time);
        n++;
    }
    for (i=0;i<nlambda;i++)
    {
        mde_delta_h_add_dh(dhc->dh+n, foreign_dU[i], time);
        n++;
    }
    if (bPressure)
    {
        mde_delta_h_add_dh(dhc->dh+n, pV, time);
        n++;
    }
}
Exemplo n.º 2
0
/* add a bunch of samples - note fep_state is double to allow for better data storage */
void mde_delta_h_coll_add_dh(t_mde_delta_h_coll *dhc,
                             double              fep_state,
                             double              energy,
                             double              pV,
                             double             *dhdl,
                             double             *foreign_dU,
                             double              time)
{
    int i;

    if (!dhc->start_time_set)
    {
        dhc->start_time_set = TRUE;
        dhc->start_time     = time;
    }

    for (i = 0; i < dhc->ndhdl; i++)
    {
        mde_delta_h_add_dh(dhc->dh_dhdl+i, dhdl[i], time);
    }
    for (i = 0; i < dhc->nlambda; i++)
    {
        mde_delta_h_add_dh(dhc->dh_du+i, foreign_dU[i], time);
    }
    if (dhc->dh_pv != NULL)
    {
        mde_delta_h_add_dh(dhc->dh_pv, pV, time);
    }
    if (dhc->dh_energy != NULL)
    {
        mde_delta_h_add_dh(dhc->dh_energy, energy, time);
    }
    if (dhc->dh_expanded != NULL)
    {
        mde_delta_h_add_dh(dhc->dh_expanded, fep_state, time);
    }

}