示例#1
0
文件: mvdata.c 项目: aar2163/GROMACS
void bcast_ir_mtop(const t_commrec *cr,t_inputrec *inputrec,gmx_mtop_t *mtop)
{
  int i; 
  if (debug) fprintf(debug,"in bc_data\n");
  bc_inputrec(cr,inputrec);
  if (debug) fprintf(debug,"after bc_inputrec\n");
  bc_symtab(cr,&mtop->symtab);
  if (debug) fprintf(debug,"after bc_symtab\n");
  bc_string(cr,&mtop->symtab,&mtop->name);
  if (debug) fprintf(debug,"after bc_name\n");

  bc_ffparams(cr,&mtop->ffparams);

  block_bc(cr,mtop->nmoltype);
  snew_bc(cr,mtop->moltype,mtop->nmoltype);
  for(i=0; i<mtop->nmoltype; i++) {
    bc_moltype(cr,&mtop->symtab,&mtop->moltype[i]);
  }

  block_bc(cr,mtop->nmolblock);
  snew_bc(cr,mtop->molblock,mtop->nmolblock);
  for(i=0; i<mtop->nmolblock; i++) {
    bc_molblock(cr,&mtop->molblock[i]);
  }

  block_bc(cr,mtop->natoms);

  bc_atomtypes(cr,&mtop->atomtypes);

  bc_block(cr,&mtop->mols);
  bc_groups(cr,&mtop->symtab,mtop->natoms,&mtop->groups);
  bc_cmap(cr,&mtop->cmap_grid);
}
示例#2
0
/*! \brief Broadcasts ir and mtop from the master to all nodes in
 * cr->mpi_comm_mygroup. */
static
void bcast_ir_mtop(const t_commrec *cr, t_inputrec *inputrec, gmx_mtop_t *mtop)
{
    int i;
    if (debug)
    {
        fprintf(debug, "in bc_data\n");
    }
    bc_inputrec(cr, inputrec);
    if (debug)
    {
        fprintf(debug, "after bc_inputrec\n");
    }
    bc_symtab(cr, &mtop->symtab);
    if (debug)
    {
        fprintf(debug, "after bc_symtab\n");
    }
    bc_string(cr, &mtop->symtab, &mtop->name);
    if (debug)
    {
        fprintf(debug, "after bc_name\n");
    }

    bc_ffparams(cr, &mtop->ffparams);

    block_bc(cr, mtop->nmoltype);
    snew_bc(cr, mtop->moltype, mtop->nmoltype);
    for (i = 0; i < mtop->nmoltype; i++)
    {
        bc_moltype(cr, &mtop->symtab, &mtop->moltype[i]);
    }

    block_bc(cr, mtop->bIntermolecularInteractions);
    if (mtop->bIntermolecularInteractions)
    {
        snew_bc(cr, mtop->intermolecular_ilist, F_NRE);
        bc_ilists(cr, mtop->intermolecular_ilist);
    }

    block_bc(cr, mtop->nmolblock);
    snew_bc(cr, mtop->molblock, mtop->nmolblock);
    for (i = 0; i < mtop->nmolblock; i++)
    {
        bc_molblock(cr, &mtop->molblock[i]);
    }

    block_bc(cr, mtop->natoms);

    bc_atomtypes(cr, &mtop->atomtypes);

    bc_block(cr, &mtop->mols);
    bc_groups(cr, &mtop->symtab, mtop->natoms, &mtop->groups);
}