本文整理汇总了C++中snew_bc函数的典型用法代码示例。如果您正苦于以下问题:C++ snew_bc函数的具体用法?C++ snew_bc怎么用?C++ snew_bc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了snew_bc函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: bc_atomtypes
static void bc_atomtypes(const t_commrec *cr, t_atomtypes *atomtypes)
{
int nr;
block_bc(cr,atomtypes->nr);
nr = atomtypes->nr;
snew_bc(cr,atomtypes->radius,nr);
snew_bc(cr,atomtypes->vol,nr);
snew_bc(cr,atomtypes->surftens,nr);
snew_bc(cr,atomtypes->gb_radius,nr);
snew_bc(cr,atomtypes->S_hct,nr);
nblock_bc(cr,nr,atomtypes->radius);
nblock_bc(cr,nr,atomtypes->vol);
nblock_bc(cr,nr,atomtypes->surftens);
nblock_bc(cr,nr,atomtypes->gb_radius);
nblock_bc(cr,nr,atomtypes->S_hct);
}
开发者ID:aar2163,项目名称:GROMACS,代码行数:20,代码来源:mvdata.c
示例2: bc_pull
static void bc_pull(const t_commrec *cr,t_pull *pull)
{
int g;
block_bc(cr,*pull);
snew_bc(cr,pull->grp,pull->ngrp+1);
for(g=0; g<pull->ngrp+1; g++)
{
bc_pullgrp(cr,&pull->grp[g]);
}
}
开发者ID:andersx,项目名称:gmx-debug,代码行数:11,代码来源:mvdata.c
示例3: bc_cmap
static void bc_cmap(const t_commrec *cr, gmx_cmap_t *cmap_grid)
{
int i, j, nelem, ngrid;
block_bc(cr, cmap_grid->ngrid);
block_bc(cr, cmap_grid->grid_spacing);
ngrid = cmap_grid->ngrid;
nelem = cmap_grid->grid_spacing * cmap_grid->grid_spacing;
if (ngrid > 0)
{
snew_bc(cr, cmap_grid->cmapdata, ngrid);
for (i = 0; i < ngrid; i++)
{
snew_bc(cr, cmap_grid->cmapdata[i].cmap, 4*nelem);
nblock_bc(cr, 4*nelem, cmap_grid->cmapdata[i].cmap);
}
}
}
开发者ID:rbharath,项目名称:gromacs,代码行数:21,代码来源:mvdata.c
示例4: bc_simtempvals
static void bc_simtempvals(const t_commrec *cr, t_simtemp *simtemp, int n_lambda)
{
block_bc(cr, simtemp->simtemp_low);
block_bc(cr, simtemp->simtemp_high);
block_bc(cr, simtemp->eSimTempScale);
snew_bc(cr, simtemp->temperatures, n_lambda);
nblock_bc(cr, n_lambda, simtemp->temperatures);
if (debug)
{
fprintf(debug, "after bc_simtempvals\n");
}
}
开发者ID:MelroLeandro,项目名称:gromacs,代码行数:12,代码来源:broadcaststructs.cpp
示例5: bc_swapions
static void bc_swapions(const t_commrec *cr, t_swapcoords *swap)
{
int i;
block_bc(cr, *swap);
/* Broadcast ion group atom indices */
snew_bc(cr, swap->ind, swap->nat);
nblock_bc(cr, swap->nat, swap->ind);
/* Broadcast split groups atom indices */
for (i = 0; i < 2; i++)
{
snew_bc(cr, swap->ind_split[i], swap->nat_split[i]);
nblock_bc(cr, swap->nat_split[i], swap->ind_split[i]);
}
/* Broadcast solvent group atom indices */
snew_bc(cr, swap->ind_sol, swap->nat_sol);
nblock_bc(cr, swap->nat_sol, swap->ind_sol);
}
开发者ID:rbharath,项目名称:gromacs,代码行数:22,代码来源:mvdata.c
示例6: bc_symtab
static void bc_symtab(const t_commrec *cr, t_symtab *symtab)
{
int i, nr, len;
t_symbuf *symbuf;
block_bc(cr, symtab->nr);
nr = symtab->nr;
snew_bc(cr, symtab->symbuf, 1);
symbuf = symtab->symbuf;
symbuf->bufsize = nr;
snew_bc(cr, symbuf->buf, nr);
for (i = 0; i < nr; i++)
{
if (MASTER(cr))
{
len = strlen(symbuf->buf[i]) + 1;
}
block_bc(cr, len);
snew_bc(cr, symbuf->buf[i], len);
nblock_bc(cr, len, symbuf->buf[i]);
}
}
开发者ID:rbharath,项目名称:gromacs,代码行数:22,代码来源:mvdata.c
示例7: bc_molblock
static void bc_molblock(const t_commrec *cr, gmx_molblock_t *molb)
{
block_bc(cr, molb->type);
block_bc(cr, molb->nmol);
block_bc(cr, molb->natoms_mol);
block_bc(cr, molb->nposres_xA);
if (molb->nposres_xA > 0)
{
snew_bc(cr, molb->posres_xA, molb->nposres_xA);
nblock_bc(cr, molb->nposres_xA*DIM, molb->posres_xA[0]);
}
block_bc(cr, molb->nposres_xB);
if (molb->nposres_xB > 0)
{
snew_bc(cr, molb->posres_xB, molb->nposres_xB);
nblock_bc(cr, molb->nposres_xB*DIM, molb->posres_xB[0]);
}
if (debug)
{
fprintf(debug, "after bc_molblock\n");
}
}
开发者ID:MelroLeandro,项目名称:gromacs,代码行数:22,代码来源:broadcaststructs.cpp
示例8: bc_inputrec
static void bc_inputrec(const t_commrec *cr, t_inputrec *inputrec)
{
int i;
block_bc(cr, *inputrec);
bc_grpopts(cr, &(inputrec->opts));
/* even if efep is efepNO, we need to initialize to make sure that
* n_lambda is set to zero */
snew_bc(cr, inputrec->fepvals, 1);
if (inputrec->efep != efepNO || inputrec->bSimTemp)
{
bc_fepvals(cr, inputrec->fepvals);
}
/* need to initialize this as well because of data checked for in the logic */
snew_bc(cr, inputrec->expandedvals, 1);
if (inputrec->bExpanded)
{
bc_expandedvals(cr, inputrec->expandedvals, inputrec->fepvals->n_lambda);
}
snew_bc(cr, inputrec->simtempvals, 1);
if (inputrec->bSimTemp)
{
bc_simtempvals(cr, inputrec->simtempvals, inputrec->fepvals->n_lambda);
}
if (inputrec->bPull)
{
snew_bc(cr, inputrec->pull, 1);
bc_pull(cr, inputrec->pull);
}
if (inputrec->bRot)
{
snew_bc(cr, inputrec->rot, 1);
bc_rot(cr, inputrec->rot);
}
if (inputrec->bIMD)
{
snew_bc(cr, inputrec->imd, 1);
bc_imd(cr, inputrec->imd);
}
for (i = 0; (i < DIM); i++)
{
bc_cosines(cr, &(inputrec->ex[i]));
bc_cosines(cr, &(inputrec->et[i]));
}
if (inputrec->eSwapCoords != eswapNO)
{
snew_bc(cr, inputrec->swap, 1);
bc_swapions(cr, inputrec->swap);
}
}
开发者ID:MelroLeandro,项目名称:gromacs,代码行数:53,代码来源:broadcaststructs.cpp
示例9: bc_inputrec
static void bc_inputrec(const t_commrec *cr, t_inputrec *inputrec)
{
/* The statement below is dangerous. It overwrites all structures in inputrec.
* If something is added to inputrec, like efield it will need to be
* treated here.
*/
gmx::IInputRecExtension *eptr = inputrec->efield;
block_bc(cr, *inputrec);
inputrec->efield = eptr;
bc_grpopts(cr, &(inputrec->opts));
/* even if efep is efepNO, we need to initialize to make sure that
* n_lambda is set to zero */
snew_bc(cr, inputrec->fepvals, 1);
if (inputrec->efep != efepNO || inputrec->bSimTemp)
{
bc_fepvals(cr, inputrec->fepvals);
}
/* need to initialize this as well because of data checked for in the logic */
snew_bc(cr, inputrec->expandedvals, 1);
if (inputrec->bExpanded)
{
bc_expandedvals(cr, inputrec->expandedvals, inputrec->fepvals->n_lambda);
}
snew_bc(cr, inputrec->simtempvals, 1);
if (inputrec->bSimTemp)
{
bc_simtempvals(cr, inputrec->simtempvals, inputrec->fepvals->n_lambda);
}
if (inputrec->bPull)
{
snew_bc(cr, inputrec->pull, 1);
bc_pull(cr, inputrec->pull);
}
if (inputrec->bRot)
{
snew_bc(cr, inputrec->rot, 1);
bc_rot(cr, inputrec->rot);
}
if (inputrec->bIMD)
{
snew_bc(cr, inputrec->imd, 1);
bc_imd(cr, inputrec->imd);
}
inputrec->efield->broadCast(cr);
if (inputrec->eSwapCoords != eswapNO)
{
snew_bc(cr, inputrec->swap, 1);
bc_swapions(cr, inputrec->swap);
}
}
开发者ID:MrTheodor,项目名称:gromacs,代码行数:53,代码来源:broadcaststructs.cpp
示例10: bc_fepvals
static void bc_fepvals(const t_commrec *cr, t_lambda *fep)
{
gmx_bool bAlloc = TRUE;
int i;
block_bc(cr, fep->nstdhdl);
block_bc(cr, fep->init_lambda);
block_bc(cr, fep->init_fep_state);
block_bc(cr, fep->delta_lambda);
block_bc(cr, fep->bPrintEnergy);
block_bc(cr, fep->n_lambda);
if (fep->n_lambda > 0)
{
snew_bc(cr, fep->all_lambda, efptNR);
nblock_bc(cr, efptNR, fep->all_lambda);
for (i = 0; i < efptNR; i++)
{
snew_bc(cr, fep->all_lambda[i], fep->n_lambda);
nblock_bc(cr, fep->n_lambda, fep->all_lambda[i]);
}
}
block_bc(cr, fep->sc_alpha);
block_bc(cr, fep->sc_power);
block_bc(cr, fep->sc_r_power);
block_bc(cr, fep->sc_sigma);
block_bc(cr, fep->sc_sigma_min);
block_bc(cr, fep->bScCoul);
nblock_bc(cr, efptNR, &(fep->separate_dvdl[0]));
block_bc(cr, fep->dhdl_derivatives);
block_bc(cr, fep->dh_hist_size);
block_bc(cr, fep->dh_hist_spacing);
if (debug)
{
fprintf(debug, "after bc_fepvals\n");
}
}
开发者ID:rbharath,项目名称:gromacs,代码行数:36,代码来源:mvdata.c
示例11: bc_swapions
static void bc_swapions(const t_commrec *cr, t_swapcoords *swap)
{
block_bc(cr, *swap);
/* Broadcast atom indices for split groups, solvent group, and for all user-defined swap groups */
snew_bc(cr, swap->grp, swap->ngrp);
for (int i = 0; i < swap->ngrp; i++)
{
t_swapGroup *g = &swap->grp[i];
block_bc(cr, *g);
snew_bc(cr, g->ind, g->nat);
nblock_bc(cr, g->nat, g->ind);
int len = 0;
if (MASTER(cr))
{
len = strlen(g->molname);
}
block_bc(cr, len);
snew_bc(cr, g->molname, len);
nblock_bc(cr, len, g->molname);
}
}
开发者ID:MelroLeandro,项目名称:gromacs,代码行数:24,代码来源:broadcaststructs.cpp
示例12: bc_pull
static void bc_pull(const t_commrec *cr, pull_params_t *pull)
{
int g;
block_bc(cr, *pull);
snew_bc(cr, pull->group, pull->ngroup);
for (g = 0; g < pull->ngroup; g++)
{
bc_pull_group(cr, &pull->group[g]);
}
snew_bc(cr, pull->coord, pull->ncoord);
nblock_bc(cr, pull->ncoord, pull->coord);
for (int c = 0; c < pull->ncoord; c++)
{
if (!MASTER(cr))
{
pull->coord[c].externalPotentialProvider = NULL;
}
if (pull->coord[c].eType == epullEXTERNAL)
{
bc_cstring(cr, &pull->coord[c].externalPotentialProvider);
}
}
}
开发者ID:MichalKononenko,项目名称:gromacs,代码行数:24,代码来源:broadcaststructs.cpp
示例13: bc_ilists
static void bc_ilists(const t_commrec *cr, t_ilist *ilist)
{
int ftype;
/* Here we only communicate the non-zero length ilists */
if (MASTER(cr))
{
for (ftype = 0; ftype < F_NRE; ftype++)
{
if (ilist[ftype].nr > 0)
{
block_bc(cr, ftype);
block_bc(cr, ilist[ftype].nr);
nblock_bc(cr, ilist[ftype].nr, ilist[ftype].iatoms);
}
}
ftype = -1;
block_bc(cr, ftype);
}
else
{
for (ftype = 0; ftype < F_NRE; ftype++)
{
ilist[ftype].nr = 0;
}
do
{
block_bc(cr, ftype);
if (ftype >= 0)
{
block_bc(cr, ilist[ftype].nr);
snew_bc(cr, ilist[ftype].iatoms, ilist[ftype].nr);
nblock_bc(cr, ilist[ftype].nr, ilist[ftype].iatoms);
}
}
while (ftype >= 0);
}
if (debug)
{
fprintf(debug, "after bc_ilists\n");
}
}
开发者ID:rbharath,项目名称:gromacs,代码行数:43,代码来源:mvdata.c
示例14: bc_strings
static void bc_strings(const t_commrec *cr,t_symtab *symtab,int nr,char ****nm)
{
int i;
int *handle;
char ***NM;
snew(handle,nr);
if (MASTER(cr)) {
NM = *nm;
for(i=0; (i<nr); i++)
handle[i] = lookup_symtab(symtab,NM[i]);
}
nblock_bc(cr,nr,handle);
if (!MASTER(cr)) {
snew_bc(cr,*nm,nr);
NM = *nm;
for (i=0; (i<nr); i++)
(*nm)[i] = get_symtab_handle(symtab,handle[i]);
}
sfree(handle);
}
开发者ID:aar2163,项目名称:GROMACS,代码行数:22,代码来源:mvdata.c
示例15: bc_groups
static void bc_groups(const t_commrec *cr, t_symtab *symtab,
int natoms, gmx_groups_t *groups)
{
int dummy;
int g, n;
bc_grps(cr, groups->grps);
block_bc(cr, groups->ngrpname);
bc_strings(cr, symtab, groups->ngrpname, &groups->grpname);
for (g = 0; g < egcNR; g++)
{
if (MASTER(cr))
{
if (groups->grpnr[g])
{
n = natoms;
}
else
{
n = 0;
}
}
block_bc(cr, n);
if (n == 0)
{
groups->grpnr[g] = NULL;
}
else
{
snew_bc(cr, groups->grpnr[g], n);
nblock_bc(cr, n, groups->grpnr[g]);
}
}
if (debug)
{
fprintf(debug, "after bc_groups\n");
}
}
开发者ID:rbharath,项目名称:gromacs,代码行数:38,代码来源:mvdata.c
示例16: bc_grpopts
static void bc_grpopts(const t_commrec *cr, t_grpopts *g)
{
int i, n;
block_bc(cr, g->ngtc);
block_bc(cr, g->ngacc);
block_bc(cr, g->ngfrz);
block_bc(cr, g->ngener);
snew_bc(cr, g->nrdf, g->ngtc);
snew_bc(cr, g->tau_t, g->ngtc);
snew_bc(cr, g->ref_t, g->ngtc);
snew_bc(cr, g->acc, g->ngacc);
snew_bc(cr, g->nFreeze, g->ngfrz);
snew_bc(cr, g->egp_flags, g->ngener*g->ngener);
nblock_bc(cr, g->ngtc, g->nrdf);
nblock_bc(cr, g->ngtc, g->tau_t);
nblock_bc(cr, g->ngtc, g->ref_t);
nblock_bc(cr, g->ngacc, g->acc);
nblock_bc(cr, g->ngfrz, g->nFreeze);
nblock_bc(cr, g->ngener*g->ngener, g->egp_flags);
snew_bc(cr, g->annealing, g->ngtc);
snew_bc(cr, g->anneal_npoints, g->ngtc);
snew_bc(cr, g->anneal_time, g->ngtc);
snew_bc(cr, g->anneal_temp, g->ngtc);
nblock_bc(cr, g->ngtc, g->annealing);
nblock_bc(cr, g->ngtc, g->anneal_npoints);
for (i = 0; (i < g->ngtc); i++)
{
n = g->anneal_npoints[i];
if (n > 0)
{
snew_bc(cr, g->anneal_time[i], n);
snew_bc(cr, g->anneal_temp[i], n);
nblock_bc(cr, n, g->anneal_time[i]);
nblock_bc(cr, n, g->anneal_temp[i]);
}
}
/* QMMM stuff, see inputrec */
block_bc(cr, g->ngQM);
snew_bc(cr, g->QMmethod, g->ngQM);
snew_bc(cr, g->QMbasis, g->ngQM);
snew_bc(cr, g->QMcharge, g->ngQM);
snew_bc(cr, g->QMmult, g->ngQM);
snew_bc(cr, g->bSH, g->ngQM);
snew_bc(cr, g->CASorbitals, g->ngQM);
snew_bc(cr, g->CASelectrons, g->ngQM);
snew_bc(cr, g->SAon, g->ngQM);
snew_bc(cr, g->SAoff, g->ngQM);
snew_bc(cr, g->SAsteps, g->ngQM);
if (g->ngQM)
{
nblock_bc(cr, g->ngQM, g->QMmethod);
nblock_bc(cr, g->ngQM, g->QMbasis);
nblock_bc(cr, g->ngQM, g->QMcharge);
nblock_bc(cr, g->ngQM, g->QMmult);
nblock_bc(cr, g->ngQM, g->bSH);
nblock_bc(cr, g->ngQM, g->CASorbitals);
nblock_bc(cr, g->ngQM, g->CASelectrons);
nblock_bc(cr, g->ngQM, g->SAon);
nblock_bc(cr, g->ngQM, g->SAoff);
nblock_bc(cr, g->ngQM, g->SAsteps);
/* end of QMMM stuff */
}
}
开发者ID:rbharath,项目名称:gromacs,代码行数:67,代码来源:mvdata.c
示例17: bcast_state
void bcast_state(const t_commrec *cr, t_state *state)
{
int i, nnht, nnhtp;
gmx_bool bAlloc;
if (!PAR(cr))
{
return;
}
/* Broadcasts the state sizes and flags from the master to all nodes
* in cr->mpi_comm_mygroup. The arrays are not broadcasted. */
block_bc(cr, state->natoms);
block_bc(cr, state->ngtc);
block_bc(cr, state->nnhpres);
block_bc(cr, state->nhchainlength);
block_bc(cr, state->flags);
if (state->lambda == NULL)
{
snew_bc(cr, state->lambda, efptNR)
}
if (cr->dd)
{
/* We allocate dynamically in dd_partition_system. */
return;
}
/* The code below is reachable only by TPI and NM, so it is not
tested by anything. */
nnht = (state->ngtc)*(state->nhchainlength);
nnhtp = (state->nnhpres)*(state->nhchainlength);
/* We still need to allocate the arrays in state for non-master
* ranks, which is done (implicitly via bAlloc) in the dirty,
* dirty nblock_abc macro. */
bAlloc = !MASTER(cr);
if (bAlloc)
{
state->nalloc = state->natoms;
}
for (i = 0; i < estNR; i++)
{
if (state->flags & (1<<i))
{
switch (i)
{
case estLAMBDA: nblock_bc(cr, efptNR, state->lambda); break;
case estFEPSTATE: block_bc(cr, state->fep_state); break;
case estBOX: block_bc(cr, state->box); break;
case estBOX_REL: block_bc(cr, state->box_rel); break;
case estBOXV: block_bc(cr, state->boxv); break;
case estPRES_PREV: block_bc(cr, state->pres_prev); break;
case estSVIR_PREV: block_bc(cr, state->svir_prev); break;
case estFVIR_PREV: block_bc(cr, state->fvir_prev); break;
case estNH_XI: nblock_abc(cr, nnht, state->nosehoover_xi); break;
case estNH_VXI: nblock_abc(cr, nnht, state->nosehoover_vxi); break;
case estNHPRES_XI: nblock_abc(cr, nnhtp, state->nhpres_xi); break;
case estNHPRES_VXI: nblock_abc(cr, nnhtp, state->nhpres_vxi); break;
case estTC_INT: nblock_abc(cr, state->ngtc, state->therm_integral); break;
case estVETA: block_bc(cr, state->veta); break;
case estVOL0: block_bc(cr, state->vol0); break;
case estX: nblock_abc(cr, state->natoms, state->x); break;
case estV: nblock_abc(cr, state->natoms, state->v); break;
case estSDX: nblock_abc(cr, state->natoms, state->sd_X); break;
case estCGP: nblock_abc(cr, state->natoms, state->cg_p); break;
case estDISRE_INITF: block_bc(cr, state->hist.disre_initf); break;
case estDISRE_RM3TAV:
block_bc(cr, state->hist.ndisrepairs);
nblock_abc(cr, state->hist.ndisrepairs, state->hist.disre_rm3tav);
break;
case estORIRE_INITF: block_bc(cr, state->hist.orire_initf); break;
case estORIRE_DTAV:
block_bc(cr, state->hist.norire_Dtav);
nblock_abc(cr, state->hist.norire_Dtav, state->hist.orire_Dtav);
break;
default:
gmx_fatal(FARGS,
"Communication is not implemented for %s in bcast_state",
est_names[i]);
}
}
}
}
开发者ID:rbharath,项目名称:gromacs,代码行数:84,代码来源:mvdata.c
示例18: bc_block
static void bc_block(const t_commrec *cr, t_block *block)
{
block_bc(cr, block->nr);
snew_bc(cr, block->index, block->nr+1);
nblock_bc(cr, block->nr+1, block->index);
}
开发者ID:rbharath,项目名称:gromacs,代码行数:6,代码来源:mvdata.c
示例19: bc_imd
static void bc_imd(const t_commrec *cr, t_IMD *imd)
{
block_bc(cr, *imd);
snew_bc(cr, imd->ind, imd->nat);
nblock_bc(cr, imd->nat, imd->ind);
}
开发者ID:MelroLeandro,项目名称:gromacs,代码行数:6,代码来源:broadcaststructs.cpp
注:本文中的snew_bc函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论