コード例 #1
0
ファイル: txtdump.c プロジェクト: alexholehouse/gromacs
static void pr_cosine(FILE *fp,int indent,const char *title,t_cosines *cos,
		      gmx_bool bMDPformat)
{
  int j;
  
  if (bMDPformat) {
    fprintf(fp,"%s = %d\n",title,cos->n);
  }
  else {
    indent=pr_title(fp,indent,title);
    (void) pr_indent(fp,indent);
    fprintf(fp,"n = %d\n",cos->n);
    if (cos->n > 0) {
      (void) pr_indent(fp,indent+2);
      fprintf(fp,"a =");
      for(j=0; (j<cos->n); j++)
	fprintf(fp," %e",cos->a[j]);
      fprintf(fp,"\n");
      (void) pr_indent(fp,indent+2);
      fprintf(fp,"phi =");
      for(j=0; (j<cos->n); j++)
	fprintf(fp," %e",cos->phi[j]);
      fprintf(fp,"\n");
    }
  }
}
コード例 #2
0
ファイル: txtdump.c プロジェクト: alexholehouse/gromacs
void pr_header(FILE *fp,int indent,const char *title,t_tpxheader *sh)
{
  char buf[22];
    
  if (available(fp,sh,indent,title))
    {
      indent=pr_title(fp,indent,title);
      pr_indent(fp,indent);
      fprintf(fp,"bIr    = %spresent\n",sh->bIr?"":"not ");
      pr_indent(fp,indent);
      fprintf(fp,"bBox   = %spresent\n",sh->bBox?"":"not ");
      pr_indent(fp,indent);
      fprintf(fp,"bTop   = %spresent\n",sh->bTop?"":"not ");
      pr_indent(fp,indent);
      fprintf(fp,"bX     = %spresent\n",sh->bX?"":"not ");
      pr_indent(fp,indent);
      fprintf(fp,"bV     = %spresent\n",sh->bV?"":"not ");
      pr_indent(fp,indent);
      fprintf(fp,"bF     = %spresent\n",sh->bF?"":"not ");
      
      pr_indent(fp,indent);
      fprintf(fp,"natoms = %d\n",sh->natoms);
      pr_indent(fp,indent);
      fprintf(fp,"lambda = %e\n",sh->lambda);
    }
}
コード例 #3
0
ファイル: dump.c プロジェクト: JehandadKhan/gromacs
void list_xtc(const char *fn)
{
    t_fileio  *xd;
    int        indent;
    char       buf[256];
    rvec      *x;
    matrix     box;
    int        nframe, natoms, step;
    real       prec, time;
    gmx_bool   bOK;

    xd = open_xtc(fn, "r");
    read_first_xtc(xd, &natoms, &step, &time, box, &x, &prec, &bOK);

    nframe = 0;
    do
    {
        sprintf(buf, "%s frame %d", fn, nframe);
        indent = 0;
        indent = pr_title(stdout, indent, buf);
        pr_indent(stdout, indent);
        fprintf(stdout, "natoms=%10d  step=%10d  time=%12.7e  prec=%10g\n",
                natoms, step, time, prec);
        pr_rvecs(stdout, indent, "box", box, DIM);
        pr_rvecs(stdout, indent, "x", x, natoms);
        nframe++;
    }
    while (read_next_xtc(xd, natoms, &step, &time, box, x, &prec, &bOK));
    if (!bOK)
    {
        fprintf(stderr, "\nWARNING: Incomplete frame at time %g\n", time);
    }
    sfree(x);
    close_xtc(xd);
}
コード例 #4
0
ファイル: dump.c プロジェクト: JehandadKhan/gromacs
/*! \brief Callback used by list_tng_for_gmx_dump. */
static void list_tng_inner(const char *fn,
                           gmx_bool    bFirstFrame,
                           real       *values,
                           gmx_int64_t step,
                           double      frame_time,
                           gmx_int64_t n_values_per_frame,
                           gmx_int64_t n_atoms,
                           real        prec,
                           gmx_int64_t nframe,
                           char       *block_name)
{
    char                 buf[256];
    int                  indent = 0;

    if (bFirstFrame)
    {
        sprintf(buf, "%s frame %" GMX_PRId64, fn, nframe);
        indent = 0;
        indent = pr_title(stdout, indent, buf);
        pr_indent(stdout, indent);
        fprintf(stdout, "natoms=%10" GMX_PRId64 "  step=%10" GMX_PRId64 "  time=%12.7e",
                n_atoms, step, frame_time);
        if (prec > 0)
        {
            fprintf(stdout, "  prec=%10g", prec);
        }
        fprintf(stdout, "\n");
    }
    pr_reals_of_dim(stdout, indent, block_name, values, n_atoms, n_values_per_frame);
}
コード例 #5
0
ファイル: txtdump.c プロジェクト: Chadi-akel/cere
void pr_top(FILE *fp,int indent,char *title,t_topology *top)
{
  if (available(fp,top,title)) {
    indent=pr_title(fp,indent,title);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"name=\"%s\"\n",*(top->name));
    pr_atoms(fp,indent,"atoms",&(top->atoms));
    pr_blocks(fp,indent,"blocks",top->blocks,ebNR,eblock_names);
    pr_idef(fp,indent,"idef",&top->idef);
  }
}
コード例 #6
0
ファイル: txtdump.c プロジェクト: alexholehouse/gromacs
void pr_atoms(FILE *fp,int indent,const char *title,t_atoms *atoms, 
	      gmx_bool bShownumbers)
{
  if (available(fp,atoms,indent,title))
    {
      indent=pr_title(fp,indent,title);
      pr_atom(fp,indent,"atom",atoms->atom,atoms->nr);
      pr_strings(fp,indent,"atom",atoms->atomname,atoms->nr,bShownumbers);
      pr_strings2(fp,indent,"type",atoms->atomtype,atoms->atomtypeB,atoms->nr,bShownumbers);
      pr_resinfo(fp,indent,"residue",atoms->resinfo,atoms->nres,bShownumbers);
    }
}
コード例 #7
0
ファイル: txtdump.c プロジェクト: alexholehouse/gromacs
static int pr_block_title(FILE *fp,int indent,const char *title,t_block *block)
{
  int i;

  if (available(fp,block,indent,title))
    {
      indent=pr_title(fp,indent,title);
      (void) pr_indent(fp,indent);
      (void) fprintf(fp,"nr=%d\n",block->nr);
    }
  return indent;
}
コード例 #8
0
static void list_trn(char *fn)
{
  int         fpread,fpwrite,nframe,indent;
  char        buf[256];
  rvec        *x,*v,*f;
  matrix      box;
  t_trnheader trn;
  bool        bOK;

  fpread  = open_trn(fn,"r"); 
  fpwrite = open_tpx(NULL,"w");
  gmx_fio_setdebug(fpwrite,TRUE);
  
  nframe = 0;
  while (fread_trnheader(fpread,&trn,&bOK)) {
    snew(x,trn.natoms);
    snew(v,trn.natoms);
    snew(f,trn.natoms);
    if (fread_htrn(fpread,&trn,
		   trn.box_size ? box : NULL,
		   trn.x_size   ? x : NULL,
		   trn.v_size   ? v : NULL,
		   trn.f_size   ? f : NULL)) {
      sprintf(buf,"%s frame %d",fn,nframe);
      indent=0;
      indent=pr_title(stdout,indent,buf);
      pr_indent(stdout,indent);
      fprintf(stdout,"natoms=%10d  step=%10d  time=%12.7e  lambda=%10g\n",
	      trn.natoms,trn.step,trn.t,trn.lambda);
      if (trn.box_size)
	pr_rvecs(stdout,indent,"box",box,DIM);
      if (trn.x_size)
	pr_rvecs(stdout,indent,"x",x,trn.natoms);
      if (trn.v_size)
	pr_rvecs(stdout,indent,"v",v,trn.natoms);
      if (trn.f_size)
	pr_rvecs(stdout,indent,"f",f,trn.natoms);
    } 
    else
      fprintf(stderr,"\nWARNING: Incomplete frame: nr %d, t=%g\n",
	      nframe,trn.t);
    
    sfree(x);
    sfree(v);
    sfree(f);
    nframe++;
  }
  if (!bOK)
    fprintf(stderr,"\nWARNING: Incomplete frame header: nr %d, t=%g\n",
	    nframe,trn.t);
  close_tpx(fpwrite);
  close_trn(fpread);
}
コード例 #9
0
ファイル: txtdump.c プロジェクト: Chadi-akel/cere
static void pr_atoms(FILE *fp,int indent,char *title,t_atoms *atoms)
{
  if (available(fp,atoms,title))
    {
      indent=pr_title(fp,indent,title);
      pr_atom(fp,indent,"atom",atoms->atom,atoms->nr);
      pr_grps(fp,indent,"grp",atoms->grps,egcNR,atoms->grpname);
      pr_strings(fp,indent,"atom",atoms->atomname,atoms->nr);
      pr_strings2(fp,indent,"type",atoms->atomtype,atoms->atomtypeB,atoms->nr);
      pr_strings(fp,indent,"residue",atoms->resname,atoms->nres);
      pr_strings(fp,indent,"grpname",atoms->grpname,atoms->ngrpname);
      pr_block(fp,indent,"excl",&atoms->excl);
    }
}
コード例 #10
0
ファイル: txtdump.c プロジェクト: alexholehouse/gromacs
void pr_top(FILE *fp,int indent,const char *title,t_topology *top, gmx_bool bShowNumbers)
{
  if (available(fp,top,indent,title)) {
    indent=pr_title(fp,indent,title);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"name=\"%s\"\n",*(top->name));
    pr_atoms(fp,indent,"atoms",&(top->atoms),bShowNumbers);
    pr_atomtypes(fp,indent,"atomtypes",&(top->atomtypes),bShowNumbers);
    pr_block(fp,indent,"cgs",&top->cgs, bShowNumbers);
    pr_block(fp,indent,"mols",&top->mols, bShowNumbers);
    pr_blocka(fp,indent,"excls",&top->excls, bShowNumbers);
    pr_idef(fp,indent,"idef",&top->idef,bShowNumbers);
  }
}
コード例 #11
0
void pr_atomtypes(FILE *fp,int indent,const char *title,t_atomtypes *atomtypes, 
		  bool bShowNumbers)
{
  int i;
  if (available(fp,atomtypes,indent,title)) 
  {
    indent=pr_title(fp,indent,title);
    for(i=0;i<atomtypes->nr;i++) {
      pr_indent(fp,indent);
	  fprintf(fp,
              "atomtype[%3d]={radius=%12.5e, volume=%12.5e, surftens=%12.5e, atomnumber=%4d)}\n",
              bShowNumbers?i:-1,atomtypes->radius[i],atomtypes->vol[i],
              atomtypes->surftens[i],atomtypes->atomnumber[i]);
    }
  }
}
コード例 #12
0
ファイル: topology.cpp プロジェクト: Murilogabardo/gromacs
void pr_top(FILE *fp, int indent, const char *title, const t_topology *top, gmx_bool bShowNumbers)
{
    if (available(fp, top, indent, title))
    {
        indent = pr_title(fp, indent, title);
        pr_indent(fp, indent);
        fprintf(fp, "name=\"%s\"\n", *(top->name));
        pr_atoms(fp, indent, "atoms", &(top->atoms), bShowNumbers);
        pr_atomtypes(fp, indent, "atomtypes", &(top->atomtypes), bShowNumbers);
        pr_block(fp, indent, "cgs", &top->cgs, bShowNumbers);
        pr_block(fp, indent, "mols", &top->mols, bShowNumbers);
        pr_str(fp, indent, "bIntermolecularInteractions",
               gmx::boolToString(top->bIntermolecularInteractions));
        pr_blocka(fp, indent, "excls", &top->excls, bShowNumbers);
        pr_idef(fp, indent, "idef", &top->idef, bShowNumbers);
    }
}
コード例 #13
0
ファイル: txtdump.c プロジェクト: Chadi-akel/cere
static int pr_block_title(FILE *fp,int indent,char *title,t_block *block)
{
  int i;

  if (available(fp,block,title))
    {
      indent=pr_title(fp,indent,title);
      (void) pr_indent(fp,indent);
      fprintf(fp,"multinr[division over processors]:");
      for (i=0; (i<MAXNODES); i++) 
	(void) fprintf(fp," %d",block->multinr[i]);
      fprintf(fp,"\n");
      (void) pr_indent(fp,indent);
      (void) fprintf(fp,"nr=%d\n",block->nr);
      (void) pr_indent(fp,indent);
      (void) fprintf(fp,"nra=%d\n",block->nra);
    }
  return indent;
}
コード例 #14
0
ファイル: txtdump.c プロジェクト: Chadi-akel/cere
static void pr_cosine(FILE *fp,int indent,char *title,t_cosines *cos)
{
  int j;
  
  indent=pr_title(fp,indent,title);
  (void) pr_indent(fp,indent);
  fprintf(fp,"n = %d\n",cos->n);
  if (cos->n > 0) {
    (void) pr_indent(fp,indent+2);
    fprintf(fp,"a =");
    for(j=0; (j<cos->n); j++)
      fprintf(fp," %e",cos->a[j]);
    fprintf(fp,"\n");
    (void) pr_indent(fp,indent+2);
    fprintf(fp,"phi =");
    for(j=0; (j<cos->n); j++)
      fprintf(fp," %e",cos->phi[j]);
    fprintf(fp,"\n");
  }
}
コード例 #15
0
void pr_ffparams(FILE *fp,int indent,const char *title,
                 gmx_ffparams_t *ffparams,
                 bool bShowNumbers)
{
  int i,j;
  
  indent=pr_title(fp,indent,title);
  (void) pr_indent(fp,indent);
  (void) fprintf(fp,"atnr=%d\n",ffparams->atnr);
  (void) pr_indent(fp,indent);
  (void) fprintf(fp,"ntypes=%d\n",ffparams->ntypes);
  for (i=0; i<ffparams->ntypes; i++) {
      (void) pr_indent(fp,indent+INDENT);
      (void) fprintf(fp,"functype[%d]=%s, ",
                     bShowNumbers?i:-1,
                     interaction_function[ffparams->functype[i]].name);
      pr_iparams(fp,ffparams->functype[i],&ffparams->iparams[i]);
  }
  (void) pr_real(fp,indent,"fudgeQQ",ffparams->fudgeQQ);
}
コード例 #16
0
ファイル: txtdump.c プロジェクト: Chadi-akel/cere
static void pr_ilist(FILE *fp,int indent,char *title,
                     t_idef *idef,t_ilist *ilist)
{
  int i,j,k,type,ftype;
  t_iatom *iatoms;

  if (available(fp,ilist,title))
    {  
      indent=pr_title(fp,indent,title);
      (void) pr_indent(fp,indent);
      fprintf(fp,"nr: %d\n",ilist->nr);
      if (ilist->nr > 0) {
	(void) pr_indent(fp,indent);
	fprintf(fp,"multinr[division over processors]:");
	for (i=0; (i<MAXNODES) && (ilist->multinr[i] > 0); i++) 
	  (void) fprintf(fp," %d",ilist->multinr[i]);
	fprintf(fp,"\n");
	(void) pr_indent(fp,indent);
	fprintf(fp,"iatoms:\n");
	iatoms=ilist->iatoms;
	for (i=j=0; i<ilist->nr;) {
#ifndef DEBUG
	  (void) pr_indent(fp,indent+INDENT);
	  type=*(iatoms++);
	  ftype=idef->functype[type];
	  (void) fprintf(fp,"%d type=%d (%s)",
			 bShowNumbers?j:-1,bShowNumbers?type:-1,
			 interaction_function[ftype].name);
	  j++;
	  for (k=0; k<interaction_function[ftype].nratoms; k++)
	    (void) fprintf(fp," %u",*(iatoms++));
	  (void) fprintf(fp,"\n");
	  i+=1+interaction_function[ftype].nratoms;
#else
	  fprintf(fp,"%5d%5d\n",i,iatoms[i]);
	  i++;
#endif
	}
      }
    }
}
コード例 #17
0
void list_xtc(char *fn, bool bXVG)
{
  int    xd,indent;
  char   buf[256];
  rvec   *x;
  matrix box;
  int    nframe,natoms,step;
  real   prec,time;
  bool   bOK;
  
  xd = open_xtc(fn,"r");
  read_first_xtc(xd,&natoms,&step,&time,box,&x,&prec,&bOK);
		
  nframe=0;
  do {
    if (bXVG) {
      int i,d;
      
      fprintf(stdout,"%g",time);
      for(i=0; i<natoms; i++)
	for(d=0; d<DIM; d++)
	  fprintf(stdout," %g",x[i][d]);
      fprintf(stdout,"\n");
    } else {
      sprintf(buf,"%s frame %d",fn,nframe);
      indent=0;
      indent=pr_title(stdout,indent,buf);
      pr_indent(stdout,indent);
      fprintf(stdout,"natoms=%10d  step=%10d  time=%12.7e  prec=%10g\n",
	    natoms,step,time,prec);
      pr_rvecs(stdout,indent,"box",box,DIM);
      pr_rvecs(stdout,indent,"x",x,natoms);
    }
    nframe++;
  } while (read_next_xtc(xd,natoms,&step,&time,box,x,&prec,&bOK));
  if (!bOK)
    fprintf(stderr,"\nWARNING: Incomplete frame at time %g\n",time);
  close_xtc(xd);
}
コード例 #18
0
ファイル: trnio.c プロジェクト: BioinformaticsArchive/GromPy
void pr_trnheader(FILE *fp,int indent,char *title,t_trnheader *sh)
{
  if (sh) {
    indent=pr_title(fp,indent,title);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"box_size    = %d\n",sh->box_size);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"x_size      = %d\n",sh->x_size);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"v_size      = %d\n",sh->v_size);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"f_size      = %d\n",sh->f_size);
    
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"natoms      = %d\n",sh->natoms);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"step        = %d\n",sh->step);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"t           = %e\n",sh->t);
    (void) pr_indent(fp,indent);
    (void) fprintf(fp,"lambda      = %e\n",sh->lambda);
  }
}
コード例 #19
0
ファイル: txtdump.c プロジェクト: alexholehouse/gromacs
void pr_mtop(FILE *fp,int indent,const char *title,gmx_mtop_t *mtop,
             gmx_bool bShowNumbers)
{
    int mt,mb;

    if (available(fp,mtop,indent,title)) {
        indent=pr_title(fp,indent,title);
        (void) pr_indent(fp,indent);
        (void) fprintf(fp,"name=\"%s\"\n",*(mtop->name));
        pr_int(fp,indent,"#atoms",mtop->natoms);
        for(mb=0; mb<mtop->nmolblock; mb++) {
            pr_molblock(fp,indent,"molblock",&mtop->molblock[mb],mb,
                        mtop->moltype,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,"groups",&mtop->groups,bShowNumbers);
    }
}
コード例 #20
0
ファイル: topology.cpp プロジェクト: Murilogabardo/gromacs
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);
    }
}
コード例 #21
0
ファイル: txtdump.c プロジェクト: alexholehouse/gromacs
void pr_ilist(FILE *fp,int indent,const char *title,
              t_functype *functype,t_ilist *ilist, gmx_bool bShowNumbers)
{
    int i,j,k,type,ftype;
    t_iatom *iatoms;
    
    if (available(fp,ilist,indent,title) && ilist->nr > 0)
    {  
        indent=pr_title(fp,indent,title);
        (void) pr_indent(fp,indent);
        fprintf(fp,"nr: %d\n",ilist->nr);
        if (ilist->nr > 0) {
            (void) pr_indent(fp,indent);
            fprintf(fp,"iatoms:\n");
            iatoms=ilist->iatoms;
            for (i=j=0; i<ilist->nr;) {
#ifndef DEBUG
                (void) pr_indent(fp,indent+INDENT);
                type=*(iatoms++);
                ftype=functype[type];
                (void) fprintf(fp,"%d type=%d (%s)",
                               bShowNumbers?j:-1,bShowNumbers?type:-1,
                               interaction_function[ftype].name);
                j++;
                for (k=0; k<interaction_function[ftype].nratoms; k++)
                    (void) fprintf(fp," %u",*(iatoms++));
                (void) fprintf(fp,"\n");
                i+=1+interaction_function[ftype].nratoms;
#else
                fprintf(fp,"%5d%5d\n",i,iatoms[i]);
                i++;
#endif
            }
        }
    }
}
コード例 #22
0
ファイル: txtdump.c プロジェクト: alexholehouse/gromacs
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);
  }
}
コード例 #23
0
ファイル: gmxdump.c プロジェクト: aar2163/gromacs_energy
static void list_tpx(const char *fn, gmx_bool bShowNumbers, const char *mdpfn,
                     gmx_bool bSysTop)
{
    FILE         *gp;
    int           fp, indent, i, j, **gcount, atot;
    t_state       state;
    rvec         *f = NULL;
    t_inputrec    ir;
    t_tpxheader   tpx;
    gmx_mtop_t    mtop;
    gmx_groups_t *groups;
    t_topology    top;

    read_tpxheader(fn, &tpx, TRUE, NULL, NULL);

    read_tpx_state(fn,
                   tpx.bIr  ? &ir : NULL,
                   &state, tpx.bF ? f : NULL,
                   tpx.bTop ? &mtop : NULL);

    if (mdpfn && tpx.bIr)
    {
        gp = gmx_fio_fopen(mdpfn, "w");
        pr_inputrec(gp, 0, NULL, &(ir), TRUE);
        gmx_fio_fclose(gp);
    }

    if (!mdpfn)
    {
        if (bSysTop)
        {
            top = gmx_mtop_t_to_t_topology(&mtop);
        }

        if (available(stdout, &tpx, 0, fn))
        {
            indent = 0;
            indent = pr_title(stdout, indent, fn);
            pr_inputrec(stdout, 0, "inputrec", tpx.bIr ? &(ir) : NULL, FALSE);

            indent = 0;
            pr_header(stdout, indent, "header", &(tpx));

            if (!bSysTop)
            {
                pr_mtop(stdout, indent, "topology", &(mtop), bShowNumbers);
            }
            else
            {
                pr_top(stdout, indent, "topology", &(top), bShowNumbers);
            }

            pr_rvecs(stdout, indent, "box", tpx.bBox ? state.box : NULL, DIM);
            pr_rvecs(stdout, indent, "box_rel", tpx.bBox ? state.box_rel : NULL, DIM);
            pr_rvecs(stdout, indent, "boxv", tpx.bBox ? state.boxv : NULL, DIM);
            pr_rvecs(stdout, indent, "pres_prev", tpx.bBox ? state.pres_prev : NULL, DIM);
            pr_rvecs(stdout, indent, "svir_prev", tpx.bBox ? state.svir_prev : NULL, DIM);
            pr_rvecs(stdout, indent, "fvir_prev", tpx.bBox ? state.fvir_prev : NULL, DIM);
            /* leave nosehoover_xi in for now to match the tpr version */
            pr_doubles(stdout, indent, "nosehoover_xi", state.nosehoover_xi, state.ngtc);
            /*pr_doubles(stdout,indent,"nosehoover_vxi",state.nosehoover_vxi,state.ngtc);*/
            /*pr_doubles(stdout,indent,"therm_integral",state.therm_integral,state.ngtc);*/
            pr_rvecs(stdout, indent, "x", tpx.bX ? state.x : NULL, state.natoms);
            pr_rvecs(stdout, indent, "v", tpx.bV ? state.v : NULL, state.natoms);
            if (tpx.bF)
            {
                pr_rvecs(stdout, indent, "f", f, state.natoms);
            }
        }

        groups = &mtop.groups;

        snew(gcount, egcNR);
        for (i = 0; (i < egcNR); i++)
        {
            snew(gcount[i], groups->grps[i].nr);
        }

        for (i = 0; (i < mtop.natoms); i++)
        {
            for (j = 0; (j < egcNR); j++)
            {
                gcount[j][ggrpnr(groups, j, i)]++;
            }
        }
        printf("Group statistics\n");
        for (i = 0; (i < egcNR); i++)
        {
            atot = 0;
            printf("%-12s: ", gtypes[i]);
            for (j = 0; (j < groups->grps[i].nr); j++)
            {
                printf("  %5d", gcount[i][j]);
                atot += gcount[i][j];
            }
            printf("  (total %d atoms)\n", atot);
            sfree(gcount[i]);
        }
        sfree(gcount);
    }
    done_state(&state);
    sfree(f);
}
コード例 #24
0
ファイル: txtdump.c プロジェクト: alexholehouse/gromacs
void pr_inputrec(FILE *fp,int indent,const char *title,t_inputrec *ir,
                 gmx_bool bMDPformat)
{
  const char *infbuf="inf";
  int  i;
  
  if (available(fp,ir,indent,title)) {
    if (!bMDPformat)
      indent=pr_title(fp,indent,title);
    PS("integrator",EI(ir->eI));
    PSTEP("nsteps",ir->nsteps);
    PSTEP("init-step",ir->init_step);
    PS("ns-type",ENS(ir->ns_type));
    PI("nstlist",ir->nstlist);
    PI("ndelta",ir->ndelta);
    PI("nstcomm",ir->nstcomm);
    PS("comm-mode",ECOM(ir->comm_mode));
    PI("nstlog",ir->nstlog);
    PI("nstxout",ir->nstxout);
    PI("nstvout",ir->nstvout);
    PI("nstfout",ir->nstfout);
    PI("nstcalcenergy",ir->nstcalcenergy);
    PI("nstenergy",ir->nstenergy);
    PI("nstxtcout",ir->nstxtcout);
    PR("init-t",ir->init_t);
    PR("delta-t",ir->delta_t);
    
    PR("xtcprec",ir->xtcprec);
    PI("nkx",ir->nkx);
    PI("nky",ir->nky);
    PI("nkz",ir->nkz);
    PI("pme-order",ir->pme_order);
    PR("ewald-rtol",ir->ewald_rtol);
    PR("ewald-geometry",ir->ewald_geometry);
    PR("epsilon-surface",ir->epsilon_surface);
    PS("optimize-fft",BOOL(ir->bOptFFT));
    PS("ePBC",EPBC(ir->ePBC));
    PS("bPeriodicMols",BOOL(ir->bPeriodicMols));
    PS("bContinuation",BOOL(ir->bContinuation));
    PS("bShakeSOR",BOOL(ir->bShakeSOR));
    PS("etc",ETCOUPLTYPE(ir->etc));
    PI("nsttcouple",ir->nsttcouple);
    PS("epc",EPCOUPLTYPE(ir->epc));
    PS("epctype",EPCOUPLTYPETYPE(ir->epct));
    PI("nstpcouple",ir->nstpcouple);
    PR("tau-p",ir->tau_p);
    pr_matrix(fp,indent,"ref-p",ir->ref_p,bMDPformat);
    pr_matrix(fp,indent,"compress",ir->compress,bMDPformat);
    PS("refcoord-scaling",EREFSCALINGTYPE(ir->refcoord_scaling));
    if (bMDPformat)
      fprintf(fp,"posres-com  = %g %g %g\n",ir->posres_com[XX],
	      ir->posres_com[YY],ir->posres_com[ZZ]);
    else
      pr_rvec(fp,indent,"posres-com",ir->posres_com,DIM,TRUE);
    if (bMDPformat)
      fprintf(fp,"posres-comB = %g %g %g\n",ir->posres_comB[XX],
	      ir->posres_comB[YY],ir->posres_comB[ZZ]);
    else
      pr_rvec(fp,indent,"posres-comB",ir->posres_comB,DIM,TRUE);
    PI("andersen-seed",ir->andersen_seed);
    PR("rlist",ir->rlist);
    PR("rlistlong",ir->rlistlong);
    PR("rtpi",ir->rtpi);
    PS("coulombtype",EELTYPE(ir->coulombtype));
    PR("rcoulomb-switch",ir->rcoulomb_switch);
    PR("rcoulomb",ir->rcoulomb);
    PS("vdwtype",EVDWTYPE(ir->vdwtype));
    PR("rvdw-switch",ir->rvdw_switch);
    PR("rvdw",ir->rvdw);
    if (ir->epsilon_r != 0)
      PR("epsilon-r",ir->epsilon_r);
    else
      PS("epsilon-r",infbuf);
    if (ir->epsilon_rf != 0)
      PR("epsilon-rf",ir->epsilon_rf);
    else
      PS("epsilon-rf",infbuf);
    PR("tabext",ir->tabext);
    PS("implicit-solvent",EIMPLICITSOL(ir->implicit_solvent));
    PS("gb-algorithm",EGBALGORITHM(ir->gb_algorithm));
    PR("gb-epsilon-solvent",ir->gb_epsilon_solvent);
    PI("nstgbradii",ir->nstgbradii);
    PR("rgbradii",ir->rgbradii);
    PR("gb-saltconc",ir->gb_saltconc);
    PR("gb-obc-alpha",ir->gb_obc_alpha);
    PR("gb-obc-beta",ir->gb_obc_beta);
    PR("gb-obc-gamma",ir->gb_obc_gamma);
    PR("gb-dielectric-offset",ir->gb_dielectric_offset);
    PS("sa-algorithm",ESAALGORITHM(ir->gb_algorithm));
    PR("sa-surface-tension",ir->sa_surface_tension);
	  
    PS("DispCorr",EDISPCORR(ir->eDispCorr));
    PS("free-energy",EFEPTYPE(ir->efep));
    PR("init-lambda",ir->init_lambda);
    PR("delta-lambda",ir->delta_lambda);
    if (!bMDPformat)
    {
        PI("n-foreign-lambda",ir->n_flambda);
    }
    if (ir->n_flambda > 0)
    {
        pr_indent(fp,indent);
        fprintf(fp,"foreign-lambda%s",bMDPformat ? " = " : ":");
        for(i=0; i<ir->n_flambda; i++)
        {
            fprintf(fp,"  %10g",ir->flambda[i]);
        }
        fprintf(fp,"\n");
    }
    PR("sc-alpha",ir->sc_alpha);
    PI("sc-power",ir->sc_power);
    PR("sc-sigma",ir->sc_sigma);
    PR("sc-sigma-min",ir->sc_sigma_min);
    PI("nstdhdl", ir->nstdhdl);
    PS("separate-dhdl-file", SEPDHDLFILETYPE(ir->separate_dhdl_file));
    PS("dhdl-derivatives", DHDLDERIVATIVESTYPE(ir->dhdl_derivatives));
    PI("dh-hist-size", ir->dh_hist_size);
    PD("dh-hist-spacing", ir->dh_hist_spacing);

    PI("nwall",ir->nwall);
    PS("wall-type",EWALLTYPE(ir->wall_type));
    PI("wall-atomtype[0]",ir->wall_atomtype[0]);
    PI("wall-atomtype[1]",ir->wall_atomtype[1]);
    PR("wall-density[0]",ir->wall_density[0]);
    PR("wall-density[1]",ir->wall_density[1]);
    PR("wall-ewald-zfac",ir->wall_ewald_zfac);

    PS("pull",EPULLTYPE(ir->ePull));
    if (ir->ePull != epullNO)
      pr_pull(fp,indent,ir->pull);
    
    PS("rotation",BOOL(ir->bRot));
    if (ir->bRot)
      pr_rot(fp,indent,ir->rot);

    PS("disre",EDISRETYPE(ir->eDisre));
    PS("disre-weighting",EDISREWEIGHTING(ir->eDisreWeighting));
    PS("disre-mixed",BOOL(ir->bDisreMixed));
    PR("dr-fc",ir->dr_fc);
    PR("dr-tau",ir->dr_tau);
    PR("nstdisreout",ir->nstdisreout);
    PR("orires-fc",ir->orires_fc);
    PR("orires-tau",ir->orires_tau);
    PR("nstorireout",ir->nstorireout);

    PR("dihre-fc",ir->dihre_fc);
    
    PR("em-stepsize",ir->em_stepsize);
    PR("em-tol",ir->em_tol);
    PI("niter",ir->niter);
    PR("fc-stepsize",ir->fc_stepsize);
    PI("nstcgsteep",ir->nstcgsteep);
    PI("nbfgscorr",ir->nbfgscorr);

    PS("ConstAlg",ECONSTRTYPE(ir->eConstrAlg));
    PR("shake-tol",ir->shake_tol);
    PI("lincs-order",ir->nProjOrder);
    PR("lincs-warnangle",ir->LincsWarnAngle);
    PI("lincs-iter",ir->nLincsIter);
    PR("bd-fric",ir->bd_fric);
    PI("ld-seed",ir->ld_seed);
    PR("cos-accel",ir->cos_accel);
    pr_matrix(fp,indent,"deform",ir->deform,bMDPformat);

    PS("adress",BOOL(ir->bAdress));
    if (ir->bAdress){
        PS("adress_type",EADRESSTYPE(ir->adress->type));
        PR("adress_const_wf",ir->adress->const_wf);
        PR("adress_ex_width",ir->adress->ex_width);
        PR("adress_hy_width",ir->adress->hy_width);
        PS("adress_interface_correction",EADRESSICTYPE(ir->adress->icor));
        PS("adress_site",EADRESSSITETYPE(ir->adress->site));
        PR("adress_ex_force_cap",ir->adress->ex_forcecap);
        PS("adress_do_hybridpairs", BOOL(ir->adress->do_hybridpairs));

        pr_rvec(fp,indent,"adress_reference_coords",ir->adress->refs,DIM,TRUE);
    }
    PI("userint1",ir->userint1);
    PI("userint2",ir->userint2);
    PI("userint3",ir->userint3);
    PI("userint4",ir->userint4);
    PR("userreal1",ir->userreal1);
    PR("userreal2",ir->userreal2);
    PR("userreal3",ir->userreal3);
    PR("userreal4",ir->userreal4);
    pr_grp_opts(fp,indent,"grpopts",&(ir->opts),bMDPformat);
    pr_cosine(fp,indent,"efield-x",&(ir->ex[XX]),bMDPformat);
    pr_cosine(fp,indent,"efield-xt",&(ir->et[XX]),bMDPformat);
    pr_cosine(fp,indent,"efield-y",&(ir->ex[YY]),bMDPformat);
    pr_cosine(fp,indent,"efield-yt",&(ir->et[YY]),bMDPformat);
    pr_cosine(fp,indent,"efield-z",&(ir->ex[ZZ]),bMDPformat);
    pr_cosine(fp,indent,"efield-zt",&(ir->et[ZZ]),bMDPformat);
    PS("bQMMM",BOOL(ir->bQMMM));
    PI("QMconstraints",ir->QMconstraints);
    PI("QMMMscheme",ir->QMMMscheme);
    PR("scalefactor",ir->scalefactor);
    pr_qm_opts(fp,indent,"qm-opts",&(ir->opts));
  }
}
コード例 #25
0
void pr_inputrec(FILE *fp,int indent,const char *title,t_inputrec *ir,
		 bool bMDPformat)

{
  char *infbuf="inf";
  
  if (available(fp,ir,indent,title)) {
    if (!bMDPformat)
      indent=pr_title(fp,indent,title);
    PS("integrator",EI(ir->eI));
    PI("nsteps",ir->nsteps);
    PI("init_step",ir->init_step);
    PS("ns_type",ENS(ir->ns_type));
    PI("nstlist",ir->nstlist);
    PI("ndelta",ir->ndelta);
    PI("nstcomm",ir->nstcomm);
    PS("comm_mode",ECOM(ir->comm_mode));
    PI("nstlog",ir->nstlog);
    PI("nstxout",ir->nstxout);
    PI("nstvout",ir->nstvout);
    PI("nstfout",ir->nstfout);
    PI("nstenergy",ir->nstenergy);
    PI("nstxtcout",ir->nstxtcout);
    PR("init_t",ir->init_t);
    PR("delta_t",ir->delta_t);
    PR("xtcprec",ir->xtcprec);
    PI("nkx",ir->nkx);
    PI("nky",ir->nky);
    PI("nkz",ir->nkz);
    PI("pme_order",ir->pme_order);
    PR("ewald_rtol",ir->ewald_rtol);
    PR("ewald_geometry",ir->ewald_geometry);
    PR("epsilon_surface",ir->epsilon_surface);
    PS("optimize_fft",BOOL(ir->bOptFFT));
    PS("ePBC",EPBC(ir->ePBC));
    PS("bPeriodicMols",BOOL(ir->bPeriodicMols));
    PS("bContinuation",BOOL(ir->bContinuation));
    PS("bShakeSOR",BOOL(ir->bShakeSOR));
    PS("etc",ETCOUPLTYPE(ir->etc));
    PS("epc",EPCOUPLTYPE(ir->epc));
    PS("epctype",EPCOUPLTYPETYPE(ir->epct));
    PR("tau_p",ir->tau_p);
    pr_matrix(fp,indent,"ref_p",ir->ref_p,bMDPformat);
    pr_matrix(fp,indent,"compress",ir->compress,bMDPformat);
    PS("refcoord_scaling",EREFSCALINGTYPE(ir->refcoord_scaling));
    if (bMDPformat)
      fprintf(fp,"posres_com  = %g %g %g\n",ir->posres_com[XX],
	      ir->posres_com[YY],ir->posres_com[ZZ]);
    else
      pr_rvec(fp,indent,"posres_com",ir->posres_com,DIM,TRUE);
    if (bMDPformat)
      fprintf(fp,"posres_comB = %g %g %g\n",ir->posres_comB[XX],
	      ir->posres_comB[YY],ir->posres_comB[ZZ]);
    else
      pr_rvec(fp,indent,"posres_comB",ir->posres_comB,DIM,TRUE);
    PI("andersen_seed",ir->andersen_seed);
    PR("rlist",ir->rlist);
    PR("rtpi",ir->rtpi);
    PS("coulombtype",EELTYPE(ir->coulombtype));
    PR("rcoulomb_switch",ir->rcoulomb_switch);
    PR("rcoulomb",ir->rcoulomb);
    PS("vdwtype",EVDWTYPE(ir->vdwtype));
    PR("rvdw_switch",ir->rvdw_switch);
    PR("rvdw",ir->rvdw);
    if (ir->epsilon_r != 0)
      PR("epsilon_r",ir->epsilon_r);
    else
      PS("epsilon_r",infbuf);
    if (ir->epsilon_rf != 0)
      PR("epsilon_rf",ir->epsilon_rf);
    else
      PS("epsilon_rf",infbuf);
    PR("tabext",ir->tabext);
    PS("implicit_solvent",EIMPLICITSOL(ir->implicit_solvent));
    PS("gb_algorithm",EGBALGORITHM(ir->gb_algorithm));
    PR("gb_epsilon_solvent",ir->gb_epsilon_solvent);
    PI("nstgbradii",ir->nstgbradii);
    PR("rgbradii",ir->rgbradii);
    PR("gb_saltconc",ir->gb_saltconc);
    PR("gb_obc_alpha",ir->gb_obc_alpha);
    PR("gb_obc_beta",ir->gb_obc_beta);
    PR("gb_obc_gamma",ir->gb_obc_gamma);
    PR("sa_surface_tension",ir->sa_surface_tension);
	  
    PS("DispCorr",EDISPCORR(ir->eDispCorr));
    PS("free_energy",EFEPTYPE(ir->efep));
    PR("init_lambda",ir->init_lambda);
    PR("sc_alpha",ir->sc_alpha);
    PI("sc_power",ir->sc_power);
    PR("sc_sigma",ir->sc_sigma);
    PR("delta_lambda",ir->delta_lambda);
    
    PI("nwall",ir->nwall);
    PS("wall_type",EWALLTYPE(ir->wall_type));
    PI("wall_atomtype[0]",ir->wall_atomtype[0]);
    PI("wall_atomtype[1]",ir->wall_atomtype[1]);
    PR("wall_density[0]",ir->wall_density[0]);
    PR("wall_density[1]",ir->wall_density[1]);
    PR("wall_ewald_zfac",ir->wall_ewald_zfac);

    PS("pull",EPULLTYPE(ir->ePull));
    if (ir->ePull != epullNO)
      pr_pull(fp,indent,ir->pull);

    PS("disre",EDISRETYPE(ir->eDisre));
    PS("disre_weighting",EDISREWEIGHTING(ir->eDisreWeighting));
    PS("disre_mixed",BOOL(ir->bDisreMixed));
    PR("dr_fc",ir->dr_fc);
    PR("dr_tau",ir->dr_tau);
    PR("nstdisreout",ir->nstdisreout);
    PR("orires_fc",ir->orires_fc);
    PR("orires_tau",ir->orires_tau);
    PR("nstorireout",ir->nstorireout);

    PR("dihre-fc",ir->dihre_fc);
    
    PR("em_stepsize",ir->em_stepsize);
    PR("em_tol",ir->em_tol);
    PI("niter",ir->niter);
    PR("fc_stepsize",ir->fc_stepsize);
    PI("nstcgsteep",ir->nstcgsteep);
    PI("nbfgscorr",ir->nbfgscorr);

    PS("ConstAlg",ECONSTRTYPE(ir->eConstrAlg));
    PR("shake_tol",ir->shake_tol);
    PI("lincs_order",ir->nProjOrder);
    PR("lincs_warnangle",ir->LincsWarnAngle);
    PI("lincs_iter",ir->nLincsIter);
    PR("bd_fric",ir->bd_fric);
    PI("ld_seed",ir->ld_seed);
    PR("cos_accel",ir->cos_accel);
    pr_matrix(fp,indent,"deform",ir->deform,bMDPformat);
    PI("userint1",ir->userint1);
    PI("userint2",ir->userint2);
    PI("userint3",ir->userint3);
    PI("userint4",ir->userint4);
    PR("userreal1",ir->userreal1);
    PR("userreal2",ir->userreal2);
    PR("userreal3",ir->userreal3);
    PR("userreal4",ir->userreal4);
    pr_grp_opts(fp,indent,"grpopts",&(ir->opts),bMDPformat);
    pr_cosine(fp,indent,"efield-x",&(ir->ex[XX]),bMDPformat);
    pr_cosine(fp,indent,"efield-xt",&(ir->et[XX]),bMDPformat);
    pr_cosine(fp,indent,"efield-y",&(ir->ex[YY]),bMDPformat);
    pr_cosine(fp,indent,"efield-yt",&(ir->et[YY]),bMDPformat);
    pr_cosine(fp,indent,"efield-z",&(ir->ex[ZZ]),bMDPformat);
    pr_cosine(fp,indent,"efield-zt",&(ir->et[ZZ]),bMDPformat);
    PS("bQMMM",BOOL(ir->bQMMM));
    PI("QMconstraints",ir->QMconstraints);
    PI("QMMMscheme",ir->QMMMscheme);
    PR("scalefactor",ir->scalefactor);
    pr_qm_opts(fp,indent,"qm_opts",&(ir->opts));
  }
}
コード例 #26
0
ファイル: txtdump.c プロジェクト: Chadi-akel/cere
void pr_inputrec(FILE *fp,int indent,char *title,t_inputrec *ir)
{
  char *infbuf="inf";
  
  if (available(fp,ir,title)) {
    indent=pr_title(fp,indent,title);
#define PS(t,s) pr_str(fp,indent,t,s)
#define PI(t,s) pr_int(fp,indent,t,s)
#define PR(t,s) pr_real(fp,indent,t,s)
    PS("integrator",EI(ir->eI));
    PI("nsteps",ir->nsteps);
    PS("ns_type",ENS(ir->ns_type));
    PI("nstlist",ir->nstlist);
    PI("ndelta",ir->ndelta);
    PS("bDomDecomp",BOOL(ir->bDomDecomp));
    PI("decomp_dir",ir->decomp_dir);
    PI("nstcomm",ir->nstcomm);
    PI("nstlog",ir->nstlog);
    PI("nstxout",ir->nstxout);
    PI("nstvout",ir->nstvout);
    PI("nstfout",ir->nstfout);
    PI("nstenergy",ir->nstenergy);
    PI("nstxtcout",ir->nstxtcout);
    PR("init_t",ir->init_t);
    PR("delta_t",ir->delta_t);
    PR("xtcprec",ir->xtcprec);
    PI("nkx",ir->nkx);
    PI("nky",ir->nky);
    PI("nkz",ir->nkz);
    PI("pme_order",ir->pme_order);
    PR("ewald_rtol",ir->ewald_rtol);
    PR("ewald_geometry",ir->ewald_geometry);
    PR("epsilon_surface",ir->epsilon_surface);
    PS("optimize_fft",BOOL(ir->bOptFFT));
    PS("ePBC",EPBC(ir->ePBC));
    PS("bUncStart",BOOL(ir->bUncStart));
    PS("bShakeSOR",BOOL(ir->bShakeSOR));
    PS("etc",ETCOUPLTYPE(ir->etc));
    PS("epc",EPCOUPLTYPE(ir->epc));
    PS("epctype",EPCOUPLTYPETYPE(ir->epct));
    PR("tau_p",ir->tau_p);
    pr_rvecs(fp,indent,"ref_p",ir->ref_p,DIM);
    pr_rvecs(fp,indent,"compress",ir->compress,DIM);
    PS("bSimAnn",BOOL(ir->bSimAnn)); 
    PR("zero_temp_time",ir->zero_temp_time); 
    PR("rlist",ir->rlist);
    PS("coulombtype",EELTYPE(ir->coulombtype));
    PR("rcoulomb_switch",ir->rcoulomb_switch);
    PR("rcoulomb",ir->rcoulomb);
    PS("vdwtype",EVDWTYPE(ir->vdwtype));
    PR("rvdw_switch",ir->rvdw_switch);
    PR("rvdw",ir->rvdw);
    if (fabs(ir->epsilon_r) > GMX_REAL_MIN)
      PR("epsilon_r",ir->epsilon_r);
    else
      PS("epsilon_r",infbuf);
    PS("DispCorr",EDISPCORR(ir->eDispCorr));
    PR("fudgeQQ",ir->fudgeQQ);
    PS("free_energy",EFEPTYPE(ir->efep));
    PR("init_lambda",ir->init_lambda);
    PR("sc_alpha",ir->sc_alpha);
    PR("sc_sigma",ir->sc_sigma);
    PR("delta_lambda",ir->delta_lambda);
    PS("disre_weighting",EDISREWEIGHTING(ir->eDisreWeighting));
    PS("disre_mixed",BOOL(ir->bDisreMixed));
    PR("dr_fc",ir->dr_fc);
    PR("dr_tau",ir->dr_tau);
    PR("nstdisreout",ir->nstdisreout);
    PR("orires_fc",ir->orires_fc);
    PR("orires_tau",ir->orires_tau);
    PR("nstorireout",ir->nstorireout);
    PR("em_stepsize",ir->em_stepsize);
    PR("em_tol",ir->em_tol);
    PI("niter",ir->niter);
    PR("fc_stepsize",ir->fc_stepsize);
    PI("nstcgsteep",ir->nstcgsteep);
    PS("ConstAlg",ESHAKETYPE(ir->eConstrAlg));
    PR("shake_tol",ir->shake_tol);
    PI("lincs_order",ir->nProjOrder);
    PR("lincs_warnangle",ir->LincsWarnAngle);
    PR("bd_temp",ir->bd_temp);
    PR("bd_fric",ir->bd_fric);
    PI("ld_seed",ir->ld_seed);
    PR("cos_accel",ir->cos_accel);
    PI("userint1",ir->userint1);
    PI("userint2",ir->userint2);
    PI("userint3",ir->userint3);
    PI("userint4",ir->userint4);
    PR("userreal1",ir->userreal1);
    PR("userreal2",ir->userreal2);
    PR("userreal3",ir->userreal3);
    PR("userreal4",ir->userreal4);
#undef PS
#undef PR
#undef PI
    pr_grp_opts(fp,indent,"grpopts",&(ir->opts));
    pr_cosine(fp,indent,"efield-x",&(ir->ex[XX]));
    pr_cosine(fp,indent,"efield-xt",&(ir->et[XX]));
    pr_cosine(fp,indent,"efield-y",&(ir->ex[YY]));
    pr_cosine(fp,indent,"efield-yt",&(ir->et[YY]));
    pr_cosine(fp,indent,"efield-z",&(ir->ex[ZZ]));
    pr_cosine(fp,indent,"efield-zt",&(ir->et[ZZ]));
  }
}
コード例 #27
0
ファイル: dump.cpp プロジェクト: carryer123/gromacs
static void list_trr(const char *fn)
{
    t_fileio         *fpread;
    int               nframe, indent;
    char              buf[256];
    rvec             *x, *v, *f;
    matrix            box;
    gmx_trr_header_t  trrheader;
    gmx_bool          bOK;

    fpread  = gmx_trr_open(fn, "r");

    nframe = 0;
    while (gmx_trr_read_frame_header(fpread, &trrheader, &bOK))
    {
        snew(x, trrheader.natoms);
        snew(v, trrheader.natoms);
        snew(f, trrheader.natoms);
        if (gmx_trr_read_frame_data(fpread, &trrheader,
                                    trrheader.box_size ? box : NULL,
                                    trrheader.x_size   ? x : NULL,
                                    trrheader.v_size   ? v : NULL,
                                    trrheader.f_size   ? f : NULL))
        {
            sprintf(buf, "%s frame %d", fn, nframe);
            indent = 0;
            indent = pr_title(stdout, indent, buf);
            pr_indent(stdout, indent);
            fprintf(stdout, "natoms=%10d  step=%10d  time=%12.7e  lambda=%10g\n",
                    trrheader.natoms, trrheader.step, trrheader.t, trrheader.lambda);
            if (trrheader.box_size)
            {
                pr_rvecs(stdout, indent, "box", box, DIM);
            }
            if (trrheader.x_size)
            {
                pr_rvecs(stdout, indent, "x", x, trrheader.natoms);
            }
            if (trrheader.v_size)
            {
                pr_rvecs(stdout, indent, "v", v, trrheader.natoms);
            }
            if (trrheader.f_size)
            {
                pr_rvecs(stdout, indent, "f", f, trrheader.natoms);
            }
        }
        else
        {
            fprintf(stderr, "\nWARNING: Incomplete frame: nr %d, t=%g\n",
                    nframe, trrheader.t);
        }

        sfree(x);
        sfree(v);
        sfree(f);
        nframe++;
    }
    if (!bOK)
    {
        fprintf(stderr, "\nWARNING: Incomplete frame header: nr %d, t=%g\n",
                nframe, trrheader.t);
    }
    gmx_trr_close(fpread);
}