Exemple #1
0
static void pr_moltype(FILE *fp,int indent,const char *title,
                       gmx_moltype_t *molt,int n,
                       gmx_ffparams_t *ffparams,
                       gmx_bool bShowNumbers)
{
    int j;

    indent = pr_title_n(fp,indent,title,n);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"name=\"%s\"\n",*(molt->name));
    pr_atoms(fp,indent,"atoms",&(molt->atoms),bShowNumbers);
    pr_block(fp,indent,"cgs",&molt->cgs, bShowNumbers);
    pr_blocka(fp,indent,"excls",&molt->excls, bShowNumbers);
    for(j=0; (j<F_NRE); j++) {
        pr_ilist(fp,indent,interaction_function[j].longname,
                 ffparams->functype,&molt->ilist[j],bShowNumbers);
    }
}
Exemple #2
0
void pr_mtop(FILE *fp, int indent, const char *title, const gmx_mtop_t *mtop,
             gmx_bool bShowNumbers)
{
    int mt, mb, j;

    if (available(fp, mtop, indent, title))
    {
        indent = pr_title(fp, indent, title);
        pr_indent(fp, indent);
        fprintf(fp, "name=\"%s\"\n", *(mtop->name));
        pr_int(fp, indent, "#atoms", mtop->natoms);
        pr_int(fp, indent, "#molblock", mtop->nmolblock);
        for (mb = 0; mb < mtop->nmolblock; mb++)
        {
            pr_molblock(fp, indent, "molblock", &mtop->molblock[mb], mb, mtop->moltype);
        }
        pr_str(fp, indent, "bIntermolecularInteractions",
               gmx::boolToString(mtop->bIntermolecularInteractions));
        if (mtop->bIntermolecularInteractions)
        {
            for (j = 0; (j < F_NRE); j++)
            {
                pr_ilist(fp, indent, interaction_function[j].longname,
                         mtop->ffparams.functype,
                         &mtop->intermolecular_ilist[j], bShowNumbers);
            }
        }
        pr_ffparams(fp, indent, "ffparams", &(mtop->ffparams), bShowNumbers);
        pr_atomtypes(fp, indent, "atomtypes", &(mtop->atomtypes), bShowNumbers);
        for (mt = 0; mt < mtop->nmoltype; mt++)
        {
            pr_moltype(fp, indent, "moltype", &mtop->moltype[mt], mt,
                       &mtop->ffparams, bShowNumbers);
        }
        pr_groups(fp, indent, &mtop->groups, bShowNumbers);
    }
}
Exemple #3
0
void pr_idef(FILE *fp,int indent,const char *title,t_idef *idef, gmx_bool bShowNumbers)
{
  int i,j;
  
  if (available(fp,idef,indent,title)) {  
    indent=pr_title(fp,indent,title);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"atnr=%d\n",idef->atnr);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"ntypes=%d\n",idef->ntypes);
    for (i=0; i<idef->ntypes; i++) {
      (void) pr_indent(fp,indent+INDENT);
      (void) fprintf(fp,"functype[%d]=%s, ",
		     bShowNumbers?i:-1,
		     interaction_function[idef->functype[i]].name);
      pr_iparams(fp,idef->functype[i],&idef->iparams[i]);
    }
    (void) pr_real(fp,indent,"fudgeQQ",idef->fudgeQQ);

    for(j=0; (j<F_NRE); j++)
      pr_ilist(fp,indent,interaction_function[j].longname,
               idef->functype,&idef->il[j],bShowNumbers);
  }
}