alexxy/gromacs.git
10 years agoMerge release-5-0 into master
Roland Schulz [Tue, 27 May 2014 08:25:50 +0000 (04:25 -0400)]
Merge release-5-0 into master

Change-Id: Ibc8f81443d1eaac18b62f544fa149e0924073891

10 years agoMerge release-4-6 into release-5-0
Roland Schulz [Mon, 26 May 2014 08:49:25 +0000 (04:49 -0400)]
Merge release-4-6 into release-5-0

Conflicts:
CMakeLists.txt - fixed use of GMX_CPU_ACCELERATION
src/gromacs/gmxana/gmx_lie.c
src/gromacs/pulling/pull.c

Change-Id: I45a70eee6f7ec4dd922b6c04c740c40f50159a45

10 years agoMove general functions out of typedefs.h
Teemu Murtola [Sun, 25 May 2014 18:44:50 +0000 (21:44 +0300)]
Move general functions out of typedefs.h

- Move overallocation routines to smalloc.h.  Perhaps the DD routines
  could go higher up the dependency stack, but then again, they weren't
  particularly high earlier.
- Move gmx_step_str() to cstringutil.h.  This could probably go away
  completely in favor of GMX_PRId64, but here it will force less
  dependencies on code that still uses it.

These changes allow files that use one of these functions to still get
rid of all unnecessary dependencies that typedefs.h brings.

Change-Id: Ic7973799c14f1748867965fda5bf8e33fae4fd0c

10 years agoRemove some typedefs.h dependencies
Teemu Murtola [Sun, 25 May 2014 04:28:31 +0000 (07:28 +0300)]
Remove some typedefs.h dependencies

- Replace several typedefs.h dependencies with either forward
  declarations or includes of the individual headers that are required.
- Some other cleanup in the selection code, removing stuff that is no
  longer necessary for C++.

Change-Id: I6b9b3fe5cbbcc8f6bac29c9306cc4c4c57e59479

10 years agoMove types/topology.h to topology/
Teemu Murtola [Sun, 25 May 2014 03:20:55 +0000 (06:20 +0300)]
Move types/topology.h to topology/

- Make the types forward-declarable, and use that in a few headers.
- Adapt files that were including the file directly.
- Move functions that operate on these structs from typedefs.[ch] to
  topology/ as well, and make callers of those functions include
  topology.h.

typedefs.h still brings this header with it.  That will be cleaned up
separately in parts.

Change-Id: Iff50b854c335d10b97fd79c65d21791e5ae432a1

10 years agoSimplified section "Porting".
Rossen Apostolov [Fri, 23 May 2014 12:25:42 +0000 (14:25 +0200)]
Simplified section "Porting".

Fixes #1069.

Change-Id: I01578dfe27585f5c5cc81ce9f564e9586c60a3ed

10 years agoMove types/idef.h to topology/
Teemu Murtola [Sat, 24 May 2014 18:13:58 +0000 (21:13 +0300)]
Move types/idef.h to topology/

- Move bondedtable_t to fcdata.h, which is the only header that used it.
- Make other types forward-declarable.
- Some minor cleanup in the moved file.
- Adapt files that were including idef.h directly.  Everything else
  still depends on getting this through typedefs.h / types/topology.h.

Change-Id: Ib11c1e34dde83180e1bfa8415d579ced96aeee4d

10 years agoAllow trjconv to keep some box dimensions unchanged.
Rossen Apostolov [Fri, 23 May 2014 14:30:06 +0000 (16:30 +0200)]
Allow trjconv to keep some box dimensions unchanged.

Giving -1 to option box will preserve the original box size
for the given dimension.

Fixes #871.

Change-Id: I339aedcf09da8ecb4eb8f32e8057f953a21e0f5f

10 years agoMove types/atoms.h to topology/
Teemu Murtola [Sat, 24 May 2014 04:20:48 +0000 (07:20 +0300)]
Move types/atoms.h to topology/

- Make all the structs forward-declarable, and use that in a few
  headers.
- Adjust existing few includes.
- Move functions that operate on these types from typedefs.[ch] to
  topology/ as well.

Nearly all code still depends on including this through
typedefs.h->types/topology.h, but that can wait.

Change-Id: If870711a061756a77451f52598d91e72d8948d92

10 years agoMove types/ishift.h to pbcutil/
Teemu Murtola [Sat, 24 May 2014 03:41:51 +0000 (06:41 +0300)]
Move types/ishift.h to pbcutil/

- Remove the include from typedefs.h, and add it to files that are using
  it.

Change-Id: I752648c73ba767eff30c113c84aabd5c7d7494ac

10 years agoMove invblock.* to topology/
Teemu Murtola [Fri, 23 May 2014 18:51:22 +0000 (21:51 +0300)]
Move invblock.* to topology/

- Remove unnecessary includes of invblock.h.
- make_invblock() actually seems unused, but left it there for now.
  Perhaps the whole functions could be merged to block.h, but that will
  be easy to do later as well.

Change-Id: I5dc133b0bb66c9ec66704c3406f19ab217dade68

10 years agoMove types/block.h to topology/
Teemu Murtola [Fri, 23 May 2014 04:07:48 +0000 (07:07 +0300)]
Move types/block.h to topology/

- Move t_block and t_blocka definitions to topology/.
- Move functions that operate only on these types from typedefs.[hc] to
  the same place.
- Include the new block.h from all source files that reference the
  functions.
- Clean up a few headers that were including types/block.h directly.
  Most other code still depends on getting the type definitions
  indirectly through typedefs.h, but that can be fixed during subsequent
  changes.

Change-Id: I458e9cdc00a8d81665630f8123589b64d123790a

10 years agoMove symtab.* to topology/
Teemu Murtola [Thu, 22 May 2014 19:01:43 +0000 (22:01 +0300)]
Move symtab.* to topology/

- Adapt #includes and some minor cleanup in touched files.
- Convert symtab.c to C++ to get rid of a "macros.h" dependency, and
  clean up the includes otherwise as well.
- Adjust valgrind memory leak suppression to suppress on an extern "C"
  function.

This new subdirectory is an initial home for everything related to basic
topology and index group handling.  More files will follow.

Change-Id: Id5b1a626ef4a90836f70a8b4c7f24ff52c768a5d

10 years agoMerge t_symtab into symtab.h
Teemu Murtola [Wed, 21 May 2014 19:22:33 +0000 (22:22 +0300)]
Merge t_symtab into symtab.h

- Remove types/symtab.h.
- Make the type forward-declarable and use that in headers.
- Remove some unnecessary includes of symtab.h, and added some that were
  missing.  These may not be 100% accurate, since types/topology.h still
  brings symtab.h into nearly every file.

In principle, it should be straightforward to make the type internal to
symtab.c (I don't think the contents of the struct are used anywhere
outside that file), but the problem is that it is very difficult to find
all places where t_topology or gmx_mtop_t is allocated with snew()
without calling open_symtab() afterwards, since all those should change
to also initialize the symtab member to a non-NULL pointer.

Change-Id: I3b932f508bb010c4bda06f80ad98a4836eeb8484

10 years agoMove pbc.* to pbcutil/
Teemu Murtola [Tue, 20 May 2014 19:30:03 +0000 (22:30 +0300)]
Move pbc.* to pbcutil/

- Remove unnecessary includes of pbc.h.
- Reorder some of the includes in C++ code manually; elsewhere, just a
  manual replacement of the include paths.
- Some minor cleanup.

This introduces a cyclic fileio<->pbcutil dependency, but that needs to be solved separately.

Change-Id: I13becc82aaa217288ea45df72bb6198377de9d0f

10 years agoMove tools code to where it is used
Mark Abraham [Wed, 21 May 2014 17:47:52 +0000 (19:47 +0200)]
Move tools code to where it is used

All the actual clients of calch.c and princ.c were respectively
in gmxpreprocess and gmxana, so it makes more sense for them
to be there, together with their headers. Removed some
unneccesary #includes of those headers.

Change-Id: I47f6d2f1e3a4670ebba907b874590e362f070eac

10 years agoFix memory issue in solvate
Roland Schulz [Thu, 22 May 2014 22:16:13 +0000 (18:16 -0400)]
Fix memory issue in solvate

Caused by SIMD padding introduced by new group kernels.

Fixes #1499

Change-Id: I5126217c9b752f1c1fd04d01e2644987fdc52d5b

10 years agoAdd ASAN build configuration
Roland Schulz [Sun, 11 May 2014 20:26:14 +0000 (16:26 -0400)]
Add ASAN build configuration

Also renamed ThreadSanitizer to TSAN

Change-Id: I4373a626acc3962bfb8f163297ab146684bd5ea6

10 years agoMove cinvsqrtdata.c to math/ and remove Fortran remnants
Teemu Murtola [Thu, 22 May 2014 03:57:13 +0000 (06:57 +0300)]
Move cinvsqrtdata.c to math/ and remove Fortran remnants

There is no longer any Fortran code that needs to use the arrays, so
simplify the code.

Change-Id: I304ab21129412f53b8c9696ac0739cbafbcb0b7e

10 years agoNormal modes don't work currently with virtual sites or shells.
Rossen Apostolov [Tue, 6 May 2014 14:23:25 +0000 (16:23 +0200)]
Normal modes don't work currently with virtual sites or shells.

Refs #879.

Change-Id: I1c45b5a4b4c97feff222dccbbbb884e0153ad0c5

10 years agoFix static group list indices in selection prompt
Teemu Murtola [Thu, 22 May 2014 03:20:47 +0000 (06:20 +0300)]
Fix static group list indices in selection prompt

In 4.6, the list was zero-based, and this is what the selection parser
uses when resolving numeric group references, so it should still be.
Also the list shown by various functions in index.c is zero-based.
The printing code had been inadvertently changed to one-based in cleanup
of the handling of group names within the selection code.

Fixes #1506

Change-Id: I9a573b921802d2276e3bdb653359a961c90ff29a

10 years agoAvoid energy drift with verlet-buffer-tolerance
Berk Hess [Fri, 9 May 2014 22:05:46 +0000 (00:05 +0200)]
Avoid energy drift with verlet-buffer-tolerance

Added a warning with weak coupling and SD when tau_t and
verlet-buffer-tolerance as so large that the temperature might
be off by more than 0.2%.
Turned off nstlist tuning in mdrun with nstlist=1.
Also fixed Andersen checks in mdrun that were useless, since they
were done before temperature coupling groups were set.

Change-Id: I41bd316449c9e03e21d33dd82ebeab034d019fc6

10 years agoAdd fatal errors for VV and twin-range MTS
Mark Abraham [Tue, 13 May 2014 15:52:50 +0000 (17:52 +0200)]
Add fatal errors for VV and twin-range MTS

Michael never implemented the multiple-time stepping with the VV
integrator family and constraints (see code that calls
combine_forces() from update_coords() in src/mdlib/update.c). Probably
that means the multiple-time-step regime was not tested with VV
either. Strictly speaking, these new fatal errors have scope that is
wider than is clearly warranted, but it is not clear the
no-constraints VV path was only ever as bad as the broken leap-frog
path is (see #1400).

I suspect VV+constraints will work with the incoming fixes for
leap-frog, but until someone wants to use it (and why would they?),
then I'm not going to test that it works as well as it does with
leap-frog.

Change-Id: Ib61d0fb7661bca2101c04423a6af1744420c06ab

10 years agoClarified docs for use of mdrun -nstlist
Mark Abraham [Tue, 20 May 2014 13:18:58 +0000 (15:18 +0200)]
Clarified docs for use of mdrun -nstlist

Change-Id: I86118d59116bb183bf81d21bdef8f9c75c12700a

10 years agoMerge t_pbc definition into pbc.h
Teemu Murtola [Tue, 20 May 2014 04:25:27 +0000 (07:25 +0300)]
Merge t_pbc definition into pbc.h

- Remove types/pbc.h, and merge its contents into pbc.h.
- Make t_pbc forward-declarable, and use this in header that only
  included one of the pbc.h files to just get this definition.
- Add some missing pbc.h includes.
- Fix some other include dependencies that were previously covered
  transitively.
- Minor cleanup in touched files.

Change-Id: I0a69980b244c23905c44448c1a095d497807cd04

10 years agoRefactor string handling for GPU usage report
Mark Abraham [Sat, 17 May 2014 13:27:25 +0000 (15:27 +0200)]
Refactor string handling for GPU usage report

This prepares for future addition of reporting the list of available
compatible GPUs in the auto-selection case, which is needed for gmx
tune-pme to function well. Current outputs are only of IDs of
available GPUs, or IDs of those that will be used. The latter depends
on the number of PP ranks, so it doesn't help gmx tune-pme find out
how to run the optimization. At some point, delegating this kind of
task to hwinfo called from gmx tune-pme might be preferable.

The only functionality changes here are of reporting GPU ids by
referring to them as IDs, and the string of the ones used is of style
"0,1,4" rather than "#0, #1, #4". The use of the template function and
constructing the temporary vector prepares for the next commit.

Change-Id: Ic37989ce2f8e6396f450e1b5457ea7ea70b3849b

10 years agoMove mshift.* to pbcutil/
Teemu Murtola [Mon, 19 May 2014 18:16:13 +0000 (21:16 +0300)]
Move mshift.* to pbcutil/

- Remove unnecessary includes of mshift.h.
- Replace mshift.h includes in headers with forward declarations of
  t_graph where applicable.
- Add some missing mshift.h includes to source files that were getting
  it transitively from one of the above headers.
- Convert mshift.c to C++ and get rid of macros.h dependency.

Change-Id: Ie0671cd6d683f5092243e5fdcb102641fdb6ecf6

10 years agoMerge t_graph definition into mshift.h
Teemu Murtola [Mon, 19 May 2014 17:08:59 +0000 (20:08 +0300)]
Merge t_graph definition into mshift.h

- Remove types/graph.h, and merge its contents into mshift.h.
  This is a natural place for the structure, as the header already
  contains most functions that operate on the graph.
- Make t_graph forward-declarable, and use that in headers that
  previously got t_graph from typedefs.h.
- Add some missing mshift.h includes to source files that now need it.

Some additional cleanup of mshift.h dependencies will be done in
subsequent commits, when the header itself is moved.

Change-Id: Ia8c5817c11474c857a6845810e5e7f5a75f1c47c

10 years agoFix copyright years for new code
Mark Abraham [Tue, 20 May 2014 20:46:30 +0000 (22:46 +0200)]
Fix copyright years for new code

These files are new and of code new to GROMACS, so it is
only correct to copyright 2014.

Change-Id: I5d56116f1330fc83380919b111cefa4bf533fb08

10 years agoMove rmpbc.* to pbcutil/
Teemu Murtola [Sun, 18 May 2014 17:25:06 +0000 (20:25 +0300)]
Move rmpbc.* to pbcutil/

- Remove unnecessary includes of rmpbc.h.
- Add includes for rmpbc.h in files where it was missing and was
  previously transitively covered through gstat.h (which itself didn't
  need rmpbc.h).
- Some additional include reordering in files that were manually edited.

More PBC-related files will get to this directory in subsequent commits.

Change-Id: I3f3a963bb2444c0899ea24d2d4cd6a58c3077a82

10 years agoImprovements to the g_lie help description.
Justin Lemkul [Tue, 8 Oct 2013 11:38:04 +0000 (07:38 -0400)]
Improvements to the g_lie help description.

Information was sparse, likely to avoid restating published
protocols, but some expansion was definitely warranted,
given the amount of questions that have recently been
posted to the mailing list and Redmine.

Refs #1353

Change-Id: Ib4057ae671ccac70061498b1d40ebcba84c497ee

10 years agoAdded a note about using direction-periodic pulling.
Rossen Apostolov [Tue, 6 May 2014 13:28:58 +0000 (15:28 +0200)]
Added a note about using direction-periodic pulling.

Refs #1352.

Change-Id: I867fe1372082063bb221880e8021089f9ded14e7

10 years agoAdded a note about unsupported Verlet cutoff + Buckingham.
Rossen Apostolov [Wed, 14 May 2014 10:10:55 +0000 (12:10 +0200)]
Added a note about unsupported Verlet cutoff + Buckingham.

Refs #1192.

Change-Id: I2da3bf8c768de40531e1ffdf6f8cec73c9e53314

10 years agoAdd note about correct calling of wallcycle counter
Mark Abraham [Fri, 16 May 2014 11:05:27 +0000 (13:05 +0200)]
Add note about correct calling of wallcycle counter

The code could be refactored to use a series of explicit OpenMP
barriers so that the wallcycle_start/stop are more clearly matched,
but that's too hard for now. The comments make it harder for anyone
to misunderstand or mistakenly change the code.

Change-Id: Iec00e50e26a60efe09afb6f5744d401a9d9c06a3

10 years agoConvert gmx_detect_hardware.c to C++
Mark Abraham [Sat, 17 May 2014 12:23:00 +0000 (14:23 +0200)]
Convert gmx_detect_hardware.c to C++

Minor fixes to keep new compilers and static analysis happy. The
change to the return behaviour of sizeof_cuda_dev_info does not
matter, because it is only used if it is non-zero.

Change-Id: If2c9c2676667316637a30af9ead71fb9f77058c2

10 years agoFix indenting of .tpr parameter dump in mdrun log file
Mark Abraham [Tue, 13 May 2014 07:25:29 +0000 (09:25 +0200)]
Fix indenting of .tpr parameter dump in mdrun log file

This got broken recently in I39550bff60

Fixes #1447

Change-Id: I3e9765e56081d28dd0855d8d8f3fdf39b900993b

10 years agoClean up matio.*
Teemu Murtola [Sun, 18 May 2014 04:32:03 +0000 (07:32 +0300)]
Clean up matio.*

- Remove unnecessary includes of matio.h.
- Move t_matrix and related type definitions from types/matrix.h to
  matio.h, since this is the only header that needs them, and all users
  also need the contents of that header.
- t_rgb is an exception to the above rule.  Moved that to types/rgb.h
  for now, and adapted other users.
- Remove clear_matrix() as unused.
- Fix a file handle left open in do_dssp.
- Make several functions not declared in matio.h static in matio.cpp.
- Don't use gmx_fio_close() on a handle not opened with gmx_fio_open()
  in readcmap().
- Most of the *cmap() functions are unused (only do_dssp calls one of
  the reading functions, and no one calls the writing functions), but
  left them there for completeness.

Change-Id: Iffc9c9e6d06ce8884e1835c07e9c0f9227412725

10 years agoMove 3dview.* to programs/view/
Teemu Murtola [Wed, 23 Apr 2014 18:58:41 +0000 (21:58 +0300)]
Move 3dview.* to programs/view/

This is the only place where the t_3dview structure is used, and it
seems quite tailored for this use.

Change-Id: Iee0cb3aae947b2bb3f98763ea91949a560faf602

10 years agoClean up math/
Teemu Murtola [Wed, 23 Apr 2014 18:51:05 +0000 (21:51 +0300)]
Clean up math/

- Remove some unnecessary includes.
- Remove autoconf remnants.
- Split 3dview.* to 3dview.* for t_3dview and 3dtransforms.* for the
  basic 4-vector operations.
- Rename most mat4/vec4 operations to be more descriptive and make some
  3dview operations static, as they were not used outside the source
  file.
- Add some documentation for 3dtransforms.h (but not for all functions,
  so the file itself is not documented).

This removes some legacyheaders/ dependencies from math/, and allows
moving 3dview.* to programs/view/, which is the only user for them.

Change-Id: Ieb51d1d800c07f053eb5a28dfef2a249d5fcfceb

10 years agoClean-up gmx_eof
Roland Schulz [Wed, 30 Apr 2014 07:37:36 +0000 (03:37 -0400)]
Clean-up gmx_eof

- Changed name to gmx_one_before_eof so that the different
  behavior from feof is obvious.
- Changed one usage of gmx_eof to feof where the std
  behavior is OK
- Moved to confio and made static because it is only
  used there.
- Removed the special treatment for pipes. It was incorrect.
  gmx_before_eof is only used for gro file reading and
  those could not be read from compressed files anyhow.
  Their is no possible correct implemenation for pipes
  (which cannot be seeked) and even if it wouldn't help
  because gro file reading also uses rewind which
  doesn't work for pipes.

Change-Id: I77fd34253817cd591011b8a2ec39ae95ce7b7378

10 years agoMore elaborate default handling for FileNameOption
Teemu Murtola [Mon, 5 May 2014 18:33:27 +0000 (21:33 +0300)]
More elaborate default handling for FileNameOption

- FileNameOption now prefers existing files when completing the default
  basename to a full filename for input options, like t_filenm parsing
  does.
- Add FileNameOptionManager that allows interaction between different
  file-related options.  Use it to add support for -deffnm-like option
  to set a default base name for all FileNameOptions.

To do the above, and make the -deffnm option independent from the
command line order, the default file names are now handled during
Options::finish().  So there are cases when the value returned by a file
name option changes after this call.

Change-Id: I73d3badae5409e9f066f06dec307b2c10ac89bfd

10 years agoUnit tests for parse_common_args() file options
Teemu Murtola [Sun, 27 Apr 2014 03:49:11 +0000 (06:49 +0300)]
Unit tests for parse_common_args() file options

Some tests were already there, but extended the set to consider the
paths that check for file existence on the file system.
The tests should now cover most happy paths within parse_file_args().
Many unhappy paths behave quite unintuitively, so they are not tested
to avoid enforcing such unintuitive behavior.

Change-Id: I21c2dc40a3861784d55b6419dd148d6dda26dde5

10 years agoFixes a complicated bug in g_anaeig.
David van der Spoel [Fri, 16 May 2014 05:40:37 +0000 (07:40 +0200)]
Fixes a complicated bug in g_anaeig.

If the number of frames for a covariance analysis is fewer than the
number of degrees of freedom, g_covar would happily print nonsense
eigenvalues in the eigenval.xvg file. This would then lead g_anaeig
to give NaN entropy values. By limiting the number of output lines in
the eigenvalue file this should be resolved. In addition a warning is
printed.

Change-Id: I01693a0fa9f3ba5b5784543a04d0d88b33a755c2

10 years agoAdded cmake profiling support
David van der Spoel [Tue, 13 May 2014 13:46:53 +0000 (15:46 +0200)]
Added cmake profiling support

Support for using gprof with gromacs executables is added to
allow basic profiling using
gmx command [options]
gprof gmx

Removed explicit -fomit-frame-pointer, since this has been default
behaviour in gcc at most optimization levels since at least version
4.4. This lets "-O3 -pg" in the Profile build-type CFLAGS fight it out
themselves.

Change-Id: I99710f9cdd406f866d663a9610e0e9cccb87c07c

10 years agoMove physics.* to math/units.*
Teemu Murtola [Tue, 22 Apr 2014 04:14:58 +0000 (07:14 +0300)]
Move physics.* to math/units.*

- Remove some unnecessary #includes.
- Remove the dummy tests; easy to rewrite as usable tests using GTest if
  someone needs those.  They were anyways testing code that no one is
  still calling, even though it was introduced several years ago.
  Now gmxlib is free of *_test.c files.

Now, only one file using atom_id is keeping math/ dependent on
legacyheaders/.

Part of #1415.

Change-Id: I31312b92cf9f5d5129fbd90f31fcf27be2f7afaf

10 years agoMerge "Merge release-5-0 into master"
Roland Schulz [Wed, 14 May 2014 16:25:27 +0000 (18:25 +0200)]
Merge "Merge release-5-0 into master"

10 years agoProhibit AVX_256 with buggy gcc 4.6.1
Mark Abraham [Tue, 13 May 2014 14:16:44 +0000 (16:16 +0200)]
Prohibit AVX_256 with buggy gcc 4.6.1

Fixes #1259

Change-Id: I7c523a90ccd0dd8fd3df6cb1914429e22a27ab5d

10 years agoMerge release-5-0 into master
Roland Schulz [Sat, 10 May 2014 16:34:36 +0000 (12:34 -0400)]
Merge release-5-0 into master

Change-Id: Ib309c33a5923d50757122b789df9430aaa1ee98d

10 years agoMerge release-4-6 into release-5-0
Roland Schulz [Fri, 9 May 2014 19:08:58 +0000 (15:08 -0400)]
Merge release-4-6 into release-5-0

Conflicts:
CMakeLists.txt (applied to cmake/gmxManageSharedLibraries.cmake)

Replaced gmx_llabs by llabs as mentioned in TODO.

Change-Id: I37e8cf5d6725cc9836e6dc29ca44e7ef915417c4

10 years agoFix clang 3.5 warnings regarding *abs*
Alexey Shvetsov [Sun, 20 Apr 2014 13:01:54 +0000 (17:01 +0400)]
Fix clang 3.5 warnings regarding *abs*

Fix abs() family functions type usage mismatch.

Change-Id: I85ed2931d681aa1ad024678b4209a524abc2cc61
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agoMinor tweaks to the DD setup
Berk Hess [Thu, 8 May 2014 13:17:00 +0000 (15:17 +0200)]
Minor tweaks to the DD setup

Dynamic load balancing is now turned on when the total performance
loss is more than 2% (lower than that will not help).
The check for large prime factors should be done on the PP node
count when -npme is set by the user.

Change-Id: Ib81b56a7cb071540b143a4bfc98758788a8ac07d

10 years agoFix comparison of array to NULL
Roland Schulz [Sat, 3 May 2014 16:27:14 +0000 (12:27 -0400)]
Fix comparison of array to NULL

Static char array is never NULL. Detected by clang 3.5. Also fixes
output of read_atype and print error for incorrect format.

Change-Id: I834fca2d8fdd49167a88dc15bc7a2e72f4d97269

10 years agoMerge "Merge branch release-4-6 into release-5-0" into release-5-0
Roland Schulz [Fri, 9 May 2014 19:04:43 +0000 (21:04 +0200)]
Merge "Merge branch release-4-6 into release-5-0" into release-5-0

10 years agoFix OpenMP scope error
Roland Schulz [Fri, 9 May 2014 09:57:08 +0000 (05:57 -0400)]
Fix OpenMP scope error

Change-Id: I5cea5df876a48e5868b5160170e8450e697f3b4b

10 years agoFix GCC 4.9 warnings
Roland Schulz [Fri, 9 May 2014 16:57:53 +0000 (12:57 -0400)]
Fix GCC 4.9 warnings

Change-Id: I277d0f03f67dfbb5ca5785adc7e8f31880202b41

10 years agoFix OpenMP unproteced update bug
Roland Schulz [Fri, 9 May 2014 16:33:13 +0000 (12:33 -0400)]
Fix OpenMP unproteced update bug

Change-Id: Id881b3e2726fa9c9be7a37f7e909bb7b268e44a7

10 years agoFix GCC 4.8 warnings
Roland Schulz [Thu, 8 May 2014 02:40:31 +0000 (22:40 -0400)]
Fix GCC 4.8 warnings

Those warnings only present without OpenMP were not fixed prior.

Defines GMX_ATTRIBUTE_NORETURN for GCC and Clang. TODO is
left because it still doesn't define it for all compilers.

Change-Id: I7197e58f87c01de7d2deeba91a82026af74ba213

10 years agocmake: enable shared libraries by default on Hurd
Pino Toscano [Mon, 5 May 2014 21:01:28 +0000 (23:01 +0200)]
cmake: enable shared libraries by default on Hurd

Since the toolchain is mostly the same as used on e.g. GNU/Linux
(glibc, gcc, binutils, etc), they can be safely enabled.

Change-Id: Ic663c8c344b5dfa2910e9c30260588e1917038c1

10 years agoFix incorrect limits in FloatOptionStorage
Teemu Murtola [Thu, 1 May 2014 18:20:22 +0000 (21:20 +0300)]
Fix incorrect limits in FloatOptionStorage

This typo didn't cause any problems in Gromacs, since currently, no code
path enters here.  But if user code would use FloatOption or RealOption,
it would trigger.  Found while taking this code into actual use in
master.

Change-Id: I712faf365359964f6f767991664da7981072e5bd

10 years agoFix usage of gmx_eof
Roland Schulz [Wed, 30 Apr 2014 07:37:36 +0000 (03:37 -0400)]
Fix usage of gmx_eof

gmx_eof has different behavior from gmx_eof and feof
should be used here.

Change-Id: I877c15d0edde64fe06ae2eedbda980f117509449

10 years agoMerge branch release-4-6 into release-5-0
Mark Abraham [Tue, 29 Apr 2014 20:52:24 +0000 (22:52 +0200)]
Merge branch release-4-6 into release-5-0

Conflicts:
src/gromacs/mdlib/coupling.c

Resolved in favour of release-4-6, except that the underlying
RNG calls are now made to the new cycle-based RNG.

Run uncrustify

Change-Id: I56286e19632ac28958a0d4ef60ff09b875aa3005

10 years agoRemoved truncation of nrdf in v-rescale thermostat
Berk Hess [Wed, 23 Apr 2014 13:15:08 +0000 (15:15 +0200)]
Removed truncation of nrdf in v-rescale thermostat

The resampling function for the v-rescale thermostat expected an
integer value for nrdf, but a real was passed, which was truncated.
With a single coupling coupling group nrdf is analytically an int,
but could be off by a bit. The could lead to incorrect kinetic
energy fluctuations (averages were correct).
Now fractional nrdf's are properly handled for nrdf > 3.
For nrdf < 3 a check is added for integer values with a small margin
for rounding.
Fixes #1218

Change-Id: I4c60c337f9874d0bff51220ad09429140be2a056

10 years agoMade ORCA compile.
Justin Lemkul [Thu, 24 Apr 2014 14:45:41 +0000 (10:45 -0400)]
Made ORCA compile.

There are probably larger issues here with the QM/MM interface.
I made no effort to test the validity of any simulation done with
ORCA (since I don't have ORCA and I don't do QM/MM), so issues
definitely remain.

Change-Id: Ibd5dd83d05a3b42c641f0fc9def75c4641e3a7d4

10 years agoMove mtxio.* to fileio/
Teemu Murtola [Mon, 21 Apr 2014 04:11:00 +0000 (07:11 +0300)]
Move mtxio.* to fileio/

This removes some cyclic module-level dependencies, and is more in line
with the current layout, where all I/O code specific to some file
formats is in fileio/.  math/ in general probably also needs to be lower
in the dependency stack than fileio/, so it is not possible to keep the
code in the old place without introducing a cyclic dependency.

Change-Id: If0c0632a3d5b3cd4ffe82f38f743e9afdc7ffdff

10 years agoReduced usage of typdefs.h
Roland Schulz [Mon, 21 Apr 2014 00:57:32 +0000 (20:57 -0400)]
Reduced usage of typdefs.h

Preliminary step to move types out of legacyheader.

Renamed parameter called "matrix" because cppcheck gets
confused if a parameter is called the same as a type.

Part of #1415

Change-Id: I9207a7b8de7f092bab890da128abbb48a8d97b79

10 years agoMove rvec and friends to math/vectypes.h
Teemu Murtola [Sun, 20 Apr 2014 18:33:08 +0000 (21:33 +0300)]
Move rvec and friends to math/vectypes.h

Adjust a few more types/simple.h includes to use only its component
parts.  Now, math/ has only very few legacyheaders/ dependencies left.

Part of #1415

Change-Id: Iffeafa4fac5c5e0c744cf6deecac4eedaee2caf5

10 years agoMove 'real' definition to utility/real.h
Teemu Murtola [Fri, 18 Apr 2014 14:16:13 +0000 (17:16 +0300)]
Move 'real' definition to utility/real.h

- types/simple.h still includes the new header to avoid touching all
  code depending on this.
- Go through most files outside gmxlib and mdlib that included
  types/simple.h, and checked whether headers from utility/ could
  fulfill the needs.  Replaced at least in places where this helped
  fully remove legacyheaders/ dependencies.
- Some minor changes elsewhere to remove legacyheaders/ dependencies
  from modules.  Now linearalgebra/ and statistics/ don't depend on
  legacyheaders, improving the layout of the dependency graph
  significantly.

In the long run, this may be better outside utility/ to better
distinguish code that depends on 'real' from parts that do not.
Currently, it would create a lot of cyclic dependencies everywhere else.

Part of #1415.

Change-Id: I2aa1890357377d0d14c05b3968e1b36e1023458f

10 years agoFix cppcheck 1.64 warnings
Roland Schulz [Sat, 19 Apr 2014 08:51:39 +0000 (04:51 -0400)]
Fix cppcheck 1.64 warnings

Related to #1487

Change-Id: I223289d71e0dfc426f382d1bcb53b3509202779f

10 years agoMore efficient TNG selection group creation
Magnus Lundborg [Wed, 16 Apr 2014 06:29:18 +0000 (08:29 +0200)]
More efficient TNG selection group creation

Do not create a TNG selection group if no selection is specified
explicitly, or if the selection contains all atoms in the system.

Change-Id: Ibe2a14e55aff829fdb74de074447f00f0e85f090

10 years agoFixed nbnxn FE list allocation issue
Berk Hess [Wed, 16 Apr 2014 08:11:50 +0000 (10:11 +0200)]
Fixed nbnxn FE list allocation issue

With free-energy calculations, the nbnxn search code could write
beyond the list bound, which could cause a segv.
Fixes #1474

Change-Id: I4c202fc14b04980f05ad1b3ea001732fdfaa9f00

10 years agoFix memory error in asc format IO
Roland Schulz [Tue, 22 Apr 2014 19:51:29 +0000 (15:51 -0400)]
Fix memory error in asc format IO

Found with cppcheck 1.64

Change-Id: I72e80cd2b11559be47d449d0a8d444857843979b

10 years agoIssue warnings for potential switch w/o defining switch regions.
Michael Shirts [Fri, 18 Apr 2014 03:09:01 +0000 (23:09 -0400)]
Issue warnings for potential switch w/o defining switch regions.

If either older style switches or new potential-switch modifiers are
used, issue a warning if the PME regions is too long, resulting in
inaccurate energies. Also issue a warning if rvdw_switch is 0, which
occurs if no value is specified.

Discussion is in redmine #1463

Change-Id: I7a2c29f87ceb04712aab5076ac97f5f22f573671

10 years agoMove part of macros.h to grompp-impl.h
Roland Schulz [Sun, 20 Apr 2014 17:56:55 +0000 (13:56 -0400)]
Move part of macros.h to grompp-impl.h

Part of #1415.

Change-Id: I360ae1f220b6c51e90edbbe136053fd2e1c0ad5b

10 years agoMove sfactor.[hc] to gmxana
Alexey Shvetsov [Wed, 16 Apr 2014 04:26:17 +0000 (08:26 +0400)]
Move sfactor.[hc] to gmxana

Move it here since its only used by g_saxs

Change-Id: I2ff7761da30eabb569e55362cdc55d683b296d8e
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agoMove vec.h to math/
Teemu Murtola [Wed, 16 Apr 2014 03:49:35 +0000 (06:49 +0300)]
Move vec.h to math/

Most of the changes are scripted replacement of include paths.
Exceptions:
- #includes in the moved file were cleaned up slightly, and include
  guards adjusted.
- Places where it was included as "gromacs/legacyheaders/vec.h" were
  handled manually and the include order adjusted.
- Removal of unnecessary #include "vec.h" from update.h revealed some
  transitive dependencies that were fixed.  Some associated include
  order cleanup in these files.
- Removed some duplicate includes.
- Remove dependency from linearalgebra/matrix.c to vec.h (only needed
  for a single sqr()) to avoid a cyclic math <-> linearalgebra
  dependency.

Part of #1415.

Change-Id: I7ece6eafa22139215510148807c5979f8950a885

10 years agoMerge "Merge release-5-0 into master"
Mark Abraham [Thu, 17 Apr 2014 08:58:32 +0000 (10:58 +0200)]
Merge "Merge release-5-0 into master"

10 years agoFixed bug inverting compression precision.
Magnus Lundborg [Wed, 16 Apr 2014 06:23:03 +0000 (08:23 +0200)]
Fixed bug inverting compression precision.

In the TNG library the compression precision was modified to
suit GROMACS compression precision better (i.e. indicating
the multiplier applied to the compressed value). There was no
change in GROMACS to reflect this, meaning that compressed TNG
would have 0 coordinates for almost all atoms. That is fixed
in this commit.

Change-Id: Id906c710deb68d172a38acec34892aa4823c039d

10 years agoMerge release-5-0 into master
Roland Schulz [Wed, 16 Apr 2014 15:07:10 +0000 (11:07 -0400)]
Merge release-5-0 into master

Conflicts:
CMakeLists.txt

Change-Id: Id9bdc4de634a67c4060bec0e5edf4c358cc6a228

10 years agoRemove unused minvert.h
Teemu Murtola [Mon, 14 Apr 2014 18:15:50 +0000 (21:15 +0300)]
Remove unused minvert.h

This wasn't included from anywhere either (except one file in contrib/),
and none of the declared functions had implementation.

Change-Id: I8133c278303f651c9a324fd5ec60133e00c90cd8

10 years agoFix whitespace
Roland Schulz [Wed, 16 Apr 2014 06:45:52 +0000 (02:45 -0400)]
Fix whitespace

Change-Id: Ib5cba2818ae0ae5cbf40634fc85a20ca196e70d9

10 years agoFix and simplify version matching for running tests
Mark Abraham [Fri, 11 Apr 2014 12:11:00 +0000 (14:11 +0200)]
Fix and simplify version matching for running tests

The version strings that might need bumping for releases and branch
forks are now all maintained in one place, and are always
defined. Correct behaviour follows from whether the "-dev" tag is
present in PROJECT_VERSION.

When this patch is merged with master branch, preserve the bump
to PROJECT_VERSION that is already in master branch, and change
release-5-0 to master branch for REGRESSIONTEST_BRANCH.

Change-Id: I4a5579f00e487273f8e08bad5613ecceac7bf682

10 years agoFix typo in fatalerror.h
Teemu Murtola [Wed, 16 Apr 2014 04:04:57 +0000 (07:04 +0300)]
Fix typo in fatalerror.h

This was causing a warning from the Doxygen checker (doc-check).

Change-Id: I2a482856fd7b88db0d8e669bdb815f52db79e4f0

10 years agoMove xvgr.* to fileio/
Teemu Murtola [Tue, 15 Apr 2014 04:07:31 +0000 (07:07 +0300)]
Move xvgr.* to fileio/

Part of #1415

Change-Id: Ib3d78bce62a4c03c4d72001164921edd556657a2

10 years agoClean up xvgr.h and viewit.h usage
Teemu Murtola [Tue, 15 Apr 2014 03:59:39 +0000 (06:59 +0300)]
Clean up xvgr.h and viewit.h usage

- Remove unnecessary includes of these files.
- Include viewit.h in files that were covered transitively through
  xvgr.h, and remove the include from there.
- Remove other unnecessary includes in these headers.
- Make can_view() static in viewit.c, since it wasn't even declared in
  the header.

Change-Id: I7b6b3724a5b7fd40be46eb8fbcb9d9aeaccf9cc8

10 years agoRemove sysstuff.h
Teemu Murtola [Sun, 13 Apr 2014 09:39:57 +0000 (12:39 +0300)]
Remove sysstuff.h

Replace this with those standard headers that are actually necessary for
the source files.  There are likely several transitively covered header
dependencies now, but those can be resolved when they give problems.
One more header off from legacyheaders/.

Part of #1415.

Change-Id: I4cc3f0eec0f546dad929512e532d8efb11da3694

10 years agoRemove sysstuff.h includes from headers
Teemu Murtola [Sun, 13 Apr 2014 07:05:14 +0000 (10:05 +0300)]
Remove sysstuff.h includes from headers

Remove #include "sysstuff.h" from all headers, and replace it with
standard headers where necessary.  Add necessary standard headers to
source files that previously got them transitively from one of these.

Use snew() in gmx_spatial.c instead of a custom implementation.
Replace some free() with sfree().

Part of getting rid of sysstuff.h.

Change-Id: I857ba69c004aea16195e629c5bf69df32724b3fc

10 years agoRefactor gmx_fatal()
Teemu Murtola [Sun, 13 Apr 2014 05:29:48 +0000 (08:29 +0300)]
Refactor gmx_fatal()

- Remove t_commrec and legacyheaders/ dependencies from
  utility/fatalerror.cpp by splitting gmx_fatal_collective() into a
  low-level helper (in fatalerror.cpp) and a high-level routine that
  knows t_commrec (in network.c).
- Move the declaration of gmx_fatal_collective to network.h to get rid
  of one more header in legacyheaders/.
- Refactor fatalerror.cpp such that the error handler is no longer
  responsible of terminating the program.  Split functionality into
  helper functions that can be called as appropriate, and remove a lot
  of duplication.
- Clean up gmx_abort() and code that calls it.
- Remove interactive prompt from the error handler exit path.

Change-Id: Ia0ab2e415a18bf6ed17bebd1fd8870946d16793e

10 years agoBeer + table soccer = quote!
Mark Abraham [Thu, 10 Apr 2014 22:14:11 +0000 (00:14 +0200)]
Beer + table soccer = quote!

Change-Id: I3323f5b7ae7c65013dc8c0270232f02da8a42bd5

10 years agoImprove language choice
Roland Schulz [Mon, 14 Apr 2014 16:47:02 +0000 (12:47 -0400)]
Improve language choice

Fixes #1480

Change-Id: I45d26cd329c8c358852dc759270ffbac54728d27

10 years agoRemove unused shift.h
Teemu Murtola [Sun, 13 Apr 2014 14:19:26 +0000 (17:19 +0300)]
Remove unused shift.h

Wasn't included from anywhere, and the one declared function isn't
implemented anywhere.

Change-Id: Ib7548bdfe4f02e34a5c4c62b370c4a7071c3653a

10 years agoRemove utility -> fileio dependencies
Teemu Murtola [Mon, 7 Apr 2014 04:09:55 +0000 (07:09 +0300)]
Remove utility -> fileio dependencies

- Move futil.* to utility/.  It is somewhat difficult to keep low-level
  utilities independent of any file utility functions.  Now fileio/
  mainly contains I/O routines that need to know something about the
  file formats supported by Gromacs, and lower-level stuff is in
  utility/.
- Move path.* back to utility/, with the same rationale as above.
- Don't use gmxfio for the debug file.  It doesn't provide any benefit
  for this use, but introduces a cyclic dependency that is very hard to
  break otherwise.  There are some extra conditionals in gmxfio that
  could possibly be removed because of this, but left them there for
  now, since they require additional analysis.

Now, the only dependency from utility/ to other subdirectories is
because of gmx_fatal_collective().

Change-Id: Ib5b8e71088f1fa69909179b35f9600e22ef9ad8d

10 years agoClean up futil.*
Teemu Murtola [Thu, 10 Apr 2014 03:39:23 +0000 (06:39 +0300)]
Clean up futil.*

- Make is_pipe() static, since it is not used outside futil.cpp.
- Move gmx_fexist_master() to network.* to remove t_commrec dependency
  from futil.
- Remove unnecessary #define for a system-provided symbol rewind().
- Remove unused gmx_truncatefile().
- Move STRLEN to utility/cstringutil.h, since types/simple.h is no
  longer transitively included by futil.h.  This avoids reintroducing an
  utility/ -> types/simple.h dependency.  Include cstringutil.h in
  source files that were depending on STRLEN.
- Add some Doxygen documentation for all the functions.

Preparation for moving these to utility/ to resolve fileio-utility
cyclic dependency.

Change-Id: I26ed7e46c512ee41621e2a2c241692c1bb28530d

10 years agoFixed typo in manual README.
Justin Lemkul [Thu, 10 Apr 2014 17:57:22 +0000 (13:57 -0400)]
Fixed typo in manual README.

Fixes #1478

Change-Id: I0dc1cbcac90b4d40a805bfeaf38a90e478801ae0

10 years agoMerge branch 'release-4-6' into release-5-0
Mark Abraham [Thu, 10 Apr 2014 16:40:29 +0000 (18:40 +0200)]
Merge branch 'release-4-6' into release-5-0

Change-Id: Icd1eafab98512328523a3ea788626b3fb415b0a8

10 years agoClean up and fix issues in doc-check scripts
Teemu Murtola [Thu, 3 Apr 2014 03:16:52 +0000 (06:16 +0300)]
Clean up and fix issues in doc-check scripts

- Some 'documentation' -> 'doc' replacements in method names to make
  lines shorter and to make method names more consistent.
- Make the checker work for members of anonymous namespaces.
- To achieve the above, add minimal modeling of namespaces and members
  to gmxtree.py, and model the parent compounds of members better in
  doxygenxml.py.
- Make the checker check also documentation that is ignored by Doxygen.
  This is now possible when anonymouns namespaces work.
  --check-ignored now only controls whether the ignored comments provoke
  a note or not.  This is not enabled currently, because it produces
  quite a lot of noise.
- Fix documentation issues in those ignored Doxygen comments (all the
  source code changes).
- Encapsulate some logic in gmxtree.py related to how the API type is
  handled in the case of legacy (undocumented) modules.  This simplifies
  the graph generation logic, and replaces a lot of the "legacy" edges
  with more descriptive edges: installed headers in legacy modules are
  now treated as public API headers.
- Add a basic legend to the module graph.

Change-Id: Ia4e83468548b361f37bdb8d35862e636d7abddd6

10 years agoMove part of types/simple.h to utility/
Teemu Murtola [Sun, 6 Apr 2014 18:55:25 +0000 (21:55 +0300)]
Move part of types/simple.h to utility/

- Move those parts of types/simple.h that are wrapping C99 features and
  some compiler-specific attributes (gmx_unused) into
  utility/basedefinitions.h.
- Replace some uses of types/simple.h with the new header, removing a
  few module-level dependencies on legacyheaders/
- For now, types/simple.h includes the new header to avoid touching a
  lot of code.
- Remove unused BIG_STRLEN from types/simple.h.
- Move XXXX etc. into calcvir.c, which is the only place where they are
  used.

Change-Id: Idad2aff77048cc1487945e90c8b50ff8bd7010d4

10 years agoRe-use gmx_within_tol from math/utilities instead of is_equal
Carsten Kutzner [Mon, 7 Apr 2014 11:55:15 +0000 (13:55 +0200)]
Re-use gmx_within_tol from math/utilities instead of is_equal

Change-Id: I097bc4901c2f0123cdcb101c9d2f75f1485fb771

10 years agoFurther fix to gmx tune-pme
Mark Abraham [Sun, 6 Apr 2014 15:04:14 +0000 (17:04 +0200)]
Further fix to gmx tune-pme

We need to ignore the column of total time, before reading the total
number of gigacycles. This was also broken before the recent patch to
this line that removed a spurious read of a %d for the number of
ranks.

Change-Id: I1ce7f378069c319e03fe9c0691193bd09a8a209f

10 years agoRemove utility/ dependencies on network.h and main.h
Teemu Murtola [Sun, 6 Apr 2014 04:03:45 +0000 (07:03 +0300)]
Remove utility/ dependencies on network.h and main.h

- Move basic functions that do not depend on t_commrec from network.*
  to utility/basenetwork.h.  This allows removing network.h dependencies
  from utility/, as well as from other new C++ code.
- Simplify gmx_abort() somewhat.  It is only called with real MPI, so
  remove other code paths, and make it a linker error if it is called
  under other circumstances.
- Move gmx_gethostname() from main.* to basenetwork.*.
- While at it, remove unnecessary includes for main.h, now that it only
  contains a few functions.

Change-Id: I048e48ba81b5e764e8342ee07a05201da5fbade2

10 years agoFixed g_rmsdist NOE calculation
Carlo Camilloni [Wed, 9 Apr 2014 22:38:08 +0000 (23:38 +0100)]
Fixed g_rmsdist NOE calculation

This fix solve a series of bugs in NOE calculations:
1) incorrect number of frames in the calculation of the average distance
2) wrong selection of equivalent atoms
3) -equiv was wrongly documented

Change-Id: Icc6bbed0e1ba65774ad470c3edbd7a6a96e63ee6