alexxy/gromacs.git
5 years agoRemove NVML support
Mark Abraham [Thu, 27 Sep 2018 15:20:02 +0000 (17:20 +0200)]
Remove NVML support

Net value for this feature isn't high enough to maintain it.

gmx_device_info_t can now be used const-correct in many more places.

Fixes #2655

Change-Id: I2fac7d8b5613bee3fe0a6020862fc57224f7f6c4

5 years agoFix constraints cycle counting
Szilárd Páll [Wed, 26 Sep 2018 00:47:46 +0000 (03:47 +0300)]
Fix constraints cycle counting

Cycle counter start/stop calls were misplaced after earlier refactoring
of the constraints code.
This change fixes the duoble-counting issues introduced and makde some
minor code simplifications.

Fixes #2652

Change-Id: I5aaed801320b11a848530b97274bc562f34fbcfe

5 years agoRefactoring in calc_verletbuf.cpp
Berk Hess [Fri, 21 Sep 2018 10:51:19 +0000 (12:51 +0200)]
Refactoring in calc_verletbuf.cpp

Replaced all list pointers by std::vector.
Used extractILists to simplify code.

Change-Id: Idc2c5d8169e765340d150e2638f84783e092a6af

5 years agoStop ICC ICE
Mark Abraham [Wed, 26 Sep 2018 10:25:13 +0000 (12:25 +0200)]
Stop ICC ICE

Fixes #2648

Change-Id: I52929b347b5a5b4fa44b63b2e9397f581e03d3c3

5 years agoAdd UpdateGroupsCog to DD
Berk Hess [Wed, 19 Sep 2018 20:46:24 +0000 (22:46 +0200)]
Add UpdateGroupsCog to DD

Change-Id: I8602af8311a992c5d584b8b55da45a2af1941f54

5 years agoUse more default initialization of mdrun structs
Mark Abraham [Wed, 26 Sep 2018 10:01:19 +0000 (12:01 +0200)]
Use more default initialization of mdrun structs

Such plain-data structs should be implemented so that
compiler-generated default functions will do the right things, so that
they can be embedded in more complex objects that need such
behaviours.

Change-Id: Id50b6971ff1da4b54b92864f716e7f0b6aa7f604

5 years agoMake some symbols in gmxpre-config.h always defined
Mark Abraham [Wed, 26 Sep 2018 12:09:28 +0000 (14:09 +0200)]
Make some symbols in gmxpre-config.h always defined

Made related minor simplifications in a few places.

Fixes #2654

Change-Id: Ie3245c78f1f88bd9df6f81c86f8f04dae2ceb45c

5 years agoRecognize Intel GPU as compatible
Roland Schulz [Sat, 28 Apr 2018 06:24:58 +0000 (23:24 -0700)]
Recognize Intel GPU as compatible

Note new hardware support in the user guide
Also enable I_PREFETCH by default

Fixes #2030

Change-Id: I9c3efe70df4d273e463bf49f5ae4f0959a590ebe

5 years agoMove maxReferenceTemperature() to inputrec
Berk Hess [Wed, 26 Sep 2018 10:09:22 +0000 (12:09 +0200)]
Move maxReferenceTemperature() to inputrec

The maxReferenceTemperature() is more generally useful, so it is
moved from calc_verletbuf.cpp to inputrec.h/cpp.

Change-Id: Id9d1ac445510dbed6c16cf05c75e0cd397816550

5 years agoImprove update group radii
Berk Hess [Tue, 25 Sep 2018 13:30:43 +0000 (15:30 +0200)]
Improve update group radii

The update group radii computation could return too small values
for exotic topologies. Now the worst case estimate is used, unless
all atoms in an update group are connected by angle potentials.
In the latter case the radius is determined assuming deformed
conformations for a given temperature. Tests for this have been added
with different temperature values.

Change-Id: I085b345f6f9833a048be69afd8e8857d1c44110e

5 years agoReorganize RVec scaling functions
Berk Hess [Thu, 27 Sep 2018 06:35:17 +0000 (08:35 +0200)]
Reorganize RVec scaling functions

The RVec scale() function and method were confusingly named, sas they
did not actually scale the vector, but only returned a scaled vector.
These are now replaced by the * operator. Also added the / operator.
Added *= and /= operators to actually scale a vector.

Change-Id: I68d1cd453a18862c53f128dbfcd216868ba88a13

5 years agoReduce preprocessor dependency in resourcedivision.cpp
Kevin Boyd [Mon, 3 Sep 2018 18:55:47 +0000 (14:55 -0400)]
Reduce preprocessor dependency in resourcedivision.cpp

Also added some constexpr

Also broke up some long text blocks

Change-Id: I28a8207008d65fe39c10429542f44373ba0bbafd

5 years ago(Re-)fix typo in DD load balancing printing
Pascal Merz [Wed, 26 Sep 2018 23:12:25 +0000 (17:12 -0600)]
(Re-)fix typo in DD load balancing printing

Seems I42dcb3e5a8fa64f80cf480f4838a9f7fa70e03cd got lost in
Id3fcf6594b6f97129c72fe6f44c54d5c20afa11d. This patch restores that fix.

Change-Id: Ibaffe7f3b36ab9a298cc2713603a04965e658c9a

5 years agoExtract settle test water coordinates
Berk Hess [Mon, 24 Sep 2018 11:37:28 +0000 (13:37 +0200)]
Extract settle test water coordinates

These coordinates will be used by other tests as well.

Change-Id: I4e0ad7ac6c540d31a3565a0cfe004136e2431f36

5 years agoAdded pullCheckPbcWithinGroup() to check one group
Magnus Lundborg [Tue, 25 Sep 2018 11:33:05 +0000 (13:33 +0200)]
Added pullCheckPbcWithinGroup() to check one group

This function checks if a single group obeys PBC restrictions.

Change-Id: I26e99335c9d127ada1a229597bce489416b21408

5 years agoClarify distinct paths for mdrun log file handling
Mark Abraham [Tue, 25 Sep 2018 11:48:22 +0000 (13:48 +0200)]
Clarify distinct paths for mdrun log file handling

Opening for appending is actually handled in the checkpointing code,
which is now explicit in mdrunner.

Also handled the error case when the log file cannot be opened.

Also removed unnecessary dependency on commrec.

Refs #2651

Change-Id: I0b8c7756a08c3d786571e7936e7f8f327fd17947

5 years agoSupport atom groups in nbnxn_search
Berk Hess [Thu, 30 Aug 2018 12:20:24 +0000 (14:20 +0200)]
Support atom groups in nbnxn_search

When atoms groups are use in the pair search instead of atoms,
the atoms can be slightly outside the grid. This change takes
that into account for distance checks. The actual gridding of
atom groups instead of atoms is in a separate change.

Change-Id: Icf3a4a3a422f0d9ad0ab74e3ceeff2e7da791ca5

5 years agoAllow explicit reset of simulation stop condition.
M. Eric Irrgang [Fri, 24 Aug 2018 11:26:41 +0000 (14:26 +0300)]
Allow explicit reset of simulation stop condition.

Grant client code the ability to reset the global stop condition. This
is a necessary (but not sufficient) provision to allow multiple
simulations in the lifetime of a single process.

Change-Id: Ib755b9bffc71aef43c6e20988f2ae9994cb426b4

5 years agoAdd UpdateGroupsCog class
Berk Hess [Tue, 21 Aug 2018 08:13:32 +0000 (10:13 +0200)]
Add UpdateGroupsCog class

Added class for managing the centers of mass of update groups.
Also added a test.

Change-Id: Ife6c996056e758c9f0fc02d1043a20d745dc3ac8

5 years agoAdd margin as input to pullGroupObeysPbcRestrictions
Magnus Lundborg [Tue, 25 Sep 2018 08:38:03 +0000 (10:38 +0200)]
Add margin as input to pullGroupObeysPbcRestrictions

Make it possible to specify the margin when checking that a pull
group is not too large (compared to the PBC dimensions).

Change-Id: I1a856ae6078c085693ed7add4cf765b5a49abc2d

5 years agoRemove obsolete braces in do_md()
Pascal Merz [Tue, 25 Sep 2018 05:39:20 +0000 (23:39 -0600)]
Remove obsolete braces in do_md()

In I17c9ae4c1c88bdb328e17e75fec55a558613cff0, we removed the rerun
functionality from do_md(), but left a pair of braces to make rebasing
and reviewing easier. This change removes these obsolete braces.

Change-Id: I67d10f19022149de50696eb25502f5412b366424

5 years agoRemove rerun from do_md
Pascal Merz [Mon, 20 Aug 2018 06:39:56 +0000 (00:39 -0600)]
Remove rerun from do_md

As the rerun functionality is handled in a separate function now, this
commit removes rerun from do_md.

refs #1868

Change-Id: I17c9ae4c1c88bdb328e17e75fec55a558613cff0

5 years agoRemove unnecessary functionality from do_rerun
Pascal Merz [Mon, 17 Sep 2018 20:08:07 +0000 (14:08 -0600)]
Remove unnecessary functionality from do_rerun

As discussed in task #1868, the rerun functionality gets reduced to essentially
"take a configuration and calculate forces and energies". If the trajectory contains
velocities, they are ignored. This allows to remove a lot of functionality from
do_rerun, which is done in this commit.

Functionality removed includes

    * Reading of velocities in reruns (reruns won't contain kinetic energy)
    * Constraints
    * Temperature / pressure coupling
    * Essential dynamics
    * Interactive MD
    * Simulated annealing
    * Multisimulations
    * AWH
    * Expanded ensemble
    * Replica exchange
    * Checkpointing
    * Counter resetting (no benchmarking)
    * PME tuning
    * FAHCORE
    * EnergyHistory

The following quantities are not reported:

    * Kinetic energy
    * Total energy
    * Conserved energy
    * Temperature(s)
    * Pressure, pressure tensor, and pressure dispersion correction
    * Virial tensor(s)

This change also changes the rerun tests not to test for correct
reproduction of the velocities (since they are intentionally set
to zero), and adds some information to the documentation.

Refs #1868

Change-Id: I522d56a610f2a6ff189484c9311b6f53c775ed47

5 years agoPrepare rerun commit
Pascal Merz [Mon, 20 Aug 2018 06:08:42 +0000 (00:08 -0600)]
Prepare rerun commit

In Task #1868, we will break out rerun from the do_md code. This
results in new files, rerun.{h,cpp}, containing a do_rerun function
which includes only the portions of code in do_md which are relevant
for rerun. It does, however, make sense to diff this new function to
the current do_md to be able to review the changes made. This commit
therefore duplicates the current md.{h,cpp} files to allow for easier
reviewing of the following changes. It does also change runner.cpp to
send any rerun through the new code path. This allows to create to
independent follow-up commits, namely
1 Cleaning up do_md() [I17c9ae4c1c88bdb328e17e75fec55a558613cff0], and
2 Cleaning up do_rerun() [I522d56a610f2a6ff189484c9311b6f53c775ed47].
Commit 1 will thereby likely be easy to review and merge, while
commit 2 might require more discussion.

Refs #1868

Change-Id: I832ce07e3c5932a42151983deb8f527f988b2a2e

5 years agoFix gmxapi::Version test regression.
M. Eric Irrgang [Tue, 18 Sep 2018 15:08:38 +0000 (18:08 +0300)]
Fix gmxapi::Version test regression.

During code review, the feature names in the hasFeature() test were
rejected, but they slipped into the commit anyway. This change removes
the objectionable preemptive feature names and attempts to clarify the
test and API, per conversation during code review.

Change-Id: I134249a7bae66a78b878e501e702f6d2d691706a

5 years agoFix performance report when init_step!=0
Berk Hess [Mon, 24 Sep 2018 08:31:18 +0000 (10:31 +0200)]
Fix performance report when init_step!=0

Change-Id: Ia4e15c2fb9b0e3debe7fc7f2aa8a1cdf346f90cb

5 years agoFix Doxygen links
Mark Abraham [Fri, 14 Sep 2018 13:47:17 +0000 (15:47 +0200)]
Fix Doxygen links

Change-Id: Ifa0117d53ea29747fd88ff4c9955248d7d4c8346

5 years agoLeak less from gromppp with cmap
Mark Abraham [Sun, 23 Sep 2018 21:58:46 +0000 (23:58 +0200)]
Leak less from gromppp with cmap

Change-Id: I9995615e1c0281cf945b45970a906bf14552f0ef

5 years agoAdd gmxapi::MDModule.
M. Eric Irrgang [Thu, 23 Aug 2018 17:39:11 +0000 (20:39 +0300)]
Add gmxapi::MDModule.

Provide basic framework for passing objects between object libraries.
Describe protocol for managing object lifetimes and sharing ownership
across API environments (such as Python, C, and C++) with minimal
dependencies.

Supports gmxapi milestone 7:

Refs #2585

Change-Id: I206adb7341b3005dd56137e7c7df207a08dd41c2

5 years agoAdd update groups boolean to DD
Berk Hess [Wed, 27 Jun 2018 07:52:53 +0000 (09:52 +0200)]
Add update groups boolean to DD

Change-Id: I8b6c8e126974982ed4ca20dc1a10f064413219fb

5 years agoRename DD constraint booleans
Berk Hess [Tue, 18 Sep 2018 12:46:48 +0000 (14:46 +0200)]
Rename DD constraint booleans

This is preparation for adding update groups

Change-Id: I135abe196569c6e1a7dde535c8e616e1a479bcac

5 years agoAdd update groups
Berk Hess [Thu, 17 May 2018 22:22:37 +0000 (00:22 +0200)]
Add update groups

Adds functionality for detecting update groups, covered by tests.
Update groups are group that can be updated independently,
i.e. vsite are constructed from atoms with the group and constraints
only act on atoms within the group.
The functionality is not used yet.

Change-Id: I958983bc9010999cc7ce33b26daf587eda632c36

5 years agoBump test timeout only for OpenCL integration tests
Szilárd Páll [Fri, 21 Sep 2018 15:09:52 +0000 (17:09 +0200)]
Bump test timeout only for OpenCL integration tests

The OpenCL JIT time can make the mdrun integration tetsts time out, so
we need to bump the timoeouts. This change enables a double (240
seconds) timeout only for OpenCL builds.

Fixes #2529

Change-Id: Id0dd3a13f7b5edc5642bbae65de44c125993c7d5

5 years agoFix clang-tidy warnings for clang 7
Roland Schulz [Wed, 19 Sep 2018 19:57:15 +0000 (12:57 -0700)]
Fix clang-tidy warnings for clang 7

Disable clang-analyzer because we run analyzer as seperate job.
Disable cppcoreguidelines-avoid-goto because it is easy to spot
in code-review and has very rare good uses.

Change-Id: Ibfeb8ba6b14012b0079e7eef15282e0e2b6538fc

5 years agoMake CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS require global communication
Pascal Merz [Thu, 20 Sep 2018 22:19:27 +0000 (16:19 -0600)]
Make CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS require global communication

Currently, giving the CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS flag, but
none of CGLO_TEMPERATURE, CGLO_STOPCM, CGLO_PRESSURE, CGLO_CONSTRAINT, or
CGLO_ENERGY does not prompt global_stat() in compute_globals(). This has
currently no implications because this specific flag is never set without
at least one of the others, but it is not intuitive and becomes a problem
when setting up a rerun without temperature calculation. This change fixes
this.

Refs #1868, #2647

Change-Id: I53b4dd9a1b7b273f1ce99e8e8c78bf386a693842

5 years agoFixes a bug in pull group size calculation
Magnus Lundborg [Fri, 21 Sep 2018 07:14:41 +0000 (09:14 +0200)]
Fixes a bug in pull group size calculation

The wrong atom indexes were used when checking the coordinates
of atoms in a pull group (commit aa102e691d59b4de37c8e4).
That lead to false reports of too large pull group
(and presumably false negatives). This fixes the problem.

Refs #2397

Change-Id: Ib7d7e648204c0d1b219714610de7fb5842713048

5 years agoUpdate to test with clang-7
Mark Abraham [Wed, 19 Sep 2018 14:11:41 +0000 (16:11 +0200)]
Update to test with clang-7

Change-Id: I7087119efc67390d152dbf06d83ddb59d5c0e1e9

5 years agoSeparate methods to create localtop and t_topology
Paul Bauer [Wed, 12 Sep 2018 14:34:08 +0000 (16:34 +0200)]
Separate methods to create localtop and t_topology

Made a separate method for creating t_topology from gmx_mtop_t instead
of going through the unsafe way of using gmx_localtop_t as an
intermediate.

Change-Id: Ia57c22839d08a97b9189dfe534c35588291a469f

5 years agoAlways use mtop constructor
Paul Bauer [Wed, 19 Sep 2018 08:45:36 +0000 (10:45 +0200)]
Always use mtop constructor

Remove init_mtop and always use the mtop constructor for initializing
a gmx_mtop_t.

Also change ffparams and cmap to be initialized from the start.

Change-Id: Ieaf89a501ebbc29d31435305927332a3926d0c07

5 years agoChange pull buffers to std::vector
Berk Hess [Thu, 26 Apr 2018 15:28:45 +0000 (17:28 +0200)]
Change pull buffers to std::vector

Change-Id: Ic9a3521e52c86a4fac70ad52e53e27d977f124cc

5 years agoFix type bug in trilinic DD code
Berk Hess [Thu, 20 Sep 2018 07:58:58 +0000 (09:58 +0200)]
Fix type bug in trilinic DD code

An off-diagonal triclinic box coupling variable was int instead of
real. For postive off-diagonal box elements the only led to (slightly)
more atoms being communicated. For, unusual, negative off-diagonal
elements this could cause to few atoms to be communicated.

Change-Id: I4cc2cd00aaee79359e32342615c818ba134054b3

5 years agoChange names of gmxapi::Version functions.
M. Eric Irrgang [Tue, 18 Sep 2018 14:54:04 +0000 (17:54 +0300)]
Change names of gmxapi::Version functions.

major() and minor() member functions clash with a historical macro,
producing compiler warnings. Change names to majorVersion(), etc.

Fixes #2646

Change-Id: I568ab1dc216b200b182b34f76016fbfa54015dbd

5 years agoConvert gmx_cmap_t to C++
Berk Hess [Tue, 18 Sep 2018 23:48:09 +0000 (01:48 +0200)]
Convert gmx_cmap_t to C++

Change-Id: I023328eeb9432c6cb3ee96b7f5c0f5960f97d6bc

5 years agoConvert gmx_ffparams_t to C++
Berk Hess [Tue, 18 Sep 2018 21:23:04 +0000 (23:23 +0200)]
Convert gmx_ffparams_t to C++

Note that gmx_cmap_t still needs to be converted.

Change-Id: Ib695962c08b7cba539a9604077cc372d795b1647

5 years agoDocumentation fix: Rerun and nstlist
Pascal Merz [Tue, 18 Sep 2018 22:57:09 +0000 (16:57 -0600)]
Documentation fix: Rerun and nstlist

The current code is not, as written in the documentation, behaving differently if
`nstlist == 0`. The relevant code part in `md.cpp` (line 312+) reads

    const gmx_bool bRerunMD      = mdrunOptions.rerun;
    int            nstglobalcomm = mdrunOptions.globalCommunicationInterval;

    if (bRerunMD)
    {
        /* Since we don't know if the frames read are related in any way,
         * rebuild the neighborlist at every step.
         */
        ir->nstlist       = 1;
        ir->nstcalcenergy = 1;
        nstglobalcomm     = 1;
    }

This change adapts the documentation to reflect what we're is actually doing.

Change-Id: I2292c675e0798f7e500ac3438a61872accabf21c

5 years agoIntroduce extractILists helper function
Berk Hess [Mon, 17 Sep 2018 07:56:57 +0000 (09:56 +0200)]
Introduce extractILists helper function

Change-Id: I768da6d065366992d556f0fa046b2ee28417e2fc

5 years agoSeparated partitioning and dlb code within domdec
Mark Abraham [Sun, 16 Sep 2018 12:39:59 +0000 (14:39 +0200)]
Separated partitioning and dlb code within domdec

Improves modularization, so that e.g. touching PaddedVector
implementation doesn't recompile the whole domdec module, and every
client.

This is pure code movement, no functional changes except to visibility
of functions between translation units and gmx_bool to bool changes.

Change-Id: Id3fcf6594b6f97129c72fe6f44c54d5c20afa11d

5 years agoIntroduce stop handler
Pascal Merz [Wed, 29 Aug 2018 14:40:56 +0000 (08:40 -0600)]
Introduce stop handler

This change introduces a stop handler which encapsulates the
setting and handling of stop signals, and owns the bLastStep boolean
(which is, however, currently mirrored as a local variable in do_md for
convenience). This cleans up the do_md loop, exchanging several lines
of code by a single command. To set the signal, the StopHandler object
loops over a vector of stop condition functions registered previously
with a helper object of type StopHandlerHelper. This allows to formulate
different conditions, and only build them if the current setup requires
them (e.g. only have a stop criterion based on time if a maximal run
time was set, only build stop conditions on master rank, ...).

The stop handler itself is created in do_md by a helper object owned by
the calling code. The helper object offers an interface to register
stop conditions via std::function objects. This allows higher-level
code to inject stop conditions.

Refs #1793

Change-Id: Ia9077841d96a9bc6d6f000eef4093e9fbd9f5363

5 years agoIntroduce checkpoint handler
Pascal Merz [Tue, 28 Aug 2018 21:06:55 +0000 (15:06 -0600)]
Introduce checkpoint handler

This change introduces a checkpoint handler which encapsulates the
setting and handling of checkpoint signals, and owns the bCPT boolean.
This cleans up the do_md loop, exchanging several lines of code by
a single command. It also makes a step towards a task-based design by
only calling the internal functions when necessary (if checkpointing
is enabled, signal setting only on master), and by owning as much
data as possible.

Refs #1793

Change-Id: I05ca7abc9e81c9a8deacb6b81086e1077524d005

5 years agoIntroduce reset handler
Pascal Merz [Tue, 28 Aug 2018 22:55:42 +0000 (16:55 -0600)]
Introduce reset handler

This change introduces a reset handler which encapsulates the
setting and handling of resetting signals, and the actual counter resetting.
This cleans up the do_md loop, exchanging several lines of code by
a single command. It also makes a step towards a task-based design by
only calling the internal functions when necessary (if counter resetting
was requested, signal setting only on master).

Refs #1793

Change-Id: I5dec051cd3a0c0b3b52dfe69a72dac7f7e9f65ed

5 years agoAdd not_null from GSL
Mark Abraham [Thu, 13 Sep 2018 12:45:30 +0000 (14:45 +0200)]
Add not_null from GSL

This can't be fully featured before C++14, but it is useful
now. Permits us to implement CppCoreGuidelines I.12, F.23, F.25, and
updates the style guide accordingly.

Change-Id: I7da884de83f68c35d52ba01ec4e868da48574e1b

5 years agoFix bitmask printing
Roland Schulz [Tue, 18 Sep 2018 04:56:35 +0000 (21:56 -0700)]
Fix bitmask printing

Change-Id: I0e9294ad734dfd682cfea3a31011a9b9c7fb9034

5 years agoRefactor ddbox handling
Berk Hess [Mon, 17 Sep 2018 11:06:43 +0000 (13:06 +0200)]
Refactor ddbox handling

Removed inputrec as argument to ddbox functions.
Changed all const pointers to references, this trickles down to
the PME load balancing code.
This is preparation for update groups addition to DD.

Change-Id: Ibc1c8b0f53397e4d15df7aeaa6f8561bd32e9a18

5 years agoFramework in which to build gmxapi.
M. Eric Irrgang [Fri, 24 Aug 2018 13:35:54 +0000 (16:35 +0300)]
Framework in which to build gmxapi.

Establish a clean slate in which to develop the new external GROMACS
interface. Introduces `libgmxapi` and installed headers in
`include/gmxapi/` to provide a stable C++ interface.

Note that this commit has several inconsistencies with the gmxtree
policies, and src/api/cpp/* has been added to
docs/doxygen/suppressions.txt to avoid testing noise while these issues
are resolved. They are mostly of the following sort.

1. includes non-local file as "gmxapi/version.h"
2. does not include "gmxpre.h" first

The public interface is separated into a separate directory that does
not fit the current pattern for installed headers, and there is code
that specifically builds against the public interface that should not
include library headers, like "gmxpre.h". Discussion and tasks to
resolve policy and apply appropriate checks is at Redmine issue #2586
(gmxapi milestone 2)

Refs #2586

Change-Id: I1eb8ea75fdaea77e0ce03f2d312c44db8df16f28

5 years agoProperly initialize idef in topologies
Paul Bauer [Wed, 12 Sep 2018 09:40:22 +0000 (11:40 +0200)]
Properly initialize idef in topologies

Adds and uses functions to properly initialize and clean up
idef structure in topologies.

This is preparing for changes that no longer use snew for
allocating topology datastructures.

Change-Id: Iabad6d95bc994f4b292c063572a6d83e7f02036d

5 years agoMove ifunc stuff from idef.h to ifunc.h
Berk Hess [Mon, 17 Sep 2018 07:37:10 +0000 (09:37 +0200)]
Move ifunc stuff from idef.h to ifunc.h

Interaction function definitions were spread over ifunc.h and idef.h.
Also changed some macros to constexpr or inline functions.
Changed interaction_function.flags to unsigned int.
Added ifunc.h to installed headers, as it is now required.

Change-Id: I285413f9474866b1fe52e635188763b1c9ee9f95

5 years agoRefactor pdb2gmx in c++ framework
Joe Jordan [Thu, 5 Jul 2018 17:40:48 +0000 (19:40 +0200)]
Refactor pdb2gmx in c++ framework

Put pdb2gmx into c++ framework using modern options.

The focus here is on keeping what the user sees the
same. As yet, minimal effort has been put into
making the the whole code into modern c++.

Change-Id: I6dd750d0761c474415c02e9ae36d7ddb1fbbda10

5 years agoAdded basic tests for gmx msd
Kevin Boyd [Sun, 16 Sep 2018 18:42:29 +0000 (14:42 -0400)]
Added basic tests for gmx msd

Change-Id: I35d765d9a68d4723bf0a968d07453a268ed4e78a

5 years agoChange pointers to InteractionList to references
Berk Hess [Sat, 15 Sep 2018 21:02:13 +0000 (23:02 +0200)]
Change pointers to InteractionList to references

Change-Id: Ia2431137e7326a4fa68083b0e50a82455b426c86

5 years agoFix typo in DD load balancing printing
Pascal Merz [Mon, 17 Sep 2018 04:40:41 +0000 (22:40 -0600)]
Fix typo in DD load balancing printing

Removed superfluous string format specifier (%s).

Change-Id: I42dcb3e5a8fa64f80cf480f4838a9f7fa70e03cd

5 years agoRefactoring in DD redistribute
Berk Hess [Tue, 21 Aug 2018 19:34:41 +0000 (21:34 +0200)]
Refactoring in DD redistribute

Split computeMoveFlag() of from calc_cg_move().
Group limit arguments into a struct.
Change move from a pointer to an arrayref.

Change-Id: Iab7f7ae3168fcb8a77ad08d3632a2dc23007d322

5 years agoMove variables around in pdb2gmx
Joe Jordan [Fri, 14 Sep 2018 15:35:19 +0000 (17:35 +0200)]
Move variables around in pdb2gmx

This narrows the scope of variables in pdb2gmx and
changes a few names. This is only code movement.

Change-Id: I2f923df42124f430348601fce839b0914ca41674

5 years agoReplace slave with agent
Roland Schulz [Sat, 15 Sep 2018 05:25:42 +0000 (22:25 -0700)]
Replace slave with agent

See releng change for details.
Also removes the word in one non Jenkins related file where
it didn't add any value to a comment.

Change-Id: Ic299f2fce0ffcd5412611c464b5f88db41d31a9c

5 years agoRefactor getAtomGroupDistribution()
Berk Hess [Tue, 14 Aug 2018 10:16:43 +0000 (12:16 +0200)]
Refactor getAtomGroupDistribution()

Change-Id: Id97802c061d179d9303d05b6da97131151be027a

5 years agoRemove LaTeX file writing from gmx check
Paul Bauer [Wed, 23 May 2018 10:18:32 +0000 (12:18 +0200)]
Remove LaTeX file writing from gmx check

The function would now live in gmx report instead.

Change-Id: I09a03f1cab32f8a3e4e1bf5bc7426b9a7fd80170

5 years agoRearrange mdrun/runner.h
M. Eric Irrgang [Fri, 14 Sep 2018 10:43:03 +0000 (13:43 +0300)]
Rearrange mdrun/runner.h

Swap the public and private sections of Mdrunner. Improves readability
and reduces noise / conflicts for other changes under review. This
commit is only reorganization.

Refs #2605

Change-Id: Ibb9a24a588afd90c7199f77e80aa2a3f2d2e7339

5 years agoChange gmx_moltype_t.ilist to InteractionLists
Berk Hess [Thu, 13 Sep 2018 09:08:24 +0000 (11:08 +0200)]
Change gmx_moltype_t.ilist to InteractionLists

Also changed the mtop_util ilist loops to return a pointer
to InteractionLists.

Change-Id: I449176dcb2b7b73225c78308cf64da70cc88051b

5 years agoIntroduce gmx report-methods
Paul Bauer [Thu, 17 May 2018 18:04:57 +0000 (20:04 +0200)]
Introduce gmx report-methods

The writing of system information from gmx check has been
moved to a new module gmx report-methods that does the only
this part, writing the basic system information to the
the terminal, as well as a LaTeX formatted or unformatted
output file.

Change-Id: Id34c8ca67e606a88da70fe9558b2811a716dcc47

5 years agoWarn for type mismatch for gmx printf like functions 3/3
Roland Schulz [Sat, 14 Jul 2018 05:57:53 +0000 (22:57 -0700)]
Warn for type mismatch for gmx printf like functions 3/3

Add attributes for gcc (and compatible) and msvc.
And fix remaining issues.

Related #2570

Change-Id: I9b46559c2554404b309aa8710eb34ffa128d8cae

5 years agoRemove sparc64_hpc_ace nonbonded kernels
Roland Schulz [Wed, 12 Sep 2018 19:58:23 +0000 (12:58 -0700)]
Remove sparc64_hpc_ace nonbonded kernels

Unclear whether they work after C++ change. No plans
to test them.

Change-Id: I5fe296ec34c51d0e9d0500eef3c6c7d5cd1b4a76

5 years agoAdd C++ version of t_ilist
Berk Hess [Wed, 12 Sep 2018 23:29:27 +0000 (01:29 +0200)]
Add C++ version of t_ilist

gmx_moltype_t in gmx_mtop_t now uses a C++ version of t_ilist called
InteractionList. The interface of IteractionList and t_ilist match
such that templated code can work with either. Thus we do not need
to change all code that uses t_idef now as well.

Change-Id: I90b829dae874f38d52ec0ceb538342313b2f8dd9

5 years agoRemove useless comments
Roland Schulz [Wed, 12 Sep 2018 18:40:50 +0000 (11:40 -0700)]
Remove useless comments

Change-Id: I6df536841e9307491db8d3e9a529803724375d89

5 years agoEliminate main.h
Mark Abraham [Wed, 12 Sep 2018 13:46:38 +0000 (15:46 +0200)]
Eliminate main.h

This generic file had generic content and will create cyclic
dependencies if not broken up into logical units.

Moved replica exchange code to be alongside the multisim code that it
needs. Moved multi-sim communication routines to be where other
low-level and multi-sim communication routines are found. Added simple
Doxygen, while leaving a suppression and TODO for the main
replica-exchange routines documentation, which is not in scope for
this change. Converted a define to a constexpr and made the include
guards match GROMACS style.

Change-Id: I123231d56bfa9a699ddbd32fec0b055cf14d93e3

5 years agoWarn for type mismatch for gmx printf like functions 2/3
Roland Schulz [Fri, 13 Jul 2018 04:18:58 +0000 (21:18 -0700)]
Warn for type mismatch for gmx printf like functions 2/3

Most manual fixes. Inclduing those with missing/extra
arguments.

Related #2570

Change-Id: I2046d323dad6420e61f47918b12aa538f4a6d4a0

5 years agoAdd SSE2 + double config
Roland Schulz [Wed, 12 Sep 2018 15:12:46 +0000 (08:12 -0700)]
Add SSE2 + double config

Change-Id: I751b4c4755d01ffd7aad08144dc2e5e3a1b96280

5 years agoConvert vsite structs to C++
Berk Hess [Tue, 11 Sep 2018 14:18:00 +0000 (16:18 +0200)]
Convert vsite structs to C++

Change-Id: I164e78e981404df535d1115d5eaab399382924ae

5 years agoSimplify add_suffix_to_output_names()
M. Eric Irrgang [Tue, 11 Sep 2018 10:01:50 +0000 (13:01 +0300)]
Simplify add_suffix_to_output_names()

Use gmx::Path::concatenateBeforeExtension instead of C string
manipulation.

Change-Id: I3203bf43aa19d9eae93dcf58eb314591864c590f

5 years agoRemove cpluscplus ifdefs
Roland Schulz [Sun, 9 Sep 2018 01:57:37 +0000 (18:57 -0700)]
Remove cpluscplus ifdefs

Also remove c/c++ bool check given that it isn't needed
anymore.

Change-Id: I8b1c34a5fe3130c1a2754eed81815fa36020bd89

5 years agoFix clang-tidy warnings for OCL
Roland Schulz [Wed, 12 Sep 2018 09:34:10 +0000 (02:34 -0700)]
Fix clang-tidy warnings for OCL

Change-Id: I2f794a2209f355c0b3ee67623360724d96982458

5 years agoConvert DD gmx_reverse_top_t to C++
Berk Hess [Tue, 11 Sep 2018 12:39:26 +0000 (14:39 +0200)]
Convert DD gmx_reverse_top_t to C++

Note: thread_work_t will be converted to C++ in a child change.

Change-Id: I629016caebc7c6a0149471647a7fc9110ba01e27

5 years agoFix SSE4.1 after change to C++
Roland Schulz [Tue, 11 Sep 2018 20:05:32 +0000 (13:05 -0700)]
Fix SSE4.1 after change to C++

Change-Id: I1450c97c5594df37e38cb2e6586db2f23e1fcae8

5 years agoReplace C-style library file handling with RAII approaches
Mark Abraham [Tue, 11 Sep 2018 08:55:58 +0000 (10:55 +0200)]
Replace C-style library file handling with RAII approaches

Avoids and fixes leaks of filename strings and file pointers, in
normal and exceptional cases. Also cleans up some possible mismatched
file open and close routines.

Introduced a new header to declare the new smart FILE-pointer type.

Minor fixes to doxygen.

Change-Id: Ia7fcf5c93f2b91a6540cdd3d0e710a787960af98

5 years agoImprove DD logging
Mark Abraham [Tue, 4 Sep 2018 22:56:15 +0000 (00:56 +0200)]
Improve DD logging

Many info and warning-level messages are updated to use the existing
logging and/or text wrapping infrastructure, following the policy of
level messages are used. Messages about DLB decisions was downgraded
to information level, because users are not expected to react to them
and they are not critical.

Extended some of the infrastructure to suit the needed use cases.

Fixes #2636

Change-Id: I6d39dc41d23fe3e0ed8ee51d326c8d2264112b1f

5 years agoCompile nonbonded kernels as C++
Roland Schulz [Sat, 8 Sep 2018 21:15:03 +0000 (14:15 -0700)]
Compile nonbonded kernels as C++

Remove extern "C"

Change-Id: Id6843c53bca8246ce8d7229198e8307e0c6bdeca

5 years agoAdded option to gmx nmeig to print ZPE.
David van der Spoel [Mon, 10 Sep 2018 16:51:33 +0000 (18:51 +0200)]
Added option to gmx nmeig to print ZPE.

The Zero-point energy is a fundamental property of compounds
that can be computed simply from the vibrational frequencies.
Since we have all that information available in gmx nmeig we
might as well compute and print it.

Added some comments about units for doxygen output.

Added warning for unphysical frequencies.

Change-Id: I8914898f56bfe39a2b8f0fb3ad9df9e22eaa61bf

5 years agoReplace readConformation with TopologyInformation
Mark Abraham [Tue, 26 Jun 2018 19:04:03 +0000 (21:04 +0200)]
Replace readConformation with TopologyInformation

Removed that function and renamed its source file to reflect the only
remaining contents.

Refs #1862

Change-Id: I6616ab8930a90d33ac4a836f97c30f6bea40e29c

5 years agoAdded trivial const qualifiers
Pascal Merz [Thu, 6 Sep 2018 00:16:03 +0000 (18:16 -0600)]
Added trivial const qualifiers

Const qualifiers were added to function arguments. No changes were
made inside function bodies, except for adding const qualifiers to
convenience references within functions. These changes help the
development of a MD state object, as they reflect more clearly where
write access to data is _really_ needed.

Refs #2616

Change-Id: I779b4dfed2fbd0ad129e226c9b535ed97a8bb01f

5 years agoInitialize total_vir and pres in init_md
Pascal Merz [Thu, 6 Sep 2018 00:12:42 +0000 (18:12 -0600)]
Initialize total_vir and pres in init_md

There's no reason these should be treated differently than other
matrices like force_vir and shake_vir.

Change-Id: Ie0bbef63c9a2a67683f500217ba7c9a72b253452

5 years agoRemove const from pointers in t_filenm.
M. Eric Irrgang [Fri, 7 Sep 2018 11:11:50 +0000 (14:11 +0300)]
Remove const from pointers in t_filenm.

The const char pointer members of t_filenm were themselves const,
restricting the ability of t_filenm objects to be assigned or passed
by value. If the pointer members should not be updated, the variable
holding the t_filenm object can be marked const, so this change removes
the const-ness of the pointer members.

Change-Id: I1c405b390c5399604cf66ca5818fdac630ffde8e

5 years agoReplace rounding using int(x+0.5) with roundToInt
Roland Schulz [Sat, 8 Sep 2018 16:57:12 +0000 (09:57 -0700)]
Replace rounding using int(x+0.5) with roundToInt

Enable clang-tidy misc-incorrect-roundings

Change-Id: If448e37ad86c01a38e7a4951f3cb42a3b4cd1f12

5 years agoAdd roundToInt
Roland Schulz [Wed, 8 Aug 2018 23:18:32 +0000 (16:18 -0700)]
Add roundToInt

- Leaves the rounding of halfway cases implementation defined.
  Reason: It simplifies implementation and has no impact for
  anything where the input can have at least 1ulp error.
- Uses rint(f) because it is optimized in all commonly used
  compilers avoiding the use of intrinsics.

Change-Id: Id01c2a37d3e1c5000858e78332fa72beb5b3b58d
Fixes: #2562

5 years agoChange TopologyInformation implementation
Mark Abraham [Thu, 21 Jun 2018 07:50:47 +0000 (09:50 +0200)]
Change TopologyInformation implementation

This changes TopologyInformation so that we will be able to use it
also in the legacy tools, providing a better migration path for them,
as well as making progress to removing t_topology and a lot of calls
to legacy file-reading functions.

It can now lazily build and cache atom and expanded topology data
structures, re-using the gmx_localtop_t type (intended for use by the
DD code for domain-local topologies). The atoms data structure can
also be explicitly copied out, so that tools who need to modify it can
do so without necessarily incurring a performance penalty. All these
are convenient for tools to use.

The atom coordinate arrays are now maintained as std::vector, which
might want a getter overload to make rvec * for the legacy tools.

Added tests that the reading behaviour for various kinds of inputs is
as expected. Converted lysozyme.gro to pdb, added a 'B' chain ID,
generated a .top (which needed an HG for CYS) so updated pdb and gro
accordingly. Some sasa test refdata needed fixing for that minor
change.

Provided a convenience overload of gmx_rmpbc_init that takes
TopologyInformation as input, as this will frequently be used by
tools.

Extended getTopologyConf to also return velocities, which will
be needed by some tools.

Adapted the trajectoryanalysis modules to use the new approach, which
is well covered by tests.

Refs #1862

Change-Id: I2f43e62bc2d97f5e654f15c6e474b9b71d7106ec

5 years agoRemove macro for group type in topology
Paul Bauer [Fri, 7 Sep 2018 10:01:44 +0000 (12:01 +0200)]
Remove macro for group type in topology

Change-Id: Iabb199c321af21061f0e94c0bac20c352957e3a6

5 years agoFix grompp memory leaks
Mark Abraham [Thu, 6 Sep 2018 22:53:27 +0000 (00:53 +0200)]
Fix grompp memory leaks

Change-Id: I845565e6beca036ea15db21c03ad69bcda553acc

5 years agoMinor fixes to GPU build system
Mark Abraham [Thu, 23 Aug 2018 09:23:51 +0000 (11:23 +0200)]
Minor fixes to GPU build system

CUDA_FOUND is set by the find module, and should not be managed by us.

If CUDA hasn't been found, FindNVML can't be creative about finding
NVML, but if the user has set things up in other ways, NVML can still
be found.

We need all three of the outputs of the detection, so all three should
contribute to whether we run the detection code.

Change-Id: I3c528f5d4eacd4556c292d262b2b73ec7e32ada4

5 years agoclang-tidy: override
Roland Schulz [Wed, 18 Jul 2018 09:52:51 +0000 (02:52 -0700)]
clang-tidy: override

Change-Id: I3767d2a1117b525d9284a32935a4e8bb3ab337af

5 years agoCheck q perturbation when PME on GPU is tested
Magnus Lundborg [Tue, 4 Sep 2018 09:59:55 +0000 (11:59 +0200)]
Check q perturbation when PME on GPU is tested

If charges are not perturbued allow running PME on the GPU in
FE simulations.

Refs #2054.

Change-Id: Ibc610cb63afaadf4aa97608b8e03b6906fe2d026

5 years agoSeparate simulation database used in tests
Mark Abraham [Tue, 4 Sep 2018 13:16:06 +0000 (15:16 +0200)]
Separate simulation database used in tests

Change-Id: Id76b6cf1438b5b432ec51e98d2ce170bba01caa2

5 years agoSimplify Allocator
Roland Schulz [Sun, 19 Aug 2018 23:20:34 +0000 (16:20 -0700)]
Simplify Allocator

Remove all unneeded functions. Most of them weren't needed
with C++11 which requires all usage of allocators to go
through the allocator_traits which provide the default
implementation.

Change-Id: I37fb298c575fa5b09e5a6a1fdf4e7ff390eaec7a

5 years agoHostAllocator: Remove unnecessary template
Roland Schulz [Thu, 6 Sep 2018 19:57:13 +0000 (12:57 -0700)]
HostAllocator: Remove unnecessary template

Change-Id: I097f8318222fedf749cf911f48fca2b11a0ac5c1