#cmakedefine GMX_CYGWIN
/** Define if we have sufficient C++11 support */
-#cmakedefine GMX_CXX11
+#cmakedefine01 GMX_CXX11
/* GCC bug in AVX maskload/maskstore arguments - worked around internally */
#cmakedefine GMX_SIMD_X86_AVX_GCC_MASKLOAD_BUG
#cmakedefine GMX_USE_TNG
/* Add support for tracing using Extrae */
-#cmakedefine HAVE_EXTRAE
+#cmakedefine01 HAVE_EXTRAE
/* Use MPI (with mpicc) for parallelization */
#cmakedefine GMX_LIB_MPI
/* Maximum number of OpenMP threads supported */
#define GMX_OPENMP_MAX_THREADS @GMX_OPENMP_MAX_THREADS@
-/* Use if can't rename checkpoints */
-#cmakedefine GMX_NO_RENAME
+/* Use if we cannot rename checkpoints */
+#cmakedefine01 GMX_NO_RENAME
/* Use (modified) Gamess-UK for QM-MM calculations */
-#cmakedefine GMX_QMMM_GAMESS
+#cmakedefine01 GMX_QMMM_GAMESS
/* Use (modified) Gaussian0x for QM-MM calculations */
-#cmakedefine GMX_QMMM_GAUSSIAN
+#cmakedefine01 GMX_QMMM_GAUSSIAN
/* Use (modified) Mopac 7 for QM-MM calculations */
-#cmakedefine GMX_QMMM_MOPAC
+#cmakedefine01 GMX_QMMM_MOPAC
/* Use ORCA for QM-MM calculations */
-#cmakedefine GMX_QMMM_ORCA
+#cmakedefine01 GMX_QMMM_ORCA
/* Use the GROMACS software 1/sqrt(x) */
#cmakedefine GMX_SOFTWARE_INVSQRT
#cmakedefine HAVE_PTHREAD_SETAFFINITY
/* Define for X-Windows */
-#cmakedefine GMX_X11
+#cmakedefine01 GMX_X11
/* Enable x86 gcc inline assembly */
#cmakedefine GMX_X86_GCC_INLINE_ASM
#cmakedefine HAVE_SCHED_H
/* Define to 1 if you have the POSIX <regex.h> header file. */
-#cmakedefine HAVE_POSIX_REGEX
+#cmakedefine01 HAVE_POSIX_REGEX
/* Define to 1 if you have the C++11 <regex> header file. */
-#cmakedefine HAVE_CXX11_REGEX
+#cmakedefine01 HAVE_CXX11_REGEX
/* Define to 1 if you have the sysconf() function */
#cmakedefine HAVE_SYSCONF
#cmakedefine01 GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
/* Define if SIGUSR1 is present */
-#cmakedefine HAVE_SIGUSR1
+#cmakedefine01 HAVE_SIGUSR1
/* Enable gromacs quotes */
-#cmakedefine GMX_COOL_QUOTES
+#cmakedefine01 GMX_COOL_QUOTES
/* default name mangling maybe wrong on exotic plattforms */
#define F77_FUNC(name,NAME) name ## _
/* Define if we have pipes */
-#cmakedefine HAVE_PIPES
+#cmakedefine01 HAVE_PIPES
/* Define if we have feenableexcept */
-#cmakedefine HAVE_FEENABLEEXCEPT
+#cmakedefine01 HAVE_FEENABLEEXCEPT
/* Define if we have zlib */
-#cmakedefine HAVE_ZLIB
+#cmakedefine01 HAVE_ZLIB
/*! \endcond */
{
printf("Executing command '%s'\n", Buffer);
}
-#ifdef HAVE_PIPES
+#if HAVE_PIPES
if ((pipe = popen(Buffer, "r")) == NULL)
{
gmx_fatal(FARGS, "Unable to open pipe to `%s'\n", Buffer);
//! Close file or pipe
void pdo_close_file(FILE *fp)
{
-#ifdef HAVE_PIPES
+#if HAVE_PIPES
pclose(fp);
#else
gmx_ffclose(fp);
npmenodes = 0;
}
-#ifndef GMX_NO_RENAME
+#if !GMX_NO_RENAME
/* make the new temporary filename */
snew(fntemp, strlen(fn)+5+STEPSTRSIZE);
strcpy(fntemp, fn);
/* we don't move the checkpoint if the user specified they didn't want it,
or if the fsyncs failed */
-#ifndef GMX_NO_RENAME
+#if !GMX_NO_RENAME
if (!bNumberAndKeep && !ret)
{
if (gmx_fexist(fn))
#ifdef HAVE_LIBMKL
#include <mkl.h>
#endif
-#ifdef HAVE_EXTRAE
+#if HAVE_EXTRAE
#include <extrae_user_events.h>
#endif
#include <boost/version.hpp>
* but we dont call this routine often, and it avoids using
* a mutex for locking the variable...
*/
-#ifdef GMX_COOL_QUOTES
+#if GMX_COOL_QUOTES
return (getenv("GMX_NO_QUOTES") == NULL);
#else
/*be uncool*/
#else
fprintf(fp, "RDTSCP usage: disabled\n");
#endif
-#ifdef GMX_CXX11
+#if GMX_CXX11
fprintf(fp, "C++11 compilation: enabled\n");
#else
fprintf(fp, "C++11 compilation: disabled\n");
#else
fprintf(fp, "TNG support: disabled\n");
#endif
-#ifdef HAVE_EXTRAE
+#if HAVE_EXTRAE
unsigned major, minor, revision;
Extrae_get_version(&major, &minor, &revision);
fprintf(fp, "Tracing support: enabled. Using Extrae-%d.%d.%d\n", major, minor, revision);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
abort();
}
break;
-#ifdef HAVE_SIGUSR1
+#if HAVE_SIGUSR1
case SIGUSR1:
usr_condition = 1;
break;
}
gmx_signal(SIGINT);
}
-#ifdef HAVE_SIGUSR1
+#if HAVE_SIGUSR1
if (getenv("GMX_NO_USR1") == NULL)
{
if (debug)
gmx_bool gmx_got_usr_signal(void)
{
-#ifdef HAVE_SIGUSR1
+#if HAVE_SIGUSR1
gmx_bool ret = (gmx_bool)usr_condition;
usr_condition = 0;
return ret;
int gmx_feenableexcept()
{
-#ifdef HAVE_FEENABLEEXCEPT
+#if HAVE_FEENABLEEXCEPT
return feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
#elif (defined(__i386__) || defined(__x86_64__)) && defined(__APPLE__)
/* Author: David N. Williams
#include "config.h"
-#ifdef GMX_QMMM_GAMESS
+#if GMX_QMMM_GAMESS
#include <math.h>
#include <stdio.h>
#include "config.h"
-#ifdef GMX_QMMM_GAUSSIAN
+#if GMX_QMMM_GAUSSIAN
#include <math.h>
#include <stdio.h>
#include "config.h"
-#ifdef GMX_QMMM_MOPAC
+#if GMX_QMMM_MOPAC
#include <math.h>
#include <stdio.h>
/* declarations of the interfaces to the QM packages. The _SH indicate
* the QM interfaces can be used for Surface Hopping simulations
*/
-#ifdef GMX_QMMM_GAMESS
+#if GMX_QMMM_GAMESS
/* GAMESS interface */
void
call_gamess(t_forcerec *fr,
t_QMrec *qm, t_MMrec *mm, rvec f[], rvec fshift[]);
-#elif defined GMX_QMMM_MOPAC
+#elif GMX_QMMM_MOPAC
/* MOPAC interface */
void
real
call_mopac_SH(t_QMrec *qm, t_MMrec *mm, rvec f[], rvec fshift[]);
-#elif defined GMX_QMMM_GAUSSIAN
+#elif GMX_QMMM_GAUSSIAN
/* GAUSSIAN interface */
void
real
call_gaussian(t_forcerec *fr, t_QMrec *qm, t_MMrec *mm, rvec f[], rvec fshift[]);
-#elif defined GMX_QMMM_ORCA
+#elif GMX_QMMM_ORCA
/* ORCA interface */
void
if (qm->QMmethod < eQMmethodRHF && !(mm->nrMMatoms))
{
-#ifdef GMX_QMMM_MOPAC
+#if GMX_QMMM_MOPAC
if (qm->bSH)
{
QMener = call_mopac_SH(qm, mm, f, fshift);
/* do an ab-initio calculation */
if (qm->bSH && qm->QMmethod == eQMmethodCASSCF)
{
-#ifdef GMX_QMMM_GAUSSIAN
+#if GMX_QMMM_GAUSSIAN
QMener = call_gaussian_SH(fr, qm, mm, f, fshift);
#else
gmx_fatal(FARGS, "Ab-initio Surface-hopping only supported with Gaussian.");
}
else
{
-#ifdef GMX_QMMM_GAMESS
+#if GMX_QMMM_GAMESS
QMener = call_gamess(fr, qm, mm, f, fshift);
-#elif defined GMX_QMMM_GAUSSIAN
+#elif GMX_QMMM_GAUSSIAN
QMener = call_gaussian(fr, qm, mm, f, fshift);
-#elif defined GMX_QMMM_ORCA
+#elif GMX_QMMM_ORCA
QMener = call_orca(fr, qm, mm, f, fshift);
#else
gmx_fatal(FARGS, "Ab-initio calculation only supported with Gamess, Gaussian or ORCA.");
*/
if (qm->QMmethod < eQMmethodRHF)
{
-#ifdef GMX_QMMM_MOPAC
+#if GMX_QMMM_MOPAC
/* do a semi-empiprical calculation */
init_mopac(qm);
#else
else
{
/* do an ab-initio calculation */
-#ifdef GMX_QMMM_GAMESS
+#if GMX_QMMM_GAMESS
init_gamess(cr, qm, mm);
-#elif defined GMX_QMMM_GAUSSIAN
+#elif GMX_QMMM_GAUSSIAN
init_gaussian(qm);
-#elif defined GMX_QMMM_ORCA
+#elif GMX_QMMM_ORCA
init_orca(qm);
#else
gmx_fatal(FARGS, "Ab-initio calculation only supported with Gamess, Gaussian or ORCA.");
*/
if (qr->qm[0]->QMmethod < eQMmethodRHF)
{
-#ifdef GMX_QMMM_MOPAC
+#if GMX_QMMM_MOPAC
/* semi-empiprical 1-layer ONIOM calculation requested (mopac93) */
init_mopac(qr->qm[0]);
#else
else
{
/* ab initio calculation requested (gamess/gaussian/ORCA) */
-#ifdef GMX_QMMM_GAMESS
+#if GMX_QMMM_GAMESS
init_gamess(cr, qr->qm[0], qr->mm);
-#elif defined GMX_QMMM_GAUSSIAN
+#elif GMX_QMMM_GAUSSIAN
init_gaussian(qr->qm[0]);
-#elif defined GMX_QMMM_ORCA
+#elif GMX_QMMM_ORCA
init_orca(qr->qm[0]);
#else
gmx_fatal(FARGS, "Ab-initio calculation only supported with Gamess, Gaussian or ORCA.");
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
}
//!\}
-#ifndef GMX_CXX11
+#if !GMX_CXX11
//! No-op to enable use of same get()/set() implementation as with C++11.
static gmx::SelectionParserValue &move(gmx::SelectionParserValue &src)
{
* \param[in] src Semantic value to get the value from.
* \returns Retrieved value.
* \throws unspecified Any exception thrown by the move constructor of
- * ValueType (copy constructor if GMX_CXX11 is not set).
+ * ValueType (copy constructor if GMX_CXX11 is 0).
*
* There should be no statements that may throw exceptions in actions before
* this function has been called for all semantic values that have a C++ object
* \param[in] value Value to put into the semantic value.
* \throws std::bad_alloc if out of memory.
* \throws unspecified Any exception thrown by the move constructor of
- * ValueType (copy constructor if GMX_CXX11 is not set).
+ * ValueType (copy constructor if GMX_CXX11 is 0).
*
* This should be the last statement before ::END_ACTION, except for a
* possible ::CHECK_SEL.
#ifdef gmx_ffclose
#undef gmx_ffclose
#endif
-#if (!defined(HAVE_PIPES) && !defined(__native_client__))
+#if (!HAVE_PIPES && !defined(__native_client__))
static FILE *popen(const char *nm, const char *mode)
{
gmx_impl("Sorry no pipes...");
return 0;
}
-#endif /* !defined(HAVE_PIPES) && !defined(__native_client__) */
+#endif /* !HAVE_PIPES && !defined(__native_client__) */
#endif /* GMX_FAHCORE */
int gmx_ffclose(FILE *fp)
#include "config.h"
-#if defined(HAVE_POSIX_REGEX)
-#include <sys/types.h>
+#if HAVE_POSIX_REGEX
+# include <sys/types.h>
// old Mac needs sys/types.h before regex.h
-#include <regex.h>
-#define USE_POSIX_REGEX
-#elif defined(HAVE_CXX11_REGEX)
-#include <regex>
-#define USE_CXX11_REGEX
+# include <regex.h>
+#elif HAVE_CXX11_REGEX
+# include <regex>
#endif
#include "gromacs/utility/exceptions.h"
// static
bool Regex::isSupported()
{
-#if defined(USE_POSIX_REGEX) || defined(USE_CXX11_REGEX)
+#if HAVE_POSIX_REGEX || HAVE_CXX11_REGEX
return true;
#else
return false;
#endif
}
-#if defined(USE_POSIX_REGEX)
+#if HAVE_POSIX_REGEX
class Regex::Impl
{
public:
regex_t regex_;
};
-#elif defined(USE_CXX11_REGEX)
+#elif HAVE_CXX11_REGEX
class Regex::Impl
{
public:
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
//! Returns the stored pointer.
T *get() const { return ptr_; }
//! Check for non-null pointer in boolean context.
-#ifdef GMX_CXX11
+#if GMX_CXX11
explicit
#endif
operator bool () const { return ptr_ != 0; }
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "config.h"
-#ifdef GMX_CXX11 // C++11 Compiler
+#if GMX_CXX11 // C++11 Compiler
#include <memory> // IWYU pragma: export
#include <utility> // IWYU pragma: export
#else // C++03 Compiler
* \brief The smart pointer type.
* Work-around for the non-existence of template typedefs in C++03.
*/
-#ifdef GMX_CXX11 // C++11 Compiler
+#if GMX_CXX11 // C++11 Compiler
using std::move;
template<typename T>
struct gmx_unique_ptr
* version. */
const char *trajectoryFileNames[] = {
"../../../gromacs/gmxana/legacytests/spc2-traj.trr",
-#if defined GMX_USE_TNG && defined HAVE_ZLIB
+#if defined GMX_USE_TNG && HAVE_ZLIB
"../../../gromacs/gmxana/legacytests/spc2-traj.tng",
#endif
"../../../gromacs/gmxana/legacytests/spc2-traj.xtc",
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
-#ifdef GMX_X11
+#if GMX_X11
#include "gromacs/fileio/writeps.h"
if (parse_common_args(&argc, argv, PCA_CAN_TIME, NFILE, fnm,
0, NULL, asize(desc), desc, asize(bugs), bugs, &oenv))
{
-#ifndef GMX_X11
+#if !GMX_X11
fprintf(stderr, "Compiled without X-Windows - can not run viewer.\n");
#else
t_x11 *x11;