alexxy/gromacs.git
5 years agoMerge branch release-2018
Mark Abraham [Wed, 29 Aug 2018 14:34:10 +0000 (16:34 +0200)]
Merge branch release-2018

Trivial clash in post-submit matrix, where a TODO resolved in 2018
release collided with a new TODO in master branch.

Change-Id: I07366ecb232c7341c8cf17674be3112f44fc9cdd

5 years agoAllow extensible MDModules and forceProviders.
M. Eric Irrgang [Fri, 24 Aug 2018 13:49:40 +0000 (16:49 +0300)]
Allow extensible MDModules and forceProviders.

supports gmxapi milestone 6, described at #2585.

MDModules::Impl gets a std::vector for (shared) ownership of objects
providing the IMDModule interface. An add() method is added to the
MDModules public member functions, but the binding protocols are
separated into separate issues to allow minimal changes and varying
dependencies on other pending changes.

Relates to #1972, #2229, #2492, #2574, #2590.

Refs #2623

Change-Id: Ibb16d1453003213a49622810ed8bad4ed4b06e2d

5 years agoDocument clang-tidy libstdc++ incompatibility
Roland Schulz [Wed, 29 Aug 2018 08:30:19 +0000 (01:30 -0700)]
Document clang-tidy libstdc++ incompatibility

Fixes #2627

Change-Id: I424698e22d2c73716fe53ae750bc260e3872a91f

5 years agoRefactor wall potential calculation
Berk Hess [Mon, 2 Oct 2017 19:41:09 +0000 (21:41 +0200)]
Refactor wall potential calculation

Changed the wall potential calculation to use ForceWithVirial instead
of the coord x forces sum plus a virial correction. This change removes
the last virial buffer from t_forcerec.
Also refactored do_walls().

Change-Id: I23e56b6e08c57bd03363646f1f968bf0e251faa2

5 years agoUse more const in hardwaretopology
Roland Schulz [Tue, 28 Aug 2018 21:04:24 +0000 (14:04 -0700)]
Use more const in hardwaretopology

Change-Id: I5b4240c246e3a87f3c85e506645d720960e09933

5 years agoFix clang-tidy build with libstdc++ >= 7
Roland Schulz [Tue, 28 Aug 2018 02:23:09 +0000 (19:23 -0700)]
Fix clang-tidy build with libstdc++ >= 7

Fixes #2627

Change-Id: I236ab812f98c4921b21b03c6825707595d0385c3

5 years agoMove clang-tidy build
Mark Abraham [Mon, 27 Aug 2018 21:12:36 +0000 (23:12 +0200)]
Move clang-tidy build

This has seemed too slow when combined with the ASAN build.

Change-Id: I45ea5856ca05edbb6107b62f219e8afd3cdbda3f

5 years agoFix more clang-tidy issues
Mark Abraham [Tue, 28 Aug 2018 10:53:42 +0000 (12:53 +0200)]
Fix more clang-tidy issues

Change-Id: I64f138bc2034bbf1cfd734e49db8e88d07139ca9

5 years agoQuiet cmake about clFFT not found after first run
Szilárd Páll [Tue, 28 Aug 2018 13:06:19 +0000 (15:06 +0200)]
Quiet cmake about clFFT not found after first run

Change-Id: Ief373c63045354982c7b9b505aa99842c3e5ea51

5 years agoUpdates to gmx cluster
boristim [Fri, 24 Aug 2018 17:23:45 +0000 (20:23 +0300)]
Updates to gmx cluster

As proposed by Boris Timofeev on redmine, this adds to ability
of writing CRYST information to output pdb files, as well as
writing index files for generated clusters.

Fixes #2597

Change-Id: I991889d4116f096a58a22d5482420f0ddc6d0ef9

5 years agoAdd hard limit for line length
Roland Schulz [Fri, 24 Aug 2018 04:20:08 +0000 (21:20 -0700)]
Add hard limit for line length

Extremely long lines are a pain in diff-views (gerrit, github, ...),
and a problem for readability. The specific number doesn't matter,
as long as it reasonable. Most of us are just ignoring 80 so that
is useless as guideline.

Change-Id: I5dbced451b56bc307beea2aec7599b8764f978cd

5 years agoFix documentation build without imagemagick
Paul Bauer [Tue, 28 Aug 2018 08:09:18 +0000 (10:09 +0200)]
Fix documentation build without imagemagick

During a recent merge commit the CMakefile for generating the
documentation without the full reference manual got broken due to a
double definition of the user-guide/index file. This commit fixes this.

Change-Id: Ib4e8a9e991695ebe28937745591290e3d336aaaf

5 years agoFix use of nullptr
Mark Abraham [Mon, 27 Aug 2018 10:11:29 +0000 (12:11 +0200)]
Fix use of nullptr

clang-tidy is supposed to check this, but probably didn't because this
source file was changed around the same time.

Change-Id: I8e30024ea59779a75a757160b1367a66b3a670cf

5 years agoPrepare pme-gpu-types.h for OpenCL
Aleksei Iupinov [Wed, 16 May 2018 12:39:36 +0000 (14:39 +0200)]
Prepare pme-gpu-types.h for OpenCL

DeviceBuffer fields are hidden from the future OpenCL
device compilation with a macro. Struct fields are reordered
to satisfy the OpenCL device/host compatibility constraints.

Change-Id: I438c8121487c119cc5abfc04535a2c515fa2d399

5 years agoTransfer information from old how-to section
Paul Bauer [Wed, 17 Jan 2018 15:10:39 +0000 (16:10 +0100)]
Transfer information from old how-to section

Transfer information from the old how-to section to the new website and
perform some updates/deletions where needed.

Refs #2359

Change-Id: I474f4161003f07f92ba23d8183ac058fec4dc17b

5 years agoEnable more clang-tidy checks for new code
Roland Schulz [Fri, 3 Aug 2018 01:19:40 +0000 (18:19 -0700)]
Enable more clang-tidy checks for new code

Some of the clang-tidy checks would require too many code
changes when enabled globally. To get the benefits from
the checks without changing all legacy code add a second
configuration. Which configuration is used is selected by
directory: Any new module should use the new configuration.

Additionally it is recommended to use the new configuration
on a per file or change basis (clang-tidy-diff.py) manually.

This change contains the proposed configuration for new code and
and enables it for three folders which contain new code.

Checks enabled relative to base configuration:
clang-analyzer-security.insecureAPI.strcpy
readability-inconsistent-declaration-parameter-name
readability-function-size
cppcoreguidelines-owning-memory
cppcoreguidelines-no-malloc
cppcoreguidelines-pro-type-member-init
cppcoreguidelines-pro-type-union-access

The reasons that the remaining checks are still disabled (don't
know a good place to document because json doesn't allow comments):
misc-incorrect-roundings: #2562
readability-else-after-return: I don't think it is something we want to follow
cppcoreguidelines-pro-type-*cast: While it is best to not do those cast there
    are valid reasons for them. And because they are already easy to spot,
    mandating a NOLINT for those is probably not helpful.
cppcoreguidelines-special-member-functions: conflicts with Wunused-member
cppcoreguidelines-pro-type-vararg: #2570
cppcoreguidelines-pro-bounds-constant-array-index: While I think it would be
    nice to have a compile mode with bound checking enabled. It is so ugly
    to have to write at(v, n) instead of v[n].
cppcoreguidelines-pro-bounds-array-to-pointer-decay: This would be particular
    nice to have But it makes it very hard to write warning free code with
    legacy APIs which uses e.g. rvec. Those have to be modernized first.
cppcoreguidelines-pro-bounds-pointer-arithmetic: This would also be very nice.
    But it requires that depending APIs use ArrayRef rather than pointers
    for non-owning array passing.

Change-Id: I891a576d2c185ef6587224a1a19324f1a8967237

5 years agoAdd basic operations for gmx::BasicVector<>
Alexey Shvetsov [Wed, 22 Aug 2018 17:04:09 +0000 (20:04 +0300)]
Add basic operations for gmx::BasicVector<>

1. Overload +,-,+=,-= operations for BasicVector
2. Add class methods for dot,cross products, scale, unitv, length,
   sqlength functions (norm, norm2)
3. Add out of class functions for same operations as class methods
4. Add .toRVec, .toDVec methods
5. Provide forwarding templates in vec.h to get correct norm, norm2
   implementation when both headers are included and function is applied
   to older vector style.

Change-Id: I9d0f4490ae51d12842e0f22e9b24b46754fb4f79
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
5 years agoReplace gmx_hash_t by HashedMap
Berk Hess [Fri, 10 Aug 2018 13:25:08 +0000 (15:25 +0200)]
Replace gmx_hash_t by HashedMap

This change is only refactoring.
The only (minor) functional change is that the initial size of the
hash table is set to >=1.5*#keys instead of 2.0*#keys.

Change-Id: I4512318dce5b76d99e7f5846ee0f158fb56b510f

5 years agoMerge "Merge branch release-2018"
Berk Hess [Fri, 24 Aug 2018 15:44:02 +0000 (17:44 +0200)]
Merge "Merge branch release-2018"

5 years agoAdd size optimization to HashedMap
Berk Hess [Fri, 10 Aug 2018 11:16:27 +0000 (13:16 +0200)]
Add size optimization to HashedMap

The table size in HashedMap is now optimized when calling clear()
using the old number of keys. Also the number of keys is now set
to a power of 2, so we can use bit masking instead of modulo.
The bit masking allows for negative keys, which is also tested.

This is preparation for replacing gmx_hash_t with HashedMap,
but also improves performance for gmx_ga2la_t.

Change-Id: I90c5a602cb7e213eb6d2e8259a0effc4fd7c4e14

5 years agoAdd tests for HashedMap
Berk Hess [Tue, 21 Aug 2018 15:11:56 +0000 (17:11 +0200)]
Add tests for HashedMap

Also moved HashedMap into gmx namespace and replaced the debug
assertions by debug exceptions.

Change-Id: Ie1d5984ee1db9b288e8664d17a86ab265652c637

5 years agoFix build without TNG
Mark Abraham [Fri, 24 Aug 2018 08:58:25 +0000 (10:58 +0200)]
Fix build without TNG

Also resolve the TODO about testing for this case.

Change-Id: I7e4b65f82a83c84234a01220954931e8ecd28c9e

5 years agoMerge branch release-2018
Mark Abraham [Thu, 23 Aug 2018 21:40:50 +0000 (23:40 +0200)]
Merge branch release-2018

Clashes in set_pull_init signature.

Issues with new pull checks from LocalAtomSet refactoring.

Transfered change to PME-on-GPU availability to new
location.

Ignored changes to pre-submit, because no longer appropriate.

Adopted changes to gmx solvate into master. The new test
coverage finds a memory leak that is fixed in this patch with
a refactoring of sort_molecule and add_solv.

Needed to include domdec/collect.h now used in master because
a function call from it was introduced in release-2018.

Change-Id: I5f7fcdf52a6093b455bd6e31c264696d88ced2ac

5 years agochange some char to string in gmxpreprocess
Joe Jordan [Sun, 5 Aug 2018 17:55:36 +0000 (19:55 +0200)]
change some char to string in gmxpreprocess

Related to #2566 and #2570. As part of the refactoring of
pdb2gmx one thing that becomes clear is that a lot of variables
could have better defined scope and readability could be
improved if some char's are converted to string's. This can
ripple through the code base of gmxpreprocess. I have followed
some of those ripples here and will continue to follow in
later changes.

Change-Id: I0d12704ef27c06a4f64f8d1e8638760c8c7019ae

5 years agoUpdate to prepare for 2018.4 point release
Paul Bauer [Tue, 21 Aug 2018 09:09:52 +0000 (11:09 +0200)]
Update to prepare for 2018.4 point release

Change-Id: Id2cd50926f53c6a5ee825dfd9a7dce32e31938d4

5 years agoVersion 2018.3
Paul Bauer [Tue, 21 Aug 2018 09:05:47 +0000 (11:05 +0200)]
Version 2018.3

Added some release notes for issues that were missing them.

Change-Id: I5480e5421387081fb7b6fc26885d983e6b4046b9

5 years agoFix trjconv when running without a structure file
Paul Bauer [Wed, 22 Aug 2018 09:58:58 +0000 (11:58 +0200)]
Fix trjconv when running without a structure file

When running trjconv without a reference structure file,
the topology information would be left uninitialized and
cause subsequent crashes during the deallocation.

Added tests to cover this behaviour.

Fixes #2619

Change-Id: I501c560ee0f8afca00bc78fd6f81b6841b5a5b57

5 years agoFix handling of counter resets
Mark Abraham [Fri, 27 Apr 2018 16:35:34 +0000 (18:35 +0200)]
Fix handling of counter resets

There is no reason for or need to change max_hours, ir->nsteps or
step_rel when doing a counter reset.

This makes clear that the behaviour for the combination

mdrun -maxh t -resetstep n

matches the documentation of -maxh.

Updated the API for walltime_acccounting and its usage, because
elapsed time is an insufficiently clear context. Changed the names of
the start and stop functions so that no callers can silently rely on
semantics that have changed.

Avoided variables such as elapsed_time and max_hours, which were
insufficiently precisely worded.

Refs #1781

Change-Id: I16c96985f43a7b4ac75b94f378da3d05914d6986

5 years agoFix missing interactions with GPU and DD
Berk Hess [Fri, 10 Aug 2018 07:03:41 +0000 (09:03 +0200)]
Fix missing interactions with GPU and DD

Non-local LJ and Coulomb interactions would not be computed on a rank
after the non-local GPU pair-list was empty at some point in time;
either at the start of the run or during a run.
The issue is that the pair-list was initialized conditionally on
the size of the list in the device side data instead of the host side
data.
Although this could have led to silent errors for small step numbers,
most systems will likely crash for production runs.

Fixes #2502

Change-Id: Iae1c5b70624b652d625520cadb647f862f296d5b

5 years agoFix pdb2gmx -chainsep
Joe Jordan [Tue, 7 Aug 2018 13:13:18 +0000 (15:13 +0200)]
Fix pdb2gmx -chainsep

Fixes #2577

This patch makes readConfAndAtoms public and has pdb2gmx call it
directly. Previously pdb2gmx called readConfAndTopology, which
then called readConfAndAtoms and then tpx_make_chain_identifiers,
the latter of which is suspected of being broken, as documented
in the TODO added here.

Change-Id: I1b47e1743f6accf77ae67d232eb2c815edcff970

5 years agoPermit PME on GPUs only for dynamical integrators
Mark Abraham [Tue, 21 Aug 2018 17:04:34 +0000 (19:04 +0200)]
Permit PME on GPUs only for dynamical integrators

We did not intend to support anything else (and at least energy
minimization does not work, because copying of HostVector does not
work properly).

Fixes #2578

Change-Id: I260e578b718614e868ea264a1f487b903704f94f

5 years agoRequest flushing denorms to zero in OpenCL
Szilárd Páll [Mon, 30 Jul 2018 16:18:37 +0000 (18:18 +0200)]
Request flushing denorms to zero in OpenCL

This change adds by default the -cl-denorms-are-zero to the flags used
for kernel compilation. This is done to:
- avoid a large performance penalty on AMD Vega with ROCm (which by
  default handles denorms on GFX9 or later).
- make the defaults uniform across CUDA and OpenCL.

Fixes #2593

Change-Id: I9e6183c4367b5960e0e21f1dd342d7695acfbc44

5 years agoEnsure domains are large enough for atom motion
Berk Hess [Thu, 16 Aug 2018 11:51:18 +0000 (13:51 +0200)]
Ensure domains are large enough for atom motion

The introduction of the dual pair list has led to larger nstlist
values, which leads to larger atom displacements between domain
decomposition steps. This has made it much more likely that
"atom moved to far" errors appeared at DD and PME redistribution.
Now minimum DD cell size setting correctly takes into account atom
displacement (when there is a reference temperature).

Note that this can significantly increase the minimum DD cell size
for solvent systems and slighlty for systems with large molecules.

Fixes #2614

Change-Id: Ie41131e9eed3ef828928516a6b8ebfb9b5ba2bdb

5 years agoFixed mdrun segv with QM/MM ONIOM scheme
Berk Hess [Tue, 21 Aug 2018 08:07:22 +0000 (10:07 +0200)]
Fixed mdrun segv with QM/MM ONIOM scheme

Fixes #2617

Change-Id: I097d392ea53aeff589042df5074866e07a0ce5c5

5 years agoRe-implemented mdrun -rerun tests
Mark Abraham [Thu, 29 Mar 2018 06:59:40 +0000 (08:59 +0200)]
Re-implemented mdrun -rerun tests

Used the new infrastructure to let the rerun test check that the
energies and trajectories (including forces) produced by a rerun
actually match those produced by a normal mdrun. Such a test running
in parallel would have prevented #1868, and will help checking that
any changed or new integrator functionality does the job that it
should do.

Updated some infrastructure to not care whether it gets passed
a C or C++ string.

Removed small pieces of infrastructure originally intended for use by
this patch but which are no longer required.

Refs #1868, #2112

Change-Id: Ifcb211aba62ccb79ebaec21a3088c9e60a618c86

5 years agoFix assertions for SD update
Mark Abraham [Tue, 7 Aug 2018 12:58:51 +0000 (14:58 +0200)]
Fix assertions for SD update

Some of the assertion logic in the refactoring of 5ae5bf42159cf was
wrong, but we apparently have no tests of the SD integrator before
now.

Refs #1793

Change-Id: I8acb6c5a9b6128aab7967fa8a1d32247f6365586

5 years agoAdd test for structural similarity measures rmsd and rho.
Christian Blau [Mon, 20 Aug 2018 09:07:26 +0000 (11:07 +0200)]
Add test for structural similarity measures rmsd and rho.

Tests rmsd and size-independent rho-factor calculation routines.

Change-Id: I1c74cb4e3185e38aafc5cb04352af2789b40eca9

5 years agoRefactor calc_verlet_buffer_size()
Berk Hess [Thu, 16 Aug 2018 11:45:23 +0000 (13:45 +0200)]
Refactor calc_verlet_buffer_size()

Split of parts, which will be reused, from calc_verlet_buffer_size().
This change is only code motion.

Refs #2614

Change-Id: I9cf68a2661ee10eb991240d2768c077df9f9c0c5

5 years agoDisable single compilation unit with CUDA 9.0
Szilárd Páll [Thu, 19 Jul 2018 13:53:43 +0000 (15:53 +0200)]
Disable single compilation unit with CUDA 9.0

CUDA 9.0 does not support CC 2.x, hence even with the default list of
targeted arch, multiple compilation units an be enabled.

Fixes #2561

Change-Id: I741081da39539f211fad32bda5c1f1dccc4378f9

5 years agoRemove compacting from DD redistribute
Berk Hess [Fri, 17 Aug 2018 14:01:38 +0000 (16:01 +0200)]
Remove compacting from DD redistribute

Since a long time the bCompact argument to dd_redistribute_cg() has
always been false. Now this option and the code for it is removed.

Change-Id: Iec87acd3f968475443e4d6de1fa87df536206230

5 years agoFix Verlet buffer estimate with BD
Berk Hess [Thu, 16 Aug 2018 11:19:55 +0000 (13:19 +0200)]
Fix Verlet buffer estimate with BD

With BD and bd_fric>0, the masses used for estimating the pairlist
buffer based on estimated motion of constrained atoms and virtual
sites were, incorrectly, the actual masses instead of 1.

Fixes #2613

Change-Id: I5378c5f5566ccda28554b5a6c7d7c403228aa794

5 years agoFix clang namespace comment warning
Berk Hess [Mon, 20 Aug 2018 09:26:57 +0000 (11:26 +0200)]
Fix clang namespace comment warning

Change-Id: Iff3b32562aed431f80c9a3b57a6aeb90f042ef9b

5 years agoFix assertion failure in CG
Berk Hess [Tue, 14 Aug 2018 08:31:24 +0000 (10:31 +0200)]
Fix assertion failure in CG

When the final step coincided with a coordinate output step,
conjugate gradient minimization would exit with an assertion failure
instead of writing confout.gro.

Fixes #2554

Change-Id: I53fffccb5310259132724b83ee452ef01f8ac9c8

5 years agoReally fix CG with multiple domains
Berk Hess [Tue, 14 Aug 2018 08:02:44 +0000 (10:02 +0200)]
Really fix CG with multiple domains

Commit 9232fa9a incorrectly claimed to fix CG with multiple domains.
The change fixes all issues due to the change of the global state
only being available on the master rank.

Note that there is still an issue with writing the final trajectory
frame.

Refs #2554

Change-Id: I1ed3363f722daad9e6aef00d9ded6647acc820f2

5 years agoMake gmx_ga2la_t a proper class
Berk Hess [Thu, 28 Jun 2018 12:22:59 +0000 (14:22 +0200)]
Make gmx_ga2la_t a proper class

Made interface conform as much as possible to std::unordered_map.
This change is only refactoring, apart from adding some assertions.

Note that HashedMap is also intended to replace gmx_hash_t,
after some of the optimizations used there are ported over.

Change-Id: I702296a5bd4988cc1f56fc92df28a7ba5e27c558

5 years agoRemove macros in utility/tests/arrayref
Roland Schulz [Fri, 10 Aug 2018 22:28:12 +0000 (15:28 -0700)]
Remove macros in utility/tests/arrayref

Gave warnings in GCC 8. And were ugly anyhow.

Change-Id: I63ed9c5f46baa5523349cdae4d46ed2253119ca2

5 years agoFix simd-test
Roland Schulz [Sun, 19 Aug 2018 00:56:15 +0000 (17:56 -0700)]
Fix simd-test

Having the data constants as expressions makes it more likely for the
compiler to reorder expressions and thus get results outside of
the tight ulp checks.

Also fix compiler error with GMX_OPENMP_MAX_THREADS=128.

Change-Id: Iacdcb8d4f6536e69bedd5b028d5150e73db0c764

5 years agoAdd check for pull group PBC to grompp
Berk Hess [Wed, 15 Aug 2018 14:45:15 +0000 (16:45 +0200)]
Add check for pull group PBC to grompp

Pull groups that use a reference atom for periodic boundary treatment
should have all their atoms well within half the box size of this
reference. When this is not the case, grompp will now issue a warning.

Refs #2397

Change-Id: Ida7004624a470981d9ce22a1ef921daebad83364

5 years agoreadability-implicit-bool-conversion 2/2
Roland Schulz [Wed, 15 Aug 2018 18:33:02 +0000 (11:33 -0700)]
readability-implicit-bool-conversion 2/2

automatic changes

Change-Id: I05a9c95a129dec179291e875be411b4a8e1d0522

5 years agoreadability-implicit-bool-conversion 1/2
Roland Schulz [Tue, 14 Aug 2018 04:21:09 +0000 (21:21 -0700)]
readability-implicit-bool-conversion 1/2

manual changes

Change-Id: Iad9d6d301b526f79c25e56e7dfdf42144319ed80

5 years agoclang-tidy modernize
Roland Schulz [Wed, 18 Jul 2018 08:21:45 +0000 (01:21 -0700)]
clang-tidy modernize

avoid-bind (no changes)
redundant-void-arg
use-bool-literals

For deprecated-headers the changes are made in the cpp files but the
check isn't enabled. It isn't possible to enable it only for source
files but not header files and some of our headers still need to
compile with a C compiler for the nonbonded kernels. Once those
are removed the check should be enabled.

Change-Id: I7316b9bbffaf8842fecc40327543397984f75f5c

5 years agoclang-tidy: google tests applicable
Roland Schulz [Thu, 2 Aug 2018 02:48:12 +0000 (19:48 -0700)]
clang-tidy: google tests applicable

Change-Id: I32e5dd6226348a162750d272c20c49e116bb94a4

5 years agoEnable clang tidy/warnings for tests
Roland Schulz [Wed, 18 Jul 2018 01:39:01 +0000 (18:39 -0700)]
Enable clang tidy/warnings for tests

Also move check configuration into .clang-tidy file to allow
running clang-tidy seperately from the build to apply automatic
fixes.

Also relaxes some scalar tests. Commit b9057925955f changed contants
and relaxed SIMD tests without also relaxing scalar tests.

Change-Id: Ia895e219502b665db7ca0effaa03af3d3d380256

5 years agoMake pull pbc atom use LocalAtomSet
Berk Hess [Thu, 26 Apr 2018 14:35:20 +0000 (16:35 +0200)]
Make pull pbc atom use LocalAtomSet

Now the pull code only depends on the domain decomposition
through the local atom set and access to a communicator.

Change-Id: I8fad79ce4bd35bd7403e0f6515c66f8c2d253c69

5 years agoImprove GPU detection sanity check error message
Szilárd Páll [Mon, 13 Aug 2018 14:36:38 +0000 (16:36 +0200)]
Improve GPU detection sanity check error message

When the unexpected condition is triggered some extra info on what type
of error has been left behind after a successful detection of a
compatible GPU is now printed to aid with identifying issues.

Refs #2415

Change-Id: I85e0da4c339df8184aa2dec49440ce2d0e83e8bf

5 years agoUpdated links in user guide
Paul Bauer [Tue, 14 Aug 2018 12:49:16 +0000 (14:49 +0200)]
Updated links in user guide

Made sure links in the terminology section of the user guide point
directly to the html reference manual instead of to the pdf version.
Added small part for MD section in terminology woth link to reference
manual.

Refs #2359

Change-Id: Ie21d177c722fcc4b548d8c2d2fa228bff9bce2c8

5 years agoFix int/bool bugs
Roland Schulz [Tue, 14 Aug 2018 04:20:51 +0000 (21:20 -0700)]
Fix int/bool bugs

Change-Id: Id981c28d02ee22ad9a99f22a939887572d78e4b5

5 years agoAdd chainsep and merge tests for pdb2gmx
Joe Jordan [Mon, 16 Jul 2018 16:15:54 +0000 (18:15 +0200)]
Add chainsep and merge tests for pdb2gmx

The chainsep and merge functionality is tested here using only
one ff and water model since these should not affect
how chains are processed. The new pdb file is just
fragment1 with chains and TER records added.

Change-Id: I41a215b53e3a4bace7738c838f426047e6937d57

5 years agoFix enforced rotation energy output
Mark Abraham [Tue, 17 Jul 2018 22:49:51 +0000 (00:49 +0200)]
Fix enforced rotation energy output

Its own per-group energy output files were always OK, but normal edr
and log writing didn't work unless pull groups were also active.

Change-Id: I66d3eb1e14b72766c385a69fd35a750b2338343f

5 years agoFix SIMD anyTrue bug, and add better unit test
Erik Lindahl [Mon, 13 Aug 2018 12:48:26 +0000 (14:48 +0200)]
Fix SIMD anyTrue bug, and add better unit test

The double precision versions could occasionally
miss elements.

Fixes #2588.

Change-Id: Ie033a3af0e5de25205533868062716a83f33df3c

5 years agoRemove BasicVector.as_vec
Roland Schulz [Mon, 13 Aug 2018 00:53:59 +0000 (17:53 -0700)]
Remove BasicVector.as_vec

Change-Id: I84e24ff4fc098b116b874c7f137a6f195d827a48

5 years agoRemove code duplication in trajana/modules/trajectory
Roland Schulz [Mon, 13 Aug 2018 01:27:37 +0000 (18:27 -0700)]
Remove code duplication in trajana/modules/trajectory

Change-Id: If5f48695930c61bbed69932b6cab267fc8ac110c

5 years agoRemove cppcheck
Roland Schulz [Mon, 13 Aug 2018 00:13:16 +0000 (17:13 -0700)]
Remove cppcheck

cppcheck gives false positives with modern C++ constructs. It's
parser isn't very robust. Most of its tests are covered by at
least one of clang-tidy/clang/clang-analyzer/gcc/msvc/msvc-analazer
which all are significantly more robost making the ratio of
false positives to real issues identified not worth it. Additionally
updating cppcheck to the lastest version isn't possible because
it fails with syntax error in gtest.

Change-Id: I290468947c46eb5f4901b7cc30cdf96e487a50cf

5 years agoFix MSD
Roland Schulz [Mon, 13 Aug 2018 05:24:23 +0000 (22:24 -0700)]
Fix MSD

Fixes #2604

Change-Id: Ie0f1bb881d8ba1b5cc363c3645130123245c98a6

5 years ago3/3 of old-style casting
Roland Schulz [Fri, 6 Jul 2018 02:05:20 +0000 (19:05 -0700)]
3/3 of old-style casting

Also remove GMX_CXX11_COMPILATION and gmx_qsort

Change-Id: I3cfec7dfdb47da89d3849ff7e9cc15f0550194a9

5 years agoAdd _real user defined literal
Roland Schulz [Mon, 6 Aug 2018 06:34:40 +0000 (23:34 -0700)]
Add _real user defined literal

Change-Id: Ia656d894db2f663a3b8cfc1f6897f20d97759edc

5 years agoEnable clang-tidy for headers
Roland Schulz [Mon, 30 Jul 2018 22:46:57 +0000 (15:46 -0700)]
Enable clang-tidy for headers

Change-Id: Id5acfb264ac57c09cc1a7d8ab512eb7c6bfc40f1

5 years agoAvoid using global variables in programs
Roland Schulz [Fri, 12 Jan 2018 08:46:35 +0000 (00:46 -0800)]
Avoid using global variables in programs

Using global variables defined in libgromacs and
used from outside causes issues if only lazy
binding is available.

Change-Id: Id1e960d7c638476d3f7ace339a327040f516f6fc

5 years agoAdded physical validation document to the dev manual.
Kevin Boyd [Thu, 9 Aug 2018 00:33:14 +0000 (20:33 -0400)]
Added physical validation document to the dev manual.

physical_validation.rst had been written but not added to the
document generation

Unwrapped a few lines that were causing warnings

Change-Id: I99ade0d25ae3897f01a6ac57d4369c2a4e36f61b

5 years agoRemove Debug Helpers from Essential Dynamics code.
Christian Blau [Thu, 9 Aug 2018 08:40:51 +0000 (10:40 +0200)]
Remove Debug Helpers from Essential Dynamics code.

dump_edi_positions, dump_edi_eigenvecs, and dump_edi rely on the data
layout of the essential dynamics code and leave a large foot-print of
changes when refactoring the code.

All information dumped is reasonably accessible with a modern debugger,
also on

Part of #2590

Change-Id: Icbd60a3347014df365aa17d47bcbbb18c2566a83

5 years agoLocal atom sets in rotational pulling.
Christian Blau [Mon, 6 Aug 2018 21:00:32 +0000 (23:00 +0200)]
Local atom sets in rotational pulling.

Uncouples domain decomposition from rotational pulling by the use of
local atom set.

Change-Id: Ide8de70033a4e8d8f4e8c7eb66a554e0d3316654

5 years ago2/3 of old-style casting
Roland Schulz [Mon, 2 Jul 2018 18:29:58 +0000 (11:29 -0700)]
2/3 of old-style casting

Manual changes.

Change-Id: I5a9d1ab65498f70539dd1f28bb538781dd1021f8

5 years agoEnable ccache compiler wrapper when available.
M. Eric Irrgang [Mon, 30 Jul 2018 10:46:38 +0000 (13:46 +0300)]
Enable ccache compiler wrapper when available.

Let CMake use ccache compiler wrapper via `..._LAUNCHER`.

For gcc and compatible compilers, the cost of rebuilding can be greatly
reduced when switching back and forth between branches. If ccache is not
installed or is not given a known-compatible compiler to wrap, this
change has no effect.

Potential side effects should already be familiar to ccache users:

* In some cases, a cache configured to grow too large may lose its benefit.
* If the cache is corrupted, it may need to be removed to restore utility.

We are not using any of the more aggressive caching options, so there
should be no risk of false positives in compile cache hits.

Resolves #2592

Change-Id: Ia04d7388a3e8367d31cc5728dfc4b245ea7ef774

5 years agoEssential dynamics functions use const-ref for input t_edpar.
Christian Blau [Wed, 8 Aug 2018 12:31:48 +0000 (14:31 +0200)]
Essential dynamics functions use const-ref for input t_edpar.

Made function calls to t_edpar carrying input parameters use const &, so
that we can later use a const parameter storage class.

Added documentation and trivial modernisation to functions and moved
them into anonymous namespace.

Part of #2590

Change-Id: I1910f45c3695ce6b1c234f67bd3ecaa279541e26

5 years agoSplit essential dynamics eigenvector reading.
Christian Blau [Mon, 6 Aug 2018 06:46:12 +0000 (08:46 +0200)]
Split essential dynamics eigenvector reading.

Split off input parameter reading in all t_eigvec from working memory
allocation for buffers or simulation state variables. Preparation to
splitting t_eigvec and t_edflood data structures in constant input
data, temporary buffers, and data describing the simulation state.

Moved the initialReferencePosition and referenceSlope out of t_eigvec
into t_edflood, because it is only used in flooding and is meaningless
for all other data structures using t_eigvec.

Part of #2590

Change-Id: Id01aeca97489a02a6ed7c7ed2789fd11b978a115

5 years agoMake essential dynamics a C++ type.
Christian Blau [Mon, 6 Aug 2018 15:18:02 +0000 (17:18 +0200)]
Make essential dynamics a C++ type.

Confer also the reform of the rotational pull data, Ic03919f68c, for the
conversion strategy for gmx_edsam.

Part of #2590

Change-Id: Iece42512a8c5222d86ab8545ce2fc12aa1c6ffc7

5 years agoFix part of old-style casting
Roland Schulz [Mon, 2 Jul 2018 04:58:10 +0000 (21:58 -0700)]
Fix part of old-style casting

Part clang-tidy google-readability-casting is able to do.
Manual fixes in:
fileio/vmdio.cpp
gmxlib/nonbonded/nonbonded.cpp
selection/sm_same.cpp
gmxana/gmx_anadock.cpp
gmxana/gmx_cluster.cpp

Change-Id: Iad15ea205ac56b29f8ecaea6556fabedec975736

5 years agoRemove gmx custom fixed int (e.g. gmx_int64_t) types
Roland Schulz [Mon, 16 Jul 2018 16:35:11 +0000 (09:35 -0700)]
Remove gmx custom fixed int (e.g. gmx_int64_t) types

Change-Id: I20b6681f55c06e535524923351c9919ec4c7ffa3

5 years agoAdd some developer help to Developer Guide.
M. Eric Irrgang [Thu, 2 Aug 2018 11:55:38 +0000 (14:55 +0300)]
Add some developer help to Developer Guide.

Import helpful stuff from old web site.

Change-Id: I9ae4e872a8de014e9ddd3afed47067e9f7aac405

5 years agoRemove duplicate entry for Doxygen from dev manual
Paul Bauer [Mon, 6 Aug 2018 07:45:06 +0000 (09:45 +0200)]
Remove duplicate entry for Doxygen from dev manual

The page for doxygen was added twice to the developer manual, as it was
included both in the style guidelines and under development tools.
Removed the entry in the style section, as I think that the information
is better situated in the tools section.

Change-Id: Ie8f802b6981e7fdb53d04002e05563f092bc8047

5 years agoLocal atom sets in compEL / ion swapping code.
Christian Blau [Wed, 14 Mar 2018 12:33:23 +0000 (13:33 +0100)]
Local atom sets in compEL / ion swapping code.

Local atom sets remove depency of domain decomposition on the
computational electrophysiology modules and handle atom index updates
outside of this module.

Additional refactoring, because swap_group has to be a C++ struct now.

Refers to #1972

Change-Id: Ic6ee2a71f5c5c11e161fa26aafbed2764e014daa

5 years agoFix clang-tidy MPI warnings
Roland Schulz [Fri, 3 Aug 2018 22:47:07 +0000 (15:47 -0700)]
Fix clang-tidy MPI warnings

Change-Id: Ib7098b1409c3b11b6464d2b7673a0f58a807ed4f

5 years agoChange gmx_bool from int to bool
Roland Schulz [Mon, 21 May 2018 05:41:57 +0000 (22:41 -0700)]
Change gmx_bool from int to bool

This relies on C bool and C++ bool be of same size.
The language doesn't gurantee that. But we anyhow require
that both compilers use the same ABI and in that case
both types will have the same size.

Change-Id: I50b1b2e5683abfd1a5389ea158db2fda86e752c5

5 years agoFix gmx solvate topology updating
Kevin Boyd [Thu, 2 Aug 2018 01:33:19 +0000 (21:33 -0400)]
Fix gmx solvate topology updating

The topology update of gmx solvate was hardcoded to SOL molecules
(and some of the reported quantities also registered HOH and WAT).

Changed to allow updates based on any solvent molecule information.

Also, now allows for updates with multiple solvent molecule types
in the input solvent configuration

Added test case for topology update with multiple solvents

fixes #1929

Change-Id: If506e0f509c8a25cb615fb8d3f15b4dfdb239afa

5 years agoDisable FPE for GCC 7.* with optimizations
Roland Schulz [Mon, 6 Aug 2018 02:17:32 +0000 (19:17 -0700)]
Disable FPE for GCC 7.* with optimizations

Only GCC 7 with RelWithAsserts has issues. And debugging
has been unsuccessful.

Related #2404

Change-Id: I0ed3161c12cc8c33af3280f30a97a25c5d38cf1b

5 years agoReform enforced rotation working data
Mark Abraham [Tue, 17 Jul 2018 21:46:31 +0000 (23:46 +0200)]
Reform enforced rotation working data

runner now holds responsibility for this object, not inputrec. We need
this separation as a precursor for various modularization efforts. The
input parameters are now referred to from that object, as a precursor
to forming a proper class and module.

The working data for each rotation group now contains a handle to the
const input data for each rotation group, rather than the other way
around. It also contains its index within the set of rotation
groups. These permit more const correctness, more range-based for
loops, and fewer parameters passed. This will let us evolve a class
to handle each group and/or type of rotation.

A vec field in the inputrec is now called inputVec. Formerly , it
handled both the user input and the normalized form used during the
work of the module, which no longer occurs. The name change makes it
clear that there are no remaining inadvertent uses of the field in the
input data.

The ind_loc field is now a proper deep copy of the ind field, because
they contain different data. This can be superseded by the
LocalAtomSet approach.

Some additional const correctness and reduced scope of iteration
variables.

Change-Id: Ic03919f68cc121eed9ebba58f887f18e5d1d8720

5 years agoclang-tidy: modernize make-unique/shared
Roland Schulz [Tue, 17 Jul 2018 20:27:44 +0000 (13:27 -0700)]
clang-tidy: modernize make-unique/shared

Change-Id: I913646526c767a409b74854c3a8efce5806a2a97

5 years agoSupport hwloc 2.x.x
Kevin Boyd [Sat, 21 Jul 2018 18:56:38 +0000 (14:56 -0400)]
Support hwloc 2.x.x

Created compatibility layer to account for API changes moving
from hwloc 1.x.x to 2.x.x while retaining support for v1.x.x.

Changes supporting hwloc 2.x.x include:
    -reworked descendents lookup in topology tree to account for new
     division of object children into "normal", "memory", and "io" types
    -different memory access location for hwloc objects
    -accessing distances (latencies) between nodes has been reworked
    -different flags for accessing PCI devices
    -changed numa node ancestor search to account for numa nodes no
     longer being a normal part of topology tree

Fixes #2539

Change-Id: I483dda3dd344d8f7c99aa828bcc118a3d2de9dfd

5 years agoSplit essential dynamics reading routine
Christian Blau [Tue, 31 Jul 2018 09:27:10 +0000 (11:27 +0200)]
Split essential dynamics reading routine

Introduce a class that handles the .edi file magic number reading and
versioning.

Split off working memory allocation and file version checking from
parameter reading.

Part of #2590

Change-Id: I22ee0294d464ba3acc2e5c54b3a42d97c90cbb71

5 years agoFix -skip option for gmx rms
Paul Bauer [Wed, 25 Jul 2018 14:27:23 +0000 (16:27 +0200)]
Fix -skip option for gmx rms

Made sure request to skip points is honored.

Fixes #2565

Change-Id: I518d3f91861f89426020861d0382f5e689f33ba0

5 years agoRemove extraneous gitignore line.
M. Eric Irrgang [Tue, 31 Jul 2018 15:03:58 +0000 (18:03 +0300)]
Remove extraneous gitignore line.

The line for `#*` is a comment, but is not a useful one. It may
have been intended (and may be misread) to indicate temporary
files that start with `#`. Since no one has noticed for years that
it doesn't do that, I propose to remove the line. If someone finds
it appropriate to exclude files starting with a hash, they can add
a `\#*` line. If the line was a comment, then its meaning should
be explained in a separate change (potentially superceding this one).

Change-Id: Ice7f9b9bd11f3ac0360e567a744106a4a8ca1494

5 years agoClean up inputrec structs
Mark Abraham [Tue, 17 Jul 2018 15:47:11 +0000 (17:47 +0200)]
Clean up inputrec structs

Used Doxygen for comments. Less use of typedef struct and better use
of forward declarations at the top of the header file. Expanded some
abbreviations and fixed some spelling and punctuation.

No functionality changes.

Change-Id: I20da07314a131b945d09dcbf25d95a37ef9c03cd

5 years agoReport up to date hwloc version information
Kevin Boyd [Tue, 31 Jul 2018 01:54:27 +0000 (21:54 -0400)]
Report up to date hwloc version information

The hwloc version in gmx --version and log files had been
taken from HWLOC_API_VERSION in the hwloc header, which is
not always updated to reflect new releases.

Added HWLOC_VERSION to buildinfo.h from cmake, used in place of
HWLOC_API_VERSION

Fixes #2591

Change-Id: I0ed9f1f1ad9b4262fbb966c03c407eeb1edfc3da

5 years agoMove out OpenCL device utils from vectype ops
Szilárd Páll [Fri, 25 May 2018 15:37:36 +0000 (17:37 +0200)]
Move out OpenCL device utils from vectype ops

The vectype_ops.clh contained misplaced device functions that did not
really implement vector-type operations. These are now moved to a
separate general-purpose device-side OpenCL utils header.

Change-Id: I225260e0fc63fbb144a30f2efecdb8adb7d20100

5 years agoremove most debug flags from gmxpreprocess
Joe Jordan [Thu, 19 Jul 2018 11:53:22 +0000 (13:53 +0200)]
remove most debug flags from gmxpreprocess

To make pdb2gmx more readable as part of #2566 I
removed the debug info. I went ahead and removed
most debug info from other gmxpreprocess tools as
well.

Change-Id: I88919d1f166d7f44508b4fcfae156ffa051b4d70

5 years agoRemove hardcoded warp_size == 32 assumption from PME GPU
Aleksei Iupinov [Mon, 21 May 2018 08:40:08 +0000 (10:40 +0200)]
Remove hardcoded warp_size == 32 assumption from PME GPU

The PME OpenCL host code now queries the warp_size aka max
execution width from the device. The CUDA/unit test handling
of constants/defines is adjusted. With this, only the PME
device-side code should be relying on warp_size define
(which will be passed to the compiler in the OpenCL
implementation).

Change-Id: Ic2d1512e04d36861590b13e02b5bd7a87240f9e2

5 years agoFix CG with multiple domains
Mark Abraham [Wed, 18 Jul 2018 14:50:13 +0000 (16:50 +0200)]
Fix CG with multiple domains

The global state can only be accessed on master rank, so we should set
the flags there and then permit the DD code to propagate the setup of
the cg_p vector.

Fixes #2554

Change-Id: If294bf000eb0266125ecc6c6bf937aac0390e2b8

5 years agoDisable FPEs at end of runner
Roland Schulz [Thu, 19 Jul 2018 16:34:27 +0000 (09:34 -0700)]
Disable FPEs at end of runner

In mdrun unit tests the exceptions enabled for one test were
still active in the next. This caused issues with group
kernel which is known to throw FPEs.

Related #2404

Change-Id: Ie347a29f25ed16836a3164b61c9fca87ca66fc44

5 years agoImprove the robustness of the nvcc CMake check
Szilárd Páll [Mon, 23 Jul 2018 15:06:54 +0000 (17:06 +0200)]
Improve the robustness of the nvcc CMake check

The check to assess whether nvcc is likely functioning as expected is
made more robust by including the build-type specific CUDA_NVCC_FLAGS_*
flags in the test compilation.

Change-Id: I175809809fa436cb887c8b2a1cb48914338e596b

5 years agoFix nvcc host compiler check triggering
Szilárd Páll [Mon, 23 Jul 2018 13:46:53 +0000 (15:46 +0200)]
Fix nvcc host compiler check triggering

The nvcc host compiler check conditional triggering on the change of the
host compiler binary has not been functional as the check has been
placed after another gmx_check_if_changed() call on the same variable.
This change moves the code that checks the functioning of nvcc and host
compiler to gmxManageNvccConf and refactors the conditionals to reuse
the result of the previously issues check if changed call.

Fixes #2583

Change-Id: I26586aaec394cce93a05774cb4184b3928b560cb