alexxy/gromacs.git
5 years agoFix warnings & consolidate declarations
Szilárd Páll [Mon, 15 Apr 2019 16:24:42 +0000 (18:24 +0200)]
Fix warnings & consolidate declarations

- Unused variables warnings with cuda 10.1
- Early declaration of kernel pointers eliminated

Change-Id: I7c8ca06322a3da9c948cc19d6b0b0f6a53f16beb

5 years agoCreate gmx::compat::optional
Mark Abraham [Fri, 8 Feb 2019 15:55:27 +0000 (16:55 +0100)]
Create gmx::compat::optional

This C++17 std component is an extremely useful vocabulary type that
has a straightforward implementation in C++14. Having it available is
likely to mean we can write simpler, less buggy code in less developer
time. It should be used in cases where the absence of a proper value
has an obvious natural interpretation, e.g. the type of the return
value of a function that parses an integer value from a string, or
searching for a matching element in a range, or optionally naming
a residue type.

Updated developer guide and COPYING file accordingly.

Used compat::optional for some aspects of residue handling. This
simplifies some code, and sometimes avoids needing to make a dummy
residue name string that then needs to be compared with other strings.

Let .clang-tidy file's header management apply to source fields for
test binaries.

Excluded the external code from Doxygen checking. Noted where to go
for documentation in the file Doxygen.

Fixes #2861

Change-Id: Ife34983f234549702902a0ea45dc3592098e377d

5 years agoMove pull work struct out of inputrec
Mark Abraham [Sun, 14 Apr 2019 19:45:53 +0000 (21:45 +0200)]
Move pull work struct out of inputrec

Its lifetime is now managed by runner. This will make high-level
organization more comprehensible, and permit more meaningful
const-correctness of t_inputrec.

Change-Id: I66bf765ad7235d84184227325eb52afd58146b72

5 years agoImprove swapcoords session lifetime management
Mark Abraham [Sat, 13 Apr 2019 14:46:20 +0000 (16:46 +0200)]
Improve swapcoords session lifetime management

This is no longer stored in the inputrec (which is now more
const-correct), and it is also now be cleaned up in one place.

Change-Id: I4d3c3ebb8124849cf7e13334759fda731370c1bc

5 years agoUpdate clang-tidy to check for dangling references
Paul Bauer [Fri, 5 Apr 2019 08:22:49 +0000 (10:22 +0200)]
Update clang-tidy to check for dangling references

Change-Id: I4a720ee29dddcb0778f88aaa3b1057c61d319036

5 years agoFix pdb-related issues
Berk Hess [Sat, 13 Apr 2019 10:00:06 +0000 (12:00 +0200)]
Fix pdb-related issues

In editconf, if a PDB input was read, chain IDs are known, and should
be written if the output is also PDB. This now works again, after
being broken in commit 8dd3c9ae88004054b3.

This required adding missing tpr support to readConfAndAtoms(), which
also fixes that pdb2gmx, insert-molecules, and solvate could not read
tpr files. Those are the only tools that directly or indirectly called
readConfAndAtoms with a .tpr file.

Fix in master also closes memory leaks.

Refs #2900

Change-Id: I883777be945023a7e69260b22e76df54477828ee

5 years agoRemove group scheme search code
Berk Hess [Wed, 17 Apr 2019 09:35:59 +0000 (11:35 +0200)]
Remove group scheme search code

This also required removing the generic group kernel code.
Removed domdec group scheme sorting code.
Also removed the nbnxm grid size call from the domdec module off it
turned out the results were not used.

Change-Id: I1a49967bbeca33dcd62834e8a244aaf02e80a95e

5 years agoSimplify vsite PBC handling
Berk Hess [Tue, 16 Apr 2019 20:59:03 +0000 (22:59 +0200)]
Simplify vsite PBC handling

Since we no longer support charge groups, removed the (complex)
vsite pbc tracking code.
Also changed the inter charge group vsite counting to inter update
groups counting, so we can avoid PBC calculation with update groups.

Change-Id: Iebaee9a25e761d38c571563fd0814b57e15c7e5f

5 years agoMove shellfc code to the mdrun module
Prashanth Kanduri [Fri, 29 Mar 2019 16:15:32 +0000 (17:15 +0100)]
Move shellfc code to the mdrun module

This code was previously in mdlib and made use of the force
calculation routines. The introduction of the forceschedules
module (Patch 9363) introduces a cyclic dependency.

Therefore, this clean up is important to ensure that all
users of the Force Schedules are present in a single module.

Related: #2574, #2774

Change-Id: I19563f0f6e7985d198a2497a799c5377b24a1419

5 years agoEnable printing of known issues in commandline
Paul Bauer [Fri, 5 Apr 2019 15:41:55 +0000 (17:41 +0200)]
Enable printing of known issues in commandline

Showcase in gmx dump.
Added test for it.

Change-Id: If1e70cc3b1a9c73a9483ba643a979edb2838d6a5

5 years agoCreate gmx::compat::string_view
Paul Bauer [Wed, 3 Apr 2019 13:38:44 +0000 (15:38 +0200)]
Create gmx::compat::string_view

This part of the C++-17 std will likely help in cases we want objects to
store views to std::strings instead of performing a copy of them.

Updated COPYING instructions and developer guide.

Excluded the external code from Doxygen checking.
Noted where to go for documentation in the file Doxygen.

Change-Id: Ibc75f32929d385159d27d0b7ba87f2133995e915

5 years agoFix post-submit
Mark Abraham [Wed, 17 Apr 2019 05:06:54 +0000 (07:06 +0200)]
Fix post-submit

Change-Id: I203647ed9ac70c99d188d29223a3a4141d3d4533

5 years agoReduce nbnxm CPU kernel arguments
Berk Hess [Fri, 12 Apr 2019 12:43:34 +0000 (14:43 +0200)]
Reduce nbnxm CPU kernel arguments

The number of output arguments for nbnxm CPU kernel functions
ave been reduced to one.

Change-Id: I4d69d848b490dced6007400f8f8fae0ff0638f63

5 years agoSimplify nbnxm shift force handling
Berk Hess [Fri, 12 Apr 2019 12:17:37 +0000 (14:17 +0200)]
Simplify nbnxm shift force handling

Now thread 0 also stores the shift forces in the out thread buffer
of nbnxn_atomdata_t instead of using the global fshift buffer.

Change-Id: I8c850ffc2d55db1cd7b34c1a18977f73e5cb77b0

5 years agoMove functions operating on enerdata out of force.cpp
Szilárd Páll [Mon, 15 Apr 2019 23:32:27 +0000 (01:32 +0200)]
Move functions operating on enerdata out of force.cpp

Change-Id: I20165ac5b2a34fcb80db8c7624adb57b4b542df6

5 years agoSimplify nbnxm buffer clearing
Berk Hess [Fri, 12 Apr 2019 09:26:33 +0000 (11:26 +0200)]
Simplify nbnxm buffer clearing

We should not pass both the output index and the buffer to the clearing
function.
Also templated the flagged clearing in preparation for use for clearing
other buffers.

Change-Id: I0fdb8eb0ba9ab5766e9d6ba57804783a87163cd4

5 years agoRemove RF_excl_correction()
Berk Hess [Tue, 16 Apr 2019 08:05:59 +0000 (10:05 +0200)]
Remove RF_excl_correction()

Was only used with the group scheme. The RF correction is computed
along with the non-bonded interactions in the nbnxm kernels.

Change-Id: I1451493faa7fafb7cddf508d396b0bd06cf70272

5 years agoRemove "coarse load balancing vars" from forcerec
Szilárd Páll [Mon, 15 Apr 2019 22:23:18 +0000 (00:23 +0200)]
Remove "coarse load balancing vars" from forcerec

Legacy timing code dropped during cleanup.

Change-Id: I4a3d0f69d926973c6269df15eea8b448539c54d4

5 years agoRefactor t_pindex
Paul Bauer [Tue, 12 Mar 2019 11:17:11 +0000 (12:17 +0100)]
Refactor t_pindex

Also change naming of containers for interaction types to better reflect
what is actually stored in the container.

Refs #2833

Change-Id: I581fb2a436528c00770b98ba6e5d45af7c7d9a0c

5 years agoGroup scheme related cleanup
Szilárd Páll [Mon, 15 Apr 2019 19:02:17 +0000 (21:02 +0200)]
Group scheme related cleanup

Removed:
- SR force calculation invocation
- LR correction invocations
- SR free energy component accumulation

Minor cleanup.

Refs #1852

Change-Id: I4e22986279039a0f49a5a8be3c447f4115308492

5 years agoRemoved mdrun -gcom
Mark Abraham [Sat, 13 Apr 2019 14:55:39 +0000 (16:55 +0200)]
Removed mdrun -gcom

This was previously deprecated, and is now removed to make the
behaviour of mdrun simpler to understand and implement.

Renamed a function whose job was previously not to check a thing,
and is now clearly to compute something

Noted several TODOs to clean up behaviour related to nstcomm.

Refs #1925

Change-Id: I0b3a803fb209148e865957f796c871caef2f1fea

5 years agoRemove Group scheme neighbor search wrapper
Szilárd Páll [Mon, 15 Apr 2019 19:15:05 +0000 (21:15 +0200)]
Remove Group scheme neighbor search wrapper

Change-Id: Id89aa1b7b38c918a120385d4f1a2c7bdba82fa7b

5 years agoFix for the memory access error in constraints test.
Artem Zhmurov [Mon, 15 Apr 2019 17:41:56 +0000 (19:41 +0200)]
Fix for the memory access error in constraints test.

When SIMD enabled, some memory accesses can fall outside
the allocated memory space. Hence, padding was added for
coordinates and velocities.

Change-Id: I95fa496d398fef85c62aa0ee7e90ecda4dbb8daf

5 years agoDie with helpful note in case of incorrect input to editconf with -conect
ejjordan [Mon, 15 Apr 2019 19:11:55 +0000 (21:11 +0200)]
Die with helpful note in case of incorrect input to editconf with -conect

Previously editconf would give a cryptic error message
Assertion failed:
Condition: fio->xdr != nullptr
Implementation error: NULL XDR pointers
if -conect was specified and a tpr was not supplied.
This is now replaced by a fatal error

Change-Id: I69efc6d36c8dd8314b2656e88407e8ba00915fd7

5 years agofix formatting of editconf note
ejjordan [Mon, 15 Apr 2019 18:34:08 +0000 (20:34 +0200)]
fix formatting of editconf note

Change-Id: I628fc820a176fdc4b019e5819e6fa650842024d4

5 years agoStart making IMD and swap model IMDModule
Mark Abraham [Sun, 31 Mar 2019 16:42:04 +0000 (18:42 +0200)]
Start making IMD and swap model IMDModule

Moved MDModules to mdrun code module (to relieve cyclic dependency
that would otherwise result), because it is a very high level thing
that is intended to be aware of very many components.

Refs #2877

Change-Id: Ia7d1422bab887f768f8abed01edcbc4fb290dfeb

5 years agoAdd GROMACS library dependency to gmxapi package.
M. Eric Irrgang [Fri, 15 Mar 2019 11:24:53 +0000 (14:24 +0300)]
Add GROMACS library dependency to gmxapi package.

The `gmxapi` Python package has a C++ extension module configured and
built through CMake. This change links the C++ extension module to the
GROMACS library external interface.

No new code is introduced. This change just establishes that a Python
package can be built, installed, and imported with dynamic linking to
an installed GROMACS library.

Ref: #2912

Change-Id: I1c992c30132df25cf6a91902611cb201962649af

5 years agoUse pybind11 to make a minimal C++ Python extension.
M. Eric Irrgang [Wed, 27 Feb 2019 07:46:51 +0000 (10:46 +0300)]
Use pybind11 to make a minimal C++ Python extension.

* Bundle pybind11 2.2.4 headers
* Create the `gmxapi._gmxapi` submodule as a C++ extension module.

Ref: #2912

Change-Id: Iadc8645906c2b89d98fae57b891deac80793b050

5 years agoReuse rvecs_differ in InteractiveMD module
Mark Abraham [Wed, 10 Apr 2019 05:51:00 +0000 (07:51 +0200)]
Reuse rvecs_differ in InteractiveMD module

Change-Id: I5dfbfc0c0934dc734045f41db8075ad5f1a0b635

5 years agoMake ImdSession into a Pimpl-ed class with factory function
Mark Abraham [Sun, 31 Mar 2019 12:29:20 +0000 (14:29 +0200)]
Make ImdSession into a Pimpl-ed class with factory function

This prepares to make IMD into a proper module. No
functionality changes in this commit.

Replaced gmx_bool with bool

Used fast returns when IMD is inactive, for better
readability of code.

Refs #2877

Change-Id: Ibbe8c452f6f480e9a357fe1b87da3ab0ae166317

5 years agoReform IMD module
Mark Abraham [Fri, 29 Mar 2019 13:54:36 +0000 (14:54 +0100)]
Reform IMD module

Remove GMX_HAVE_WINSOCK which was synonymous with Windows
support. Because that is somewhat risky, introduced CMake variable to
turn off IMD support. Reduced a lot of config.h dependency in
headers. Moved portability constructs to imdsocket source file.

Expanded testing coverage to be of both a minimizer and a dynamical
integrator. Switched the test case to be one that has some
interactions (because steep segfaults otherwise), and updated the mdp
settings to continue to work given the likely future directions of
mdrun.

Removed an unused method

Moved the ownership of the IMD session data structure out of inputrec
and its point of construction out of minimizers and do_md. This is now
done in runner.cpp, alongside other such construction. This prepares
for more use of MDModules. Set up the default period between IMD steps
in a different but equivalent way (since it works differently for
minimization).

Separated the inputrec boolean for whether IMD connections are
supported by the input from the run-time boolean of whether the mdrun
command-line arguments require IMD connections to be possible. Now the
inputrec is logically const with IMD.

Used logging framework for reporting, and noted future improvements as
TOD items.  Improved reporting in some cases where IMD sessions are
impossible.

Note TODOs for future improvements for renaming and restructuring.

Removed some useless inclusion of imd.h

Fixes #2913

Change-Id: I2b13dcdd9a0e69caba697f9dd2c928d94e1fb80c

5 years agoIntroduce gmxapi operations and basic data model.
M. Eric Irrgang [Fri, 29 Mar 2019 12:59:54 +0000 (15:59 +0300)]
Introduce gmxapi operations and basic data model.

Ref: #2894

Change-Id: I4e899e63287370fd2fdde89ddc1b2ea39c3fe67d

5 years agogmxapi 2019 Q1/Q2 project roadmap.
M. Eric Irrgang [Tue, 19 Mar 2019 14:58:03 +0000 (17:58 +0300)]
gmxapi 2019 Q1/Q2 project roadmap.

Lay out project goals, functional requirements, and testing plans.
Provides roadmap.rst and pytest acceptance tests
expressing the required functionality of the Python package.

Ref: #2893

Change-Id: I71ec79eb5d8a6e4d61fb5d7d6e20176c9c07a6af

5 years agoRemove stale "TODO".
M. Eric Irrgang [Mon, 8 Apr 2019 15:23:40 +0000 (18:23 +0300)]
Remove stale "TODO".

Refs #2839

Change-Id: I927ee73fc9c6ffa423d37fd4606654392cb8a1b8

5 years agoRemove t_topology from two preprocess tools
Paul Bauer [Thu, 4 Apr 2019 14:31:03 +0000 (16:31 +0200)]
Remove t_topology from two preprocess tools

Refs #2833

Change-Id: Ic842305579986910db8cc30313f74278239640bc

5 years agodensityfitting - MDModule declaration
Christian Blau [Thu, 21 Mar 2019 15:48:04 +0000 (16:48 +0100)]
densityfitting - MDModule declaration

Declaring the infrastructure for running molecular dynamics simulations with
addional forces that are derived from densities.

Adds a IForceProvider for density fitting simulation that is set up with
its DensityFittingParameters that are in turn built from DensityFittingOptions.

refs #2282 #2901

Change-Id: I0732a78747582a6e23bba1e141d73c4cda421011

5 years agoRevert "Temporarily disable ARM HPC compiler in post-submit"
Szilárd Páll [Thu, 4 Apr 2019 16:59:29 +0000 (18:59 +0200)]
Revert "Temporarily disable ARM HPC compiler in post-submit"

This reverts commit d8d9b66ca33e423ca09079e5f9294ca872d61ca5.

Reason for revert: build slave software issues resolved.

Change-Id: I9f7c904152e4be951199c9fcdba00bd9d928f33b

5 years agoEarly exit from mdrun if group scheme is detected in .tpr
Carsten Kutzner [Thu, 4 Apr 2019 14:36:50 +0000 (16:36 +0200)]
Early exit from mdrun if group scheme is detected in .tpr

Fixes #2918

Change-Id: I37566623c3ed4613f8b4e69f9f74882656772d1d

5 years agoRemove isPressureCouplingStep(...)
Artem Zhmurov [Mon, 1 Apr 2019 09:48:05 +0000 (11:48 +0200)]
Remove isPressureCouplingStep(...)

The isPressureCouplingStep(..) subroutine is called from places,
where the type of barostat is already known and then checks for it
again. Removing this subroutine eliminates the double-checks and
improves readability of the code.

Change-Id: I5bbb0706432e16414097e87e4e0d302f669ab83f

5 years agoUpdate developer guide for changes to Gerrit
Paul Bauer [Thu, 4 Apr 2019 09:59:27 +0000 (11:59 +0200)]
Update developer guide for changes to Gerrit

Change-Id: I2fad9ad5dfd0fb4536520529706d6dbaaca5d5d9

5 years agoRemove isTemperatureCouplingStep(...)
Artem Zhmurov [Mon, 1 Apr 2019 09:24:23 +0000 (11:24 +0200)]
Remove isTemperatureCouplingStep(...)

This subroutine hides the checks on whether the temperature
coupling should be updated, making it harder to read the
sequence of events in the main loop. Also, the subroutine is
used only twice and both times some of the conditionals are
double checked (e.g. is Velocity-Verlet integrator is in use).

Change-Id: Idb4196c2f81095c09426b2798e79d2beea4f306e

5 years agoInitial deactivation of group scheme.
Mark Abraham [Wed, 3 Apr 2019 13:58:39 +0000 (15:58 +0200)]
Initial deactivation of group scheme.

mdrun now gives a fatal error with a group-scheme .tpr, so anybody
using one won't get a segfault.

do_force now only has one implementation, which suits those working
on improved force calculations.

More removal of inactive code will follow later. Noted TODO to fix the
release notes properly in such a commit.

Refs #1852

Change-Id: I3b13135565951f4d7f872ddf3b8518860eccfdb0

5 years agoFix post submit
Paul Bauer [Wed, 3 Apr 2019 08:47:02 +0000 (10:47 +0200)]
Fix post submit

Change-Id: Ia45a8e1154c0d5ddd94155ddb7907c0290d13866

5 years agoRefactor gpp_bond_atomtype
Paul Bauer [Tue, 12 Mar 2019 15:28:44 +0000 (16:28 +0100)]
Refactor gpp_bond_atomtype

Refs #2833

Change-Id: Id17a93c9cc4a66b0bf89c465d2d44601fe2c523d

5 years agoAdd std::string case insensitive compare
Paul Bauer [Fri, 15 Mar 2019 11:26:38 +0000 (12:26 +0100)]
Add std::string case insensitive compare

Add another function for std::string case insensitive
comparison over a user specified length instead of
comparing the full string.

Added tests for functionality.

Showcase in preprocessing.

Change-Id: I1f117261ce56ad7c6bc5e5113da1fef705cf8aa6

5 years agoRefactor gmx_group_t to SimulationAtomGroups
Paul Bauer [Thu, 14 Mar 2019 11:21:55 +0000 (12:21 +0100)]
Refactor gmx_group_t to SimulationAtomGroups

Change allocation on type to std::container, but did not touch to
underlying t_grps datastructure yet.

Change-Id: I3858e650a31764b3ab83090eaa0653fc579a8af1

5 years agoFix simulated annealing and add test
Paul Bauer [Tue, 19 Mar 2019 09:46:06 +0000 (10:46 +0100)]
Fix simulated annealing and add test

Refs #2871

Change-Id: Ibde5226a664d3d4d5558477fdf9b81e1219a5295

5 years agoTemporarily disable ARM HPC compiler in post-submit
Szilárd Páll [Mon, 1 Apr 2019 19:52:26 +0000 (21:52 +0200)]
Temporarily disable ARM HPC compiler in post-submit

Change-Id: Ib59a495f70d073f13c08a55344b6323dd163d8b1

5 years agoMove MDModules initialization earlier
Mark Abraham [Thu, 14 Mar 2019 16:40:23 +0000 (17:40 +0100)]
Move MDModules initialization earlier

This will permit extending the functionality to also provide
command-line options and help descriptions for gmx tools.

Moved more functionality into Mdrunner::Builder

It also permits the Mdrunner constructor that is normally used to
prompt the construction of a properly formed MDModules. Removed a
comment about default initialization that is a normal fact of life
with constructors. Updating it would be wordy and no real value.

Refs #2877

Change-Id: I70126f297422a9076484083d461b0b003ae2e23b

5 years agoMove enerdata ownership to mdrunner
Mark Abraham [Sun, 31 Mar 2019 16:52:05 +0000 (18:52 +0200)]
Move enerdata ownership to mdrunner

All the things managed by runner need a gmx_enerdata_t, so consolidate
the management of its lifetime. This prepares for modularization of
code that requires one of these.

Change-Id: Ibbf03c17beecb53039bb50a5ef6462925d777b52

5 years agoRemoved confusing gpp_atomtype functions.
David van der Spoel [Sun, 31 Mar 2019 18:17:26 +0000 (20:17 +0200)]
Removed confusing gpp_atomtype functions.

For some reason there were functions to extract the massB
and chargeB from atomtypes, however atomtypes do only have
a single charge or mass.

Change-Id: Iddcbeb57e4fa7fd905f5969447f14faf6d626ff0

5 years agoPlumbing for gmxapi 2019 Q1/Q2 project roadmap.
M. Eric Irrgang [Wed, 27 Feb 2019 08:08:05 +0000 (11:08 +0300)]
Plumbing for gmxapi 2019 Q1/Q2 project roadmap.

Provide infrastructure so that dependent change can focus on content
of project plan.

Ref: #2893

Change-Id: Idd72e9ede890f7fc97a680c5a5bffe97499eaaf5

5 years agoSimplify nbnxm final force reduction
Berk Hess [Wed, 27 Mar 2019 13:16:47 +0000 (14:16 +0100)]
Simplify nbnxm final force reduction

Change-Id: I66485bfe1c056db82492b531b266de1071aeb12c

5 years agoMove early return for nbnxm force reduction
Berk Hess [Tue, 26 Mar 2019 13:37:53 +0000 (14:37 +0100)]
Move early return for nbnxm force reduction

To reduce dependencies and code complexity, the early return for
avoiding overhead of a force reduction reducing no forces at all
has been moved from nonbonded_verlet_t to atomdata.cpp. The check
has been changed from no non-local work to no non-local atoms, which
should not affect performance much.

Change-Id: I3315699e15918482b321b702f6ba24209aa3a6b2

5 years agoMove PairlistSet declaration
Berk Hess [Mon, 18 Mar 2019 15:25:26 +0000 (16:25 +0100)]
Move PairlistSet declaration

Moved the declaration of PairlistSet to pairlistset.h.
Also completed the documentation.

Change-Id: I0cac4bbf1919b4a2f39d8ead63aa75f112ab60c7

5 years agoFix UB vector usage
Roland Schulz [Tue, 26 Mar 2019 00:24:39 +0000 (17:24 -0700)]
Fix UB vector usage

It is UB to
- increment past end.
- decrement end iterator for empty vector.
- use operator[] on end iterator.

Also fixes a buffer overflow for c_simdBestPairAlignment=2.

All found with _LIBCPP_DEBUG=1.

Change-Id: Ib21ca875244673b27748a01373e7fc10252a7c44

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