* Instead, start by looking for "long long", and just go down if we
* have to (rarely on new systems). /EL 20100810
*/
-#if ( (defined LLONG_MAX && LLONG_MAX==9223372036854775807LL) || (defined SIZEOF_LONG_LONG_INT && SIZEOF_LONG_LONG_INT==8) )
+#if ( (defined SIZEOF_LONG_LONG_INT && SIZEOF_LONG_LONG_INT==8) || (defined LLONG_MAX && LLONG_MAX==9223372036854775807LL) )
/* Long long int is 64 bit */
typedef long long int gmx_large_int_t;
#define GMX_LARGE_INT_MIN (-GMX_LARGE_INT_MAX - 1LL)
#define GMX_MPI_LARGE_INT MPI_LONG_LONG_INT
-#elif ( (defined LONG_MAX && LONG_MAX==9223372036854775807L) || (defined SIZEOF_LONG_INT && SIZEOF_LONG_INT==8) )
+#elif ( (defined SIZEOF_LONG_INT && SIZEOF_LONG_INT==8) || (defined LONG_MAX && LONG_MAX==9223372036854775807L) )
/* Long int is 64 bit */
typedef long int gmx_large_int_t;
#define GMX_LARGE_INT_MIN (-GMX_LARGE_INT_MAX - 1LL)
#define GMX_MPI_LARGE_INT MPI_LONG_INT
-#elif ( (defined INT_MAX && INT_MAX==9223372036854775807L) || (defined SIZEOF_INT && SIZEOF_INT==8) )
+#elif ( (defined SIZEOF_INT && SIZEOF_INT==8) || (defined INT_MAX && INT_MAX==9223372036854775807L) )
/* int is 64 bit */
typedef int gmx_large_int_t;
#include "typedefs.h"
#include "smalloc.h"
#include "sysstuff.h"
-#include "errno.h"
+#include <errno.h>
#include "macros.h"
#include "string2.h"
#include "confio.h"
"Found more coordinates (%d) in %s than expected %d\n",
natoms,infile,nwanted);
if (atoms) {
- if (atoms && fr->bAtoms &&
+ if (fr->bAtoms &&
(sscanf(line,"%5d%c%5s%c%5s%7d",&resnr,&c1,resnm,&c2,anm,&atnr)
!= 6)) {
if (oldres>=0)
#include "smalloc.h"
#include "string2.h"
#include "macros.h"
-#include "time.h"
+#include <time.h>
#include "random.h"
#include "statutil.h"
#include "copyrite.h"
+++ /dev/null
-#error XXXXXXX
-
* ====================================================
*/
-#if (INT_MAX == 2147483647)
+#if ( (defined SIZEOF_INT && SIZEOF_INT==4) || (SIZEOF_INT_MAX == 2147483647) )
typedef int erf_int32_t;
typedef unsigned int erf_u_int32_t;
#elif (LONG_MAX == 2147483647L)
#else
/* Define storage for little-endian or both types of CPUs. */
md5_word_t xbuf[16];
+ /* cppcheck-suppress unassignedVariable */
const md5_word_t *X;
#endif
#include "network.h"
#include "copyrite.h"
#include "statutil.h"
-#include "ctype.h"
+#include <ctype.h>
#include "macros.h"
#ifdef GMX_LIB_MPI
_rinv = sqrt_newton_scalar(_rinv,_rsq);
#endif
+ /* cppcheck-suppress selfAssignment */
FULL_INTERACTION_(_qq,_rinv,_rsq,jnr);
#ifndef NO_FORCE
/* get gmx_gbdata_t */
#include "../nb_kerneltype.h"
-#include "nb_kernel430_x86_64_sse2.h"
+#include "../nb_kernel_x86_64_sse2/nb_kernel430_x86_64_sse2.h"
void nb_kernel430_sse2_double(int * p_nri,
int * iinr,
{
c=line+6;
/* skip HEADER or TITLE and spaces */
- while (c && (c[0]!=' ')) c++;
- while (c && (c[0]==' ')) c++;
+ while (c[0]!=' ') c++;
+ while (c[0]==' ') c++;
/* truncate after title */
d=strstr(c," ");
if (d)
c=line;
}
/* skip 'MOLECULE:' and spaces */
- while (c && (c[0]!=' ')) c++;
- while (c && (c[0]==' ')) c++;
+ while (c[0]!=' ') c++;
+ while (c[0]==' ') c++;
/* truncate after title */
d=strstr(c," ");
if (d)
#include "mshift.h"
#include "invblock.h"
#include "txtdump.h"
-#include "math.h"
+#include <math.h>
#include "assert.h"
#include "gmx_fatal.h"
#include "splitter.h"
static void set_default_time_unit(const char *time_list[], gmx_bool bCanTime)
{
- int i,j;
+ int i=0,j;
const char *select;
if (bCanTime)
{
const char *unk = "onbekend";
time_t clock;
- char *user=NULL;
+ const char *user=unk;
int gh;
uid_t uid;
- char buf[256];
+ char buf[256]="";
char timebuf[STRLEN];
#ifdef HAVE_PWD_H
struct passwd *pw;
int tag, tMPI_Comm comm)
{
struct envelope *sev;
- struct tmpi_thread *send_dst=tMPI_Get_thread(comm, dest);
+ struct tmpi_thread *send_dst;
struct tmpi_thread *cur=tMPI_Get_current();
struct tmpi_req_ req;
{
return tMPI_Error(TMPI_COMM_WORLD, TMPI_ERR_COMM);
}
+ send_dst = tMPI_Get_thread(comm, dest);
if (!send_dst)
{
return tMPI_Error(comm, TMPI_ERR_SEND_DEST);
struct envelope *rev, *sev;
struct tmpi_thread *cur=tMPI_Get_current();
struct tmpi_thread *recv_src=0;
- struct tmpi_thread *send_dst=tMPI_Get_thread(comm, dest);
+ struct tmpi_thread *send_dst;
struct tmpi_req_ sreq, rreq;
int ret=TMPI_SUCCESS;
{
return tMPI_Error(TMPI_COMM_WORLD, TMPI_ERR_COMM);
}
+ send_dst=tMPI_Get_thread(comm, dest);
if (!send_dst)
{
return tMPI_Error(comm, TMPI_ERR_SEND_DEST);
struct tmpi_thread *cur=tMPI_Get_current();
struct req_list *rql=&(cur->rql);
struct tmpi_req_ *rq=tMPI_Get_req(rql);
- struct tmpi_thread *send_dst=tMPI_Get_thread(comm, dest);
+ struct tmpi_thread *send_dst;
struct envelope *ev;
#ifdef TMPI_PROFILE
tMPI_Return_req(rql,rq);
return tMPI_Error(TMPI_COMM_WORLD, TMPI_ERR_COMM);
}
+ send_dst=tMPI_Get_thread(comm, dest);
if (!send_dst)
{
tMPI_Return_req(rql,rq);
#include "molfile_plugin.h"
#include "vmddlopen.h"
#if !((defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && !defined __CYGWIN__ && !defined __CYGWIN32__)
-#include "glob.h"
+#include <glob.h>
#else
#include <windows.h>
#include <shlobj.h>
#include "statutil.h"
#include "copyrite.h"
#include "strdb.h"
-#include "time.h"
+#include <time.h>
#include "readinp.h"
/* The source code in this file should be thread-safe.
#include <stdio.h>
#include "copyrite.h"
-#include "string.h"
+#include <string.h>
#include "statutil.h"
int main(int argc,char *argv[])
dump_hybridization(debug,atoms,nbonds);
}
close_symtab(&symtab);
+ free(mymol.name);
printf("\nWARNING: topologies generated by %s can not be trusted at face value.\n",Program());
printf(" Please verify atomtypes and charges by comparison to other\n");
if (cudaMalloc((void**)&devTestMem,megsToTest*1048576UL) != cudaSuccess) throw 1;
if (cudaMalloc((void**)&devTempMem,sizeof(uint)*nBlocks) != cudaSuccess) throw 2;
if ( (hostTempMem = (uint*)malloc(sizeof(uint)*nBlocks)) == NULL) throw 3;
- } catch (int allocFailed) {
+ } catch (...) {
// Clear CUDA error flag for outside world
cudaGetLastError();
if (devTempMem) {
bool allocated;
public:
uint initTime;
- memtestState() : nBlocks(1024), nThreads(512), allocated(false), devTestMem(NULL),devTempMem(NULL),hostTempMem(NULL), initTime(0),lcgPeriod(1024) {};
+ memtestState() : nBlocks(1024), nThreads(512), loopIters(0), megsToTest(0), allocated(false), devTestMem(NULL),devTempMem(NULL),hostTempMem(NULL), initTime(0),lcgPeriod(1024) {};
~memtestState() {deallocate();}
uint allocate(uint mbToTest);
#include <ctype.h>
#include "main.h"
#include "macros.h"
-#include "math.h"
+#include <math.h>
#include "futil.h"
#include "statutil.h"
#include "copyrite.h"
void chk_ndx(const char *fn)
{
t_blocka *grps;
- char **grpname=NULL;
+ char **grpname;
int i,j;
grps = init_index(fn,&grpname);
int ndr;
ener_file_t in;
gmx_bool bCont;
- gmx_enxnm_t *enm=NULL;
+ gmx_enxnm_t *enm;
t_enxframe *fr;
int i,j,nre,b;
real rav,minthird;
t_vcm *vcm;
int nchkpt=1;
gmx_localtop_t *top;
- t_mdebin *mdebin=NULL;
+ t_mdebin *mdebin;
t_state *state=NULL;
rvec *f_global=NULL;
int n_xtc=-1;
return urs;
}
-real ursum1D(int term,int porder,real acut,real r1,real k1,real h1,int nalias)
-{
- real kt,ksq,kmag;
-/* real kcutsq; */
- real kn1,urs,tmp;
- real h_1;
- int n1;
-
- real twopi=2*M_PI;
- h_1=twopi/h1;
- /*
- c
- c for large enough values of k, the terms become negligable
- c if shat(k) = exp(-k^2/4*acut) < eps
- c kcutsq = 4*alpha* (-ln(eps))
- c eps = 10^-6, -ln(eps) = 14
- c eps = 10^-10, -ln(eps) = 23
- c eps = 10^-20, -ln(eps) = 46
- c
- */
-/* kcutsq = 4.0*acut*115; */
-
- if (nalias==0) {
- if (term==1) kt = k1;
- ksq = k1*k1;
- kmag = sqrt(ksq);
- tmp = uhat1D(porder,k1,h1);
- urs = tmp*tmp*kt*shat(acut,kmag,r1)/(EPSILON0*ksq);
- }
- else {
- urs = 0.0;
- for(n1 = -nalias; (n1<= nalias); n1++) {
- kn1 = k1 + n1*h_1;
- ksq = kn1*kn1;
- /*c if (ksq.lt.kcutsq) then*/
- if (term==XX) kt = kn1;
- if (kt != 0.0) {
- kmag = sqrt(ksq);
- tmp = uhat1D(porder,kn1,h1);
- if (tmp != 0.0)
- urs = urs + tmp*tmp*kt*shat(acut,kmag,r1)/(EPSILON0*ksq);
- }
- /*c endif*/
- }
- }
- return urs;
-}
-
real sym(int indx,int maxind)
{
if ( (indx == 0 ) || (indx == maxind/2) )
*qqopt = qopt/(EPSILON0*box1*box2*box3);
}
-void calc1D(gmx_bool bSym,gmx_bool bVerbose,
- const int n1max,const int n2max,const int n3max,
- const real h1,const real h2,const real h3,
- int nalias,int porder,real acut,real r1,const real alpha,
- const gmx_bool bSearch,
- real ***ghat,real *ppval,real *zzval,real *eeref,real *qqopt)
-{
- real box1,box2,box3;
- real k1,k2,k3;
- real gnumer,dsq,gdenom;
- real rsqal;
- real symfac;
- int l1;
- real twopi=2*M_PI;
- real d1,u1;
- real pval,zval,eref,qopt;
- int N1MAX;
-/* int N2MAX,N3MAX; */
-
- if (bSym) {
- N1MAX = n1max/2+1;
-/* N2MAX = n2max/2+1; */
-/* N3MAX = n3max/2+1; */
- }
- else {
- N1MAX = n1max;
-/* N2MAX = n2max; */
-/* N3MAX = n3max; */
- }
-
- box1 = n1max*h1;
- box2 = n2max*h2;
- box3 = n3max*h3;
-
- pval = 0.0;
- zval = 0.0;
- eref = 0.0;
- qopt = 0.0;
-
- k2 = k3 = 0;
-
- for(l1=0; (l1<N1MAX); l1++) {
- if (bVerbose)
- fprintf(stderr,"\rl1=%5d qopt=%12.6e",l1,qopt);
-
- k1 = twopi*l1/box1;
- d1 = dhat(alpha,k1,h1);
-
- if (l1 == 0)
- ghat[0][0][0] = 0.0;
- else {
- u1 = ursum1D(XX,porder,acut,r1,k1,h1,nalias);
-
- gnumer = d1*u1;
- dsq = d1*d1;
- gdenom = dsq*usqsq(porder,k1,k2,k3,h1,h2,h3);
- if (bSym)
- symfac = sym(l1,n1max);
- else
- symfac = 1.0;
-
- rsqal = crsqal(acut,r1,k1,k2,k3,h1,h2,h3,nalias);
-
- if (gdenom != 0)
- qopt += symfac*(rsqal - (gnumer*gnumer)/gdenom);
- }
- }
- if (bVerbose)
- fprintf(stderr,"\n");
- *ppval = pval/(box1*box2*box3);
- *zzval = zval/(box1*box2*box3);
- *eeref = eref/(box1*box2*box3);
- *qqopt = qopt/(box1*box2*box3);
-}
-
void read_params(char *fn,t_inputrec *ir,rvec boxs)
{
real t,lambda;
if (pluginDir != NULL && *pluginDir != '\0')
{
loadedPlugins = Platform::loadPluginsFromDirectory(pluginDir);
- if (loadedPlugins.size() > 0)
+ if (!loadedPlugins.empty())
{
hasLoadedPlugins = true;
usedPluginDir = pluginDir;
if (!hasLoadedPlugins)
{
loadedPlugins = Platform::loadPluginsFromDirectory(OPENMM_PLUGIN_DIR);
- if (loadedPlugins.size() > 0)
+ if (!loadedPlugins.empty())
{
hasLoadedPlugins = true;
usedPluginDir = OPENMM_PLUGIN_DIR;
if (!hasLoadedPlugins)
{
loadedPlugins = Platform::loadPluginsFromDirectory(Platform::getDefaultPluginsDirectory());
- if (loadedPlugins.size() > 0)
+ if (!loadedPlugins.empty())
{
hasLoadedPlugins = true;
usedPluginDir = Platform::getDefaultPluginsDirectory();
else
{
strncpy(ffdir_parent,ffdir,STRLEN-1);
+ ffdir_parent[STRLEN-1]='\0'; /*make sure it is 0-terminated even for long string*/
p=strrchr(ffdir_parent,'/');
*p='\0';
#endif
#include "string2.h"
#include "pgutil.h"
-#include "string.h"
+#include <string.h>
#include "gmx_fatal.h"
#define BUFSIZE 1024
#include "symtab.h"
#include "readinp.h"
#include "readir.h"
-#include "string.h"
+#include <string.h>
#include "mdatoms.h"
#include "pbc.h"
#include "pull.h"
/* Base name and extension of the reference file: */
strncpy(base, fn, STRLEN - 1);
+ base[STRLEN-1]='\0';
extpos = strrchr(base, '.');
strcpy(extension,extpos+1);
*extpos = '\0';
#include "filenm.h"
#include "mshift.h"
#include "force.h"
-#include "time.h"
+#include <time.h>
#include "edsam.h"
#include "mdebin.h"
#include "vcm.h"
static t_range *read_range(const char *db,int *nrange)
{
int nlines,nr,np,i;
- char **lines=NULL;
+ char **lines;
t_range *range;
int atype,ptype;
double rmin,rmax;
}
else
{
- if (dd->nc[d] > 1 && d < ddbox->npbcdim)
+ if (d < ddbox->npbcdim && dd->nc[d] > 1)
{
tric[d][i] = box[i][d]/box[i][i];
}
#include "mvdata.h"
#include "txtdump.h"
#include "vec.h"
-#include "time.h"
+#include <time.h>
#include "nrnb.h"
#include "mshift.h"
#include "mdrun.h"
#include <float.h>
#include <math.h>
#include <assert.h>
+#include "smalloc.h"
#ifndef __FLT_EPSILON__
#define __FLT_EPSILON__ FLT_EPSILON
return max;
}
-/*
-copied here from fftgrid, because:
-1. function there not publically available
-2. not sure whether we keep fftgrid
-3. less dependencies for fft5d
-
-Only used for non-fftw case
-*/
-static void *
-gmx_calloc_aligned(size_t size)
-{
- void *p0,*p;
-
- /*We initialize by zero for Valgrind
- For non-divisible case we communicate more than the data.
- If we don't initialize the data we communicate uninitialized data*/
- p0 = calloc(size+32,1);
-
- if(p0 == NULL)
- {
- gmx_fatal(FARGS,"Failed to allocated %u bytes of aligned memory.",size+32);
- }
-
- p = (void *) (((size_t) p0 + 32) & (~((size_t) 31)));
-
- /* Yeah, yeah, we cannot free this pointer, but who cares... */
- return p;
-}
-
/* NxMxK the size of the data
* comm communicator to use for fft5d
lsize = fft5d_fmax(N[0]*M[0]*K[0]*nP[0],fft5d_fmax(N[1]*M[1]*K[1]*nP[1],C[2]*M[2]*K[2]));
/* int lsize = fmax(C[0]*M[0]*K[0],fmax(C[1]*M[1]*K[1],C[2]*M[2]*K[2])); */
if (!(flags&FFT5D_NOMALLOC)) {
- lin = (t_complex*)gmx_calloc_aligned(sizeof(t_complex) * lsize);
- lout = (t_complex*)gmx_calloc_aligned(sizeof(t_complex) * lsize);
- lout2 = (t_complex*)gmx_calloc_aligned(sizeof(t_complex) * lsize);
- lout3 = (t_complex*)gmx_calloc_aligned(sizeof(t_complex) * lsize);
+ snew_aligned(lin, lsize, 32);
+ snew_aligned(lout, lsize, 32);
+ snew_aligned(lout2, lsize, 32);
+ snew_aligned(lout3, lsize, 32);
} else {
lin = *rlin;
lout = *rlout;
#endif /* FFT5D_MPI_TRANSPOS */
#endif /* GMX_FFT_FFTW3 */
- /*We can't free lin/lout here - is allocated by gmx_calloc_aligned which can't be freed*/
-
+ if (!(plan->flags&FFT5D_NOMALLOC))
+ {
+ sfree_aligned(plan->lin);
+ sfree_aligned(plan->lout);
+ sfree_aligned(plan->lout2);
+ sfree_aligned(plan->lout3);
+ }
#ifdef FFT5D_THREADS
#ifdef FFT5D_FFTW_THREADS
{
char buf[STRLEN];
int i,j;
- void * p_tmp;
if (tabfn == NULL) {
if (debug)
* to do this...
*/
- /* 8 fp entries per vdw table point, n+1 points, and 16 bytes extra to align it. */
- p_tmp = malloc(8*(nbl->tab.n+1)*sizeof(real)+16);
-
- /* align it - size_t has the same same as a pointer */
- nbl->vdwtab = (real *) (((size_t) p_tmp + 16) & (~((size_t) 15)));
-
- /* 4 fp entries per coul table point, n+1 points, and 16 bytes extra to align it. */
- p_tmp = malloc(4*(nbl->tab.n+1)*sizeof(real)+16);
-
- /* align it - size_t has the same same as a pointer */
- nbl->coultab = (real *) (((size_t) p_tmp + 16) & (~((size_t) 15)));
-
+ snew_aligned(nbl->vdwtab,8*nbl->tab.n,16);
+ snew_aligned(nbl->coultab,4*nbl->tab.n,16);
for(i=0; i<=nbl->tab.n; i++) {
for(j=0; j<4; j++)
#include "typedefs.h"
#include "network.h"
#include "filenm.h"
-#include "string.h"
+#include <string.h>
#include "smalloc.h"
#include "pull.h"
#include "xvgr.h"
#include "pbc.h"
#include "chargegroup.h"
#include "vec.h"
-#include "time.h"
+#include <time.h>
#include "nrnb.h"
#include "mshift.h"
#include "mdrun.h"
gmx_bool bReadTab,bGenTab;
real x0,y0,yp;
int i,j,k,nx,nx0,tabsel[etiNR];
- void * p_tmp;
double r,r2,Vtab,Ftab,expterm;
t_forcetable table;
* to do this :-)
*/
- /* 4 fp entries per table point, nx+1 points, and 16 bytes extra
- to align it. */
- p_tmp = malloc(4*(nx+1)*sizeof(real)+16);
-
- /* align it - size_t has the same same as a pointer */
- table.tab = (real *) (((size_t) p_tmp + 16) & (~((size_t) 15)));
+ snew_aligned(table.tab,4*nx,16);
init_table(out,nx,nx0,table.scale,&(td[0]),!bReadTab);
t_tabledata *td;
real x0,y0,yp,rtab;
int i,nx,nx0;
- void * p_tmp;
real rx, ry, rz, box_r;
t_forcetable table;
* to do this :-)
*/
- /* 4 fp entries per table point, nx+1 points, and 16 bytes extra
- to align it. */
- p_tmp = malloc(4*(nx+1)*sizeof(real)+16);
-
- /* align it - size_t has the same same as a pointer */
- table.tab = (real *) (((size_t) p_tmp + 16) & (~((size_t) 15)));
+ snew_aligned(table.tab,4*nx,16);
copy2table(table.n,0,4,td[0].x,td[0].v,td[0].f,table.tab);
set_mat(fp,mat,iatom,4,j,4,bSymm,shift);
njtot+=16;
break;
+ default:
gmx_incons("non-existing solvent type");
}
}
sprintf(tmp,"%ctmp%cdialogXXXXXX",DIR_SEPARATOR,DIR_SEPARATOR);
gmx_tmpnam(tmp);
}
+ else
+ {
+ fclose(tfil);
+ }
if ((tfil = fopen(tmp,"w")) == NULL)
gmx_fatal(FARGS,"Can not open tmp file %s",tmp);
#endif
break;
case DLG_EXIT:
- if ((bOk=(gmx_strcasecmp("ok",set))==0))
+ if ((bOk=gmx_strcasecmp("ok",set))==0)
strcpy(gmx->confout,EditText(dlg,eExConf));
HideDlg(dlg);
if (bOk)
#include <math.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "smalloc.h"
#include "macros.h"
#include "xutil.h"
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Gyas ROwers Mature At Cryogenic Speed
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <math.h>
-#include <smalloc.h>
-#include <macros.h>
-#include <names.h>
-#include "nener.h"
-#include "buttons.h"
-
-static void DrawEGraph(t_x11 *x11,t_enerwin *ew)
-{
- t_windata *wd;
- int i,EHeight,EZero;
- real epr,scale,MaxE,MinE;
- char maxstr[80];
- int y;
-
- wd=&(ew->wd);
- /* Clear */
- XClearWindow(x11->disp,wd->self);
-
- /* Calculate boundaries */
- MaxE=MinE=ew->e[ew->etype][0];
- for (i=1; (i<ew->nlast); i++) {
- MaxE=max(ew->e[ew->etype][i],MaxE);
- MinE=min(ew->e[ew->etype][i],MinE);
- }
-
- /* Print title */
- epr=max(fabs(MaxE),fabs(MinE));
- sprintf(maxstr,"%.0f",epr);
- EHeight=XTextHeight(x11->font)+AIR;
- TextInRect(x11,wd->self,EType[ew->etype],AIR,0,
- wd->width-2*AIR,EHeight,eXLeft,eYCenter);
- TextInRect(x11,wd->self,maxstr,AIR,0,
- wd->width-2*AIR,EHeight,eXRight,eYCenter);
- XDrawLine(x11->disp, wd->self,x11->gc,0,EHeight,wd->width,EHeight);
-
- if (ew->nlast==0)
- return;
-
- if (fabs(MaxE-MinE) < 1e-5)
- return;
-
- EZero=(wd->height-EHeight)/2;
- scale=EZero/(real) epr;
- EZero+=EHeight;
- XDrawLine(x11->disp,wd->self,x11->gc,0,EZero,wd->width,EZero);
-
- for(i=0; (i<ew->nlast); i++) {
- y=ew->e[ew->etype][i]*scale;
- if (y)
- XDrawLine(x11->disp,wd->self,x11->gc,i,EZero,i,EZero-y);
- }
-}
-
-static gmx_bool EWCallBack(t_x11 *x11,XEvent *event, Window w, void *data)
-{
- t_enerwin *ew;
- int i,x,y,width;
-
- return FALSE;
- ew=(t_enerwin *)data;
- switch(event->type) {
- case Expose:
- XSetForeground(x11->disp,x11->gc,WHITE);
- DrawEGraph(x11,ew);
- XSetForeground(x11->disp,x11->gc,x11->fg);
- break;
- case ConfigureNotify:
- ew->wd.x=event->xconfigure.x;
- ew->wd.y=event->xconfigure.y;
- ew->wd.width=event->xconfigure.width;
- ew->wd.height=event->xconfigure.height;
- if (ew->wd.width > ew->nwidth) {
- ew->nwidth=ew->wd.width;
- for (i=0; (i<ew->nre); i++)
- srenew(ew->e[i],ew->nwidth);
- }
- break;
- case ButtonPress:
- x=event->xbutton.x;
- y=ew->wd.y+event->xbutton.y;
- width=menu_width(ew->selener);
- x=min(x+ew->wd.x,ew->wd.x+ew->wd.width-width);
- printf("Showing at %d,%d, width %d\n",x,y,width);
- show_menu(x11,ew->selener,x,y,TRUE);
- break;
- case ClientMessage:
- ew->etype=event->xclient.data.l[0];
- ExposeWin(x11->disp,ew->wd.self);
- /* no break */
- case ButtonRelease:
- hide_menu(x11,ew->selener);
- break;
- default:
- break;
- }
- return FALSE;
-}
-
-static void create_selener(t_x11 *x11,t_enerwin *ew,Window Parent)
-{
- static t_mentry *se;
- int i;
-
- snew(se,ew->nre);
- for(i=0; (i<ew->nre); i++) {
- se[i].send_to=ew->wd.self;
- se[i].nreturn=i;
- se[i].bChecked=FALSE;
- se[i].str=EType[i];
- }
- ew->selener=init_menu(x11,Parent,x11->fg,x11->bg,ew->nre,se,1);
-}
-
-t_enerwin *init_ew(t_x11 *x11,Window Parent,
- int x,int y,int width,int height,
- unsigned long fg,unsigned long bg)
-{
- t_enerwin *ew;
- int i;
-
- snew(ew,1);
- ew->etype=0;
- ew->nlast=0;
- ew->nwidth=width;
- ew->nre=F_NRE;
- snew(ew->e,ew->nre);
- for(i=0; (i<ew->nre); i++)
- snew(ew->e[i],width);
- InitWin(&ew->wd,x,y,width,height,1,"Ener Window");
- ew->wd.self=XCreateSimpleWindow(x11->disp,Parent,x,y,1,1,1,fg,bg);
- x11->RegisterCallback(x11,ew->wd.self,Parent,EWCallBack,ew);
- x11->SetInputMask(x11,ew->wd.self,ExposureMask | ButtonPressMask |
- ButtonReleaseMask | StructureNotifyMask |
- OwnerGrabButtonMask);
- create_selener(x11,ew,Parent);
-
- return ew;
-}
-
-void map_ewin(t_x11 *x11,t_enerwin *ew)
-{
- XMapWindow(x11->disp,ew->wd.self);
-}
-
-void add_ener(t_x11 *x11,t_enerwin *ew,t_energy e[])
-{
- int i,j,w;
-
- w=ew->nwidth/2;
- if (ew->nlast >= ew->nwidth) {
- for(j=0; (j<ew->nre); j++)
- for(i=0; (i<w); i++)
- ew->e[j][i]=ew->e[j][i+w];
- ew->nlast=w;
- }
-
- for(j=0; (j<ew->nre); j++) {
- ew->e[j][ew->nlast]=e[j].e;
- }
- ew->nlast++;
- ExposeWin(x11->disp,ew->wd.self);
-}
-
-void rewind_ener(t_x11 *x11,t_enerwin *ew)
-{
- ew->nlast=0;
- ExposeWin(x11->disp,ew->wd.self);
-}
-
-void done_ew(t_x11 *x11,t_enerwin *ew)
-{
- done_menu(x11,ew->selener);
- x11->UnRegisterCallback(x11,ew->wd.self);
- sfree(ew);
-}
-
-
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Gyas ROwers Mature At Cryogenic Speed
- */
-
-#ifndef _nener_h
-#define _nener_h
-
-#include "x11.h"
-#include "xutil.h"
-#include "popup.h"
-
-typedef struct {
- t_windata wd; /* Window struct */
- t_menu *selener; /* The Select energy menu */
- int nre,nwidth; /* The number of terms */
- int nlast; /* The last frame added */
- int etype; /* The term selected */
- real **e; /* The energy array */
-} t_enerwin;
-
-extern t_enerwin *init_ew(t_x11 *x11,Window Parent,
- int x,int y,int width,int height,
- unsigned long fg,unsigned long bg);
-
-extern void map_ewin(t_x11 *x11,t_enerwin *ew);
-
-extern void add_ener(t_x11 *x11,t_enerwin *ew,t_energy e[]);
-
-extern void rewind_ener(t_x11 *x11,t_enerwin *ew);
-
-extern void done_ew(t_x11 *x11,t_enerwin *ew);
-
-#endif /* _nener_h */
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Gyas ROwers Mature At Cryogenic Speed
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <math.h>
-#include <typedefs.h>
-#include <macros.h>
-#include <smalloc.h>
-#include <string.h>
-#include "nload.h"
-#include "buttons.h"
-
-void DrawLoad(t_x11 *x11,t_windata *Win,int nloads,int *loadinfo)
-{
- static char *Strings[] = { "Unbalance","Single Node","Your Ad Here ?"};
- int i,y0,bwidth,boff,bar,bmax,bmin,ym,yh;
- int *lb;
- real bav,bscale;
- char maxstr[6];
-
- return;
-
- XClearWindow(x11->disp, Win->self);
- y0=XTextHeight(x11->font)+AIR;
- yh=(Win->height-y0)/2;
- ym=y0+yh;
- XSetForeground(x11->disp,x11->gc,WHITE);
- XDrawLine(x11->disp,Win->self,x11->gc,0,y0,Win->width,y0);
-
- if (nloads >= 2) {
- TextInRect(x11,Win->self,Strings[0],AIR,0,Win->width-2*AIR,y0,
- eXLeft,eYCenter);
- if (loadinfo[0] == 0) {
- nloads--;
- lb=&loadinfo[1];
- }
- else {
- lb=loadinfo;
- if (loadinfo[nloads-1] == 0)
- nloads--;
- }
- bwidth = (Win->width) / nloads;
- boff = (Win->width % nloads)/2;
- bav = 0.0;
-
- bmax=bmin=lb[0];
-
- for (i=1; (i<nloads); i++) {
- bmax = max (bmax,lb[i]);
- bmin = min (bmin,lb[i]);
- bav += lb[i];
- }
- bav/=nloads;
- bscale = (yh-2)/max(fabs(bmax-bav),fabs(bav-bmin));
- sprintf(maxstr,"(%d%%)",(int)(100.0*(bmax-bav)/bav));
- TextInRect(x11,Win->self,maxstr,AIR,0,Win->width-2*AIR,y0,
- eXRight,eYCenter);
-
- XDrawLine(x11->disp,Win->self,x11->gc,0,ym,Win->width,ym);
- if (bmax-bmin) {
- for(i=0; i<nloads; i++) {
- bar=(lb[i]-bav)*bscale;
- if (bar != 0) {
- if (bar > 0)
- XFillRectangle(x11->disp,Win->self,x11->gc,
- (i*bwidth)+boff+1,ym-bar+1,bwidth-2,bar);
- else
- XFillRectangle(x11->disp,Win->self,x11->gc,
- (i*bwidth)+boff+1,ym,bwidth-2,-bar);
- }
- }
-
- }
- }
- else {
- TextInRect(x11,Win->self,Strings[1],AIR,0,Win->width,y0,eXLeft,eYCenter);
- TextInRect(x11,Win->self,Strings[2],AIR,y0,Win->width,
- Win->height-y0,eXLeft,eYCenter);
- }
- XSetForeground(x11->disp,x11->gc,x11->fg);
-}
-
-static gmx_bool LWCallBack(t_x11 *x11,XEvent *event, Window w, void *data)
-{
- t_loadwin *lw;
-
- lw=(t_loadwin *)data;
- switch(event->type) {
- case Expose:
- DrawLoad(x11,&lw->wd,lw->nnodes,lw->load);
- break;
- default:
- break;
- }
- return FALSE;
-}
-
-t_loadwin *init_lw(t_x11 *x11,Window Parent,
- int x,int y,int width,int height,
- unsigned long fg,unsigned long bg)
-{
- t_loadwin *lw;
-
- snew(lw,1);
- snew(lw->load,MAXNODES);
- lw->nnodes=1;
- InitWin(&lw->wd,x,y,width,height,1,"Load Window");
- lw->wd.self=XCreateSimpleWindow(x11->disp,Parent,x,y,1,1,1,fg,bg);
- x11->RegisterCallback(x11,lw->wd.self,Parent,LWCallBack,lw);
- x11->SetInputMask(x11,lw->wd.self,ExposureMask);
-
- return lw;
-}
-
-void map_lw(t_x11 *x11,t_loadwin *lw)
-{
- XMapWindow(x11->disp,lw->wd.self);
-}
-
-void set_load(t_x11 *x11,t_loadwin *lw,int nnodes,int load[])
-{
- int i;
- gmx_bool bChange=FALSE;
-
- lw->nnodes=nnodes;
- for(i=0; (i<nnodes); i++)
- if (lw->load[i] != load[i]) {
- bChange=TRUE;
- lw->load[i]=load[i];
- }
- if (bChange)
- ExposeWin(x11->disp,lw->wd.self);
-}
-
-void done_lw(t_x11 *x11,t_loadwin *lw)
-{
- x11->UnRegisterCallback(x11,lw->wd.self);
- sfree(lw);
-}
-
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Gyas ROwers Mature At Cryogenic Speed
- */
-
-#ifndef _nload_h
-#define _nload_h
-
-#include "x11.h"
-#include "xutil.h"
-
-typedef struct {
- t_windata wd;
- int nnodes;
- int *load;
-} t_loadwin;
-
-extern t_loadwin *init_lw(t_x11 *x11,Window Parent,
- int x,int y,int width,int height,
- unsigned long fg,unsigned long bg);
-
-extern void map_lw(t_x11 *x11,t_loadwin *lw);
-
-extern void set_load(t_x11 *x11,t_loadwin *lw,int nnodes,int load[]);
-
-extern void done_lw(t_x11 *x11,t_loadwin *lw);
-
-#endif /* _nload_h */
#include <math.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "smalloc.h"
#include "macros.h"
#include "xutil.h"
#include <Xstuff.h>
#include <x11.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "smalloc.h"
#include "string2.h"
#include "smalloc.h"
#include "statutil.h"
#include "tpxio.h"
-#include "string.h"
+#include <string.h>
#include "sysstuff.h"
#include "txtdump.h"
#include "typedefs.h"
#include "filenm.h"
#include "smalloc.h"
#include "macros.h"
-#include "math.h"
+#include <math.h>
#include "typedefs.h"
#include "xvgr.h"
#include "copyrite.h"
real *mass2=NULL;
rvec *xtop,*vtop;
matrix box;
- atom_id *index0=NULL;
+ atom_id *index0;
int *indexm=NULL;
int isize;
t_trxstatus *status;
#include <ctype.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "string2.h"
#include "typedefs.h"
#include "smalloc.h"
#endif
#include <math.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "string2.h"
#include "typedefs.h"
#include "smalloc.h"
gmx_fatal(FARGS,"Invalid axes. Terminating\n");
}
- if( (natoms= read_first_x(oenv,&status,fn,&t,&x0,box)==0))
+ if( (natoms= read_first_x(oenv,&status,fn,&t,&x0,box))==0)
gmx_fatal(FARGS, "Could not read coordinates from file"); /* Open trajectory for read*/
static void writesurftoxpms(t_interf ***surf1,t_interf ***surf2, int tblocks,int xbins, int ybins, int zbins, real bw,real bwz, char **outfiles,int maplevels )
{
- char numbuf[12];
+ char numbuf[13];
int n, i, j;
real **profile1, **profile2;
real max1, max2, min1, min2, *xticks, *yticks;
#include "smalloc.h"
#include "macros.h"
-#include "math.h"
+#include <math.h>
#include "xvgr.h"
#include "copyrite.h"
#include "statutil.h"
#include "index.h"
#include "smalloc.h"
#include "statutil.h"
-#include "string.h"
+#include <string.h>
#include "sysstuff.h"
#include "txtdump.h"
#include "typedefs.h"
#include "confio.h"
#include "copyrite.h"
#include "txtdump.h"
-#include "math.h"
+#include <math.h>
#include "macros.h"
#include "random.h"
#include "futil.h"
#include <math.h>
#include "sysstuff.h"
#include "statutil.h"
-#include "string.h"
+#include <string.h>
#include "copyrite.h"
#include "smalloc.h"
#include "typedefs.h"
#include <math.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "typedefs.h"
#include "smalloc.h"
#include "macros.h"
if (bDA || (!bDA && (rha2 <= rc2))) {
rvec_sub(x[d],x[hh],r_dh);
if (bBox) {
- if (hb->bGem)
- pbc_correct_gem(r_dh,box,hbox);
- else
- pbc_correct_gem(r_dh,box,hbox);
+ pbc_correct_gem(r_dh,box,hbox);
}
if (!bDA)
fp = opt2FILE("-hbn",nfile,fnm,"w");
if (opt2bSet("-g",nfile,fnm)) {
fplog = ffopen(opt2fn("-g",nfile,fnm),"w");
- if (bContact)
- fprintf(fplog,"# %10s %12s %12s\n","Donor","Hydrogen","Acceptor");
- else
- fprintf(fplog,"# %10s %12s %12s\n","Donor","Hydrogen","Acceptor");
+ fprintf(fplog,"# %10s %12s %12s\n","Donor","Hydrogen","Acceptor");
}
else
fplog = NULL;
#include "index.h"
#include "smalloc.h"
#include "statutil.h"
-#include "string.h"
+#include <string.h>
#include "sysstuff.h"
#include "txtdump.h"
#include "typedefs.h"
#include "smalloc.h"
#include "macros.h"
-#include "math.h"
+#include <math.h>
#include "xvgr.h"
#include "copyrite.h"
#include "statutil.h"
#include <ctype.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "typedefs.h"
#include "statutil.h"
#include "smalloc.h"
#include <stdlib.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "typedefs.h"
#include "smalloc.h"
#include "macros.h"
#include <ctype.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "typedefs.h"
#include "smalloc.h"
#include "macros.h"
#include <ctype.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "typedefs.h"
#include "smalloc.h"
#include "macros.h"
#include <math.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "typedefs.h"
#include "smalloc.h"
#include "macros.h"
#include <math.h>
#include <stdlib.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "typedefs.h"
#include "smalloc.h"
#include "macros.h"
#endif
#include "smalloc.h"
-#include "math.h"
+#include <math.h>
#include "macros.h"
#include "typedefs.h"
#include "xvgr.h"
#endif
#include "smalloc.h"
-#include "math.h"
+#include <math.h>
#include "macros.h"
#include "typedefs.h"
#include "xvgr.h"
#include <stdlib.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "typedefs.h"
#include "smalloc.h"
#include "macros.h"
#include <math.h>
#include "sysstuff.h"
-#include "string.h"
+#include <string.h>
#include "typedefs.h"
#include "smalloc.h"
#include "macros.h"
#include "copyrite.h"
#include "statutil.h"
#include "tpxio.h"
-#include "math.h"
+#include <math.h>
#include "index.h"
#include "pbc.h"
#include "rmpbc.h"
#include "index.h"
#include "smalloc.h"
#include "statutil.h"
-#include "string.h"
+#include <string.h>
#include "sysstuff.h"
#include "txtdump.h"
#include "typedefs.h"
int i,m,in,nnn;
real vn,vnmax;
- if (histo == NULL)
+ if (*histo == NULL)
{
vnmax = 0;
for(i=0; (i<gnx); i++)
snew(fnms_out[i],strlen(buf)+32);
sprintf(fnms_out[i],"%d_%s",i,buf);
}
+ sfree(buf);
}
do_demux(nfile_in,fnms,fnms_out,n,val,t,dt_remd,isize,index,dt,oenv);
}
fprintf(stderr,"\n");
close_trj(status);
+ sfree(outf_base);
+
if (bRmPBC)
gmx_rmpbc_done(gpbc);
#include "index.h"
#include "smalloc.h"
#include "statutil.h"
-#include "string.h"
+#include <string.h>
#include "sysstuff.h"
#include "txtdump.h"
#include "typedefs.h"
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Green Red Orange Magenta Azure Cyan Skyblue
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "paramio.h"
-#include "pinput.h"
-
-#define PPIN \
- ITYPE("nframes", p->nframes, 1) \
- ETYPE("optimize", p->nSel) \
- "radius", "twist", "rise", "len", "nhx", "dipole", "rms", "cphi", NULL, \
- ETYPE("funct", p->funct) \
- "MC", "RECOMB", "PROPTRJ", NULL, \
- ITYPE("nsteps", p->nsteps, 100) \
- ITYPE("nev", p->nev, 10) \
- ITYPE("nskip", p->nskip, 0) \
- STYPE("projection", p->base, "WEDPRJVEC10.DAT") \
- STYPE("recomb", p->recomb, "WEDRECOMB10.DAT") \
- STYPE("gamma", p->gamma, "WEDGAMMA10.DAT") \
- RTYPE("stepsize", p->step, 0.1) \
- RTYPE("tolerance", p->tol, 1e-6) \
- RTYPE("ref-fluc", p->v0, 1e-3) \
- NULL
-
-void read_inp(char *fnin,char *fnout,t_pinp *p)
-{
- read_params(fnin,PPIN);
- write_params(fnout,PPIN);
-}
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Green Red Orange Magenta Azure Cyan Skyblue
- */
-
-#ifndef _pinput_h
-#define _pinput_h
-
-#include "typedefs.h"
-#include "string2.h"
-
-enum { ptMC, ptREC, ptPTRJ, ptNR };
-
-typedef struct {
- real step;
- real tol;
- real v0;
- char base[STRLEN];
- char recomb[STRLEN];
- char gamma[STRLEN];
- int funct;
- int nsteps;
- int nframes;
- int nskip;
- int nSel;
- int nev;
-} t_pinp;
-
-extern void read_inp(char *fnin,char *fnout,t_pinp *p);
-
-#endif