alexxy/gromacs.git
5 years agoClean up nbnxm bounding boxes
Berk Hess [Tue, 5 Mar 2019 15:11:07 +0000 (16:11 +0100)]
Clean up nbnxm bounding boxes

Changed a flat array to array of 1D BB structs.
Changed a macro to a constexpr.

Change-Id: I75bb6792a3e99dc152450398a90f5414ae79fd8c

5 years agoConvert nbnxm bounding box to a struct
Berk Hess [Fri, 1 Mar 2019 12:01:30 +0000 (13:01 +0100)]
Convert nbnxm bounding box to a struct

Change-Id: Ia432e1f242b90ec0dbe01c528125bb7fa955bd5f

5 years agoRevert "Eliminate mdlib/mdrun.h"
Mark Abraham [Wed, 6 Mar 2019 13:00:36 +0000 (14:00 +0100)]
Revert "Eliminate mdlib/mdrun.h"

This reverts commit f4c94df918063cf855ba4575e1aebefb232ace50.

Somehow gerrit permissions were able to be bypassed, and this change
fixes the change that did not go through review as expected. We'll
investigate gerrit settings also.

5 years agoEliminate mdlib/mdrun.h
Mark Abraham [Wed, 6 Mar 2019 10:16:29 +0000 (11:16 +0100)]
Eliminate mdlib/mdrun.h

This file was filled with stuff that works better elsewhere.

Moved the options structs into gmx namespace

Refs #2877

Change-Id: Ib796ef8e9896804c56936f23f67dcd3fc12900fd

5 years agoMinor modernization in gmx_dump
Mark Abraham [Sun, 24 Feb 2019 07:13:36 +0000 (08:13 +0100)]
Minor modernization in gmx_dump

Moved into gmx namespace. Used anonymous namespace rather than
static functions.

Removed out of date comment in registering legacy modules.

Change-Id: I8fa441ff9d776e0dbe391f21004c4bf2e56d5cf0

5 years agoMake pdb2gmx tests run in Jenkins
Mark Abraham [Mon, 11 Feb 2019 07:01:39 +0000 (08:01 +0100)]
Make pdb2gmx tests run in Jenkins

Now that the use of regex is less inefficient, these tests will run
several tens of times faster, which will make them usable in Jenkins.

Change-Id: I115ce221fb0156b08dd71d266c2d1b9cd65ba759

5 years agoFix post-submit warnings
Berk Hess [Tue, 5 Mar 2019 12:34:29 +0000 (13:34 +0100)]
Fix post-submit warnings

Change-Id: Id9d36d0fcdf0fcdb16438992f58229185942a1da

5 years agoMove nbnxm atomdata types to atomdata.h
Berk Hess [Thu, 28 Feb 2019 09:47:30 +0000 (10:47 +0100)]
Move nbnxm atomdata types to atomdata.h

This change is only code motion.

Change-Id: Ibefdd476c93ac2863dfb028fea37d4b00945055a

5 years agoTurn nbnxn_grid_t into a class
Berk Hess [Tue, 8 Jan 2019 22:03:18 +0000 (23:03 +0100)]
Turn nbnxn_grid_t into a class

Change-Id: I7dbb2268ad7ee70a49db5fd20b1938e786b1da35

5 years agoMerge "Merge branch release-2019"
Paul Bauer [Mon, 4 Mar 2019 10:25:15 +0000 (11:25 +0100)]
Merge "Merge branch release-2019"

5 years agoEncapsulate force output setup in do_force_*
Szilárd Páll [Thu, 28 Feb 2019 01:51:34 +0000 (02:51 +0100)]
Encapsulate force output setup in do_force_*

Code that sets up force buffer outputs for force-only and virial
contribution together with clearing is moved into a function that
produces a struct containing the relecant data.

Refs #2802

Change-Id: Ie04a8c8edf703610ff8e357792d6ec22ebb718ff

5 years agoMerge branch release-2019
Mark Abraham [Sat, 2 Mar 2019 03:28:49 +0000 (21:28 -0600)]
Merge branch release-2019

Change-Id: Ib12dea8e32d62a0cf12b8cab6ed8162ce6a40561

5 years agoRemove defunct mdrun options
Mark Abraham [Fri, 1 Mar 2019 23:42:49 +0000 (15:42 -0800)]
Remove defunct mdrun options

These worked with General Coupling Theory, and were
not removed alongside that code when it was removed.

Refs #1292

Change-Id: Ia795ea81e7c38ba3b895f926ce048c0ac2dfba1a

5 years agoMake OpenCL dummyKernel to require a input parameter
Jukka Maatta [Wed, 27 Feb 2019 15:03:52 +0000 (17:03 +0200)]
Make OpenCL dummyKernel to require a input parameter

This is a tentative fix for OpenCL error with mdrun on MacOS.
MacOS seems to require that kernel functions have at least one parameter.
Otherwise clBuildProgram fails with error -11.

Here dummyKernel takes an empty pointer in the definition.
We then pass an empty pointer to dummyKernel with clSetKernelArg.

Fixes #2865

Change-Id: Ib7c08eeeb2ec6d8a43bfe703cf1b273819a45a29

5 years agoClarify force buffer setup code in do_force
Szilárd Páll [Tue, 12 Feb 2019 17:38:43 +0000 (18:38 +0100)]
Clarify force buffer setup code in do_force

Refactored code and made conditionals non-nested to improve
the ease of understanding when is a common or separate buffer used for
the forces when direct virial contribution is computed.

Also add subcounter for force buffer clearing which also helps annotate
code that should be conditional on whether any of these buffers are used
to accumulate or only to copy into (e.g. with everything offloaded to a
GPU).

Refs #2802

Change-Id: I3fa5a3e4e4adf5cfe0eb417f0c1c3d0ed4a96769

5 years agoImprove documentation links
Roland Schulz [Thu, 28 Feb 2019 22:32:27 +0000 (14:32 -0800)]
Improve documentation links

Link in README (important for e.g. github) was outdated.
We didn't have a link which let the user reach the
documentation of a different version.

Change-Id: I73e570848e883c50a80f5c6070c0ba80aafb544d

5 years agoUse unique_ptr in nonbonded_verlet_t
Berk Hess [Thu, 21 Feb 2019 19:56:04 +0000 (20:56 +0100)]
Use unique_ptr in nonbonded_verlet_t

Changed nonbonded_verlet_t and all its pointer members to unique_ptr,
except for the GPU struct, because its contents is currently only
visible in the cuda/opencl part of the code.

Change-Id: I710b4db7a08ebf8d892b2dd9417ab82fbccf1ed2

5 years agoUse new/delete for t_forcerec
Berk Hess [Thu, 21 Feb 2019 20:57:42 +0000 (21:57 +0100)]
Use new/delete for t_forcerec

Added initialization in t_forcerec definition.

Change-Id: Iab82313ad92c60d35423f4955d4ab88da40694fb

5 years agoRefactor t_params to InteractionTypeParameters
Paul Bauer [Wed, 20 Feb 2019 15:25:05 +0000 (16:25 +0100)]
Refactor t_params to InteractionTypeParameters

Part of preprocessing clean up.

Refs #2833

Change-Id: I4514edde34c978c2756f1c17471e0adde0736896

5 years agoMake OpenCL dummyKernel to require a input parameter
Jukka Maatta [Wed, 27 Feb 2019 15:03:52 +0000 (17:03 +0200)]
Make OpenCL dummyKernel to require a input parameter

This is a tentative fix for OpenCL error with mdrun on MacOS.
MacOS seems to require that kernel functions have at least one parameter.
Otherwise clBuildProgram fails with error -11.

Here dummyKernel takes an empty pointer in the definition.
We then pass an empty pointer to dummyKernel with clSetKernelArg.

Fixes #2865

Change-Id: Ib7c08eeeb2ec6d8a43bfe703cf1b273819a45a29

5 years agoClean up dispersioncorrection.cpp
Berk Hess [Tue, 26 Feb 2019 20:47:30 +0000 (21:47 +0100)]
Clean up dispersioncorrection.cpp

Localized variable declarations, use const and replaced pointers
by std::vector and arrayref.
This change is only refactoring.

Change-Id: I3483e42e43a83956d353b60bfbff3dada943215d

5 years agoKeep niche CMake variables as advanced
Mark Abraham [Tue, 26 Feb 2019 21:41:26 +0000 (13:41 -0800)]
Keep niche CMake variables as advanced

Change-Id: I99781749d9f4f481f7943a27c415af6b5c4ef5bc

5 years agoFix 4 compilers warnings
Berk Hess [Wed, 27 Feb 2019 09:29:12 +0000 (10:29 +0100)]
Fix 4 compilers warnings

Change-Id: Ia68ae4b98b5ba35e49f75ec54d22ac99f3634d00

5 years agoRemove minor broken functionality in gmx bar
Mark Abraham [Tue, 26 Feb 2019 00:22:21 +0000 (16:22 -0800)]
Remove minor broken functionality in gmx bar

In the large commit 23eb71d14195e494f215bca1115bdb0b47bd5cf7, this got
broken, because the transition before GROMACS 4.6 to use a lambda that
is a vector of doubles is inconsistent with the practice of embedding
an integer in a filename.

Change-Id: I517a6c329b692d88732a9031de969a6dc77c699c

5 years agoCollect dispersion correction code
Berk Hess [Tue, 26 Feb 2019 15:01:13 +0000 (16:01 +0100)]
Collect dispersion correction code

All function related to dispersion correction calcutions have now
been moved to the new file dispersioncorrection.cpp.
This change is only code motion

Todo: Put all dispersion correction parameters in a separate struct.

Change-Id: Iaed34908f6650f0e75ec0264ae8a6fa62820604c

5 years agoAdd new line to trjconv notice to users
Mark Abraham [Tue, 26 Feb 2019 22:38:21 +0000 (14:38 -0800)]
Add new line to trjconv notice to users

This line can be the final terminal output, and it looks ugly to give
the user a prompt on the same line.

Change-Id: Ie3830ba9a86979ab60094271894ebd1651aa6f34

5 years agoCorrect grompp index file error message
Berk Hess [Tue, 26 Feb 2019 14:07:18 +0000 (15:07 +0100)]
Correct grompp index file error message

Change-Id: I6b59c6d7e1d3a33054836f16d879d40e109eb8ee

5 years agoClean up mtop pbc functions
Berk Hess [Tue, 26 Feb 2019 11:00:28 +0000 (12:00 +0100)]
Clean up mtop pbc functions

Change-Id: I049a96b3e8ab14a45f198c5f08224073316c58b5

5 years agoMoving finish_run(...) to runner.cpp
Prashanth Kanduri [Mon, 25 Feb 2019 11:59:35 +0000 (12:59 +0100)]
Moving finish_run(...) to runner.cpp

This is another patch in the cleaning efforts of sim_util.

The idea is to only have functions relevant to the force
schedules there so that it becomes easy to move it into
its own module with minimal merging pains.

Change-Id: I92d6aef805cacf7d183a5581336affd9ee8d66a7
Related: #2574

5 years agoMoving do_pbc_mtop(...) functions to pbcutils from mdlib
Prashanth Kanduri [Mon, 25 Feb 2019 16:26:50 +0000 (17:26 +0100)]
Moving do_pbc_mtop(...) functions to pbcutils from mdlib

Another patch to clean up some functions within sim_util
to ensure that it contains only those methods relevant to
force calculations.

This is one in a series of patches for introducing a separate
force_schedule module.

Change-Id: I4922f714dda3d423b14c2d1393cdac53941aa608
Related: #2574

5 years agoRefactor ExclusionBlocks
Paul Bauer [Mon, 18 Feb 2019 14:55:54 +0000 (15:55 +0100)]
Refactor ExclusionBlocks

Refs #2833

Change-Id: Iffcd5c8e862f2be7b8e05f1c45e324c76ca22f9f

5 years agoMove code out of sim_util.cpp
Mark Abraham [Fri, 22 Feb 2019 14:43:54 +0000 (15:43 +0100)]
Move code out of sim_util.cpp

This prepares for migrating do_force implementation details to
forceschedules module.

Change-Id: Ib659b84bbf0b43413202ae8ad6e7305336d90883

5 years agoDe-duplicate gmx_tmpnam and gmx_fopen_temporary
Mark Abraham [Sun, 24 Feb 2019 11:04:39 +0000 (11:04 +0000)]
De-duplicate gmx_tmpnam and gmx_fopen_temporary

Extracted a common implementation function from gmx_tmpnam and
gmx_fopen_temporary, rather than duplicate the code. Noted TODOs for
further cleanup.

Change-Id: Iaaa0c87e270c9ba8436e2672737171f96afe67c3

5 years agoMove all nbnxm pruning details into module
Berk Hess [Fri, 22 Feb 2019 21:41:01 +0000 (22:41 +0100)]
Move all nbnxm pruning details into module

Change-Id: I906624a83992d1da81e5b2aef0f73c296986842c

5 years agoHide internals of nbnxm parlist
Berk Hess [Tue, 19 Feb 2019 14:02:27 +0000 (15:02 +0100)]
Hide internals of nbnxm parlist

Introduced the PairlistSet class which holds all data related
with the nbnxm pair lists. The actual details of the lists are
no longer available outside the nbnxm module.

Change-Id: If4f36a379f2a6a133435b8ee82de8abfed5c63fd

5 years agoAdd tests for ExclusionBlocks
Paul Bauer [Mon, 18 Feb 2019 14:30:16 +0000 (15:30 +0100)]
Add tests for ExclusionBlocks

Change-Id: I35d2e38e1ae29576f559bf2a2307f3ffb2d28cbe

5 years agoFormalize dynamic pruning with GPU emulation
Berk Hess [Fri, 18 Jan 2019 08:56:36 +0000 (09:56 +0100)]
Formalize dynamic pruning with GPU emulation

To unify code paths and to enable future cleanup, dynamic pruning
is now requested with nbnxn GPU emulation. Note that dynamic pruning
is not yet implemented with GPU emulation, but GPU emulation was
already broken. Now this is noted in the known issues file.

Change-Id: I88cc149420633643d5ed03bf90106d9e26fdbfa3

5 years agoMove free-energy kernel dispatch into nbnxm module
Berk Hess [Wed, 20 Feb 2019 17:17:06 +0000 (18:17 +0100)]
Move free-energy kernel dispatch into nbnxm module

Change-Id: I57a76dedff567ad946e970a06d779f9cf8ce475b

5 years agoReorganize release notes
Paul Bauer [Wed, 20 Feb 2019 10:45:27 +0000 (11:45 +0100)]
Reorganize release notes

Move 2020 release notes to their own directory, and add note to
developers for how they should set up the headers and issue references.

Change-Id: I16b77b063777646baae45382b57a0c65cbbb7651

5 years agoMinor nbnxm cleanup
Berk Hess [Wed, 20 Feb 2019 08:42:00 +0000 (09:42 +0100)]
Minor nbnxm cleanup

Removed typedef nbnxn_search_t and unused alloc/free functions.

Change-Id: I07436fd909867d2db9ff41b741b4ebc218623858

5 years agoRefactor t_molinfo to MoleculeInformation class
Paul Bauer [Wed, 13 Feb 2019 17:46:15 +0000 (18:46 +0100)]
Refactor t_molinfo to MoleculeInformation class

Refs #2833

Change-Id: I66a6afc8ade636fb3002492e6c4e1d30ae51019a

5 years agoClean up nbnxm enums
Berk Hess [Thu, 17 Jan 2019 13:25:50 +0000 (14:25 +0100)]
Clean up nbnxm enums

Converted the nbnxm kernel and ewald excl enums to enum classes.
Added resource, kernel setup and pairlist type enums.
Also made pairlistSets_ private.

Change-Id: Ic8ff8c59cf8a72d3462b8a0f7382cd1636136c40

5 years agoTest for LINCS and SHAKE constraints.
Artem Zhmurov [Tue, 15 Jan 2019 15:04:49 +0000 (16:04 +0100)]
Test for LINCS and SHAKE constraints.

This version updates the tests making the selection of the
constraining algorithm more abstract. Makes it possible
to use the same test routines for new implementations (e.g.
CPU- or GPU-based) or (and) algorithms (e.g. LINCS or SHAKE).
Partly this is preparation for the GPU-based version of
the constraints (Refs #2816).

Change-Id: Ice7dfdcc6d86c04656b0a1dd4e328c5afdb8a263

5 years agoSimplify make_pairlist() call signature
Berk Hess [Fri, 11 Jan 2019 15:34:13 +0000 (16:34 +0100)]
Simplify make_pairlist() call signature

The nonbonded_verlet_group_t struct is no longer needed now the local
and non-local interactions always use the same kernel types.
This simplifies the make_pairlist() and put_on_grid() call signature.
Removed direct access to kernel and ewald exclusion types from outside
the nbnxn module.
Merged the pruning setup and the transfer of the pairlist to the GPU
into nbnxn_make_pairlist().
Also removed the ePBC argument from nbnxn_put_on_grid().

Change-Id: Id96d7e5aa6ce846e9d38614f7edcdced89687799

5 years agoAdd havePPDomainDecomposition()
Berk Hess [Tue, 22 Jan 2019 13:29:15 +0000 (14:29 +0100)]
Add havePPDomainDecomposition()

When using 1 PP and 1 PME rank, non-local code paths were called
for with GPUs. Now the DOMAINDECOMP(cr) conditional for the paths
has been replaced by havePPDomainDecomposition().

Change-Id: I1b7036b0759a316c68d5c00bd5814b067c9fd9cd

5 years agoMerge "Merge branch 'release-2019' into master"
Paul Bauer [Wed, 20 Feb 2019 18:09:31 +0000 (19:09 +0100)]
Merge "Merge branch 'release-2019' into master"

5 years agoRefactor DLB region handling
Berk Hess [Fri, 25 Jan 2019 09:58:28 +0000 (10:58 +0100)]
Refactor DLB region handling

The DLB region was controlled with two clunky enums and several
separate functions. These are now replaced by a single class that
handles the conditionals and has the open/close functions as methods.

This change also disabled the DLB regions with 1 PP and 1 PME rank,
since DLB is not applicable in this case.

Change-Id: I8a375a46b855ec1f1fcdf6573f44a3bf553410b9

5 years agoMerge branch 'release-2019' into master
Paul Bauer [Wed, 20 Feb 2019 12:50:49 +0000 (13:50 +0100)]
Merge branch 'release-2019' into master

Kept the way topologyinformation was removed from solvate and
insert_molecules in 2019.

Resolved Conflicts:
cmake/gmxVersionInfo.cmake
docs/CMakeLists.txt
docs/user-guide/mdp-options.rst
src/gromacs/gmxpreprocess/insert-molecules.cpp
src/gromacs/gmxpreprocess/solvate.cpp
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel_utils.cuh
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_kernel_utils.clh
src/gromacs/mdlib/sim_util.cpp
src/gromacs/trajectoryanalysis/topologyinformation.cpp

Change-Id: I2576133c4bc7a3c55cedb29e9832bb5afa8fe76f

5 years agoFix release notes formatting
Paul Bauer [Fri, 15 Feb 2019 14:00:29 +0000 (15:00 +0100)]
Fix release notes formatting

Change-Id: Icea8712088068c14dbfcb20e403dd68f9aa11227

5 years agoPrepare for 2019.2
Paul Bauer [Wed, 13 Feb 2019 12:54:24 +0000 (13:54 +0100)]
Prepare for 2019.2

Reset doi strings.

Change-Id: I497ce4e5afe3a0f776dfba107e45d74bc51d4cc8

5 years agoPBC setup for GPU is moved into pbcutils.
Artem Zhmurov [Tue, 15 Jan 2019 16:11:14 +0000 (17:11 +0100)]
PBC setup for GPU is moved into pbcutils.

The CUDA device function setPbcAiuc is moved from listed-forces
to pbcutils so that other parts of the code can use it.

Change-Id: I8bbbadc95a6bc72f9abeba481981b66b192a2804

5 years agoAdd GMX_OCL_SHOW_DIAGNOSTICS env option
Roland Schulz [Sat, 28 Apr 2018 01:20:33 +0000 (18:20 -0700)]
Add GMX_OCL_SHOW_DIAGNOSTICS env option

Change-Id: Ie886544d40ff78fccd301b87d610ae8c42483b14

5 years agoImprove libstd++ handling
Roland Schulz [Mon, 28 Jan 2019 04:49:02 +0000 (20:49 -0800)]
Improve libstd++ handling

clang and icc use libstdc++ under Linux by default.

Previously such dependencies were handled differently than other
dependencies, in that we relied on the compiler autodetection, and
required the user to use the compiler flags to specify a proper
version.

Now we discover libstdc++ using cmake by finding g++, unless the user
or the toolchain they chose have already managed which gcc toolchain
to use. Then the found version is provided to the compiler with the
proper flags.

This has the advantages:
- Makes it easy for us to check the required version is used.
  Version check for libstdc++ 5 for C++14 is added.
- Makes it easy for the user to provide the correct version
  because standard cmake variables work.
- Makes build reproducible because the instance of libstdc++ used
  is constant (e.g. cached via GMX_GPLUSPLUS_PATH, or controlled
  by the toolchain, but not if the user chose non-reproducibility
  by setting CXXFLAGS environment variables). Previously, the
  auto-detection depended on the PATH environment variable at
  the time of build (not the time of the cmake run). Thus
  rebuilding with the same cache file was not guranteed to
  give the same result. It could cause cause confusing link
  errors if parts were rebuilt differently.

Also managed libc++ for clang-analyzer builds a bit better.

Fixes #2842

Change-Id: I855e16a6d4bd670cfb7acd6ea5c740f3a1b226bf

5 years agoPrecision fix for rescbt code.
David van der Spoel [Wed, 13 Feb 2019 19:13:58 +0000 (20:13 +0100)]
Precision fix for rescbt code.

The compute_restangles function was not sufficiently
precise. In fact it return completely different
results in single and double precision. By making part
of the function work in double the issue is fixed.

New tests added.

Part of #2795
Fixes #2862

Change-Id: Iad7f2bc45be996ba3e16358aab838c5427b157b8

5 years agoImprove GPU target compatibility error message
Szilárd Páll [Fri, 15 Feb 2019 15:10:38 +0000 (16:10 +0100)]
Improve GPU target compatibility error message

Change-Id: I53bff22da766c2e8bc083ca6c0e5a08d7ed3b408

5 years agoUse enum class for nbnxm locality
Berk Hess [Tue, 15 Jan 2019 08:35:04 +0000 (09:35 +0100)]
Use enum class for nbnxm locality

Converted the interaction and atom locality enum to enum class.
This exposed and fixed a few mixings of the two enums.
Move some files into the Nbnxm namespace.
Add local/non-local organization to the GPU timers.

Note that the use of the Nbnxm namespace outside the nbnxm module
is only temporary. This should all be replaced by methods.

Change-Id: I3c891b3b2b3e14d8175b63f4191f365a5cd64b18

5 years agoExtract nbnxm grid.h and pairlistwork.h
Berk Hess [Tue, 8 Jan 2019 15:09:10 +0000 (16:09 +0100)]
Extract nbnxm grid.h and pairlistwork.h

Change-Id: Ia0da75a21e56d7e473f868cc3758f415ac9e4eb9

5 years agoFix compiler warnings
Berk Hess [Sat, 16 Feb 2019 17:24:13 +0000 (18:24 +0100)]
Fix compiler warnings

Change-Id: I179eb5a53b14d2bcdc340468d2215a44fcd6a3a4

5 years agoMove nbnxm details from sim_util.cpp to module
Berk Hess [Thu, 10 Jan 2019 09:34:44 +0000 (10:34 +0100)]
Move nbnxm details from sim_util.cpp to module

The removes most nbnxm implementation details from sim_util.cpp.
The rest will be done when making nbnxn a class.

Change-Id: Iba411ce87b431a3b9aad656a22dd9114d5854546

5 years agoMove nbnxn files to nbnxm directory
Berk Hess [Fri, 4 Jan 2019 10:54:27 +0000 (11:54 +0100)]
Move nbnxn files to nbnxm directory

This change moves all files related to the nbnxn code to an new
nbnxm subdirectory. This change is only code motion and file renaming.
This is also the start of a renaming from nbnxn to nbnxm, which is
a more correct name, since the i- and j-cluster size can be different.
All nbnxn setup code in forcerec.cpp is moved to nbnxm_setup.cpp.
Removed nbnxn_ and _simd... pre- and postfixes from most files.
Renamed nbnxn_search.cpp to pairlist.cpp and nbnxn_search.h to
nbnxm_pairlistset.h. Although this is currently somewhat inconsistent,
future refactoring will make the contents consistent.
Renamed nbnxn_utility.h/cpp to nbnxm_geometry.h/cpp.

Change-Id: I39c17769c566f78b84211510c5ac17793fd131fa

5 years agoTests of restrained listed potentials.
David van der Spoel [Mon, 11 Feb 2019 19:25:50 +0000 (20:25 +0100)]
Tests of restrained listed potentials.

TODO:
- Tests of tabulated potentials.
- Tests of NMR related potentials.
- Tests of restrained angles.

Part of #2795

Change-Id: I27ebc7a5a8805cc92a8e00deb83e36ca3cd87a78

5 years agoFix memory leaks in editconf
Paul Bauer [Thu, 14 Feb 2019 16:07:59 +0000 (17:07 +0100)]
Fix memory leaks in editconf

Fixed all leaks found by valgrind.

Change-Id: I87c02051e3be772c9706c0995fc0e94bcebd7add

5 years agoExtend GpuEventSynchronizer to allow on-device sync
Szilárd Páll [Sat, 10 Nov 2018 20:16:57 +0000 (21:16 +0100)]
Extend GpuEventSynchronizer to allow on-device sync

Added a method that allows inserting a dependency on the synchronizer's
even into a stream passed.

Change-Id: I982ad99b594aab6a6042749260479debb12042a5

5 years agoFixed misleading wording for membed option.
Semen Yesylevskyy [Fri, 15 Feb 2019 11:15:26 +0000 (13:15 +0200)]
Fixed misleading wording for membed option.

It is currently wrritten "This approach is unsuitable" but it is only
unsuitable from the code organization point of view, not for conceptual
reasons.

Change-Id: I504bb2a78bdb85cc41aa67b492e2a0fac828d8e4

5 years agoAdd new suggested external trajectory analysis tool
Semen Yesylevskyy [Fri, 15 Feb 2019 11:00:18 +0000 (13:00 +0200)]
Add new suggested external trajectory analysis tool

Also reorder the  list alphabetically, to avoid appearance
of suggesting a preference.

Change-Id: I474d6064e8b119429e7a91e7a804bbe386339e05

5 years agoFix memory issues in preprocess
Paul Bauer [Tue, 12 Feb 2019 09:12:22 +0000 (10:12 +0100)]
Fix memory issues in preprocess

Refs #2833

Change-Id: Ic4118958d98446d3a164fca10c5618ad0da9bed6

5 years agoRefactor vsite topology
Paul Bauer [Wed, 13 Feb 2019 07:49:20 +0000 (08:49 +0100)]
Refactor vsite topology

Refs #2833

Change-Id: Ibde09f829a72cc5e6467e15cf8ee7e3c183a30ad

5 years agoVersion 2019.1
Paul Bauer [Wed, 13 Feb 2019 12:49:51 +0000 (13:49 +0100)]
Version 2019.1

Updated regression test hash.
Set DOI strings.

Change-Id: If56a4e81c853af49ebe6a908bb9cc8883d24a7bc

5 years agoImproved diagnostics when PME cannot run on GPUs
Mark Abraham [Thu, 14 Feb 2019 16:01:25 +0000 (17:01 +0100)]
Improved diagnostics when PME cannot run on GPUs

Fixes #2789, #2823

Change-Id: Iff7609a3774c11329d36bd8557b741a4d29f7c5a

5 years agoFix tune_pme
Paul Bauer [Thu, 14 Feb 2019 15:38:09 +0000 (16:38 +0100)]
Fix tune_pme

There was an issue with the file option for the tpr file being empty
that caused a segmentation fault.

Fixes #2827

Change-Id: I2702898d071d6e9325fa2e7ebb223b9043b7109e

5 years agoFix mass Delta H double counting
Berk Hess [Wed, 13 Feb 2019 08:55:35 +0000 (09:55 +0100)]
Fix mass Delta H double counting

With separate mass lambda parameters, the perturbed mass contribution
to Delta H (not dH/dlambda) was double counted. This was due to an
incorrect fix for issue #2703 for missing Delta H contribution.

Refs #2703
Fixes #2849

Change-Id: I1349260e1e90a17a6b7dbe0d239d9474dcfa928c

5 years agoExtend performance considerations on bonded offload
Szilárd Páll [Fri, 15 Feb 2019 01:09:39 +0000 (02:09 +0100)]
Extend performance considerations on bonded offload

Refs #2793

Change-Id: I4a8ae8554cf2aad540eb4eb485898f8cabeb3966

5 years agoFix use of selections referring to index groups
Mark Abraham [Tue, 29 Jan 2019 11:56:31 +0000 (12:56 +0100)]
Fix use of selections referring to index groups

Selections that refer only to groups in an index file do not require a
topology file. This (and other behaviours) was inadvertently broken
by the wrong implementation of the default constructor, because that
constructor is used in setting up the analysis environment.

The default constructor of TopologyInformation should establish the
intended invariant, namely that until a topology is loaded, topology
getters should return nullptr.

Fixed that constructor, and fixed the unit test that verifies that
behaviour. Since that test was added at the same time as a change to
the implementation of TopologyInformation in commit 264458c9, the
broken invariant wasn't noticed.

Added a test also to gmx rdf that verifies that the selection
behaviour is fixed.

Fixes #2847

Change-Id: I2149616e0248c6d5cdd5657a8292d2c3346614b9

5 years agoRevert changes to implementation of insert-molecules and solvate
Mark Abraham [Wed, 13 Feb 2019 14:24:04 +0000 (15:24 +0100)]
Revert changes to implementation of insert-molecules and solvate

This is a partial reversion of 5181f8d1, which made an inappropriate
dependency from preparation tools to TopologyInformation, which is
intended for analysis tools. This is needed in order to fix some
actual analysis tools that were broken by related changes to
TopologyInformation.

Unfortunately in 5181f8d1 readConformation was replaced with
TopologyInformation, and the former is no longer available. Instead,
readConfAndTopology is used in the same way that it was originally
used to implement readConformation. So the behaviour is reverted
even though the code looks different.

Refs #2847, #1862

Change-Id: I6e4900eea38b5c2e1b85b0d48427dabe26b09f9d

5 years agoImproved electric-field docs
Mark Abraham [Wed, 13 Feb 2019 17:44:26 +0000 (18:44 +0100)]
Improved electric-field docs

Change-Id: Ib1c6aa260f54a3933b1d80e375dc6ee007317473

5 years agoDisable instruction fusion on Power8
Szilárd Páll [Thu, 7 Feb 2019 13:12:17 +0000 (14:12 +0100)]
Disable instruction fusion on Power8

The -mpower8-fusion flag seems to be the source of incorrect code; not
confirmed, but likely a codegen issue that also affects Power9 with the
similar flag used.

Fixes #2747 #2746 #2734

Change-Id: I56f50e54db47f4fe30c42488f4c4f79ac474518a

5 years agoMinor refactoring in mdrunnner
Szilárd Páll [Sat, 10 Nov 2018 20:43:49 +0000 (21:43 +0100)]
Minor refactoring in mdrunnner

Simplified some runner.cpp code to reduce clutter and moved a few
variable declarations away from the beginning of the function.

Change-Id: I818196e3b775077f648415ed6fbbd6d2eb91521a

5 years agoRefactor rtp renaming
Paul Bauer [Tue, 12 Feb 2019 10:42:13 +0000 (11:42 +0100)]
Refactor rtp renaming

Refs #2833

Change-Id: I2407045adadb3b84810fb6bfd83d5b8e9daba6f5

5 years agoMake EnergyOutput wrapper class
Mark Abraham [Wed, 6 Feb 2019 09:35:55 +0000 (10:35 +0100)]
Make EnergyOutput wrapper class

Eventually we want a proper class for the energy accumulation and
output behaviours. In the meantime, this hides much about t_mdebin and
t_ebin from integrators, so that we can refactor with minimal
disruption to other work.

Made t_mdebin private to the new EnergyOutput implementation file.
Used bool rather than gmx_bool in the interface of EnergyOutput.
Noted several TODOs for improvements to code structure.

Removed dependency on ebin.h and enxio.h from the new header, so
various other places had to declare their own dependencies.

Change-Id: If09b2c82dd8c139c76cb5fc453d556c26a5eee89

5 years agoIgnore Visual Studio Code metadata.
Artem Zhmurov [Wed, 13 Feb 2019 10:14:47 +0000 (11:14 +0100)]
Ignore Visual Studio Code metadata.

Change-Id: Ic03e22eb3246d7d29c4063601cc86cd6a721e81d

5 years agoReduce coupling to paddedvector.h
Mark Abraham [Tue, 12 Feb 2019 14:57:08 +0000 (15:57 +0100)]
Reduce coupling to paddedvector.h

As we've improved this infrastructure, we no longer use PaddedVector
in so many places.

Change-Id: I996433f4e0f82b00ab579e158f3d71dac9daae0f

5 years agoMove simulated tempering default setting
Paul Bauer [Tue, 5 Feb 2019 14:55:55 +0000 (15:55 +0100)]
Move simulated tempering default setting

Setting the default value for the simulated tempering when nstexpanded
was not specified in the mdp file was done before the values for the
temperature coupling are known. Moved this to a new location where the
value is known instead.

Added message to user in this case.

Refs #2754

Change-Id: I194829d5a817019da6d63a075e0dd7f4af8a4735

5 years agoMinor refactor of gpuid / task mapping parsing
Szilárd Páll [Sat, 10 Nov 2018 20:43:49 +0000 (21:43 +0100)]
Minor refactor of gpuid / task mapping parsing

Added two separate functions that implement the user-provided GPU ID
string and task mapping parsing, respectively. The separation allows the
two to reflect the slight difrerence in requirements on the input (and
allow these to change in the future). Unit tests were updated as well as
change to explicitly reflect this difference between the -gpuid and
-gputasks strings.

Change-Id: I71144a810e38d2f45e965731e245c868d1d35332

5 years agoQuiet clang warning
Mark Abraham [Tue, 12 Feb 2019 16:35:29 +0000 (17:35 +0100)]
Quiet clang warning

Change-Id: I48358616bd1c3adf0a8d5c53451ec877a8067ed8

5 years agoRefactor special bonds
Paul Bauer [Tue, 12 Feb 2019 10:05:07 +0000 (11:05 +0100)]
Refactor special bonds

Refs #2833

Change-Id: I2e093d7fb5fa429f969a78eef7da639af3f7cd1e

5 years agoRefactor t_rbonded and t_rbondeds
Paul Bauer [Mon, 4 Feb 2019 11:47:11 +0000 (12:47 +0100)]
Refactor t_rbonded and t_rbondeds

Again, replaced raw allocations with std::container and changed function
signatures and loops to use new behaviour.

Refs #2833

Change-Id: I620866b823d9839cafafe357352e3e7a49033a69

5 years agoRefactor t_restp
Paul Bauer [Mon, 4 Feb 2019 09:29:17 +0000 (10:29 +0100)]
Refactor t_restp

Replaced raw allocations with std::containers.

Refs #2833

Change-Id: Ie74708fdf04082f37e69e000aef8f5bd7f577dba

5 years ago3x3 matrices
Christian Blau [Tue, 15 Jan 2019 12:33:37 +0000 (13:33 +0100)]
3x3 matrices

Matrices with contiguous, aliged memory as C-style "matrix" replacement

Matrix elements are accessed efficiently with bracket notation m(x,y)
or, for compability reasons, with m[x][y] (though deprecated)

Matrices manage their own memory, but provide an implicit conversion to
views and const views on their data which should be used instead of a
copy.

Arithmetic operations will follow in a later patch.

refs #2834

Change-Id: Ia96037384d2e1d774559fbcac97f420c58106625

5 years agoRemove gmx::Regex
Mark Abraham [Sun, 10 Feb 2019 23:01:17 +0000 (00:01 +0100)]
Remove gmx::Regex

We now always use std::regex. The wrapper type added the value of
standardizing regex flags, which was useful while we had to use only
the subset that was usable on all platforms. But the wrapper type made
it harder to use than needed, because e.g. they could not be stored in
a container. Removing gmx::Regex will create new opportunities.

Refs #2881

Change-Id: I97974527052b52c17bb26304b214e8b152dafb4b

5 years agoRemove buggy debug output.
David van der Spoel [Mon, 11 Feb 2019 21:16:48 +0000 (22:16 +0100)]
Remove buggy debug output.

Code leftover from testing the SW model with model specifics
hardcoded.

Part of #2774

Change-Id: Ida59dbe1b23672d377e834f199c567d4a51aa0b9

5 years agoTests for polarization functions.
David van der Spoel [Sun, 3 Feb 2019 07:49:19 +0000 (08:49 +0100)]
Tests for polarization functions.

Part of #2795

Change-Id: I30d0c67bac3e16412ca2afaa12ea7e28e8c01f6e

5 years agoview on MultiDimArray
Christian Blau [Tue, 5 Feb 2019 18:12:14 +0000 (19:12 +0100)]
view on MultiDimArray

Access the view and a const view on a MultiDimArray.

refs #2834

Change-Id: Ia82983ac9e3bc8edebc53a1c9f3335101ad4c704

5 years agoRefactor t_hack to MoleculePatches
Paul Bauer [Fri, 1 Feb 2019 13:48:52 +0000 (14:48 +0100)]
Refactor t_hack to MoleculePatches

Replaced raw allocations with std::containers. Changed loops and
dependent functions to use new format.
Used hopefully better names for types and variables.

Part of preprocessing clean up.

Refs #2833

Change-Id: I518f5b0d5a7f20cbf8bf3636e88084c1daaab5d9

5 years agoRemove EmptyArrayRef
Roland Schulz [Fri, 8 Feb 2019 21:45:15 +0000 (13:45 -0800)]
Remove EmptyArrayRef

Make it more aligned with std::span.
Almost everywhere it wasn't needed anyhow.
Only exception: ternary conditional operator. But there the type
was already explict in all but one case and that one case
(src/gromacs/domdec/distribute.cpp) was confusing because of
multiple implicit conversions.

Related #2859

Change-Id: I0b61abdc2e60285a7ca17e3bdc7e53cb72c5cf6a

5 years agoFix bug in residue type reading
Paul Bauer [Wed, 6 Feb 2019 12:47:19 +0000 (13:47 +0100)]
Fix bug in residue type reading

I used the wrong comparison in a recent change, fixed by properly
checking iterators against each other.

Change-Id: Ia077899e84c7af779b873d183d49236d92296dd3

5 years agoUse more vector in selection index groups structs
Kevin Boyd [Tue, 5 Feb 2019 04:20:15 +0000 (23:20 -0500)]
Use more vector in selection index groups structs

Removed unused functions

Change-Id: If8a90ef705c3a9c9ab641ddbb64d17607d7a610f

5 years agoDisallow rerun with perturbed masses or constraints
Berk Hess [Fri, 8 Feb 2019 09:57:48 +0000 (10:57 +0100)]
Disallow rerun with perturbed masses or constraints

Since rerun no longer integrates, free-energy contributions due to
changing masses and constraints are no longer computed. Now rerun
exits with a fatal error when such a system is provided.

Fixes #2849

Change-Id: Ic1550fce22f68c573b52d6895e1e61398b671e51

5 years agoChange nightly matrix label to not use hwloc
Paul Bauer [Fri, 8 Feb 2019 15:13:46 +0000 (16:13 +0100)]
Change nightly matrix label to not use hwloc

Done because the 1310 agent has issues with the installation.

Change-Id: I3bbe1b15bf4e1c53a12a4fdac2b759726172965a

5 years agoFurther increase of tolerance for angles.
David van der Spoel [Fri, 8 Feb 2019 22:08:22 +0000 (23:08 +0100)]
Further increase of tolerance for angles.

Part of #2795

Change-Id: I0d698b6c079cfd008a5419ac2bb7de54ea6887a4

5 years agoIncreased tolerance for angle functions.
David van der Spoel [Fri, 8 Feb 2019 16:04:47 +0000 (17:04 +0100)]
Increased tolerance for angle functions.

Increased the tolerance for urey-bradley and
quartic angles some more.

Part of #2795.

Change-Id: I929957f1a8de7ad78d174cc613c544234f1450d0