alexxy/gromacs.git
10 years agoMore files to C++.
Teemu Murtola [Wed, 3 Jul 2013 11:00:39 +0000 (14:00 +0300)]
More files to C++.

Switch a few more files to C++ compilation and resolve issues found: add
several extern "C" declarations, remove unused variables, move some
static variables from headers to source files.  Move gmx_ctime_r()
declaration to string2.h; it must be better to have one extra
declaration in an installed header than a mass of repeated declarations
in source files.  Remove a hack in smalloc.h; the code that prompted
that seems to have been removed in the kernel reorganization for 4.6,
and we are anyways not yet compiling a lot of legacy code with C++.
Suppress most scanf() warnings in these files.  Make cppcheck correctly
parse #ifdef __cplusplus blocks.  Add gmx_isnan().

The motivation for this selection of files is that these files write
output files where either command_line() or Program() is used to
indicate the currently running program.  Will replace those calls with a
uniform mechanism in a subsequent commit.

Change-Id: Ic1e90fcc08b1be6d4d6d257215f9523625ab347a

10 years agoOptions for controlling startup output.
Teemu Murtola [Thu, 4 Jul 2013 19:27:17 +0000 (22:27 +0300)]
Options for controlling startup output.

Add a -quiet option to the wrapper binary.  This option suppresses all
startup headers and the gmx_thanx() call in the end.  Restructure
CommandLineModuleManager::run() to avoid multiple paths that all need to
call gmx_thanx() and potentially also print the startup header.

Make -quiet suppress the startup header also in parse_common_args().
Reordering required by this causes invalid command-line option error
messages to be printed before the header gets printed, but this only
affects those few binaries that don't go through the wrapper binary.

Make gmx_print_version_info() callable through printBinaryInformation(),
and do this in the wrapper binary and in parse_common_args() in
response to -version.

Print the copyright in response -copyright in the wrapper binary.  Easy
to add to parse_common_args() as well, but even better would be to merge
the remaining few programs into the wrapper binary.

Part of #1209.

Change-Id: I0c7dddc91065b12f347da12acd82047e2d94b44c

10 years agoBe less verbose with program options.
Teemu Murtola [Fri, 5 Jul 2013 03:33:16 +0000 (06:33 +0300)]
Be less verbose with program options.

Don't print the list of program options by default when running the
Gromacs binaries.  The command line printed as part of the startup
header should provide any diagnostic value there is to this output.
Replace the previous -quiet option (that disabled this output) with
a -verbose option that enables this output again.  Left the mostly no-op
-quiet option there (there is still a special case of -quiet -h used by
gmx_tune_pme), because it will get new use shortly.
Removed the hidden -verb option whose value wasn't used.

Related to #1209.

Change-Id: I9730e1eb08a2ee35d26fd603f48e89f561dee50a

10 years agoPre-emptively fix some C++ warnings.
Teemu Murtola [Tue, 2 Jul 2013 16:51:38 +0000 (19:51 +0300)]
Pre-emptively fix some C++ warnings.

Moved sepdvdlformat from force.h into a source file to avoid warnings
about an unused variable.  These appeared as soon as a C++ source file
included force.h.  As an additional benefit, makes printing this
information more typesafe; this is how #1294 was found.

Change-Id: Id856fbe193d9b4a74ecfb49cba9eab03bad0a7ba

10 years agoUniform and less verbose startup for all binaries.
Teemu Murtola [Sat, 29 Jun 2013 12:24:39 +0000 (15:24 +0300)]
Uniform and less verbose startup for all binaries.

Now all binaries call gmx::ProgramInfo::init() as more or less the first
thing.  Removed set_program_name() as unnecessary, since the above call
does all that.  Make CommandLineModuleManager responsible of also
printing any common startup header, and add a method to suppress this
stderr output in unit tests.

Replace CopyRight() with a less verbose method and move the
responsibility of calling it to parse_common_args().
Added a PCA_STANDALONE flag for parse_common_args() to know when to do
this (can be removed once all programs are part of the wrapper binary).

Left the CopyRight() function still there, in case we want to add a
-license command-line option or similar to print that information.
Currently, it is not called from anywhere.  Removed GMX_NO_CREDITS and
some other unnecessary code from CopyRight().

Most stuff in contrib is broken by this.  There may be more changes
coming to the initialization sequence, and it will be simple to adapt
those programs that people want to get working again, but it is not
worth doing it more than once.

Part of #1209.

Change-Id: I5403dd259ab5f314cce3283aac275a6c26d4818d

10 years agoExtract Doxygen comments within #ifdef __cplusplus.
Teemu Murtola [Tue, 2 Jul 2013 05:51:15 +0000 (08:51 +0300)]
Extract Doxygen comments within #ifdef __cplusplus.

Also add documentation for some undocumented thread_mpi members exposed
by this.

Change-Id: I93ff0770d4032b92dc829257f773c11a93d78caa

10 years agolinearalgebra and fft: clean up -Wunused-parameter warnings
Alexey Shvetsov [Mon, 1 Jul 2013 04:20:01 +0000 (08:20 +0400)]
linearalgebra and fft: clean up -Wunused-parameter warnings

Clean up (most) of unused params

Change-Id: Iaad4b2d1a98584d6d72cdd1ecf43b788d9753715
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agogmxlib: clean up -Wunused-parameter warnings
Alexey Shvetsov [Sat, 29 Jun 2013 21:11:09 +0000 (01:11 +0400)]
gmxlib: clean up -Wunused-parameter warnings

Clean up (most) of unused params

Change-Id: Ibbe8d775ca1c37338f968d124d773808a1784eae
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agoSupport for storing multipoint analysis data.
Teemu Murtola [Mon, 10 Jun 2013 18:24:23 +0000 (21:24 +0300)]
Support for storing multipoint analysis data.

Main changes:
- The storage frames now store a vector of "point set info" objects,
  which partition the vector of values into point sets, and annotate
  those sets with extra information (currently, the index of the first
  column).
- The implementation of the frame access wrappers in dataframe.* are
  adapted similarly, and methods are added to allow access to multiple
  point sets within a single frame.
- Added tests for multipoint storage.
- Other changes are adapting to these interface changes.

Still doesn't work perfectly; full support for addColumnModule()
requires reworking the logic in dataproxy.cpp.

Part of #869.

Change-Id: I21141bad83b3f2bb72ece9146aaec02792e6cd0e

10 years agoAdded citation to free volume paper.
David van der Spoel [Thu, 11 Jul 2013 13:25:07 +0000 (15:25 +0200)]
Added citation to free volume paper.

Change-Id: Idcc8d29813e13f259048e7ad6cc1f72b70cd7229

10 years agogmxpreprocess: clean up -Wunused-parameter warnings
Alexey Shvetsov [Sat, 29 Jun 2013 10:10:44 +0000 (14:10 +0400)]
gmxpreprocess: clean up -Wunused-parameter warnings

Clean up (most) of unused params

Change-Id: I1805a829682baf54047390442bfcfa2a95cd0ee1
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agogmxana: clean up -Wunused-parameter warnings
Alexey Shvetsov [Sat, 29 Jun 2013 05:52:29 +0000 (09:52 +0400)]
gmxana: clean up -Wunused-parameter warnings

Clean up (most) of unused params

Change-Id: Ic9a521924e467d3779ed8c137f7afce44b200378
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agoMake uncrustify.sh compatible with more recent env
Alexey Shvetsov [Mon, 1 Jul 2013 03:13:25 +0000 (07:13 +0400)]
Make uncrustify.sh compatible with more recent env

recent mktemp wants template in gmxuncrust.XXXXX format
also canonical *nix based which doesnt have -s arg

Change-Id: Ic054c4eef3d4a49b7bae96b1012ec323a347567d
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agoRemove orphan CMake file
Mark Abraham [Tue, 9 Jul 2013 09:39:34 +0000 (11:39 +0200)]
Remove orphan CMake file

This was added in Erik's original CMake commit, updated once,
and has never been used.

Change-Id: Idf920bd87e1bf37d532a5b460be64ef852c43844

10 years agoSplit AnalysisDataStorageFrame into two.
Teemu Murtola [Sun, 2 Jun 2013 12:03:23 +0000 (15:03 +0300)]
Split AnalysisDataStorageFrame into two.

Main changes:
- Move parts of AnalysisDataStorageFrame that are only used internally
  by the data storage into a separate class, which is internal to
  datastorage.cpp.  The remaining public interface now only contains
  methods that are required to construct the in-progress frame/point
  set.
- Make AnalysisDataStorageFrame have a separate vector of column values,
  which then get transfered into the actual storage when necessary.
  This part is required for handling multipoint storage.
- Only keep AnalysisDataStorageFrame objects for in-progress frames.
  Without this part, the memory usage of full storage would double; now
  the memory usage only increases proportional to the number of
  concurrent data frames.
- Recycle the AnalysisDataStorageFrame objects for subsequent frames.
  Avoids memory allocation, as the temporary column values don't need to
  be reallocated for each frame.

These changes clarify the responsibilities in the code, and allow for a
much cleaner implementation of multipoint storage (subsequent commit).

The implementation may not be as clean as possible, but it will see
further changes in subsequent commits.

Refactoring in preparation for #869 and #1010, no functional change.

Change-Id: I40928ff10c5aded3b094604b37349b9fd174d267

10 years agoSwitch remaining main() functions and copyrite.c to C++.
Teemu Murtola [Sat, 29 Jun 2013 04:59:18 +0000 (07:59 +0300)]
Switch remaining main() functions and copyrite.c to C++.

Required to be able to use gmx::ProgramInfo from these (done in
separate commit), and simplifies the compilation of mdrun as well.

Resolved compiler/cppcheck/clang warnings that were present in these
files.  Some include file clean-up, motivated by the fact that force.h
causes warnings when included in C++ files, and fixing that requires
fixing #1294, where the solution is not yet decided on.

Change-Id: I69f4200c1c1783340d88381a6aca82151d1230cb

10 years agoRemove g_highway and vbox.c.
Teemu Murtola [Fri, 28 Jun 2013 11:52:10 +0000 (14:52 +0300)]
Remove g_highway and vbox.c.

g_highway hasn't been included in the build for a long time (never for
CMake), so I don't think anyone will miss it.  No need to keep it up to
date with changes done in program initialization for the wrapper binary.

vbox.c seems unused.

There are some other source files under src/ngmx/ that contain a main()
and are not included in the current build, but those seem some kind of
test programs, and don't seem to use much outside src/ngmx/, so left
them alone for now.

Related to #673.

Change-Id: I8b24f58450969e432dff677b8a9659e7bc544e00

10 years agoFurther copyrite.h cleanup.
Teemu Murtola [Fri, 28 Jun 2013 04:13:13 +0000 (07:13 +0300)]
Further copyrite.h cleanup.

- Rename thanx() to gmx_thanx().
- Make it responsibility of the wrapper binary to call gmx_thanx(),
  removing most existing calls.
- Remove unnecessary copyrite.h includes (many of them made unnecessary
  by the above change).
- One fix in qm_gamess.c that caused uncrustify to not parse the file
  correctly.

Change-Id: Ie74cdefa14f03b921f94d4b5931eb8e35a09f5af

10 years agoScript for running uncrustify for modified files.
Teemu Murtola [Wed, 13 Feb 2013 11:51:07 +0000 (13:51 +0200)]
Script for running uncrustify for modified files.

Comments in the script explain how to use it manually or automatically.
The script uses the git filter attribute to indentify which files to run
uncrustify for.  This makes it possible to configure a git filter for
running uncrustify instead of using the script.  This is also described
in the script comments.

The script is easily extensible to do other types of automatic
reformatting, e.g., to check/add copyright headers.

Also contains a pre-commit hook for running uncrustify.  Currently only
checks the formatting; does not yet automatically reformat anything, as
it is a bit unclear what is the best way to do that.

Related to #845.

Change-Id: I389f2ebf43182d4827d1ec10cb6c1332bd4bf8de

10 years agoFix overeager VdW radii change note.
Teemu Murtola [Fri, 28 Jun 2013 03:34:13 +0000 (06:34 +0300)]
Fix overeager VdW radii change note.

Only print the note about changed VdW radii if the VdW radii are
actually used (and not for all tools that use any guessed property such
as masses).

Also ran the file through uncrustify.

Change-Id: I012ebe5c312c19082d0b066ae14e803196565a16

10 years agoMore flexible position input for nbsearch routines.
Teemu Murtola [Fri, 17 May 2013 09:25:57 +0000 (12:25 +0300)]
More flexible position input for nbsearch routines.

In addition to single positions, it is now possible to do a full
pairwise search between two set of positions.  Introduced a helper class
that encapsulates all information about the positions, such that all
methods can take this class as input, and all different forms of
initializing the positions only needs to be implemented once in this
class.  Also made it possible to pass selections directly to the
neighborhood search routines and removed deprecated
Selection::positions(), which was only useful in combination with the
nbsearch code.

Part of #866.

Change-Id: I1829d981ddff16a98c5a2bae873cc3589ef44d4a

10 years agoC++-ify analysis nbsearch more.
Teemu Murtola [Sun, 12 May 2013 11:38:35 +0000 (14:38 +0300)]
C++-ify analysis nbsearch more.

- Use static_cast instead of C casts throughout.
- Use more C++-style comments.
- Use the same pattern for startPairSearch() as for initSearch() to
  allow multiple concurrent searches.
- Use std::vector instead of explicit memory allocation for the grid
  cell management.  Memory is still managed explicitly for rvec and ivec
  arrays, since they can't be put into std::vector.
- Make most members of the implementation classes private to clarify the
  code (the implementation class is now explicitly responsible for
  managing its internal state).

Part of #866.

Change-Id: I2af5552b696644f954957f96705baabd891284a9

10 years agoRemove C API for analysis neighborhoor search.
Teemu Murtola [Sat, 11 May 2013 05:41:34 +0000 (08:41 +0300)]
Remove C API for analysis neighborhoor search.

Makes it easier to refactor the C++ API, when no consideration needs to
be put into maintaining the C interface.  If really necessary, this can
be reimplemented on top of the C++ API later.

Nearly the whole nbsearch.cpp file changes, but most of this is
mechanical replacement.  Kept the order in the code as same as possible
to make it easier to see that the logic is not changing.

The high-level changes are:
 - Move members of gmx_ana_nbsearch_t to the appropriate implementation
   classes and suffix them with an underscore.
 - Move static helper functions into members of the appropriate
   implementation classes.  This and the above are responsible for
   majority of the changes, as 'd->member' becomes 'member_' on most
   lines.
 - Move the declarations of the C++ implementation classes to the
   beginning of the file.
 - Move all Doxygen documentation to the classes.
 - Restructure the C++ classes a bit to remove some workarounds that
   were necessary to use the C API underneath.  Most notably, the forced
   search mode is now passed directly to the initialization function,
   removing some extra boolean flags, and the const methods in
   AnalysisNeighborhoodPairSearch are now really const.
Also some minor refactoring included here:
 - Remove use of cbrt(), and thus dependency on config.h.
 - Some conversion to C++ patterns: use of static_cast and moving
   variable declarations close to the first use.
Will continue the clean-up in subsequent commits to make it easier to
review that this part really does not change the old functionality.

Part of #866.

Change-Id: I40be305704e17d58f8cb906ad5fa69ea179ece15

10 years agoBetter concurrency support for analysis nbsearch.
Teemu Murtola [Sun, 5 May 2013 09:55:31 +0000 (12:55 +0300)]
Better concurrency support for analysis nbsearch.

AnalysisNeighborhood::initSearch() now supports concurrent calls from
multiple threads such that each call creates an independent search.
A pool of search objects is kept allocated to avoid constant
reallocation of the data structures.

This allows using the neighborhood search routines transparently in
thread-parallel analysis tools after that is implemented in the
framework.  The changes in the template demonstrate how this simplifies
the tool code.

Part of #866.

Change-Id: If469284671ec66e249e138e59da7cc87a8f4ac65

10 years agoFix analysis neighborhood search for 2D/screw PBC.
Teemu Murtola [Sun, 5 May 2013 03:48:16 +0000 (06:48 +0300)]
Fix analysis neighborhood search for 2D/screw PBC.

The gridding implementation did not work correctly in these cases, but
could get triggered.  For now, a simple all-pairs search is always used
in these cases.

Related to #866 and #651.

Change-Id: Iad066f3ea5964e97e1a29a0a20c5725f205509c8

10 years agoProper C++ API for analysis neighborhood search.
Teemu Murtola [Thu, 18 Apr 2013 19:02:01 +0000 (22:02 +0300)]
Proper C++ API for analysis neighborhood search.

Replace the dummy C++ wrapper with a more C++-like API for the
neighborhood search routines that are part of the selection code.
Subsequent commits will implement a few additional features to the API,
but split those off from here to keep things easier to review.

Implementation underneath is still the same as earlier.
Will remove the old C functions in a separate commit.
Changed the free volume tool to use the C++ API in preparation for this.

Added some basic tests for the functionality using the new API, which
should increase the percentual coverage in this part of the code
significantly.

Part of #866 and #651.

Change-Id: I139866b82cb048f1676d187b0cf6e5d270d4d32b

10 years agoFix some issues found by cppcheck-1.58.
Teemu Murtola [Thu, 30 May 2013 04:05:26 +0000 (07:05 +0300)]
Fix some issues found by cppcheck-1.58.

Some are real (although unlikely) bugs, others are just removal of
unnecessary code or stylistic changes. Fixes about 1/3 of the issues
this version of cppcheck finds; the remaining aren't as easily fixed and
most look like false positives.

Change-Id: Ic7ba3cc26be9906e037ecec9f8e63739ac3786be

10 years agoMore binaries into the wrapper binary.
Teemu Murtola [Wed, 26 Jun 2013 04:29:13 +0000 (07:29 +0300)]
More binaries into the wrapper binary.

Move most remaining binaries to be built into the 'gmx' wrapper binary.
Now, only mdrun and g_pme_error (which have a different initialization
sequence), and ngmx (and other X11 programs) remain outside.

Renamed a few headers to match the name of their implementation file.

Part of #685.

Change-Id: I3fb7e3de905c01d7564d809893390bbb9b8f8368

10 years agoMerge branch 'release-4-6' into master
Roland Schulz [Thu, 27 Jun 2013 07:57:35 +0000 (03:57 -0400)]
Merge branch 'release-4-6' into master

Conflicts:
CMakeLists.txt
cmake/ThreadMPI.cmake
src/gromacs/gmxana/calcpot.c
src/gromacs/gmxana/calcpot.h
src/gromacs/legacyheaders/pull_rotation.h
src/tools/CMakeLists.txt

Resolution was straightforward; always in favour of version already in
master branch. Removed calcpot.[ch].

Change-Id: I7ad7a6d9e34f30e04f71c52d707065c6e14b68f3

10 years agoAdapted clang-AMD-FMA workaround for both C and C++
Szilard Pall [Mon, 29 Apr 2013 16:56:48 +0000 (18:56 +0200)]
Adapted clang-AMD-FMA workaround for both C and C++

Based on 34a402e7bfb0c950edd7a7a624acf48334333a2d

The clang bug which causes incorrect code to be generated on AMD
with FMA (Piledriver and Bulldozer) is in fact caused by an assembler
bug and can be worked around by switching to an external assembler.
This commit implements such the workaround for clang 3.1 and 3.2.
The bug was fix in clang version 3.2-svn-r173176:
http://llvm.org/bugs/show_bug.cgi?id=15040
Hence, no workaround is needed for clang 3.3 with AVX_128_FMA
acceleration.

This workaround is ineffective on Mac OS because there is no suitable
external assembler, but distinguishing between vanilla and Apple clang
requires more code than what's worth adding to cover the case of
AMD-based Hackintoshes (all Mac-s are Intel-based).

Fixes #1099

Change-Id: Ice7c17a792fe257c4516628030b680d3b3b1a484

10 years agoMerge branch 'release-4-6' into master
Roland Schulz [Thu, 27 Jun 2013 03:34:35 +0000 (23:34 -0400)]
Merge branch 'release-4-6' into master

Mostly easy. selhelp.cpp got the fix from selhelp.c

Omitted the content of 34a402e7 (clang-AMD-FMA work-around) in favour
of reworking it for C++ in a child patch

    Conflicts:
        CMakeLists.txt - kept master version number!
        src/gmxlib/selection/selhelp.c - deleted
        src/gromacs/gmxana/pp2shift.h - deleted
        src/gromacs/legacyheaders/pull_rotation.h

Change-Id: Ibf0c9af136e39dfcbef0a85eb7d314740706cb60

10 years agoRemove hack to support old version tpr version 80
Roland Schulz [Sun, 2 Jun 2013 00:23:17 +0000 (20:23 -0400)]
Remove hack to support old version tpr version 80

This break reading of master tpr version 80 (used up to Oct 16,
e56dd547) which added support for fbposres. There is no simple way
of supporting F_FBPOSRES in ftupd for 80 but not for 81-89. The hack
so far breaks changes required for dihres (3ec882b8ec64)

Change-Id: Iec63fa564c7605cdadc0417e7ddb4f6ae732c0b9

10 years agoClean up copyrite.*.
Teemu Murtola [Fri, 31 May 2013 10:42:20 +0000 (13:42 +0300)]
Clean up copyrite.*.

- Make a few functions static, since they are not used outside the file.
- Move pr_difftime() to nrnb.c and make it static there, since that is
  the only place where it was used.
- Move the logic of producing the FFT library identification from
  copyrite.c to fft_*.c, where it naturally belongs.
- master always has a C++ compiler, so remove the unnecessary
  conditional.
- Clean up the include statements in copyrite.c.

Change-Id: I9a72c014f1d0583adacc657414bc8a758d450b21

10 years agoMove FFT routines to src/gromacs/fft/.
Teemu Murtola [Fri, 31 May 2013 04:15:13 +0000 (07:15 +0300)]
Move FFT routines to src/gromacs/fft/.

Adjusted the build system a bit to select the file to build at the CMake
level instead of using #ifdefs within the files. Some minor cleanup.
Also add some hacks to produce separate Doxygen docs for each of the
gmx_fft_t implementations; otherwise, they mess up each other and
produce warnings, as some of them have Doxygen comments and some do not.

Change-Id: I55d8c4ce402d68b8cd3e2e700f83d801d8b8294e

10 years agoRestructure AnalysisData unit tests.
Teemu Murtola [Sat, 8 Jun 2013 17:20:34 +0000 (20:20 +0300)]
Restructure AnalysisData unit tests.

Add test fixtures and other machinery that allows using the same test
logic for multiple different input data using typed tests from Google
Test.

Avoids code duplication in unit tests for #869 and #1010.

Change-Id: I74962aa4ed0741329b3dbcd40663fc94a3bc96b5

10 years agoMore flexible input data for analysisdata tests.
Teemu Murtola [Sat, 8 Jun 2013 10:29:48 +0000 (13:29 +0300)]
More flexible input data for analysisdata tests.

Instead of somewhat inflexible parsing from a static real[] array,
construct the input data objects by explicit method calls to add frames
and point sets.  Convert the existing tests to construct the input data
this way.

Increase coverage of multipoint tests for AnalysisData by using
point sets that do not cover the full range of columns.
Improve test error messages and fix issues found while doing this.

Prerequisite for unit tests for #869 and #1010.

Change-Id: Idd0831d9bbf8e59b6edfab758cd53881133e1f3a

10 years agoAdd unit tests for selection index mapping.
Teemu Murtola [Sun, 28 Apr 2013 10:43:28 +0000 (13:43 +0300)]
Add unit tests for selection index mapping.

Add unit tests for parts of indexutil.* that are mainly used by the
selection position calculation engine.

Add required functionality to toputils.* and update typedefs.c to
support more flexible freeing of required data structures.

Part of #651, related to #1221.

Change-Id: Ibc68ad71a4834b991820014969be46152426a9f5

10 years agoUniform initialization for analysisdata tests.
Teemu Murtola [Fri, 7 Jun 2013 10:13:56 +0000 (13:13 +0300)]
Uniform initialization for analysisdata tests.

Unit tests that use input data now initialize the AnalysisData object
using a common helper, which uses the properties of the input data.
This puts the initialization code into one place only, which makes it
easier to adapt to implementation of #1010.

Related to #1010.

Change-Id: I1ffe3a52a2b5edc7d6ac647cea669c250e67e71c

10 years agoSeparate topology handling in selection tests.
Teemu Murtola [Fri, 26 Apr 2013 12:16:18 +0000 (15:16 +0300)]
Separate topology handling in selection tests.

Split common functionality for handling test topologies in selection
unit tests into a separate files (toputils.*).  This commit does not yet
add a lot of reusable code, but subsequent commits will (and they will
also introduce more files that use this functionality).

Part of #651.

Change-Id: Idda0099ba166014c9d6c36e0d8ba212e5fa8e940

10 years agofix CMake bug related to TestQPX.c location
Jeff Hammond [Sun, 16 Jun 2013 19:08:40 +0000 (19:08 +0000)]
fix CMake bug related to TestQPX.c location

cmake/TestQPX.c was not found because it lacked the
appropriate relative path.

Fixes #1281

Change-Id: I5fcc8598c91e39a86c337f14497b6d5faff91116

10 years agofixed a typo (unclosed bracket) that cause CMake to fail
Jeff Hammond [Sun, 16 Jun 2013 18:59:21 +0000 (18:59 +0000)]
fixed a typo (unclosed bracket) that cause CMake to fail

Fixes #1280

Change-Id: I987c860052923602b0ce7e6837a6905ad81a9f22

10 years agoImprove reference data checks against same data.
Teemu Murtola [Sun, 28 Apr 2013 09:33:28 +0000 (12:33 +0300)]
Improve reference data checks against same data.

Make it easier to perform multiple checks against the same reference
data using the TestReferenceChecker.  nextSearchNode_ was always NULL
when the reference data was getting written, which caused every check to
write a new reference data entry.  Now, the search is also performed as
part of writing the reference data, so that only the first check with a
particular id creates an entry, and subsequent checks perform the check
against this entry.

The analysis data tests were depending on duplicate ids behaving
differently, so changed them to also use the same pattern as elsewhere
for repeating elements, i.e., NULL ids.

Related to #651.

Change-Id: Icc0d1d68a0846bbdcc9639933e8060e56cb4b30e

10 years agoNew analysis tool to compute the free volume and total volume.
David van der Spoel [Thu, 28 Mar 2013 16:25:38 +0000 (17:25 +0100)]
New analysis tool to compute the free volume and total volume.

Works with selections, such that the freevolume in a box containing
a subset of all atoms can be computed.
Added excessive comments so that others can use this as a reference
for implementing analysis tools as well.
Added a test system as well, but this is somewhat tricky due to
real precision and the Monte Carlo algorithm.
literature reference.
valgrind.

Change-Id: I2acb48b829c9495e399c60e9dc927662e2958d69

10 years agofixed minor g_bar output issues
Berk Hess [Tue, 11 Jun 2013 10:56:05 +0000 (12:56 +0200)]
fixed minor g_bar output issues

Replaced one s_A by s_B in the help text.
Replaced %g by %f in all gmx_fatal calls.

Change-Id: I306703eace9c6b3251981d0b9f3a05bdc9c617ff

10 years agoAdded ability to use cppcheck from the command line.
Teemu Murtola [Tue, 28 May 2013 18:54:46 +0000 (21:54 +0300)]
Added ability to use cppcheck from the command line.

CMake now detects cppcheck, and enables "make cppcheck" to run
cppcheck on all source files, generated kernels and some other files
excluded.  Commands are more or less the same as used in Jenkins.
A separate target is produced for each input file, allowing one to use
build system parallelism (tested that it doesn't have much effect on the
overall run time).  This also adds a nice property that after the
initial run, cppcheck gets only run on modified files.  All errors
(including those from unmodified files) are also collected into a single
text file for easier processing.

No effort has been made to make it particularly robust or portable,
e.g., with respect to different cppcheck versions, as it is mostly for
developer convenience to be able to reproduce the runs from Jenkins.

Ideally, Jenkins would also run cppcheck using the generated rules,
which would allow changing the cppcheck configuration in sync with
source code changes if that is necessary.  For this purpose, a CMake
option to switch to XML output files is provided.

Change-Id: Ib88e2ba87cd4f091484fe09beac5ef108b0fad77

10 years agoRemove unused variables
Mark Abraham [Wed, 29 May 2013 12:24:05 +0000 (14:24 +0200)]
Remove unused variables

Change-Id: I8c6ce4e83474d720bb8565453c13247132289e22

10 years agoBetter averaging for analysis data modules.
Teemu Murtola [Wed, 3 Apr 2013 17:17:12 +0000 (20:17 +0300)]
Better averaging for analysis data modules.

Added an AnalysisDataFrameAverager for functionality common to analysis
data modules that compute averages over frames.  Currently, it only
accumulates the average and variance in double precision (using better
formula than before), but provides a useful base for implementing other
functionality:
 - Block averaging or other methods of better estimating the error.
 - Parallelization support to allow these modules to work in parallel
   after #869 is implemented.
For all of these, after the implementation is done in this common class,
it is easy to have that functionality in all the modules.  Some
interface changes may be required for some of the above, though.

Also some improvements to AnalysisDataAverageModule documentation.

Change-Id: I06ae7a92d36a0ee7e2fc0a1602ac40e6b8212d1d

10 years agoMove wman.* to src/gromacs/onlinehelp/.
Teemu Murtola [Thu, 23 May 2013 17:22:35 +0000 (20:22 +0300)]
Move wman.* to src/gromacs/onlinehelp/.

It naturally belongs together with this functionality.
It is used only internally by the library, so no need to install it.
Also removed unnecessary declarations from the header.

One less header in legacyheaders/, ~220 to go...

Change-Id: I371de95faedc26873a85441901be88dbf60ad9ba

10 years agoFixes syntax for FAHCORE in CMakeLists.txt.
Peter Kasson [Thu, 6 Jun 2013 15:39:45 +0000 (08:39 -0700)]
Fixes syntax for FAHCORE in CMakeLists.txt.

GMX_FAHCORE triggered a set_property() call that was missing
a PROPERTY identifier and thus triggered a cmake error message.
Syntax at
http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:set_property

Change-Id: I95108ba3332e6ce5c15a4dc4bfa165c3a8e3ac8f

10 years agoAdd a GMX_NO_CREDITS variable to not show credits
Pedro Lacerda [Fri, 31 May 2013 06:11:08 +0000 (03:11 -0300)]
Add a GMX_NO_CREDITS variable to not show credits

It's annoying to get output loaded of credits messages, especially when
running scripts. This commit add GMX_NO_CREDITS environment variable,
when set no copyright is shown.

Related to #1267.

Change-Id: Ia8482a73bde733b08cb37680ecceb713560872f5

10 years agoVarious fixes for genion
Pedro Lacerda [Fri, 31 May 2013 02:02:15 +0000 (23:02 -0300)]
Various fixes for genion

Remove genion non-random insertion of ions, by side effect it stops
writting useless log file. This commit also warns user about -conc
option overriding -nn or -np.

Fixes #1236, #615, and #1208

Change-Id: Icb7e411cda10abb3a7fea4137534f253b0777def

11 years agofixed DD internal state corruption with energy minimization
Berk Hess [Mon, 3 Jun 2013 18:56:19 +0000 (20:56 +0200)]
fixed DD internal state corruption with energy minimization

With energy minimization we need to reload old DD states after
steps are rejected. There were two bookkeeping issues in the reload.
This could lead to all kinds of, but no silent, errors.
Fixes #1272

Change-Id: Ia44c3bad27f3efdee76fa93dd281690e44dde700

11 years agoFixed inconsistent locality_order array for thread affinity.
Sander Pronk [Wed, 29 May 2013 12:17:06 +0000 (14:17 +0200)]
Fixed inconsistent locality_order array for thread affinity.

The locality_order array from gmx_cpuid (determining which threads
map onto which processors) is inconsistent if run with valgrind. This
patch checks the consistency and creates a fallback linear ordering if
that happens.

Change-Id: I59c0cef487134f9cb4115faf364dcfdad7f0d0e6

11 years agoFixed deadlock on Mac OS X during thread affinity check.
Sander Pronk [Mon, 3 Jun 2013 11:15:04 +0000 (13:15 +0200)]
Fixed deadlock on Mac OS X during thread affinity check.

During thread affinity setting, an erroneous #ifndef APPLE caused the Mac OS X
binary to enter the code path that assumes thread affinity support to exist,
leading to a deadlock later on. This is fixed, by making the printing of a
warning platform-specific, but not the rest of the code path, as presumably
originally intended.

Change-Id: I95bd808552869ece45efd1b818c1b5e1be03ed94

11 years agoSplit cmake thread detection into core thread and thread_mpi.
Teemu Murtola [Sun, 26 May 2013 09:45:47 +0000 (12:45 +0300)]
Split cmake thread detection into core thread and thread_mpi.

This makes it possible to use core threading facilities
(mutex/cond-var/affinity, etc) on builds that don't use thread_mpi.

Change-Id: I0f0f43e86da642c4645fd7ac3c4796098cf9cd5e

11 years agofixed deadlock with replica exchange and -maxh
Berk Hess [Mon, 3 Jun 2013 19:42:21 +0000 (21:42 +0200)]
fixed deadlock with replica exchange and -maxh

Fixes #1273

Change-Id: Ib93cce59adf60afe0971944ef41df3a7d9883edc

11 years agoOnly build base thread support with GMX_THREAD_MPI=OFF.
Teemu Murtola [Sun, 26 May 2013 09:45:47 +0000 (12:45 +0300)]
Only build base thread support with GMX_THREAD_MPI=OFF.

Restore the old behavior of only building the basic threading primitives
from thread_mpi if the MPI parts are not needed.

Change-Id: I0f0f43e86da642c4645fd7ac3c4796098cf9cd5e

11 years agoMerge "Merge branch 'release-4-6'"
Mark Abraham [Thu, 30 May 2013 21:30:50 +0000 (23:30 +0200)]
Merge "Merge branch 'release-4-6'"

11 years agoNew patch release 4.6.2
Mark Abraham [Thu, 30 May 2013 14:00:03 +0000 (16:00 +0200)]
New patch release 4.6.2

Added details of Pronk, et al 2013 paper to README

Bumped version to 4.6.3-dev. The v4.6.2 tag points to the actual
version that built the tarball, which was patch set 1.

Change-Id: I9b17cd80f34e2d175dbed0d87677a0611254b7c7

11 years agofix unnecessary switch to polling GPU wait
Szilárd Páll [Thu, 7 Mar 2013 02:50:47 +0000 (03:50 +0100)]
fix unnecessary switch to polling GPU wait

Commit 84597ae introduced an incorrect condition for testing
whether mdrun should and can switch to polling GPU wait.
This minor bug results in swithching to polling wait even when this
is unnecessary (i.e. when the driver in use is >=v5.0), This is
rather harmless, but the polling wait is fragile, so we should use
it only when really necessary.

This commit fixes the switching as well as reorganizes the conditionals
to make it more clear that switching is needed when ECC is on and the
NVIDIA GPU driver is older than v5.0.

Change-Id: I9106cb34c9a8fde2f9b54045d9b03ee5f5d50d8b

11 years agofix thread-safety issue in affinity layout detection
Szilard Pall [Mon, 27 May 2013 17:23:00 +0000 (19:23 +0200)]
fix thread-safety issue in affinity layout detection

The pinning stride variable is shared by thread_mpi ranks and its
value is changed only when its initial value is 0. This posed a
thread-safety issue and in some cases the selected pinning stride was
only reported in the log if rank 0 happened to arrive first to the
affinity layout detection.

Refs #1254

Change-Id: Id32af8cbeacea2205fd15c30b46320ec7dd35e5e

11 years agoadd workaround for clang on AMD with FMA
Szilard Pall [Mon, 29 Apr 2013 16:56:48 +0000 (18:56 +0200)]
add workaround for clang on AMD with FMA

The clang bug which causes incorrect code to be generated on AMD
with FMA (Piledriver and Bulldozer) is in fact caused by an assembler
bug and can be worked around by switching to an external assembler.
This commit implements such the workaround for clang 3.1 and 3.2.
The bug was fix in clang version 3.2-svn-r173176:
http://llvm.org/bugs/show_bug.cgi?id=15040
Hence, no workaround is needed for clang 3.3 with AVX_128_FMA
acceleration.

This workaround is ineffective on Mac OS because there is no suitable
external assembler, but distinguishing between vanilla and Apple clang
requires more code than what's worth adding to cover the case of
AMD-based Hackintoshes (all Mac-s are Intel-based).

It is appropriate to amend only C and not C++ compilation for
release-4-6 branch, but when merging this to master branch, reconsider
the detail of the implementation.

Refs #1099

Change-Id: I835e0f2436ee33507514d3bc3980fcc227e2e36f

11 years agoAdded GROMOS96 54A7 force field files.
Justin Lemkul [Wed, 22 May 2013 12:24:55 +0000 (08:24 -0400)]
Added GROMOS96 54A7 force field files.

Files are taken from ATB, which is hosted by Alan Mark, who
was an author on the GROMACS96 54A7 paper, which is cited in
forcefields.doc. So these files are effectively equivalent to
the reference implementation.

Fixes #773.

Change-Id: I800da3d3535a09cd5beb7f2b4d1b42422cc4329f

11 years agofix thread offset + stride check
Szilard Pall [Mon, 27 May 2013 17:07:30 +0000 (19:07 +0200)]
fix thread offset + stride check

This commit fixes the check which makes sure that the combination of
thread offset and stride does not cause pinning beyond the last hardware
thread.

Additionally, also improved pinning-related warnings and notes.

Change-Id: Ia33610cacb7526dca2ff69491aac2973c7333022

11 years agoFixing the constraint dhdl term in shake
Michael Shirts [Sun, 26 May 2013 14:22:09 +0000 (10:22 -0400)]
Fixing the constraint dhdl term in shake

Addresses and corrects new issues with #1255,
with additional comments explaining what else
may need to be done in the future to make sure
that the theory of the changes are completely
correctly founded.  See the redmine entry #1255
to see the numerical validation of the current choices.
Also adds possible missing constraint dHdl contribution.
Fixes #1268

Change-Id: Ibe3980c2e265cced49b03b966e02143c5cf9f07c

11 years agoFixes #1194 error reading 4.5.5 tpr files with dihres
David van der Spoel [Wed, 1 May 2013 13:08:29 +0000 (15:08 +0200)]
Fixes #1194 error reading 4.5.5 tpr files with dihres

Somehow the tpx_version produced by 4.5.5 was higher (73)
than expected, making the the tpx reading incorrectly
assuming this was using the new file format.
Now set to the version before the
first official 4.6 tpx format, 82 to match the tpr files
in the regression tests. Duh!

Change-Id: I40d8ffa0d350cf3b690f8dfb071fc191f027d02f

11 years agoWork around for correct treatment of all-vs-all
Mark Abraham [Fri, 24 May 2013 14:50:37 +0000 (16:50 +0200)]
Work around for correct treatment of all-vs-all

Neither C or accelerated all-vs-all kernels work in 4.6. The group
SIMD kernels do not work either. The non-accelerated kernel is OK,
though.

Fixes #1249 (for certain values of "fixes"), refs #1095

Change-Id: Id52c0ba110aa915e77859585c2cbfd4d529fe3ca

11 years agoFixed calculation of slab buffer size for flexible potentials.
Carsten Kutzner [Tue, 21 May 2013 14:31:46 +0000 (16:31 +0200)]
Fixed calculation of slab buffer size for flexible potentials.

The slab buffer size is difference in slabs between the reference and
the current positions of the rotation group. This was originally
calculated once in the init_rot_group() routine. However, it needs
to be calculated at every step since it changes when the rotation group
expands or contracts along the rotation vector.

Change-Id: I3b1fac41f88744e14e712454ae546c94f9b26750

11 years agoFix an error in selection online help.
Teemu Murtola [Fri, 24 May 2013 03:56:59 +0000 (06:56 +0300)]
Fix an error in selection online help.

Fixes #1262.

Change-Id: Ia9144690327b852dfab58e833cc2fdc20579b277

11 years agoFix for a rare condition in flexible rotation potentials.
Carsten Kutzner [Thu, 23 May 2013 16:23:41 +0000 (18:23 +0200)]
Fix for a rare condition in flexible rotation potentials.

Change-Id: Icc6c7fceaba3fa53f3f2d627c3c205469fc9d710

11 years agominor function argument cleanup
Szilard Pall [Mon, 27 May 2013 17:37:18 +0000 (19:37 +0200)]
minor function argument cleanup

Removed an unused function argument and changed anoehter one to not pass
the entire nonbonded verlet data structure to the nbnxn_cuda module, but
only what's needed from it.

Change-Id: I89699548f69245eba6d8451683ba6dc36af75dc2

11 years agoCode cleanup in enforced rotation module, remove warnings.
Carsten Kutzner [Wed, 22 May 2013 13:47:47 +0000 (15:47 +0200)]
Code cleanup in enforced rotation module, remove warnings.

Change-Id: Iceb458b06f2c003c6325c77c3258edb112e449f6

11 years agoFix of memory leak
Michael Shirts [Sun, 26 May 2013 15:52:52 +0000 (11:52 -0400)]
Fix of memory leak

Fixes #1265 (probably)

freeing data in expanded ensemble code that should have been freed all along.

Change-Id: I115ee068c56e4edab8fcea828e60ee1386f00716

11 years agoMake FFT detection quieter when nothing is changing
Mark Abraham [Sun, 14 Apr 2013 16:01:45 +0000 (18:01 +0200)]
Make FFT detection quieter when nothing is changing

Change-Id: I58ae8571de21eb81998a6dbce5883c1343552eeb

11 years agoMerge branch 'release-4-6'
Teemu Murtola [Fri, 24 May 2013 17:59:13 +0000 (20:59 +0300)]
Merge branch 'release-4-6'

Omitted the patch with the hacks for silencing warnings with gcc-4.8,
since we plan to do a proper job of that in master branch.

Some minor conflicts resolved.

Conflicts:
CMakeLists.txt
cmake/ThreadMPI.cmake
src/config.h.cmakein
src/programs/mdrun/md.c

Change-Id: I2c1f1b9b40100c269eea6b06b7b073491b5e17d6

11 years agoFixed a potential race condition in tMPI_Thread_create()
Sander Pronk [Tue, 21 May 2013 13:33:18 +0000 (15:33 +0200)]
Fixed a potential race condition in tMPI_Thread_create()

The pthreads version of tMPI_Thread_create contained a potential race
condition where the tMPI_Thread_t structure may not be fully populated
as the child thread starts.

Refs #1254

Change-Id: I86e8faaa3d27b88269257be8d7df66ef728dbb0d

11 years agoAdd a few sequence diagrams to Doxygen docs.
Teemu Murtola [Sun, 10 Mar 2013 18:48:02 +0000 (20:48 +0200)]
Add a few sequence diagrams to Doxygen docs.

- Add detection for mscgen to be used with Doxygen.  If the tool is not
  found, the diagrams are simply not generated (missing images on the
  HTML pages).
- Add a separate wrapper script for running Doxygen to show warnings
  more clearly (in particular errors from mscgen were difficult to spot
  otherwise).  This script also prints a note if mscgen is not available
  when the documentation is built.
- Add a few sequence diagrams for the analysis framework to clarify
  interactions between parts and illustrate the parallelization design
  (although parallelization itself isn't implemented yet, it is useful
  to see the plan to fully understand the design).  Added some text to
  describe the diagrams; this could perhaps be better integrated into
  the other documentation (currently, more or less the same text may
  also be found elsewhere).
- Fix a few Doxygen issues (missing links etc.) noticed while adding the
  diagrams.

Change-Id: If26049560b8db3be1e202d0aef6e08f0db7d5e73

11 years agoClarify g_gyrate -h
Mark Abraham [Wed, 22 May 2013 10:06:38 +0000 (12:06 +0200)]
Clarify g_gyrate -h

The description could be better still, but since I don't know
exactly what g_gyrate does, I will leave it alone.

Partial fix for #934

Change-Id: If797ed87f07d119ef5d778e341735e2c1d48ff9e

11 years agoFix g_chi -omega
Mark Abraham [Mon, 29 Apr 2013 22:48:24 +0000 (00:48 +0200)]
Fix g_chi -omega

Per IUPAC, we should calculate peptide omega angles from
Calpha-C-N-Calpha, and there are only n-1 such angles defined for a
polypeptide of n amino acid residues.

There are some other IUPAC violations in make_chi_ind(), but solving
those is deferred to 5.0, not least because there will be a
behavioural change when we conform to IUPAC.

The problem that led to the report had several causes. The hard-coding
of the string names for hydrogen bound to peptide nitrogen (which in
CHARMM27 is "HN") meant that an H atom was not found. has_dihedral()
then checked whether a Calpha was found, which was true. Then
make_chi_ind() computed the angle based on H without doing any further
check. So some garbage coordinate was looked up when computing the
angle.

A proper fix for this kind of stuff for 5.0 requires finding all the
places we try to guess what atoms are from their names and using
properly implemented selections.

Also removed orphaned header file.

Fixes #953, details and links there

Change-Id: I63257a1d6d8ed46d251b8bc0cb308dfbd2864a97

11 years agoFix genion -nq and -pq when using -neutral
Pedro Lacerda [Mon, 20 May 2013 05:11:16 +0000 (02:11 -0300)]
Fix genion -nq and -pq when using -neutral

Currently genion can't neutralize (-neutral) systems when -nq/-pq
differs from -1/+1. This commit fixes the problem.

Change-Id: If2a82ace079555d8a684ea876daa947677d5e442

11 years agoUpdated grompp cut-off and PME-Switch checks
Mark Abraham [Thu, 25 Apr 2013 14:34:23 +0000 (16:34 +0200)]
Updated grompp cut-off and PME-Switch checks

Added a warning with PME-Switch when switching over more than 5%.
Charge-group size rlist notes/warnings now also appear when
potential modifiers are used.
Documented effect of potential-modifiers on the group scheme cut-off
treatment in mdp_opt.html.

Fixes #1179

Change-Id: Ide00caf5ae378104f99611bf197e896d1b53d7d7

11 years agoFix -neutral option in genion
P S Lacerda [Fri, 17 May 2013 06:14:41 +0000 (03:14 -0300)]
Fix -neutral option in genion

The help for -neutral says that it "will add enough ions to neutralize
the system", but this option can only be used in combination with -conc.
This commit makes -neutral independent.

Change-Id: I08b019b05cf3d8511757c4665c24dcaa37968ceb

11 years agoFixed problem with bond constraint dhdl being left out
Michael Shirts [Fri, 17 May 2013 18:44:00 +0000 (14:44 -0400)]
Fixed problem with bond constraint dhdl being left out

At some point, the dhdl from the holonomic bond constraints got left out,
because the term got zeroed before being added to the bonded energy.

Also, I made some of the variable names involved more descriptive to
clarify the logic.

Removed velocity constraint calls, as don't contribute to dhdl.

Fixes redmine #1255

Change-Id: I2eebf357d1a922b7636dc015b09f286827283dd0

11 years agoFujitsu Sparc64 acceleration and general fixes for non-x86 builds
Erik Lindahl [Sun, 6 Jan 2013 13:50:23 +0000 (14:50 +0100)]
Fujitsu Sparc64 acceleration and general fixes for non-x86 builds

Fixes configurations not to assume x86 and avoid warnings, in
particular if a non-x86 acceleration is used.
The cpu detection code has been extended to parse /proc/cpuinfo on
Linux in cases where the x86 CPUID instruction (or the inline
assembly to execute it) is not available.
Finally, there are new group kernels accelerated for use on the
K computer, which uses the Sparc64 HPC-ACE instruction set. These
kernels are roughly ~35% faster than the compiled C version, which
means Gromacs-4.6 is now ~70% faster on K than Gromacs-4.5.

Change-Id: I92559f0ac6159b504f100447a41a03e4b33fec19

11 years agoNew version of thread_mpi with many minor enhancements
Sander Pronk [Fri, 26 Apr 2013 11:59:19 +0000 (13:59 +0200)]
New version of thread_mpi with many minor enhancements

- Fixed issues with collective calls with 1 thread
- Fixed deadlocks with copy buffer turned on
- Turned off copy buffers by default for Gromacs
- Fixed error handling on low-level calls
- Low-level errors are now propagated correctly through MPI
- Simplified the atomics
- Compiles for platforms for which atomics are not supported.
- Added Fujitsu Sparc64 support

Change-Id: I3553906d6630cea8b1efe59fca293fe3c066c8d9

11 years agoHack compiler flags to silence warnings on gcc 4.8
Mark Abraham [Mon, 20 May 2013 22:13:38 +0000 (00:13 +0200)]
Hack compiler flags to silence warnings on gcc 4.8

GCC changed its default behaviour when reporting a number of different
kinds of warnings. We don't want to fix these in the bugfix branch
because even where it is possible it looks too invasive. We plan to
address these issues in a less heavy-handed manner in master branch.

Note when merging to master, do not include this patch.

Change-Id: I14f00357195424dd538aca4b319e5c2c120c691d

11 years agoMerge release-4-6 into master
Roland Schulz [Tue, 21 May 2013 04:33:22 +0000 (00:33 -0400)]
Merge release-4-6 into master

Conflicts:
CMakeLists.txt
cmake/FindMKL.cmake (deleted in 4.6)
src/gromacs/selection/compiler.cpp (was backport)
src/mdlib/nbnxn_cuda/nbnxn_cuda_types.h
src/ngmx/CMakeLists.txt
src/programs/grompp/gpp_tomorse.h

was incorrectly identified as rename target:
src/gromacs/trajectoryanalysis/tests/CMakeLists.txt
change instead belonged to:
        src/gromacs/mdlib/nbnxn_cuda/CMakeLists.txt

moved changes for OpenMM to src/programs/mdrun/CMakeLists.txt:
src/kernel/CMakeLists.txt
Deleted in 5.0 - only copyright changed:
share/template/template.c
share/template/template_doc.c
FFT_LIBRARIES change already in 5.0:
src/gmxlib/CMakeLists.txt
src/mdlib/CMakeLists.txt
src/tools/CMakeLists.txt
Removed GMX_*_EXPORT:
        src/gromacs/legacyheaders/domdec.h
        src/gromacs/legacyheaders/pme.h

Change-Id: Ib1d4abe66ea7b29c418dba687f8e7c1d645d39c4

11 years agoIntroduce fatal error for GB with FE
Mark Abraham [Wed, 1 May 2013 15:06:56 +0000 (17:06 +0200)]
Introduce fatal error for GB with FE

Old code silently computed zeroes for Coulomb(SR) when using
Generalized Born and the free energy kernel, because of the
inappropriate use of a default branch of a switch statement.

Fixed the default branch for icoul and ivdw switch statements to issue
gmx_incons (similar to usage in the Verlet kernel code). Now we invoke
explicit code paths for all legal values of icoul and ivdw. Added
gmx_fatal for un-implemented GB case (similar to the gmx_fatal for
Buckingham with this free energy kernel).

Partial fix for #1237

Change-Id: I30684aed9fba9beac9b1b87eb99e2cbc7e7e374d

11 years agoFixed g_sgangle legends.
Justin Lemkul [Wed, 15 May 2013 14:28:58 +0000 (10:28 -0400)]
Fixed g_sgangle legends.

There were no legends previously, and questions are often asked
about the interpretation of the data.  This commit adds proper
s0 and s1 legends in XmGrace format.

Change-Id: I7bdcb57167eb3a0cef90a9b9dba9d04b86ba7cbd

11 years agoFixed two compilation issues.
David van der Spoel [Thu, 9 May 2013 16:29:35 +0000 (18:29 +0200)]
Fixed two compilation issues.

With new compilers and boost 1.5.3, since that version adds an
"explicit operator bool()" to the smart pointer classes, if
the compiler supports it.

Change-Id: I31862314479990adc8333e834dd16cbddbfcc387

11 years agoChoose the PBC image of each rotation group atom depending
Carsten Kutzner [Tue, 30 Apr 2013 15:32:04 +0000 (17:32 +0200)]
Choose the PBC image of each rotation group atom depending
on the current position of it reference atom. Therefore,
1) in choose_pbc_image() the correctly rotated reference position
has to be used (the addition of the pivot vector was missing)
2) in init_rot_group(), the reference positions have to be
correctly determined for restarts. In these cases, the initial
angle of the reference group is different from zero.

Change-Id: I57f886c507317385619e42bf387e407479b0c08d

11 years agoMerge "fixed incorrect scaling of cos-acceleration viscosity" into release-4-6
Christoph Junghans [Wed, 15 May 2013 19:53:56 +0000 (21:53 +0200)]
Merge "fixed incorrect scaling of cos-acceleration viscosity" into release-4-6

11 years agoMerge "Fixing handling of perturbation mass changes." into release-4-6
Sander Pronk [Fri, 10 May 2013 13:17:11 +0000 (15:17 +0200)]
Merge "Fixing handling of perturbation mass changes." into release-4-6

11 years agoMerge "Fixes "Function type U-B not implemented in ip_pert."" into release-4-6
Mark Abraham [Fri, 10 May 2013 12:14:43 +0000 (14:14 +0200)]
Merge "Fixes "Function type U-B not implemented in ip_pert."" into release-4-6

11 years agoMerge "improve build with OpenMM, still not 100% fixed" into release-4-6
Mark Abraham [Fri, 10 May 2013 11:53:04 +0000 (13:53 +0200)]
Merge "improve build with OpenMM, still not 100% fixed" into release-4-6

11 years agoMerge "fixing rerun with free energy + .xtc or .gro" into release-4-6
Mark Abraham [Fri, 10 May 2013 09:45:08 +0000 (11:45 +0200)]
Merge "fixing rerun with free energy + .xtc or .gro" into release-4-6

11 years agoimprove build with OpenMM, still not 100% fixed
Christoph Junghans [Fri, 18 Jan 2013 03:30:30 +0000 (20:30 -0700)]
improve build with OpenMM, still not 100% fixed

* introduced in e508a07b6e127fa1cf31d263bcbd33e4040066cb

Change-Id: I6ad45fd2d5766d1c4a91ef2e0c442ff030fc1296

11 years agofixed incorrect scaling of cos-acceleration viscosity
Berk Hess [Wed, 8 May 2013 16:07:38 +0000 (18:07 +0200)]
fixed incorrect scaling of cos-acceleration viscosity

The cos-acceleration 1/viscosity output contained an anomalous factor
1/volume. This factor is now removed.
Fixes #1244

Change-Id: I9bf318b4e6557720683d50a0c2e887e306bacc3f

11 years agofixing rerun with free energy + .xtc or .gro
Michael Shirts [Tue, 7 May 2013 05:37:56 +0000 (01:37 -0400)]
fixing rerun with free energy + .xtc or .gro

When running rerun specifying init-fep-state rather than lambda (which
is necessary if the vector components are specified separately), the
init-fep-state in the .mdp is ignored. There .trr appears to already work
correctly.

Fixes bug #1240

Change-Id: Id118ae9273ef67438797306a74ac3bccfb8c4dba

11 years agoFix extant references to former GPL licensing
Mark Abraham [Tue, 7 May 2013 18:06:59 +0000 (20:06 +0200)]
Fix extant references to former GPL licensing

Some files did not have the copyright header I applied in 2012, so
I have re-applied that header as I would have then.

Some references remain in src/contrib and share/top/residues.dtd,
because I do not know whether they should change.

Change-Id: Ia80adc0c55ac1776297754a90cc0f8b5de7eae8f