alexxy/gromacs.git
5 years agoMove nbnxm domainSetup to GridSet
Berk Hess [Mon, 18 Mar 2019 10:13:56 +0000 (11:13 +0100)]
Move nbnxm domainSetup to GridSet

The domain setup belongs with GridSet and moving it there reduces
the dependency of the pairlist construction function on PairSearch.
Removed PairSearch as an argument to those constuction functions.
Also moved SearchCycleCounting out of PairSearch.

Change-Id: I764868f5e7a002cf435ce74d428c95cf1e9dac23

5 years agoExtract nbnxm PairlistSets
Berk Hess [Mon, 18 Mar 2019 12:30:47 +0000 (13:30 +0100)]
Extract nbnxm PairlistSets

The class PairlistSets was part of nonbonded_verlet_t. This change
extracts it, moves it to pairlistsets.h and hides it from the rest
of the code. This requires a few more, trivial, methods in
nonbonded_verlet_t to operate on PairlistSets.
Also renamed the pairlist params struct to PairlistParams and
moved it to separate include and source files.

Change-Id: I8e728663e145ce1f8504ae7302d7208344cc7cf3

5 years agoMove DomdecOptions into its own header
Mark Abraham [Wed, 13 Mar 2019 09:26:21 +0000 (10:26 +0100)]
Move DomdecOptions into its own header

This reduces compilation coupling and prepares for implementing proper
Options support into mdrun. Moved content into gmx namespace and
replaced gmx_bool. Renamed nr enum members to Count for future
compatibility with the new enumeration helpers.

Refs #2877

Change-Id: Ib5f5889111f858579f594f4c76f3aa8c222403b2

5 years agoGPU naming conventions
Artem Zhmurov [Tue, 19 Mar 2019 12:59:57 +0000 (13:59 +0100)]
GPU naming conventions

In GPU programing, it is convenient to indicate what memory space
the pointer points to. This is often done by adding prefixes to the
pointers, which is now indicated in the developers manual.

Refs #2053.

Change-Id: Id39ad0b9c5876e4362fa4e261d0c011125dc380a

5 years agoFix nbnxm OpenCL with cluster size 4
Berk Hess [Wed, 27 Mar 2019 10:17:26 +0000 (11:17 +0100)]
Fix nbnxm OpenCL with cluster size 4

Fixed the nbnxm OpenCL setup with cluster size 4 (for Intel IGPUs)
by using the appropriate constexpr to set the clustersize.
Also renamed PairlistType::Hierarchical8x8 to HierarchicalNxN.

Fixes #2906

Change-Id: Ifc373d04481eb7f56211d192014dfef218e56c03

5 years agoMoving put_atoms_in_box_omp() to pbc.h
Prashanth Kanduri [Tue, 19 Mar 2019 15:37:46 +0000 (16:37 +0100)]
Moving put_atoms_in_box_omp() to pbc.h

This is another patch in the cleaning efforts of sim_util.
It finally removes sim_util.h

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.

Related: #2574

Change-Id: Ib0c2dbc21bd31ee272888d3fa25a3c0ce65b5478

5 years agoGetting rid of use_GPU(nbv) function
Prashanth Kanduri [Thu, 21 Mar 2019 17:42:17 +0000 (18:42 +0100)]
Getting rid of use_GPU(nbv) function

Using the useGPU() function build within nonbonded_verlet_t
struct

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.

Related: #2574

Change-Id: I0e0d1dc74aa18032dfb4ab84f3badbb83ef0365b

5 years agoMove stat function declarations to a new stat.h
Prashanth Kanduri [Thu, 21 Mar 2019 18:23:00 +0000 (19:23 +0100)]
Move stat function declarations to a new stat.h

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: I8decd93e02cfdda79f131171d2b91be095cc77e0
Related: #2574

5 years agoSkip PBC calculation when there are no listed forces
Szilárd Páll [Thu, 14 Mar 2019 11:56:58 +0000 (12:56 +0100)]
Skip PBC calculation when there are no listed forces

Change-Id: I3857f2e55bdd052d508acc026b6f77ee5dbc2546

5 years agodo_force_cutsVERLET cleanup
Szilárd Páll [Mon, 25 Mar 2019 20:17:24 +0000 (21:17 +0100)]
do_force_cutsVERLET cleanup

- removed unused PME cycles returned from do_force_lowlevel
- removed unused variables
- localized variables only used in nbnxn_put_on_grid

Change-Id: I1b36df6c0a0c36962e764fcd252f1c9c3f71821b

5 years agoConvert nbnxn_pairlist_set_t to class PairlistSet
Berk Hess [Fri, 15 Mar 2019 21:10:08 +0000 (22:10 +0100)]
Convert nbnxn_pairlist_set_t to class PairlistSet

This change is only refactoring.
Two implementation details have changed:
The CPU and GPU pairlist objects are now straight lists instead
of array of pointer to lists. This means that the pairlist objects are
no longer allocated on their respecitive thtreads. But since the lists
have buffers to avoid cache polution and the actual i- and j-lists are
llocated thread local, this should not affect performance
ignificantly.
The free-energy lists are now only allocated with perturbed atoms.

Change-Id: Ifc76608215518edfc61c0ca8eb71ea2a928cf57c

5 years agoRemove unused headers
Artem Zhmurov [Mon, 25 Mar 2019 14:00:16 +0000 (15:00 +0100)]
Remove unused headers

These headers contain integrator_t definition, which is no longe in use.

Change-Id: Ic4acd4e238aa0e06301162001588aaf7f0ad6890

5 years agoSupport ArrayRef of EnumerationArray
Mark Abraham [Wed, 20 Mar 2019 16:03:37 +0000 (17:03 +0100)]
Support ArrayRef of EnumerationArray

Also updated the example and named FooStrings variables correctly.
Introduced keysOf free function so that it is easy to write code that
clang-tidy does not warn about.

Change-Id: I51ee8adb1b13d771e7b1e8cd75f263bc6e921ffb

5 years agoRemove uses of std::iterator mix-in.
M. Eric Irrgang [Sat, 23 Mar 2019 12:00:07 +0000 (15:00 +0300)]
Remove uses of std::iterator mix-in.

std::iterator<> is used as a mix-in (via CRLT) to inherit compatibility
with std::iterator_traits<>. However, inheriting from std::iterator<>
is unnecessary, may hurt clarity, and is deprecated (as of C++17).

Instead, explicitly express the member types that are necessary for
compatibility with std::iterator_traits<>

Change-Id: I32cdd97681a73cdf7beec257635f9132ec67de03

5 years agoConvert gmx dump to module
Mark Abraham [Sun, 24 Feb 2019 07:15:57 +0000 (08:15 +0100)]
Convert gmx dump to module

Used Options and more std::string.

Minor fixes and improvements to text. Removed the report of the known
bug, replacing it with a TODO.

Added eftRunInput to the filename option types understood by
FileNameOption machinery, so that tools that only operate on .tpr
files work properly. This is then used for gmx dump -s.

Refs #2877

Change-Id: I5bb1c73c39a4cdd820735f894d4cb55d171afd48

5 years agodensityfitting - serializer for mrc header data.
Christian Blau [Thu, 14 Mar 2019 12:57:04 +0000 (13:57 +0100)]
densityfitting - serializer for mrc header data.

Serializes mrc header data.

Change-Id: I6160eba199cb2e355f7cf4f65d5729346735cc92

5 years agoAdd simple tests for symbol table
Paul Bauer [Tue, 19 Mar 2019 14:36:37 +0000 (15:36 +0100)]
Add simple tests for symbol table

Refs #2833

Change-Id: I0e69a0b6c5410c56cb2b62a9320814f93cd2f23c

5 years agoReorder PBC setup in do_force_lowlevel
Szilárd Páll [Tue, 12 Feb 2019 17:40:19 +0000 (18:40 +0100)]
Reorder PBC setup in do_force_lowlevel

Eliminated redundant set_pbc() call so now there is always a single call
to the DD-optimized set_pbc_dd() called only when needed with clarified
conditionals for the different use cases (listed forces and Group
scheme).

Also improve the t_forcerec.bMolPBC documentation.

Change-Id: I8a0782bf81e05f1c7221ee5f0da42bf5e4d24ac9

5 years agoMove around PairSearch code
Berk Hess [Fri, 15 Mar 2019 09:36:13 +0000 (10:36 +0100)]
Move around PairSearch code

Renamed internal.h to pairsearch.h.
Moved PairSearch member functions to new file pairsearch.cpp.

TODO: Remove dependencies of pairlist.cpp on Pairsearch.
TODO: Make all PairSearch functions in pairlist.cpp members.

Change-Id: I21e3f93fa69a5ee0ffd00faf01a7d0267d7e79b9

5 years agoClean up mdrun help description
Mark Abraham [Sun, 17 Mar 2019 15:39:41 +0000 (16:39 +0100)]
Clean up mdrun help description

Details about how unix signals are implemented can go in the user
guide.

The nice level does not actually change with whether mpirun is used,
so we should not say so.

Mentions of "experimental" features that have been in the code for a
decade don't belong here.

Fixed a repeated word.

Preparation for #2877

Change-Id: Ib68ab15717e52a9155be869581c18ba21513f067

5 years agoImprove mimic module
Mark Abraham [Wed, 20 Mar 2019 09:16:54 +0000 (10:16 +0100)]
Improve mimic module

File naming did not conform to style. Improved some include structure. This
module no longer needs to depend on gmxpreprocess.

Preparation for #2877

Change-Id: I0a3a4e72828f3e47f28d0d7420e5c65e580d5428

5 years agoAdd simple test to preprocess bond atom type
Paul Bauer [Tue, 12 Mar 2019 16:21:45 +0000 (17:21 +0100)]
Add simple test to preprocess bond atom type

Refs #2833

Change-Id: I401678c4d5f266794c2018db3f4168432d33450d

5 years agoAdd test for string comparison
Paul Bauer [Fri, 15 Mar 2019 15:37:37 +0000 (16:37 +0100)]
Add test for string comparison

Change-Id: If42579ceb2d98d270389d4e401f504955df73761

5 years agoAdd support for serializing 32-bit integers
Mark Abraham [Tue, 19 Mar 2019 02:55:02 +0000 (03:55 +0100)]
Add support for serializing 32-bit integers

Some file formats explicitly require this size, which we should
support explicitly. Note that C++ requires that int be at least 16
bits. In practice on current systems it is always 32 bits, but being
explicit might help future portability if any architecture would use
64-bit int.

Also added some support for unsigned 32- and 64-bit integers where
I saw it was missing and might be useful.

Added some test coverage where it already exists.

Refs #1877

Change-Id: I05efd7d4ba07b695fc4ed7c9d9cac8738873a3a5

5 years agodensityfitting - density file format (mrc) header.
Christian Blau [Fri, 8 Mar 2019 15:06:01 +0000 (16:06 +0100)]
densityfitting - density file format (mrc) header.

Implements mrc/cc4/map format file headers as decribed in
"EMDB Map Distribution Format Description Version 1.01 (c)
emdatabank.org 2014"

Reading and writing is part of a follow-up patch.

refs #2282 and #1877

Change-Id: Ifd43cedb137c0beeb320e1299df8bae9916c8ea8

5 years agoFix case insensitive string comparison
Paul Bauer [Fri, 15 Mar 2019 15:27:37 +0000 (16:27 +0100)]
Fix case insensitive string comparison

Changed instances of string comparison back to use same order as in
original code, and revert one change for comparison over length to
original code.

Change-Id: I07c3ccce93c37ff897365d80c0ff384e29aa6322

5 years agoFix clang warning
Mark Abraham [Tue, 19 Mar 2019 12:06:23 +0000 (13:06 +0100)]
Fix clang warning

Change-Id: I905b387692bfa606da0db74bbb8aee42ddc24ab7

5 years agoReduce dependencies of nbnxn_atomdata_t
Berk Hess [Fri, 15 Mar 2019 09:26:02 +0000 (10:26 +0100)]
Reduce dependencies of nbnxn_atomdata_t

Now the nbnxn atomdata module no longer depends on PairSearch,
but on GridSet instead.
Also moved the cycle counting to nbnxm.cpp.

Change-Id: Ibb1af368e38e84459c77f41fa867c4fc18dc5756

5 years agoUpdate ElectricField module
Mark Abraham [Mon, 18 Mar 2019 13:40:52 +0000 (14:40 +0100)]
Update ElectricField module

As we use this as an example module, we should have it up to date with
style and language features, etc.

Change-Id: I2e350a2c7f9f78840be433ecd81f8b6b24f8209d

5 years agoMove initialize_lambdas(...) to state
Prashanth Kanduri [Thu, 28 Feb 2019 15:58:00 +0000 (16:58 +0100)]
Move initialize_lambdas(...) to state

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: I270e75126b6ec3aa3cf194e92e7589d713ac6bcd
Related: #2574

5 years agoSimple tests for C-style string comparison
Paul Bauer [Mon, 18 Mar 2019 13:00:40 +0000 (14:00 +0100)]
Simple tests for C-style string comparison

Those tests are meant to be used to guide reimplementation of the
C-style functions in C++ and should be extended for additional functions
that are replaced.

Change-Id: Icb12192c676bd5d24110000668790e4193a9a268

5 years agoMoving do_constraints_first(...) to constr.h
Prashanth Kanduri [Wed, 27 Feb 2019 11:12:44 +0000 (12:12 +0100)]
Moving do_constraints_first(...) to constr.h

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: Ic311bd9afe8baddc0589f368ebf464f1699589dc
Related: #2574

5 years agoChange nbnxn_search to class PairSearch
Berk Hess [Wed, 13 Mar 2019 21:27:25 +0000 (22:27 +0100)]
Change nbnxn_search to class PairSearch

Changed some nbnxm functions to methods located in new file nbnxm.cpp
to keep the internals of the nbnxm module private and hidden.

TODO: Rename internal.h to pairsearch.h
TODO: Move Pairsearch definitions to new file pairsearch.cpp
TODO: Rename nonbonded_verlet_t to Nbxnm

Change-Id: I8fa5d3b88ed453598cbed3ab4b8548258f851e20

5 years agoExtract DomainSetup from nbnxn_search
Berk Hess [Wed, 13 Mar 2019 12:55:33 +0000 (13:55 +0100)]
Extract DomainSetup from nbnxn_search

Change-Id: I1a46c543e063b250e27b3759ddc050a46fc6692d

5 years agoChange nbnxm macros to constexpr
Berk Hess [Wed, 13 Mar 2019 09:47:49 +0000 (10:47 +0100)]
Change nbnxm macros to constexpr

Also added an inline function to clarify the code and avoid code
duplication.

Change-Id: If68ad4f745a9b6f1c68379af24305a47084b608b

5 years agoMove functions to gridset.cpp
Berk Hess [Tue, 12 Mar 2019 10:58:42 +0000 (11:58 +0100)]
Move functions to gridset.cpp

Change-Id: Ib8b6b0159d25b50ddfd0d4ced37b8486ed2c6081

5 years agoAdd nbnxm GridSet class
Berk Hess [Mon, 11 Mar 2019 14:07:47 +0000 (15:07 +0100)]
Add nbnxm GridSet class

Collected all data that is shared between nbnxm grids to a new class
called GridSet.

TODO: Turn nbnxn_search into a class and move some functions

Change-Id: Iae0dc988d88310d88e0541656f896e552cd19260

5 years agoFix compilation issue
Berk Hess [Thu, 14 Mar 2019 07:23:38 +0000 (08:23 +0100)]
Fix compilation issue

Automatic rebase allowed merging code with outdated types.

Added namespace and fixed Doxygen while we were there

Change-Id: I7543f53d07fba5010ef15e4e81fbb7e2d632d167

5 years agoReorganize search-time code in do_force_cutsVERLET
Szilárd Páll [Fri, 8 Mar 2019 14:18:52 +0000 (15:18 +0100)]
Reorganize search-time code in do_force_cutsVERLET

Only code reordering done here in order to facilitate splitting out the
DD/search work from the force computation schedule.

Change-Id: I04b7fa97eed3a48b38389b9da4ac9be4b36c718a

5 years agoAdd haveGpuBondedWork flag to PpForceWorkload
Szilárd Páll [Tue, 12 Mar 2019 16:57:54 +0000 (17:57 +0100)]
Add haveGpuBondedWork flag to PpForceWorkload

Also move init of PpForceWorkload to make sure it precedes the GPU bonded
data initialization that the value of flag depends on.

Change-Id: Icdaab084d718087a44b2a2ec7702edd0ba86285b

5 years agoStart modularizing force workload setup
Szilárd Páll [Tue, 19 Feb 2019 09:44:14 +0000 (10:44 +0100)]
Start modularizing force workload setup

Extend ppForceWorkload flags with listed forces-related booleans
and add a setup function that re-initializes ppForceWorkload every
search step.

Change-Id: I71c783cf22e58e880d7d8655bc1e9b44e6428407

5 years agoAdd tests for preprocess atom types
Paul Bauer [Tue, 12 Mar 2019 16:07:02 +0000 (17:07 +0100)]
Add tests for preprocess atom types

Adds some tests for the handling of preprocessing atom types and fixes a
bug that I introduced while refactoring the code.

Refs #2833

Change-Id: I3dabd11a1bc8a78379f4187bc8efa266a7c46d74

5 years agoRemove custom datastructure in vsite preprocessing
Paul Bauer [Tue, 12 Mar 2019 10:29:17 +0000 (11:29 +0100)]
Remove custom datastructure in vsite preprocessing

Refs #2833

Change-Id: I6801264e743b3bf8cf205b8b297315c4b739de06

5 years agoFix errors caused by automatic rebase
Paul Bauer [Wed, 13 Mar 2019 12:51:17 +0000 (13:51 +0100)]
Fix errors caused by automatic rebase

A recent merge caused an automatic rebase that did not take a change
in a parent commit into account, leading to all builds to fail.
This fixes the error.

Change-Id: Iee9064e723fdc1d546fe140256467a6b0cb0b2fa

5 years agoBasic routines to handle periodic boundary.
Artem Zhmurov [Fri, 22 Feb 2019 11:10:13 +0000 (12:10 +0100)]
Basic routines to handle periodic boundary.

This is a generalization of the SIMD/GPU-like PBC
routines so that they can be used in a CPU code as well.

(Related to Refs #2863)

====================================

Patch set 6:

-- TODOs and reference to Redmine #2863 added.
-- Comments improved.

====================================

Patch sets 7 and 8: Rebasing.

====================================

Patch set 9:

-- Minor changes to comments.
-- Standsrd float3 vector subtraction used.

====================================

Patch set 10 and 11: Rebase, uncrustify.

====================================

Change-Id: I9efded685fcc41d05bbc5d7deed3ce70f43f5e98

5 years agoRefactor t_param to InteractionType
Paul Bauer [Fri, 22 Feb 2019 17:07:39 +0000 (18:07 +0100)]
Refactor t_param to InteractionType

Refs #2833

Change-Id: Iab043e96399c2a9615e66c5889010331c95782df

5 years agoMove nbnxm atom macros to atomdata.h
Berk Hess [Mon, 11 Mar 2019 09:53:38 +0000 (10:53 +0100)]
Move nbnxm atom macros to atomdata.h

Removed unused macros
The moved macros have been converted to constexpr.

Change-Id: I0d1352a218e1a317223e6579108fb42b02ddf393

5 years agoFix memory leak
Mark Abraham [Tue, 12 Mar 2019 02:56:24 +0000 (03:56 +0100)]
Fix memory leak

Refs #2833

Change-Id: I402aa9996ed398654594527d408a8318dab701f0

5 years agoRefactor preprocessing atom types.
Paul Bauer [Fri, 25 Jan 2019 16:07:02 +0000 (17:07 +0100)]
Refactor preprocessing atom types.

Refs #2833

Change-Id: Ifd7f583fd5908c1ce225e379b58757f9a09b2100

5 years agoClean up calc_verlet_buffer_size()
Berk Hess [Thu, 7 Mar 2019 09:52:29 +0000 (10:52 +0100)]
Clean up calc_verlet_buffer_size()

Use return value instead of passing pointer. Added a separate vsite
function for counting the non-linear vsites.
Changed pointers to references.
Improve variable naming
This change is only refactoring.

Change-Id: I91b57dee08452d5e44b5b38860ffbd5e01430a3a

5 years agoMinor refactoring in vsite_parm
Paul Bauer [Wed, 6 Mar 2019 14:35:29 +0000 (15:35 +0100)]
Minor refactoring in vsite_parm

Refs #2833

Change-Id: I0658c9c380d4a0723e5a283cd6372f4ad8a6c6b8

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 agoRemove ineffective code for writing more TER fields to pdb files
Mark Abraham [Sun, 10 Feb 2019 13:28:49 +0000 (14:28 +0100)]
Remove ineffective code for writing more TER fields to pdb files

A weakly typed string containing a residue type name was passed to a
function expecting a residue name. This has led to fewer TER records
being output than expected by the author of ff9a9692e1f4. The intent
then was presumably to refer to the residue type of the previous
chain, but in fact the residue type of that residue type was used,
which is always "Other". Thus no extra TER fields were ever written.

The intended feature for PDB writing is not clearly vital, and has
never worked, so is now removed. These days, it would only be active
if pdb2gmx wrote .pdb output, since in no other case do we build chain
numbers.

Change-Id: I4e5ed09171772e17fd0fc11aff239bf7aaa966eb

5 years agoNew tests for pdb2gmx and editconf
Mark Abraham [Sun, 10 Feb 2019 15:13:06 +0000 (16:13 +0100)]
New tests for pdb2gmx and editconf

The editconf tests run only in single precision, as they do not
reproduce well in double precision. We don't have a good way to make
them reproduce without writing a much more complex checker. It's
better that we add test coverage for the normal precision than to have
no coverage until we have code that works for both kinds of precision
configuration.

Change-Id: If85768ec63469b148547506f77a84c1fa940ebf8

5 years agoClean up use of loop indices
Mark Abraham [Sun, 10 Feb 2019 13:11:30 +0000 (14:11 +0100)]
Clean up use of loop indices

There was no need to index restype by i, so we may as well
move closer to being able to use range-based for loops.

Change-Id: I6551325b74ffdfc15b055339cf0d2ca818c01ff3

5 years agoClean up nbnxm bounding box functions
Berk Hess [Tue, 5 Mar 2019 21:13:18 +0000 (22:13 +0100)]
Clean up nbnxm bounding box functions

Replaced macro function by inline function.
Reduced and simplified function arguments.
Renamed functions with more expressive names.
Removed _simd4 from the SIMD4 version of the normal BB distance
calculation function, since it can be used everywhere and this
reduced preprocessing logic.
Replaced nbnxn_bb_t by BoundingBox.

Change-Id: I63a7a0add371b268b533bde60e15a644ec71583e

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