alexxy/gromacs.git
10 years agoFixed bug with LJ pot-switch in 4xN kernels
Berk Hess [Thu, 20 Feb 2014 09:01:22 +0000 (10:01 +0100)]
Fixed bug with LJ pot-switch in 4xN kernels

The recent commit of LJ switch functions in the nbnxn kernels
contained a bug in the 4xN kernels which caused the force on some
pairs not to be switched.

Change-Id: Ib4303223924e92d7e84641071a4a56955de70274

10 years agoSuppress icc warning for Boost 1.55 use of #pragma once
Mark Abraham [Sat, 22 Feb 2014 18:13:35 +0000 (19:13 +0100)]
Suppress icc warning for Boost 1.55 use of #pragma once

Change-Id: Ib187cf34ba2c72a2c57fc55cfd26154508e9543b

10 years agoRemoved deprecated Encad FF.
Rossen Apostolov [Thu, 20 Feb 2014 16:21:50 +0000 (17:21 +0100)]
Removed deprecated Encad FF.

Change-Id: Ib7f5c3d9920307a808dde9ef13b0f042827eb8ca

10 years agoFix load_lj_pair_params2 for MIC
Roland Schulz [Thu, 20 Feb 2014 08:57:56 +0000 (03:57 -0500)]
Fix load_lj_pair_params2 for MIC

Change-Id: I181bf5c6190d19ee2cb7bcf629c1b81e849e6373

10 years agoUpdated Boost to latest 1.55.0
Roland Schulz [Wed, 29 Jan 2014 19:07:28 +0000 (14:07 -0500)]
Updated Boost to latest 1.55.0

Shouldn't have any disadvantage because boost still has support
for e.g. GCC 3.3. Newest version should work better with newer
compilers (e.g. no warnings).

Reduced the number of changes in boost to two:
- Virtual dtor fix is not required anymore
- Removed #error which was aimed at producing compiler errors
  for removed dependencies. Because this internal boost is only
  meant to be used by Gromacs we shouldn't have to detect
  odd usage of BOOST_* defines.

Fixed two comipler warnings:
- Applied nvcc.path from https://svn.boost.org/trac/boost/ticket/9392
- Commented out unsed parameter

These warnings should be fixed in future boost versions but if not and
the changes have to be reapplied, check Gerrit for the diff. Patch Set 1
contains the unmodified version without the fixes.

Change-Id: I09179891f9979a5997171a579a6a552621a693df

10 years agoMerge "Merge release-4-6 into master"
Roland Schulz [Fri, 21 Feb 2014 20:16:23 +0000 (21:16 +0100)]
Merge "Merge release-4-6 into master"

10 years agoAdded new amber99sb-ildn-bsc0 force field.
Nina Fischer [Thu, 20 Feb 2014 10:48:07 +0000 (11:48 +0100)]
Added new amber99sb-ildn-bsc0 force field.

It extends the original amber99sb-ildn with new
parameters for nucleic acids, while the protein
parameters are the same in both force fields.

Change-Id: I665ea598015428ced103ce18f6665afd0d5ede8c

10 years agoMerge release-4-6 into master
Roland Schulz [Fri, 21 Feb 2014 00:53:08 +0000 (19:53 -0500)]
Merge release-4-6 into master

Changed BUILD_CPU_ACCELERATION to GMX_SIMD in
CMakeLists.txt.

Reverts change to src/mdlib/pme_simd4.h. Corresponding
fix for master is under review as I5e08b0a09.

Removed reference to PD in message in shellfc.c.

Conflicts (all trivial):
CMakeLists.txt
src/contrib/fftw/CMakeLists.txt
src/gromacs/gmxlib/gmx_detect_hardware.c
src/gromacs/legacyheaders/shellfc.h
        src/gromacs/gmxlib/copyrite.cpp

Change-Id: I2d43520ae8833055eff51d431e47cd8b90d3a687

10 years agoReinstate shell code with DD
Mark Abraham [Thu, 20 Feb 2014 21:59:41 +0000 (22:59 +0100)]
Reinstate shell code with DD

Further work on the complex/sw test case in the 5.0 regressiontests
branch reveals that the initial conditions may have been the reason
for the problems observed with DD and more than one node, rather than
the implementation.

Refs #1429

Change-Id: I26ff6d9f8c79605afa794cae4761b5643b712124

10 years agoRemove particle decomposition
Mark Abraham [Sat, 12 Oct 2013 00:27:28 +0000 (02:27 +0200)]
Remove particle decomposition

The paths that are eliminated are those for which MD_PARTDECOMP was
needed, those triggered by PARTDECOMP(cr), and any for which PAR(cr)
&& !cr->dd.

Reviewers, please note
* that for the purposes of this patch, OpenMP is not a form of
  parallelism,
* the definition of DOMAINDECOMP(cr) in commrec.h,
* that TPI and NM can run in parallel, but use neither PD nor DD,
* multi-simulations run in parallel but need not use DD, so
* we still need both PAR(cr) and DOMAINDECOMP(cr), and
* I have generally left the indenting alone to make for easy review,
  but we will uncrustify before merging

Summary of changes in this patch:

Removed
* code triggered by MD_PARTDECOMP
* code triggered by PARTDECOMP(cr)
* anything decomposition-related with "pd" in the name (but the name
  clash with x86 vector intrinsics is unfortunate)
* t_mdatoms field called start (DD does atom number remapping)
Note that bPDvsitecomm was never set anyway!
* manual section

Renamed two functions with "pd" in their name changed to "serial"
because they are still needed there (and moved them?)

Deleted files, functions and function paramters that only supported PD
code paths.

Cleaned up
* use of DOMAINDECOMP(cr)
* a bit of Generalized Born code that should have been static or
  was unused
* bcast_state machinery can now be much simpler; still does the right
  thing, but does it further behind the scenes and easier to
  understand
* made explicit the assumption of replica exchange that the
  integrator is dynamical, which makes for some minor
  simplifications

Refs #1292

Change-Id: If029f16e6b4b06d58d465afe072a3cde6481479e

10 years agoadded gmx_is_{single,double}_precision
Christoph Junghans [Tue, 18 Feb 2014 17:32:47 +0000 (10:32 -0700)]
added gmx_is_{single,double}_precision

* allows easy detection of the precision for cmake, autotools
  without parsing the output of gmx_print_version_info (no
  cross-compile support) or the output of strings command (unix
  only)
* linking against libgmx with/out -DGMX_DOUBLE will lead to
  unpredictable segfaults

Change-Id: I472f10ae374a1f42c94c55e156b53f8905bdf098

10 years agoFix aligned store to unaligned memory
Roland Schulz [Mon, 17 Feb 2014 22:23:33 +0000 (17:23 -0500)]
Fix aligned store to unaligned memory

Also fixes that unaligned store was used when not necessary.

Change-Id: I44bb222a07ec0af65198667787b8673b3c6cd2e7

10 years agoavoid mdrun crash when rdtscp is not supported
Mark Abraham [Fri, 31 Jan 2014 14:06:20 +0000 (15:06 +0100)]
avoid mdrun crash when rdtscp is not supported

When using rdtscp, mdrun now detects at runtime whether the CPU supports
this instruction and if this is not the case, it issues a fatal error
and instructs the user to recompile mdrun for the compute host. Note
that this will happen rarely, only when cross-compiling from a newer
host for a rather old one.

Additionally, when the user manually picks AVX, we also turn on RDTSCP
as all AVX-capable CPUs support it.

Also made CMake advanced cache option for GMX_USE_RDTSCP. This replaces
the previously hidden GMX_DISTRIBUTABLE_BUILD option.

Fixes #1428

Change-Id: I8bc884ef9ea8ea4661626b60490182ae2b302648

10 years agoAdd integration tests for replica exchange
Mark Abraham [Tue, 10 Dec 2013 07:02:52 +0000 (18:02 +1100)]
Add integration tests for replica exchange

Only NVT and NPT tested so far.

Added new convenience class for a value-parameterized mdrun
integration-test fixture.

Change-Id: I25211277d6979909f67378dc578e3d388a8abeda

10 years agoRename ffopen and ffclose to gmx_ff*.
Rossen Apostolov [Wed, 12 Feb 2014 13:14:42 +0000 (14:14 +0100)]
Rename ffopen and ffclose to gmx_ff*.

There are name clashes with e.g. PathScale compiler.

Fixes #1250.

Change-Id: I3e5e85d9335f2695515483d59d440276823624f0

10 years agoFix Reference Build
Roland Schulz [Mon, 17 Feb 2014 22:21:19 +0000 (17:21 -0500)]
Fix Reference Build

Rename (e5e37f2c62c) broke reference build

Change-Id: Id98b61f2af2e4731f57a775ee9c4057baf76587a

10 years agoAdd documentation for using Doxygen
Teemu Murtola [Sun, 9 Feb 2014 12:15:32 +0000 (14:15 +0200)]
Add documentation for using Doxygen

- Add a page that provides guidelines and examples for using Doxygen.
  Hopefully, this would make simple examples easier to find, and help
  people write correct comments from the beginning.
- Remove unnecessary \addtopublicapi and \addtolibraryapi.

Once the contents are there, it is easy to enhance the documentation by
adding content whenever noticing things that are tricky.

Change-Id: I319e30452004998df73c249f46570cb2254daa87

10 years agoImplemented nbnxn LJ switch functions
Berk Hess [Thu, 14 Nov 2013 08:59:50 +0000 (09:59 +0100)]
Implemented nbnxn LJ switch functions

The nbnxn C reference and SIMD kernels now support force and
potential switching, which are selected through vdw_modifier.
Both use analytical functions, since tables are expensive with SIMD.
Made the nbnxn kernel naming consistent with the group scheme.
Corresponding CUDA kernels will be added soon.

Dispersion correction always needs table generation, which had always
been a fortuitous side effect of something else, until this patch.

Change-Id: I52a1cda5ec7c3bdce6f3f2735ff7b13303ea5880

10 years agoMake some variable names less cryptic
Mark Abraham [Tue, 18 Feb 2014 18:03:39 +0000 (19:03 +0100)]
Make some variable names less cryptic

No changes to function

Change-Id: I910abe7d8f42186bfd43706d3389fca2f0995cc6

10 years agoFix outstanding references to "CPU acceleration"
Mark Abraham [Sun, 16 Feb 2014 22:36:56 +0000 (23:36 +0100)]
Fix outstanding references to "CPU acceleration"

Since we now use GMX_SIMD rather than GMX_CPU_ACCELERATION we
should be consistent.

Change-Id: I6a798870e5b89fc92bdbea18680e017101a2f704

10 years agoFix harmless bug with combination of group and twin-range
Mark Abraham [Fri, 14 Feb 2014 17:29:34 +0000 (18:29 +0100)]
Fix harmless bug with combination of group and twin-range

The combination of
* group cut-off scheme,
* coulomb-modifier != none,
* rcoulomb > rlist (ie. twin-range), and
* rlistlong == -1

was being treated by the wrong clause in readir.c because the check
for "might be zero at cutoff" did not consider the modifier. The only
behavioural difference was issuing a warning that there will be no
buffering.

The modifier checks have been refactored to make it possible to check
the modifier.

Also removed some useless checks for EVDW_SWITCH

Change-Id: Ic64f3f48be17f6d87230bc4060a31e1fb4343973

10 years agoExtend TestFileManager
Mark Abraham [Mon, 27 Jan 2014 19:43:04 +0000 (20:43 +0100)]
Extend TestFileManager

A test fixture may wish to change the output temporary directory, and
should be able to do so without perturbing the global state from which
the test TestFileManager object is initialized.

The only client of this feature (the setup code) is updated
accordingly.

Minor fixes to existing documentation.

Change-Id: I7ba7a82964c05f12de107710655b6320d42ae99c

10 years agoEnable more warnings
Roland Schulz [Tue, 11 Feb 2014 21:30:59 +0000 (16:30 -0500)]
Enable more warnings

- pointer arithmetic on void*
- increase warning level for ICC from 2 (=Wall) to recommended 3.
  Includes useful warnings such as:
  - statement has no effect
  - external/internal linkage conflict
- See gerrit for description of all disabled warnings.

Change-Id: I1c41119ed8bcee8dda8af0cbe2866b3e404a3992

10 years agoFix test reference data accidentally broken
Mark Abraham [Sun, 12 Jan 2014 22:23:11 +0000 (23:23 +0100)]
Fix test reference data accidentally broken

Change-Id: Ib622b126b0331c88acab924aff660211122f9d03

10 years agoRemove support for .g87 and .xyz I/O formats
Mark Abraham [Sun, 12 Jan 2014 22:23:11 +0000 (23:23 +0100)]
Remove support for .g87 and .xyz I/O formats

Aspects of support for these have been broken since before GROMACS
4.5. That support is sometimes interactive, and thus a poor fit for
the way GROMACS supports other trajectory and coordinate formats.
Other file-format conversion options exist; GROMACS does not have to
be a Swiss-army knife.

Removed undocumented features of gmx helix that required .g87 support
for no particularly good reason.

Uncrustified files in this commit

Change-Id: Iad4845fd66ad4c55f9a31965d33ded745656db53

10 years agoSmall enhancement of computational electrophysiology manual section.
Carsten Kutzner [Thu, 13 Feb 2014 17:08:23 +0000 (18:08 +0100)]
Small enhancement of computational electrophysiology manual section.

Added a note about what can be done if large membrane undulations turn out
to be a problem in a Computational Electrophysiology setup.

Change-Id: I5f50b4026ea1a8b88368b10c39d2207070c4740c

10 years agoImprove man page formatting slightly
Teemu Murtola [Sat, 15 Feb 2014 11:18:01 +0000 (13:18 +0200)]
Improve man page formatting slightly

- Don't add extra space whenever [TT]/[BB]/[II] is specified.  This may
  have been necessary 15 years ago, or has always been broken, but
  currently it adds a lot of forced double spaces and leading spaces
  onto man pages.  The text is much more readable without it.
- Merge all command line options into a single OPTIONS section. Divide
  it into groups using extra paragraphs in between.  Could possibly be
  formatted nicer, but that would require extra nroff trickery that we
  might rather get rid of.

Related to #1437.

Change-Id: I4b27b79604a1830914cd5d14d6581918f33bb107

10 years agoFix default enum values in help output
Teemu Murtola [Sun, 16 Feb 2014 04:48:39 +0000 (06:48 +0200)]
Fix default enum values in help output

nenum() does not return an enum value, but an index into the underlying
array, which means that the first element is 1 and not zero like the
code assumed.  The help output was off-by-one, and could error out if
some environment variable was set that was affecting the help output.

Fixes #1438.

Change-Id: Iec2f05c9ced55868902069ce59bc4979a6879f86

10 years agoFix some broken links in HTML pages
Teemu Murtola [Sat, 15 Feb 2014 05:34:44 +0000 (07:34 +0200)]
Fix some broken links in HTML pages

Links to programs need to be prefixed with the relative path, as well as
"gmx-".  Also added the "gmx " prefix to the displayed names.

Change-Id: I60bd0a58761a725804aa4c5b02619c3031ae7d26

10 years agoOne more bump of the TNG version.
Magnus Lundborg [Thu, 13 Feb 2014 13:49:39 +0000 (14:49 +0100)]
One more bump of the TNG version.

This is just to include the improved warning flag settings.

Change-Id: Idc1e0b43b963e8431cd943214c424012d09b6a4c

10 years agoRemoved option to use OpenMP with the TNG library.
Magnus Lundborg [Wed, 12 Feb 2014 08:02:24 +0000 (09:02 +0100)]
Removed option to use OpenMP with the TNG library.

OpenMP was only used for compiling a few of the examples. With
the latest version of the TNG library the detection is done when
compiling those examples and skipping them if OpenMP is not
available.

Fixes #1432

Change-Id: I76df67b10067f2fbc57a4cf0b1825875239e435d

10 years agoEnable TNG builds on Windows by default.
Magnus Lundborg [Wed, 12 Feb 2014 08:11:58 +0000 (09:11 +0100)]
Enable TNG builds on Windows by default.

With the latest version of TNG the problems encountered on
Windows should be fixed.

Change-Id: I52d7fd609d086ba4abe4eb8cd95337a58ee35641

10 years agoBumped TNG to latest version.
Magnus Lundborg [Wed, 12 Feb 2014 07:59:48 +0000 (08:59 +0100)]
Bumped TNG to latest version.

Change-Id: Iefbb35ce46f0c545a23b8bea6b90ad5e11caeffc

10 years agoRefactored 'solvate' and 'insert-molecules'
Mark Abraham [Mon, 3 Feb 2014 00:13:27 +0000 (01:13 +0100)]
Refactored 'solvate' and 'insert-molecules'

The use of "VDW radii" in these tools was misleading in both
documentation and code. VDW radii are used if they are found, but they
used to be scaled down via a hidden option, and the user had to
magically know what kind of number to give to -vdwd. Documented what
is going on here.

Made that hidden option public, and renamed -vdwd to -radius. Renamed
variables named r to be more reflective of their use as additive
inter-atomic exclusion half-distances. This clarified what "mk_vdw"
was really doing, and that a call to it should not be living at the
end of a function that reads in a conformation from a file. Renamed
lots of things and documented more behaviour. Freed some memory
that should have been freed all along.

This exposed some horrible use of t_atoms. Fixed the code to always
allocate on the heap, call the initializer and call the destructor.

Change-Id: I3f8bbbed07442ccc6cd8e563168f5a68736c6b40

10 years agoRe-fix compiler warnings with scanner.cpp
Mark Abraham [Mon, 3 Feb 2014 15:17:08 +0000 (16:17 +0100)]
Re-fix compiler warnings with scanner.cpp

The existing check for -Wno-deprecated-register worked with a pre-3.4
clang SVN release, but the release 3.4 compiler only has
-Wno-deprecated. Not sure if any compiler does or will support
-Wno-deprecated-register but even if it's wasted, it's not doing any
harm.

Change-Id: I274255415b66b889dc155472c5f81b6073cdce3e

10 years agoSplit genbox into 'solvate' and 'insert-molecules'
Mark Abraham [Sun, 2 Feb 2014 20:31:20 +0000 (21:31 +0100)]
Split genbox into 'solvate' and 'insert-molecules'

All working old functionality is retained in new 'solvate' and
'insert-molecules' programs. Registered genbox as obsolete, so someone
using gmx genbox gets a hint, which is also triggered by the old
symlink. No new symlinks, of course. Updated all mentions of genbox in
the whole repo.

For gmx solvate:
* Cleaned up unused functions
* Cleaned up unused headers
* Cleaned up useless command-line options
* Updated documentation
* Checked that its behaviour for writing velocities is OK (but there's
  no good way to test that)

For gmx insert-molecules:
* Cleaned up unused functions
* Cleaned up unused headers
* Cleaned up useless command-line options
* Updated documentation
* Added tests, worked out that -vdwd and spc216.gro were not required
  for a decent test and updated accordingly
* Renamed -cs to -f for consistency with other tools. It would be nice
  to have a hidden fallback so that -cs does the right thing, but the
  machinery does not exist.
* Added helpful check now that -ci is required (generic file I/O error
  previously)
* Fixed bug with gmx insert-molecules -ci and velocities. Old version
  would dereference v pointer because the insertion function does not
  return velocities for the inserted molecules.

Split the respective test cases into separate compilation
units. Consolidated functions called by both new tools into
read-conformation.[ch]. The naming and use of those functions are
horrendous, and will be fixed in the next patch.

genbox-addconf.[ch] is no longer specific to any tool, so renamed it
back to addconf.[ch].

Change-Id: I7781c3db189f5d95d5731e4e86cc0585f7d677c7

10 years agoFixed another vmdio issue.
David van der Spoel [Mon, 10 Feb 2014 17:18:09 +0000 (18:18 +0100)]
Fixed another vmdio issue.

An include that was missed previsouly in trxio.h.

Change-Id: Id7f491e402dec0ee6783d933e98692abb6ce9f1a

10 years agoUpdate stuff for old BlueGene
Mark Abraham [Fri, 7 Feb 2014 17:32:14 +0000 (18:32 +0100)]
Update stuff for old BlueGene

BlueGene/L is likely completely dead. We have no ability to
support SIMD on BlueGene/P (technically we can do 2-wide SIMD,
but there's probably issues and this platform is almost dead).

Change-Id: Ib607fd11f0b575bcddf4085351ceb2989529247d

10 years agoFirst part of commit for redesigned SIMD module - namechanges.
Erik Lindahl [Fri, 24 Jan 2014 20:04:47 +0000 (21:04 +0100)]
First part of commit for redesigned SIMD module - namechanges.

This patch contains the bulk part of trivial name changes
in preparation for the new SIMD module.
- Add the gmx_simd_ prefix, and _r suffix for real simd data.
  This makes the module more generic, and we separate the
  gromacs SIMD layer from x86 implementation better.
- epi32 (intel name to indicate 64-bit var extended to 128 bits)
  has been changed to int32 in types and defines.
- Negated-fused-multiply-add nomenclature has been changed
  so "-a*b+c" is fnmsub. This is the standard on both Intel
  and AMD, where most people have SIMD coding experience.
  My apologies for first recommending Berk to use the opposite.
- GMX_CPU_ACCELERATION_ strings have been changed to GMX_SIMD_,
  both in the code and in CMake.
- Defines like GMX_X86_SSE2 that indicate instruction set
  availability have received the _OR_HIGHER suffix to clarify
  that those are cumulative in contrast to the SIMD setting,
  which only indicates the highest level. These will be moved
  away from config.h to the simd headers in the next patch.
- GMX_SIMD_WITDH_HERE has been changed to GMX_SIMD_REAL_WIDTH.

Change-Id: I7a2567f7ddaf8ecd95a4f3b1162bbf03342b2b63

10 years agoAdded information about how to cite the TNG paper.
Magnus Lundborg [Thu, 6 Feb 2014 15:13:27 +0000 (16:13 +0100)]
Added information about how to cite the TNG paper.

Change-Id: I698582f296603f741842f99437bcf872a42682d7

10 years agoAdded safety check for fitting group in anaeig.
Jan Henning Peters [Mon, 10 Feb 2014 17:53:32 +0000 (18:53 +0100)]
Added safety check for fitting group in anaeig.

Previously, g_anaeig would not check the number of atoms in the selected
fit group against the number of atoms in the reference structure if this
was read from the eigenvector file (g_covar adds the reference structure
to the eigenvector file if fit and analysis group are identitcal). As a
result, anaeig would run out of bounds when selecting the atoms for
fitting, reading random values from memory.

This simple check should prevent this behaviour by terminating anaeig
with a fatal error similar to the one that is invoked if the group
selected for analysis has an incorrect number of atoms.

Change-Id: I63a1e1629144e539808d95d867e0ad0673480fdf

10 years agoMoved conditional cmake code for vmdio.
David van der Spoel [Mon, 10 Feb 2014 12:08:24 +0000 (13:08 +0100)]
Moved conditional cmake code for vmdio.

When moving the vmdio.c file to the fileio directory the
corresponding conditional was left in the gmxlib/CMakeLists.txt
file. This is corrected here.

Change-Id: I91a7123aebe639b89a19733ef972699a2c8c9630

10 years agoShell completions through Options
Teemu Murtola [Fri, 7 Feb 2014 18:52:53 +0000 (20:52 +0200)]
Shell completions through Options

- Implement shell completion generation for command line options
  specified through an Options object.
- Use this support to generate the list of options for the wrapper
  binary instead of hardcoding them.
- Use this support and the conversion from t_pargs/t_filenm to Options
  to generate the existing completions.  The only differences in the
  generated completions are in the order of the options and in changing
  "$n == 1" to "$n <= 1" and ".@(xtc|trr|...)" to "@(.xtc|.trr|...)".
- Extend some of the options to expose information necessary for this.

Related to #969 and #1410.

Change-Id: Ib77543367c38803ef186f6024a1af14feb806d80

10 years agoMove orientation restraints checks inside init function
Mark Abraham [Tue, 4 Feb 2014 15:29:15 +0000 (16:29 +0100)]
Move orientation restraints checks inside init function

This removes clutter from runner(), much like init_disre() already
does. Removed duplicate check for the number of orientation restraints
being zero. Removed an unused function parameter.

Change-Id: Icc6a08a2ed4af010e65bfe1f5e49b6c229454df1

10 years agoMake 'gmx -h' invariant wrt. provided options
Teemu Murtola [Fri, 7 Feb 2014 18:38:13 +0000 (20:38 +0200)]
Make 'gmx -h' invariant wrt. provided options

The help output no longer depends on what the user provided on the
command line.  To do this, initialize a separate copy of the options
holder for writing the help.  This decouples the module manager and the
actual help output a bit more.  Make the option holder implementation
shared through cmdlinemodulemanager-impl.h.

Change-Id: I82ea1e969c7d02eadcb2a9f519af30561cb19991

10 years agoRemove old help formatting code
Teemu Murtola [Mon, 23 Dec 2013 18:14:22 +0000 (20:14 +0200)]
Remove old help formatting code

Make parse_common_args() format its help using the new
CommandLineHelpWriter class.  To support this:
 - Add conversion functions that map t_filenm and t_pargs options to
   corresponding Option classes.
 - Add support for arbitrary file types from the filenm.h enum to
   FileNameOption.
 - Add support for writing a list of known issues from
   CommandLineHelpWriter.
 - Some minor extensions to the Option classes to make it easy to do
   the conversion.
 - Fix gmx_hbond to not specify the same option twice.
 - Remove wman.* as unused after the change.

Related to #969.

Change-Id: I25143ddfa4226abd5ae5b95172f69c8fc615b720

10 years agoMake FileNameOption behave more like old filenm parser
Teemu Murtola [Wed, 5 Feb 2014 19:59:17 +0000 (21:59 +0200)]
Make FileNameOption behave more like old filenm parser

If a required file name option is provided without a value, then it is a
no-op.  Previously, FileNameOption raised an exception for such usage.
Add a test to cover this case.

Related to #642.

Change-Id: I89d6cc8ee5d5bf2915bb6841317b402ade00b99b

10 years agoImplement synopsis for help output
Teemu Murtola [Tue, 4 Feb 2014 18:41:19 +0000 (20:41 +0200)]
Implement synopsis for help output

Print all the options into the synopsis, for all the output formats
(console, man pages, and HTML).  Formatting is not the nicest possible,
but surely better than what it was (in wman.cpp, the synopsis is only
printed into the man pages, with no wrapping whatsoever).

Part of #969.

Change-Id: Ic09ac91b3d5b5e2d42d41b83935d54c894eb8e97

10 years agoRefactor new help formatting implementation
Teemu Murtola [Tue, 4 Feb 2014 15:42:39 +0000 (17:42 +0200)]
Refactor new help formatting implementation

- Merge formatFileOption() and formatOption() into one.
- Remove unnecessary generality by splitting description formatting into
  its own class, and make OptionsFilter only do option filtering.  All
  output handling is now in OptionsListFormatter (which was renamed from
  OptionsExportFormatter).
- Split formatting basic option name and value placeholders into a
  separate function.

There should be no functional change.  Preparation for a proper synopsis
implementation.

Part of #969.

Change-Id: I900883eb39853ed67d5f6177ae06847283348d9e

10 years agoClean up .log file dump of inputrec
Mark Abraham [Thu, 6 Feb 2014 06:15:19 +0000 (07:15 +0100)]
Clean up .log file dump of inputrec

New wide name made formatting ugly. Renamed a few things to follow
.mdp convention.

Change-Id: I39550bff607a9ead01d228a7ab297eac1dde2523

10 years agoIssue fatal errors rather than use broken shell code
Mark Abraham [Tue, 4 Feb 2014 21:13:46 +0000 (22:13 +0100)]
Issue fatal errors rather than use broken shell code

Refs #1429

Change-Id: I18a17f1e232a86a13f4e3b591bd992702af3017b

10 years agoFix & update docs for GMX_TEST_OPTIONS
Teemu Murtola [Tue, 4 Feb 2014 20:20:18 +0000 (22:20 +0200)]
Fix & update docs for GMX_TEST_OPTIONS

The macro did not appear in Doxygen documentation, because it was
excluded to avoid warnings from undocumented instances of it.  Since
there aren't that many, opted to protect those with \cond instead.  Also
some minor updates and additions to the documentation, and some minor
cleanup of touched code.

Change-Id: I04785e6d66f124ae8ec5dde87bb7c7442230d83a

10 years agoInitialize inputrec better in genbox
Mark Abraham [Thu, 6 Feb 2014 17:23:49 +0000 (18:23 +0100)]
Initialize inputrec better in genbox

Incoming NBNXN patches change the behaviour if you just leave the VDW
modifier set to zero. The modifier is not supposed to be zero, because
grompp is supposed to change eintmodPOTSHIFT_VERLET to something
non-zero, but since we don't have a vanilla constructor for an
inputrec and use it outside grompp, we have a horrible flow-on effect.

So we set both the modifiers explicitly, to avoid these problems.

Change-Id: I2f8381e81104e673fb1a602b2d9cac1ccd81fff0

10 years agoFix build of share/template when installed
Teemu Murtola [Sat, 1 Feb 2014 18:08:09 +0000 (20:08 +0200)]
Fix build of share/template when installed

It is now possible to build the analysis tool template using the
Makefile.pkg and the CMakeLists.txt that are installed with it, at least
under some conditions.  FindGROMACS.cmake could probably be improved
further by using gromacs/version.h to detect the version for those
installations where it is present (4.6 and up); the current list of
functions is confusing (init_domdec_vsites, for example, already appears
in 4.6, but causes the detected version to be set to 5.0), and requires
extra maintenance for each release.

Remove obsolete Template.mak, which was used by autoconf to generate an
installed Makefile.

Change-Id: Ibcaa792b721db7fc9729710e36ace29bddbb82c3

10 years agoEE dhdl header should not specify one lambda
Michael Shirts [Sun, 1 Dec 2013 04:19:34 +0000 (23:19 -0500)]
EE dhdl header should not specify one lambda

The header for dhdl for expanded ensemble should not specify a single
lambda value because the simulation visits many lambdas.  This commit
fixes this problem.

Change-Id: I717203a58657fbce2bf3739c15be5f05a61435bf

10 years agoRemove antiquated and unused gmxpar.tex documentation
Mark Abraham [Wed, 5 Feb 2014 00:46:17 +0000 (01:46 +0100)]
Remove antiquated and unused gmxpar.tex documentation

Change-Id: I7c7637c38063f8d511c575990bf5c5542beaa725

10 years agoUse random seeds by default
Roland Schulz [Tue, 4 Feb 2014 02:26:22 +0000 (21:26 -0500)]
Use random seeds by default

A stocastic simulation not being reproducible by default is less
surprising. It wasn't true that lmc-seed was intialized using
ld-seed.

Change-Id: I5c95f1957b926287c8436d081661cb9d7504ee76

10 years agoUpdate description of genrestr
Mark Abraham [Tue, 4 Feb 2014 14:39:07 +0000 (15:39 +0100)]
Update description of genrestr

Change-Id: Ib5e34a40bee8154dc291121cbefd6cd73c6e1760

10 years agoFix and simplify rpath
Roland Schulz [Mon, 3 Feb 2014 23:19:57 +0000 (18:19 -0500)]
Fix and simplify rpath

- GMXLIB was removed by 0b2344 but forgotten to change for rpath.
- CMAKE_SKIP_BUILD_RPATH and CMAKE_BUILD_WITH_INSTALL_RPATH
  default to false
- No need to relink (CMAKE_BUILD_WITH_INSTALL_RPATH=false) if
  installing in the default lib directory. Saves the relinking
  time and makes rpath work correctly if build folder is moved.
- The extra escaping isn't needed anymore. Tested with 2.8.8,
  2.8.10.2 and 2.8.12.2

Change-Id: I09cf0f9a31c2c891d2aec6ab52dd9cd1d089cb97

10 years agoUse feature to explain that tpbconv has moved
Mark Abraham [Sun, 2 Feb 2014 19:26:19 +0000 (20:26 +0100)]
Use feature to explain that tpbconv has moved

Also replaced generation of the the symlink, which will also trigger
the explanation.

Change-Id: I960713aec5bc511341221cd6d334298a2822c040

10 years agocmake eats slashes
Christoph Junghans [Mon, 3 Feb 2014 16:03:00 +0000 (09:03 -0700)]
cmake eats slashes

Change-Id: I5ea157c4a5e9df2212643b49ba9b270ffd9a6978

10 years agoAdd hack to fix genbox
Mark Abraham [Sat, 1 Feb 2014 20:03:46 +0000 (21:03 +0100)]
Add hack to fix genbox

Using a lighter-weight neighbour search is a better idea, but this bug
needs fixing right now.

Add integration tests for major functionality of genbox. These pass
only with the fix in this patch. These are not the most glorious
tests, but as demonstrated by this bug, "does not segfault in routine
workflows" is useful.

Fixes #1393

Change-Id: I5628f52cd91dcb64d66e690b2e611e524f450972

10 years agoClean up genbox and associated code
Mark Abraham [Sat, 1 Feb 2014 19:12:17 +0000 (20:12 +0100)]
Clean up genbox and associated code

Moved genbox utility to preprocessing module from analysis module.
Renamed its addconf implementation files. Fixed necessary #include
dependencies. Made several functions static.

Renamed gbutil.[ch] to conformation-utilities.[ch], because they are
not exclusive to anything abbreviated "gb." These are mostly used by
gmxpreprocess, but also mdlib/tpi.c, and the header file is not really
useful to install, so the only current place they should move is
gmxlib. Removed unused orient(). Renamed genconf() and gen_box() to
avoid confusion with the utilities of those names. Moved the new
make_new_conformation into genbox.cpp because it is only used there.
Made two functions static. Removed unused (maybe broken?) NTB
parameter of the new make_new_box() function. Removed some debug
code that used a print function in a different compilation unit.

Change-Id: I33d15b2df63c9422ce241782a922145f4626b0fb

10 years agoMerge "Merge release-4-6 into master"
Teemu Murtola [Mon, 3 Feb 2014 04:45:37 +0000 (05:45 +0100)]
Merge "Merge release-4-6 into master"

10 years agoOptimize Doxygen build
Teemu Murtola [Sat, 1 Feb 2014 04:57:34 +0000 (06:57 +0200)]
Optimize Doxygen build

- Don't include verbatim headers in the documentation.  In addition to
  marginally reducing disk usage and processing time, this hides
  undocumented files from the file list, making it look better.
- Generate svg instead of png images. This reduces the disk usage of the
  build output by ~30%.  Change HTML file extension to .xhtml per
  Doxygen documentation to support svg images on IE.
- Add a CMake option GMX_COMPACT_DOXYGEN that disables most
  automatically generated graphs.  Compared to the original
  png-containing build, this reduces the disk usage by ~70%.

Times it takes to generate the documentation are reduced comparably.
Also enable generating multiple DOT graphs in one run, significantly
speeding up the build.  graphviz versions that don't support this are
ancient.

Change-Id: I5dd91779a8086025d9f0c0e477ce300d6a75a580

10 years agoImproved wallcycle reporting
Mark Abraham [Tue, 28 May 2013 10:28:18 +0000 (12:28 +0200)]
Improved wallcycle reporting

Removed reporting of MPI and thread counts on each row, in
favour of a header with that information.

With npme > 0, prints a note that the time column is not
supposed to add up.

Works correctly with a range of -npme, -ntomp and -ntomp_pme values:
PP times add up to the total, which equals the final walltime
reported; cycle count and percentage column totals are correct and
reflect the actual work done.

Partial fix for #1188

Change-Id: Ic870d981bf0375189601bf8c9bc67bc5d6226497

10 years agoMerge release-4-6 into master
Roland Schulz [Sun, 2 Feb 2014 22:30:03 +0000 (17:30 -0500)]
Merge release-4-6 into master

Conflicts (only Copyright header):
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_outer.h

Change-Id: I0c9b713d95343c13fa6e3154b8d08a9ca43e7363

10 years agoFix segfault in 'gmx -h'
Teemu Murtola [Sun, 2 Feb 2014 12:22:33 +0000 (14:22 +0200)]
Fix segfault in 'gmx -h'

Combination of two recent changes caused 'gmx -h' to segfault because of
an uninitialized variable.  This fix is in cmdlinehelpcontext.cpp.

Added a test for this case, which required some extra functionality in
the module manager.  This is all the other changes.

Change-Id: Ie845c287975575c51c42763c03ac99bca047699c

10 years agoGet rid of src/programs/gmx/
Teemu Murtola [Sun, 2 Feb 2014 12:19:57 +0000 (14:19 +0200)]
Get rid of src/programs/gmx/

Move the few remaining files from src/programs/gmx/ to src/programs/.
Since we are by default only building a single binary that contains all
the contents of src/programs/, it makes more sense to have the main
routine in src/programs/.

Change-Id: Icef3a539861e3246b469b98e985c514ec87df675

10 years agoSimplify Options::setDescription() usage
Teemu Murtola [Sun, 2 Feb 2014 06:22:52 +0000 (08:22 +0200)]
Simplify Options::setDescription() usage

Remove the need for all tools to call concatenateStrings() to pass the
description to Options::setDescription().  In addition to marginally
simplifying the calling code, this allows more elaborate processing of
the input array to fix issues that there currently are, e.g., with
descriptions that include significant leading spaces in the input
strings.  Not done in this change, though.

Change-Id: Ibe295d5e578222c43f01c1248989d119aa60f0bd

10 years agoExtend valgrind suppressions for OpenMPI
Teemu Murtola [Sun, 2 Feb 2014 12:04:00 +0000 (14:04 +0200)]
Extend valgrind suppressions for OpenMPI

There was already a suppression for Addr4, but some command lines or
other environmental causes seem to trigger a similar path with an 8-wide
read, so added Addr8 rule for the same.

Change-Id: I54cebc02163a08884838068917018735098c58cd

10 years agoAdded AVX2 detection to cmake and created CPU acceleration macro
Erik Lindahl [Wed, 11 Dec 2013 21:46:13 +0000 (22:46 +0100)]
Added AVX2 detection to cmake and created CPU acceleration macro

The main CMakeLists.txt has been cleaned up by moving
the CPU SIMD acceleration tests to a separate module,
which now also supports AVX2 detection. Acceleration
detection has been improved by actually testing SSE/AVX/AVX2
codes with the flags, rather than first testing flags and
then code (since some compilers silently accept illegal flags).
Cmake now also now detects options to use the clang built-in
assembler on OS X together with the gcc compiler when AVX
acceleration is selected, which makes it possible to use
AVX/AVX2 in combination with OpenMP support on OS X using
free compilers.

Change-Id: I6f9de80a87283cec4cf4211c4d0068d32315ba90

10 years agoFix some issues reported by 'make depcheck doccheck'
Teemu Murtola [Sat, 1 Feb 2014 13:52:08 +0000 (15:52 +0200)]
Fix some issues reported by 'make depcheck doccheck'

Fix some minor documentation issues and make swapcoords.h not installed,
since that is internal mdrun functionality.

There is a dependency issue in update.h including a non-installed
random/random.h, but this is planned to go away when the stateful RNG is
replaced in mdrun, so left it there for now.  User code probably doesn't
have much use for including update.h, anyways.

Change-Id: I491697f8528d9dd5da299f366ccccf7eecb46f8a

10 years agoUse pseudo-random instead of random streams to intialize seeds
Erik Lindahl [Sat, 1 Feb 2014 12:46:30 +0000 (13:46 +0100)]
Use pseudo-random instead of random streams to intialize seeds

The /dev/random stream will block if enough entropy is not
present in the system. This has not historically been a problem,
but with the unit tests initializing dozens of new random number
generators the entropy pool becomes exhausted, and the tests
block 10-20 seconds before each cool quote call for recent gcc
versions on our Ubuntu versions. This is also a seriously bad
abuse of the system random stream on shared systems.
Since /dev/urandom (which does not block) should be sufficiently
random for everything apart from long-term cryptographic keys,
we should use this one instead and leave /dev/random alone.

This patch solves an issue problems where recent gcc versions
took several minutes to complete unit tests.

Change-Id: I4a8fcf7e302d94f5ec3c9715593fbfd257decdd9

10 years agoOverview docs for unit testing
Teemu Murtola [Wed, 8 Jan 2014 19:11:34 +0000 (21:11 +0200)]
Overview docs for unit testing

Add overview documentation for how unit testing is organized for new C++
code.  Also, include guidance for getting started with writing new
tests.

Change-Id: I6c3e01bbc15af278e4b28723b0650825f6104065

10 years agoAdd cmake option for Reference kernel
Roland Schulz [Fri, 10 Jan 2014 22:42:02 +0000 (17:42 -0500)]
Add cmake option for Reference kernel

Change-Id: I6b6cb9c7eb575d8511dccd8e0bf410f44383259d

10 years agoMinor improvements to ewald_LRcorrection
Mark Abraham [Wed, 22 Jan 2014 13:32:53 +0000 (14:32 +0100)]
Minor improvements to ewald_LRcorrection

LJ-PME code doesn't need terms in odd powers of r or beta, so the code
might run a litte faster if expressed this way (fewer flops and fewer
registers).

Made the code that needs dr explicit by declaring dr only where it is
used.

Moved declaration of the fscal temporary to the blocks where it is
used, and commented that it is actually not the scalar force, but the
scalar force pre-multiplied by rinv. Probably that comment should
go in the generic kernels, also.

Change-Id: I052cb5a9b3bdf67a582aec0fcd99ad5da33a3b77

10 years agoMade reference SIMD work again
Berk Hess [Thu, 9 Jan 2014 19:54:28 +0000 (20:54 +0100)]
Made reference SIMD work again

The nbnxn reference SIMD code broke during reorganization.
Added GMX_SIMD_HAVE_ERFC macro.

Change-Id: I601dccab52ea2a7dc1341ce984c514679bdbfee1

10 years agoFix shell completions of ffMULT options
Teemu Murtola [Thu, 30 Jan 2014 16:28:43 +0000 (18:28 +0200)]
Fix shell completions of ffMULT options

Now file names for options with ffMULT set are completed also after one
file name has already been provided.

Fixes #1159, related to #1410.

Change-Id: I1f4f0b6a5817ce3193a0195d1cb4a2491c397593

10 years agoOverview docs for wrapper binary implementation
Teemu Murtola [Wed, 1 Jan 2014 05:21:43 +0000 (07:21 +0200)]
Overview docs for wrapper binary implementation

Add an overview of how the gmx wrapper binary is implemented.
Also some minor clean-up for related module documentation.
Remove test directories from public documentation.

Change-Id: If21cd14d189f239bed19def0acba43681013b0c6

10 years agoOverview docs for using Gromacs as a library
Teemu Murtola [Tue, 31 Dec 2013 11:15:53 +0000 (13:15 +0200)]
Overview docs for using Gromacs as a library

Add some documentation for the commandline module, and make the set of
installed headers provide a useful set of features.
Add an overview documentation for how to initialize Gromacs as a library
under different contexts.  Also, include some general notes about the
Gromacs API.  Can be extended in the future.

Change-Id: I13921fe1f1434fee8c495a169e6f5db645711f79

10 years agoRename ProgramInfo to CommandLineProgramContext
Teemu Murtola [Sun, 29 Dec 2013 12:55:06 +0000 (14:55 +0200)]
Rename ProgramInfo to CommandLineProgramContext

This better reflects its use.  The file containing it was already
renamed in the previous commit, where it was moved.

Change-Id: Ia2a73db10c185d5e290f8d98a2e74c382f141e36

10 years agoRefactor ProgramInfo use
Teemu Murtola [Sun, 29 Dec 2013 11:46:11 +0000 (13:46 +0200)]
Refactor ProgramInfo use

Instead of having ProgramInfo in src/gromacs/utility/, declare only
a program context interface there, and provide simple setters and
accessors for it.  Move all the logic related to actually providing the
values (in particular, the location of the binary) into
src/gromacs/commandline/, which provides an implementation for the new
interface.

This provides two main benefits:
 - The responsibilities of the different modules are clearer, and there
   is no complex logic related to command line programs in the
   bottom layer.
 - The API provided for external code for initializing the library is a
   lot cleaner.  They can either choose to use all the command line
   logic by using gmx::initForCommandLine(), or provide their own
   implementation for the program context, and set it directly with
   gmx::setProgramContext().

Thread safety guarantees have changed somewhat; the implementation is
much simpler this way, and I don't think we need to be 100% thread safe
in methods such as setProgramContext() (gmx::init() isn't, either).

Change-Id: I2b89aeb3833e7e40e5dd2322745efbc44581e15b

10 years agoRemoved ions.itp from GMX/share/top directory.
Rossen Apostolov [Mon, 20 Jan 2014 12:07:36 +0000 (13:07 +0100)]
Removed ions.itp from GMX/share/top directory.

Topologies of the ions should go in the corresponding xxxx.ff/ions.itp
files, there is no need for a top level one.

Change-Id: I9c711b75f494211d9ba86a6b375e8ca69c7a1df2

10 years agoMove command listing to 'gmx help commands'
Teemu Murtola [Sat, 25 Jan 2014 18:07:47 +0000 (20:07 +0200)]
Move command listing to 'gmx help commands'

Instead of printing the list of commands on 'gmx' or 'gmx help', print
it only when explicitly requested with 'gmx help commands'.  This makes
it easier to see the help about the common command line options that
'gmx' accepts.  The list of available help topics lists the 'commands'
topic, so it should be easy to find.

Related to #685.

Change-Id: I00e9ceae15ebd47d2ac129aae8e6e407f86c388a

10 years agoAllocate memory for MD5 on heap
Roland Schulz [Wed, 29 Jan 2014 20:06:39 +0000 (15:06 -0500)]
Allocate memory for MD5 on heap

1MB on stack can cause issues with stack size limits (e.g. MSVC).

Change-Id: I1e9858ae32d78b4d494652f4aaed5354b9276669

10 years agoImproved dependencies on maths includes
Mark Abraham [Mon, 20 Jan 2014 17:57:55 +0000 (18:57 +0100)]
Improved dependencies on maths includes

Our physics.h should have a dependency on our maths header for
PI.

Made explicit some dependencies on system math.h that were being
covered transitively.

Change-Id: I5a35ff10860a84688bfe73260acbd63166f4caec

10 years agoKeep clang Address Sanitizer happy
Mark Abraham [Tue, 28 Jan 2014 01:43:21 +0000 (02:43 +0100)]
Keep clang Address Sanitizer happy

Allocating 15 bytes with the 8-byte aligned memory at offset 8 of
15, would overflow the buffer, which would be fairly likely to
have no effect. But ASan notices this if you run it on AVX hardware,
unlike the Jenkins build which runs on SSE4.1. The good news is
that this fix is enough to make all the existing tests pass under
ASan on AVX.

Change-Id: I61ff11687709e096c70a162d3514227cb243561d

10 years agoFixes to filename shell completions
Teemu Murtola [Tue, 28 Jan 2014 20:37:21 +0000 (22:37 +0200)]
Fixes to filename shell completions

- When completing a file name, don't add a space after a directory name
  has been completed.
- Don't exclude directory names starting with . from the completions.
  This also excludes ../foobar/.
- Use a more reasonable pattern to match the file names: expect exactly
  one of the acceptable extensions, and at most one .gz/.Z extension.
- Complete directory names for mdrun -multidir.

Issues that remain:
- Completions for paths that contain spaces doesn't really work.
  The only difference to earlier behavior is that now, completing
  something that starts with a " gets an appended space before the
  closing ".
- When completing to subdirectories, the list of possible completions
  shows the subdirectory for each alternative.  This doesn't happen with
  standard bash completion.  Not sure whether this is feasible to fix.

Part of #1410 and #1159.

Change-Id: I1aff3ab89419e0ed4b53bc998c9a50b9a1879e9c

10 years agoUncrustify all files
Roland Schulz [Sat, 18 Jan 2014 04:47:30 +0000 (23:47 -0500)]
Uncrustify all files

Add a script that can be used to do this again if necessary.  The script
also supports listing the files based on the filter attribute, and
checking the copyright; can be extended if/when there is need.

Some manual reformatting in gpu_utils.cu, nbnxn_cuda_data_mgmt.cu, and
nbnxn_cuda_kernel.cuh.  Updated the Sparc kernel generator to generate
code that is invariant under uncrustify, like the other kernels already
do.

Copyright not updated, except for fixing readpull.c such that the script
doesn't complain.

Part of #845

Change-Id: Ia77738ec781f75f1c4e7a264734aac884321f3e5

10 years agoPrint common options to 'gmx -h'
Teemu Murtola [Sat, 25 Jan 2014 05:38:21 +0000 (07:38 +0200)]
Print common options to 'gmx -h'

The help shown for the wrapper binary now includes the command line
options it accepts.  Remaining issues that will be fixed separately:
 - Unlike other help output, this output is actually influenced by what
   the user specifies on the command line.
 - The information is not so easy to find, because of the long list of
   subcommands that comes after it.
 - The information should go to some man page as well.

Related to #685.

Change-Id: Iac72dd21d4a733016b331549e139d4184bd3e283

10 years agoClarified use of table-extension..
Justin Lemkul [Wed, 29 Jan 2014 14:03:30 +0000 (09:03 -0500)]
Clarified use of table-extension..

Following some discussion on gmx-users of the implications of
table-extension, added a clarifying remark in mdp_opt.html for
online and printed manual.  I did not add all of the suggested
fixes, as most were redundant, and this single sentence should
alleviate anything that may have been unclear.

Change-Id: I89bcecee2d0b11149423990f957b7092b0f083b9

10 years agoAutomated Verlet rlist for NVE simulations
Berk Hess [Thu, 9 Jan 2014 12:58:12 +0000 (13:58 +0100)]
Automated Verlet rlist for NVE simulations

NVE simulations with the Verlet scheme will now automatically have
the list buffer set using verlet-buffer-tolerance and the initial
temperature, unless this is zero in which case a 10% buffer is used.
A warning is added for potentially large drift over the simulation.
This change makes empty mdp files valid again.

Change-Id: Iae2d3d8ba212dd9e57783d9fb3d84f7cfc1efdd0

10 years agoMerge "Merge branch 'release-4-6'"
Teemu Murtola [Wed, 29 Jan 2014 05:14:11 +0000 (06:14 +0100)]
Merge "Merge branch 'release-4-6'"

10 years agoMoved random number generator code to separate dir.
David van der Spoel [Sun, 19 Jan 2014 07:51:06 +0000 (08:51 +0100)]
Moved random number generator code to separate dir.

GROMACS sports two random number generators for historical
reason. The oldest one is phased out in this patch.
Changing the random number
generator means that e.g. replica exchange simulations will
not be reproducible (if they ever were in practice).

Change-Id: If24f1019fba9b9412713b5fe04b5c0a8a7638468

10 years agoMerge branch 'release-4-6'
Mark Abraham [Tue, 28 Jan 2014 20:06:13 +0000 (21:06 +0100)]
Merge branch 'release-4-6'

Conflicts:
src/contrib/fftw/CMakeLists.txt
Resolved by merging bump to 3.3.3 and increased variable indirection
from both branches

src/gromacs/legacyheaders/nbnxn_cuda_data_mgmt.h
Resolved with master - both branches have now removed fplog parameter
from the free function

src/gromacs/legacyheaders/sim_util.h
src/gromacs/mdlib/minimize.c
src/gromacs/mdlib/tpi.c
src/programs/mdrun/md.c
These are text clashes between master branch runtime ->
walltime_accounting encapsulation transition, and the recently merged
release-4-6 consolidation of start-time printing. There's no code
clash, though. Resolved by using the code that works consistent with
both refactorings. The call to the print_start function has to follow
the call to the walltime_accounting_start function, of course.

Change-Id: I1559fbadfc15eb7b7e880b17e4519159ba9b534e

10 years agoAllow for "computational electrophysiology" simulations (CompEl)
Carsten Kutzner [Fri, 13 Dec 2013 09:41:57 +0000 (10:41 +0100)]
Allow for "computational electrophysiology" simulations (CompEl)

The basic new functionality is to allow exchanges of molecular
positions, e.g. of an ion with a distant water molecule. Whereas
this could be used for different things, the target application is
to determine electrophysiological properties of membrane channels.
In a double-membrane setup the number of ions, and thus the
charge imbalance, and thus the potential difference between
the two compartments can be controlled and kept constant.
If ionic flow occurs through membrane channels, which
dissipates the charge imbalance, ions can be swapped back
to restore the desired charge imbalance between the
compartments. A continuous flow of ions through the
membrane channels can be established that allows to
measure channel conductance and selectivity for example.

If requested by .mdp file settings, the do_swapcoords() routine
is called in the main MD loop. It checks whether the actual
ion counts deviate from the specified reference values and
restores the reference values by ion/water swaps. It also
reports how many ions of each type pass through which channel.

Most of this functionality is in ./src/gromacs/swap/swapcoords.c,
but there is also some new code scattered over the source tree
allowing for grompp reading of CompEl parameters, writing CompEl
data to checkpoint and letting other programs as g_tune_pme
deal with that.

There is also a section in the Latex manual in the special
section describing the protocol.

Some tests have been added in mdrun/tests/swapcoords.cpp that
at the moment only check whether the CompEl parameters are
understood, whether mdrun exits without error code when
running a CompEl simulation and whether checkpointing works.
Some extras have been added to the MdrunTestFixture
class to handle more mdrun-related filenames.

Added doxygen documentation for the new functions.

Ran uncrustify on all new files for up-to-date copyright headers
and proper code formatting. Also uncrustified tpxio.c and
changed the tpx_version from 95 to 96.

Change-Id: Iffda273fd9f47a43e511e70ecdf849f881e933c1

10 years agocmake: added FFTW_URL to allow easy offline build
Christoph Junghans [Mon, 27 Jan 2014 18:30:52 +0000 (11:30 -0700)]
cmake: added FFTW_URL to allow easy offline build

Change-Id: I9904ce03e0ee1b377e4961c1f8481fc98c10cba4

10 years agoBump own fftw build to version 3.3.3
Rossen Apostolov [Mon, 27 Jan 2014 14:50:32 +0000 (15:50 +0100)]
Bump own fftw build to version 3.3.3

Change-Id: I2a4e6acff97e1895517fd58314a010610c0637f5

10 years agoRemove "gmx trjconv -app"
Mark Abraham [Sat, 11 Jan 2014 20:52:55 +0000 (21:52 +0100)]
Remove "gmx trjconv -app"

This functionality is present in gmx trjcat and should not be
duplicated.

Change-Id: I29657de3f488549e3ce7f708c35be41b705416a3