if(NOT GMX_OPENMP)
GMX_TEST_CFLAG(CXXFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CXXFLAGS)
endif()
- GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall -Wno-unused" GMXC_CXXFLAGS)
+ GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall -Wno-unused-function" GMXC_CXXFLAGS)
+ GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wnon-virtual-dtor -Wno-unused-parameter -Wsign-compare" GMXC_CXXFLAGS)
# new in gcc 4.5
GMX_TEST_CXXFLAG(CXXFLAGS_EXCESS_PREC "-fexcess-precision=fast"
GMXC_CXXFLAGS)
GMX_TEST_CFLAG(CXXFLAGS_WARN "/wd4800 /wd4355 /wd4996" GMXC_CXXFLAGS)
endif()
+ if (CMAKE_C_COMPILER_ID MATCHES "Clang")
+ if(NOT GMX_OPENMP)
+ GMX_TEST_CFLAG(CFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CFLAGS)
+ endif()
+ GMX_TEST_CFLAG(CFLAGS_WARN "-Wall -Wno-unused" GMXC_CFLAGS)
+ endif()
+
+ if (CMAKE_C_COMPILER_ID MATCHES "Clang")
+ if(NOT GMX_OPENMP)
+ GMX_TEST_CFLAG(CXXFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CXXFLAGS)
+ endif()
+ GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall -Wno-unused-function" GMXC_CXXFLAGS)
+ endif()
+
+
# now actually set the flags:
# C
if ( NOT DEFINED GMXCFLAGS_SET AND NOT DEFINED ENV{CFLAGS} )
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.99_development_20071104
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2006, 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:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "stdio.h"
-#include "stdlib.h"
-#include "macros.h"
-#include "string2.h"
-#include "futil.h"
-#include "copyrite.h"
-
-static char *head1[]= {
- "",
- " This source code is part of",
- "",
- " G R O M A C S",
- "",
- " GROningen MAchine for Chemical Simulations",
- ""
-};
-
-static char *head2[]= {
- "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:"
-};
-
-#define NH1 asize(head1)
-#define NCR asize(CopyrightText)
-#define NH2 asize(head2)
-#define MAXS 10240
-
-void head(FILE *out, char *fn_, gmx_bool bH,
- char *cstart, char *ccont, char *cend)
-{
- char buf[STRLEN];
- int i;
-
- fprintf(out,"%s\n",cstart);
- /* NOTE: the "" are to mislead CVS so it will not replace by version info */
- fprintf(out,"%s $""Id""$\n",ccont);
- for(i=0; (i<NH1); i++)
- fprintf(out,"%s %s\n",ccont,head1[i]);
- fprintf(out,"%s %s\n",ccont,GromacsVersion());
- for(i=0; (i<NCR); i++)
- fprintf(out,"%s %s\n",ccont,CopyrightText[i]);
- for(i=0; (i<NH2); i++)
- fprintf(out,"%s %s\n",ccont,head2[i]);
- bromacs(buf,STRLEN-1);
- fprintf(out,"%s %s\n",ccont,buf);
- fprintf(out,"%s\n",cend);
- if (bH) {
- fprintf(out,"\n");
- fprintf(out,"#ifndef _%s\n",fn_);
- fprintf(out,"#define _%s\n",fn_);
- fprintf(out,"\n");
- }
-}
-
-void cr_c(char *fn)
-{
- FILE *in,*out;
- char ofn[1024],line[MAXS+1],cwd[1024];
- char *p,*fn_;
- gmx_bool bH;
-
- sprintf(ofn,"%s.bak",fn);
-
- fprintf(stderr,"Processing %s (backed up to %s)\n",
- fn,ofn);
-
- if (rename(fn,ofn) != 0) {
- perror(ofn);
- exit(1);
- }
- in=ffopen(ofn,"r");
- out=ffopen(fn,"w");
-
- /* Skip over empty lines in the beginning only */
- do {
- if (fgets2(line,MAXS,in))
- rtrim(line);
- } while ((strlen(line) == 0) && (!feof(in)));
-
- /* Now we are at end of file, or we have a non-empty string */
- if (strlen(line) != 0) {
- if (strstr(line,"/*") != NULL) {
- /* File does start with comment, so delete it and add new */
- while ((strstr(line,"*/") == NULL) && (!feof(in)))
- fgets2(line,MAXS,in);
- }
- fn_=strdup(fn);
- p=strchr(fn_,'.');
- if (p)
- p[0]='_';
- bH=FALSE;
- do {
- fgets2(line,MAXS,in);
- if ( (strstr(line,fn_) != NULL) &&
- (strstr(line,"#define") != NULL) )
- bH=TRUE;
- } while ( ( (strstr(line,fn_) != NULL) ||
- (strlen(line)==0) ) && (!feof(in) ) );
- getcwd(cwd,STRLEN);
- head(out,fn_,bH,"/*"," *"," */");
- do {
- fprintf(out,"%s\n",line);
- } while (!feof(in) && fgets2(line,MAXS,in));
- }
- ffclose(in);
- ffclose(out);
-}
-
-void cr_other(char *fn)
-{
-
- /* Doesnt work right now, so its commented out */
- /* FILE *in,*out;
- char ofn[1024],line[MAXS+1],line2[MAXS+1],cwd[1024];
- char *p,*fn_,*ptr;
- gmx_bool bH;
-
- sprintf(ofn,"%s.bak",fn);
-
- fprintf(stderr,"Processing %s (backed up to %s)\n",fn,ofn);
-
- if (rename(fn,ofn) != 0) {
- perror(ofn);
- exit(1);
- }
- in=ffopen(ofn,"r");
- out=ffopen(fn,"w");
- */
- /* Skip over empty lines in the beginning only */
-
-}
-
-void cr_tex(char *fn)
-{
- FILE *in,*out;
- char ofn[1024],line[MAXS+1];
- char *p;
-
- sprintf(ofn,"%s.bak",fn);
-
- fprintf(stderr,"Processing (as Tex) %s (backed up to %s)\n",
- fn,ofn);
-
- if (rename(fn,ofn) != 0) {
- perror(ofn);
- exit(1);
- }
- in=ffopen(ofn,"r");
- out=ffopen(fn,"w");
-
- /* Skip over empty lines in the beginning only */
- do
- if (fgets2(line,MAXS,in))
- rtrim(line);
- while ((strlen(line) == 0) && (!feof(in)));
-
- /* Now we are at end of file, or we have a non-empty string */
- if (strlen(line) != 0) {
- while ((strstr(line,"%") != NULL) && (!feof(in)))
- /* File does start with comment, so delete it and add new */
- fgets2(line,MAXS,in);
- head(out,"",FALSE,"%","%","%");
- /* Skip over empty lines */
- while ( (strlen(line) == 0) && !feof(in) )
- if (fgets2(line,MAXS,in))
- rtrim(line);
- do
- fprintf(out,"%s\n",line);
- while (!feof(in) && fgets2(line,MAXS,in));
- }
- ffclose(in);
- ffclose(out);
-}
-
-int main(int argc,char *argv[])
-{
- int i;
- char *fn,*p;
-
- for(i=1; (i<argc); i++) {
- fn=argv[i];
- p=strrchr(fn,'.');
- if ( strcmp(p,".tex")==0 )
- cr_tex(fn);
- else if ((strcmp(p,".c") == 0) || (strcmp(p,".h") == 0))
- cr_c(fn);
- else
- cr_other(fn);
- }
- return 0;
-}
t = 1000*anal->t[i];
fprintf(kp,"MODEL %d time %g fs\n",i+1,t);
for(j=0; (j<anal->nparticle); j++) {
- fprintf(kp,pdbformat,"ATOM",i+1,(j < anal->nion[i]) ? "O" : "N",
+ fprintf(kp,get_pdbformat(),"ATOM",i+1,(j < anal->nion[i]) ? "O" : "N",
"PLS",' ',1,
anal->x[i][j][XX]/100,
anal->x[i][j][YY]/100,
module->dataStarted(data);
bool bCheckMissing = _bAllowMissing
&& !(module->flags() & AnalysisDataModuleInterface::efAllowMissing);
- int ncol = data->columnCount();
for (int i = 0; i < data->frameCount(); ++i)
{
AnalysisDataFrameRef frame = data->getDataFrame(i);
}
int step, i;
- int rc;
if (_impl->nstored == 2)
{
nbins = rowCount() / 2;
}
- real minx = xstart();
AverageHistogramPointer dest(
new internal::StaticAverageHistogram(
histogramFromBins(xstart(), nbins, 2*xstep())
void CopyRight(FILE *out,const char *szProgram)
{
+ static const char * CopyrightText[] = {
+ "Written by Emile Apol, Rossen Apostolov, Herman J.C. Berendsen,",
+ "Aldert van Buuren, Pär Bjelkmar, Rudi van Drunen, Anton Feenstra, ",
+ "Gerrit Groenhof, Peter Kasson, Per Larsson, Pieter Meulenhoff, ",
+ "Teemu Murtola, Szilard Pall, Sander Pronk, Roland Schulz, ",
+ "Michael Shirts, Alfons Sijbers, Peter Tieleman,\n",
+ "Berk Hess, David van der Spoel, and Erik Lindahl.\n",
+ "Copyright (c) 1991-2000, University of Groningen, The Netherlands.",
+ "Copyright (c) 2001-2010, The GROMACS development team at",
+ "Uppsala University & The Royal Institute of Technology, Sweden.",
+ "check out http://www.gromacs.org for more information.\n"
+ };
+
+ static const char * GPLText[] = {
+ "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."
+ };
+
/* Dont change szProgram arbitrarily - it must be argv[0], i.e. the
* name of a file. Otherwise, we won't be able to find the library dir.
*/
#else
fprintf(fp, "FFT Library: unknown\n");
#endif
+
}
else
strcpy(buf,pa->option);
desc = check_tty(pa->desc);
- if (strlen(buf)>((OPTLEN+TYPELEN)-max(strlen(argtp[pa->type]),4))) {
+ if (strlen(buf)>((OPTLEN+TYPELEN)-max(strlen(get_arg_desc(pa->type)),4))) {
sprintf(buf2,"%s%s %-6s %-6s %-s\n",
bLeadingSpace ? " " : "",buf,
- argtp[pa->type],pa_val(pa,tmp,LONGSTR-1),desc);
+ get_arg_desc(pa->type),pa_val(pa,tmp,LONGSTR-1),desc);
} else if (strlen(buf)>OPTLEN) {
/* so type can be 3 or 4 char's, this fits in the %4s */
sprintf(buf2,"%s%-14s %-4s %-6s %-s\n",
- bLeadingSpace ? " " : "",buf,argtp[pa->type],
+ bLeadingSpace ? " " : "",buf,get_arg_desc(pa->type),
pa_val(pa,tmp,LONGSTR-1),desc);
} else
sprintf(buf2,"%s%-12s %-6s %-6s %-s\n",
- bLeadingSpace ? " " : "",buf,argtp[pa->type],
+ bLeadingSpace ? " " : "",buf,get_arg_desc(pa->type),
pa_val(pa,tmp,LONGSTR-1),desc);
sfree(desc);
sfree(tmp);
else {
/* Check whether atomname is an element name */
if ((strlen(nm)<4) && (gmx_strcasecmp(nm,atoms->atom[i].elem) != 0))
- strcpy(pdbform,pdbformat);
+ strcpy(pdbform,get_pdbformat());
else {
- strcpy(pdbform,pdbformat4);
+ strcpy(pdbform,get_pdbformat4());
if (strlen(nm) > 4) {
int maxwln=20;
if (nlongname < maxwln) {
}
return gc;
}
+
+const char* get_pdbformat()
+{
+ static const char *pdbformat ="%-6s%5u %-4.4s%3.3s %c%4d%c %8.3f%8.3f%8.3f";
+ return pdbformat;
+}
+
+const char* get_pdbformat4()
+{
+ static const char *pdbformat4="%-6s%5u %-4.4s %3.3s %c%4d%c %8.3f%8.3f%8.3f";
+ return pdbformat4;
+}
if (strlen(check_tex(pa_val(&(pa[i]),tmp,255))) <= 8)
fprintf(out,"\\> {\\tt %s} \\'\\> %s \\'\\> {\\tt %s} \\' "
"\\parbox[t]{0.68\\linewidth}{%s}\\\\\n",
- check_tex(pa[i].option),argtp[pa[i].type],
+ check_tex(pa[i].option),get_arg_desc(pa[i].type),
check_tex(pa_val(&(pa[i]),tmp,255)),
check_tex(pa[i].desc));
else
fprintf(out,"\\> {\\tt %s} \\'\\> %s \\'\\>\\\\\n"
"\\> \\'\\> \\'\\> {\\tt %s} \\' "
"\\parbox[t]{0.7\\linewidth}{%s}\\\\\n",
- check_tex(pa[i].option),argtp[pa[i].type],
+ check_tex(pa[i].option),get_arg_desc(pa[i].type),
check_tex(pa_val(&(pa[i]),tmp,255)),
check_tex(pa[i].desc));
}
fprintf(out,".BI \"\\-[no]%s\" \"\"\n",check_nroff(pa[i].option+1));
else
fprintf(out,".BI \"%s\" \" %s \"\n",check_nroff(pa[i].option),
- check_nroff(argtp[pa[i].type]));
+ check_nroff(get_arg_desc(pa[i].type)));
}
/* description */
else
fprintf(out,".BI \"%s\" \" %s\" \" %s\" \n %s\n\n",
check_nroff(pa[i].option),
- check_nroff(argtp[pa[i].type]),
+ check_nroff(get_arg_desc(pa[i].type)),
check_nroff(pa_val(&(pa[i]),tmp,255)),
check_nroff(pa[i].desc));
}
"<TD> %s </TD>"
"</TD>\n",
(pa[i].type == etBOOL)?"-[no]":"-",pa[i].option+1,
- argtp[pa[i].type],pa_val(&(pa[i]),tmp,255),NSR(pa[i].desc));
+ get_arg_desc(pa[i].type),pa_val(&(pa[i]),tmp,255),NSR(pa[i].desc));
fprintf(out,"</TABLE>\n");
}
if (nbug > 0) {
"\t<default-value>%s</default-value>\n"
"\t<description>%s</description>\n"
"</option>\n",
- argtp[pa[i].type], is_hidden(&pa[i]),
+ get_arg_desc(pa[i].type), is_hidden(&pa[i]),
pa[i].option+1, /* +1 - with no trailing '-' */
- pa_val(&(pa[i]),buf,255),pa[i].desc); /*argtp[pa[i].type],*/
+ pa_val(&(pa[i]),buf,255),pa[i].desc); /*get_argtp()[pa[i].type],*/
fprintf(out,"</options>\n");
}
finish_linkdata(links);
}
+const char *get_arg_desc(int type) {
+ static const char *argtp[etNR] = {
+ "int", "step", "real", "time", "string", "bool", "vector", "enum"
+ };
+ return argtp[type];
+}
void
gmx_print_version_info(FILE *fp);
-
-static const char *
-CopyrightText[] = {
- "Written by Emile Apol, Rossen Apostolov, Herman J.C. Berendsen,",
- "Aldert van Buuren, Pär Bjelkmar, Rudi van Drunen, Anton Feenstra, ",
- "Gerrit Groenhof, Peter Kasson, Per Larsson, Pieter Meulenhoff, ",
- "Teemu Murtola, Szilard Pall, Sander Pronk, Roland Schulz, ",
- "Michael Shirts, Alfons Sijbers, Peter Tieleman,\n",
- "Berk Hess, David van der Spoel, and Erik Lindahl.\n",
- "Copyright (c) 1991-2000, University of Groningen, The Netherlands.",
- "Copyright (c) 2001-2010, The GROMACS development team at",
- "Uppsala University & The Royal Institute of Technology, Sweden.",
- "check out http://www.gromacs.org for more information.\n"
-};
-
-static const char *
-GPLText[] = {
- "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."
-};
-
-
void
pr_difftime(FILE *out,double dt);
#ifndef M_1_PI
#define M_1_PI 0.31830988618379067154
#endif
-
-/* Suzuki-Yoshida Constants, for n=3 and n=5, for symplectic integration */
-/* for n=1, w0 = 1 */
-/* for n=3, w0 = w2 = 1/(2-2^-(1/3)), w1 = 1-2*w0 */
-/* for n=5, w0 = w1 = w3 = w4 = 1/(4-4^-(1/3)), w1 = 1-4*w0 */
-
-#define MAX_SUZUKI_YOSHIDA_NUM 5
-#define SUZUKI_YOSHIDA_NUM 5
-
-static const double sy_const_1[] = { 1. };
-static const double sy_const_3[] = { 0.828981543588751,-0.657963087177502,0.828981543588751 };
-static const double sy_const_5[] = { 0.2967324292201065,0.2967324292201065,-0.186929716880426,0.2967324292201065,0.2967324292201065 };
-
-static const double* sy_const[] = {
- NULL,
- sy_const_1,
- NULL,
- sy_const_3,
- NULL,
- sy_const_5
-};
-
-/*
-static const double sy_const[MAX_SUZUKI_YOSHIDA_NUM+1][MAX_SUZUKI_YOSHIDA_NUM+1] = {
- {},
- {1},
- {},
- {0.828981543588751,-0.657963087177502,0.828981543588751},
- {},
- {0.2967324292201065,0.2967324292201065,-0.186929716880426,0.2967324292201065,0.2967324292201065}
-};*/
int gmx_nint(real a);
real sign(real x,real y);
typedef struct gmx_conect_t *gmx_conect;
/* THE pdb format (for ATOM/HETATOM lines) */
-static const char *pdbformat ="%-6s%5u %-4.4s%3.3s %c%4d%c %8.3f%8.3f%8.3f";
-static const char *pdbformat4="%-6s%5u %-4.4s %3.3s %c%4d%c %8.3f%8.3f%8.3f";
+const char* get_pdbformat(void);
+const char* get_pdbformat4(void);
/* Enumerated type for pdb records. The other entries are ignored
* when reading a pdb file
etINT, etGMX_LARGE_INT, etREAL, etTIME, etSTR, etBOOL, etRVEC, etENUM, etNR
};
-/* names to print in help info */
-static const char *argtp[etNR] = {
- "int", "step", "real", "time", "string", "bool", "vector", "enum"
-};
+/* name to print in help info for command line arguments (defined in enum above) */
+const char *get_arg_desc(int type);
typedef struct {
const char *option;
{
sprintf(fname,"%s.pdb",fn);
}
- sprintf(format,"%s\n",pdbformat);
+ sprintf(format,"%s\n",get_pdbformat());
out = gmx_fio_fopen(fname,"w");
#define NTROTTERPARTS 3
+/* Suzuki-Yoshida Constants, for n=3 and n=5, for symplectic integration */
+/* for n=1, w0 = 1 */
+/* for n=3, w0 = w2 = 1/(2-2^-(1/3)), w1 = 1-2*w0 */
+/* for n=5, w0 = w1 = w3 = w4 = 1/(4-4^-(1/3)), w1 = 1-4*w0 */
+
+#define MAX_SUZUKI_YOSHIDA_NUM 5
+#define SUZUKI_YOSHIDA_NUM 5
+
+static const double sy_const_1[] = { 1. };
+static const double sy_const_3[] = { 0.828981543588751,-0.657963087177502,0.828981543588751 };
+static const double sy_const_5[] = { 0.2967324292201065,0.2967324292201065,-0.186929716880426,0.2967324292201065,0.2967324292201065 };
+
+static const double* sy_const[] = {
+ NULL,
+ sy_const_1,
+ NULL,
+ sy_const_3,
+ NULL,
+ sy_const_5
+};
+
+/*
+static const double sy_const[MAX_SUZUKI_YOSHIDA_NUM+1][MAX_SUZUKI_YOSHIDA_NUM+1] = {
+ {},
+ {1},
+ {},
+ {0.828981543588751,-0.657963087177502,0.828981543588751},
+ {},
+ {0.2967324292201065,0.2967324292201065,-0.186929716880426,0.2967324292201065,0.2967324292201065}
+};*/
+
/* these integration routines are only referenced inside this file */
static void NHC_trotter(t_grpopts *opts,int nvar, gmx_ekindata_t *ekind,real dtfull,
double xi[],double vxi[], double scalefac[], real *veta, t_extmass *MassQ, gmx_bool bEkinAveVel)
}
}
sprintf(fname,"%s_%s.pdb",fn,gmx_step_str(step,buf));
- sprintf(format,"%s%s\n",pdbformat,"%6.2f%6.2f");
+ sprintf(format,"%s%s\n",get_pdbformat(),"%6.2f%6.2f");
out = gmx_fio_fopen(fname,"w");
gmx_write_pdb_box(out,dd->bScrewPBC ? epbcSCREW : epbcXYZ,box);
a = 1;
sprintf(fname,"%s_%s_n%d.pdb",fn,gmx_step_str(step,buf),cr->sim_nodeid);
- sprintf(format,"%s%s\n",pdbformat,"%6.2f%6.2f");
- sprintf(format4,"%s%s\n",pdbformat4,"%6.2f%6.2f");
+ sprintf(format,"%s%s\n",get_pdbformat(),"%6.2f%6.2f");
+ sprintf(format4,"%s%s\n",get_pdbformat4(),"%6.2f%6.2f");
out = gmx_fio_fopen(fname,"w");
}
if (searchList.empty() && root != &_options)
{
- Options *oldRoot = root;
root = root->_impl->_parent;
++upcount;
searchList.push_back(root);
int
gmx_calc_cog(t_topology *top, rvec x[], int nrefat, atom_id index[], rvec xout)
{
- int m, j, ai;
+ int m, ai;
clear_rvec(xout);
for (m = 0; m < nrefat; ++m)
static void
analyze_static(gmx_sel_evaluate_t *data, t_selelem *sel, gmx_ana_index_t *g)
{
- t_selelem *child, *next;
bool bDoMinMax;
if (sel->type != SEL_ROOT && g)
{
t_selexpr_value *value;
t_selelem *child;
- t_selelem *expr;
if (nval != 1 || !values->bExpr)
{
_gmx_selelem_set_method(t_selelem *sel, gmx_ana_selmethod_t *method,
yyscan_t scanner)
{
- int i;
-
_gmx_selelem_set_vtype(sel, method->type);
sel->name = method->name;
snew(sel->u.expr.method, 1);
t_selelem *sel;
t_selexpr_param *params, *param;
const char *name;
- int rc;
gmx::MessageStringCollector *errors = _gmx_sel_lexer_error_reporter(scanner);
gmx::MessageStringContext context(errors, "In comparison initialization");
t_selelem *root;
t_selelem *mod;
t_selexpr_param *vparam;
- int i;
gmx::MessageStringCollector *errors = _gmx_sel_lexer_error_reporter(scanner);
char buf[128];
t_selelem *
_gmx_sel_init_selection(char *name, t_selelem *sel, yyscan_t scanner)
{
- gmx_ana_selcollection_t *sc = _gmx_sel_lexer_selcollection(scanner);
t_selelem *root;
int rc;
{
gmx_ana_index_t gp, gb, g;
int isize, bnr;
- int i, j, bi, bj, bo;
+ int i, bi, bj, bo;
base->flags |= pc->flags & (POS_VELOCITIES | POS_FORCES);
gmx_ana_index_set(&gp, pc->b.nra, pc->b.a, NULL, 0);
{
e_poscalc_t type;
int cflags;
- int rc;
cflags = flags;
*pcp = NULL;
gmx_ana_poscalc_update(gmx_ana_poscalc_t *pc, gmx_ana_pos_t *p,
gmx_ana_index_t *g, t_trxframe *fr, t_pbc *pbc)
{
- int i, j, bi, bj;
+ int i, bi, bj;
if (pc->bEval == true && !(pc->flags & POS_MASKONLY))
{
evaluate_insolidangle(t_topology *top, t_trxframe *fr, t_pbc *pbc,
gmx_ana_pos_t *pos, gmx_ana_selvalue_t *out, void *data)
{
- t_methoddata_insolidangle *d = (t_methoddata_insolidangle *)data;
int b;
out->u.g->isize = 0;
real theta, phi;
real pdeltamax, tmax;
real theta1, theta2, pdelta1, pdelta2;
- int tbin, pbin, bin;
+ int tbin;
theta = acos(x[ZZ]);
phi = atan2(x[YY], x[XX]);
init_merge(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
{
t_methoddata_merge *d = (t_methoddata_merge *)data;
- int i;
if (d->stride < 0)
{
init_output_permute(t_topology *top, gmx_ana_selvalue_t *out, void *data)
{
t_methoddata_permute *d = (t_methoddata_permute *)data;
- int i, j, b, k;
+ int i, j, b;
gmx_ana_pos_copy(out->u.p, &d->p, true);
gmx_ana_pos_set_evalgrp(out->u.p, &d->g);
gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data)
{
t_methoddata_permute *d = (t_methoddata_permute *)data;
- int i, j, b, k;
+ int i, j, b;
int refid;
if (d->p.nr % d->n != 0)
gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
{
t_methoddata_same *d = (t_methoddata_same *)data;
- int i, j;
+ int j;
out->u.g->isize = 0;
j = 0;
add_symbol(gmx_sel_symtab_t *tab, const char *name, e_symbol_t *ctype)
{
gmx_sel_symrec_t *sym, *psym;
- int len;
/* Check if there is a conflicting symbol */
psym = NULL;
TrajectoryAnalysisCommandLineRunner::run(int argc, char *argv[])
{
TrajectoryAnalysisModule *module = _impl->_module;
- int rc;
CopyRight(stderr, argv[0]);
GMX_THROW(InternalError("invalid -g1 value"));
}
angle *= RAD2DEG;
+ /* TODO: add support for -od and -dumpd
real dist = 0.0;
if (_bDumpDist)
{
dist = sqrt(distance2(c1, c2));
}
}
+ */
if (_bAll)
{
dh.setPoint(n + 1, angle);
b[i] =inprod[3][i];
}
if ( ( b4D || bSplit ) && bPDB ) {
- strcpy(pdbform,pdbformat);
+ strcpy(pdbform,get_pdbformat());
strcat(pdbform,"%8.4f%8.4f\n");
out=ffopen(threedplotfile,"w");
x0*=10.0;/* nm -> angstrom */
y0*=10.0;/* nm -> angstrom */
z0*=10.0;/* nm -> angstrom */
- sprintf(buf,"%s%%6.f%%6.2f\n",pdbformat);
+ sprintf(buf,"%s%%6.f%%6.2f\n",get_pdbformat());
for (i=0; (i<10); i++) {
fprintf(fp,buf,"ATOM ", atoms->nr+1+i, "CA", "LEG",' ',
atoms->nres+1, ' ',x0, y0, z0+(1.2*i), 0.0, -0.1*i);
for (i = 0; i < nat; i++)
{
- fprintf(out, pdbformat, "ATOM", a0 + i, "C", "BOX", 'K' + i
+ fprintf(out, get_pdbformat(), "ATOM", a0 + i, "C", "BOX", 'K' + i
/ NCUCVERT, r0 + i, 10 * vert[i][XX], 10 * vert[i][YY], 10
* vert[i][ZZ]);
fprintf(out, "\n");
for (y = 0; y <= 1; y++)
for (x = 0; x <= 1; x++)
{
- fprintf(out, pdbformat, "ATOM", a0 + i, "C", "BOX", 'K' + i
+ fprintf(out, get_pdbformat(), "ATOM", a0 + i, "C", "BOX", 'K' + i
/ 8, r0 + i, x * 10 * box[XX][XX],
y * 10 * box[YY][YY], z * 10 * box[ZZ][ZZ]);
fprintf(out, "\n");