alexxy/gromacs.git
10 years agoMinor tweaks to qm_orca.c
Justin Lemkul [Wed, 19 Jun 2013 13:07:58 +0000 (09:07 -0400)]
Minor tweaks to qm_orca.c

Formatting fixes for readability and better screen output.  Also replaced
gmx_call() by gmx_fatal() for more sensible error reporting.

Change-Id: I7669fe2b1c83c6bf8fb5d24760d8acdb0919c46c

10 years agoFixes to config.h.cmakein to set GMX_QMMM_ORCA.
Justin Lemkul [Wed, 19 Jun 2013 11:47:30 +0000 (07:47 -0400)]
Fixes to config.h.cmakein to set GMX_QMMM_ORCA.

Installing using ORCA for QM calculations would proceed without
any issue, but the mdrun executable was nonfunctional because
GMX_QMMM_ORCA was never #defined, so the code was not correctly
compiled.

Fixes #1286

Change-Id: I230ded2d3cdbd9c5fc3e865d0b20049effb16766

10 years agoFixed -npstring command line argument in g_tune_pme
Carsten Kutzner [Fri, 14 Jun 2013 12:06:28 +0000 (14:06 +0200)]
Fixed -npstring command line argument in g_tune_pme

-npstring <str> is used to let g_tune_pme know how it should specify
the number of MPI processes to the mpirun command (with -np (default) or -n ).
You could provide it, but it actually -np was used in any case.

Change-Id: Ibb807b492dfb05c67628c18b7073092aa983f770

10 years agoFixed #include of header for atomics on K-computer
Mark Abraham [Sun, 23 Jun 2013 19:43:02 +0000 (21:43 +0200)]
Fixed #include of header for atomics on K-computer

Reported by Shun Sakuraba

Fixes #1274

Change-Id: Ia6369ba56b6978f79e9fbde3268f8a44ef44b6d8

10 years agoFix declaration that XLC rejected
Jeff Hammond [Sun, 16 Jun 2013 20:50:00 +0000 (20:50 +0000)]
Fix declaration that XLC rejected

Changed volatile void* volatile* declarator to volatile void* volatile.

Fixes #1284

Change-Id: I133f480b060ab4723988bd3059e5bd20ebc9df7a

10 years agoadded CUDA compiler flags to version header
Szilard Pall [Mon, 17 Jun 2013 22:48:30 +0000 (00:48 +0200)]
added CUDA compiler flags to version header

The nvcc compiler information, compared to CPU compiler info, was
lacking both the full path to the compiler binary as well as the full
list of flags used (including the host-compiler flags if these are
passed).

Change-Id: Ic80a512bc6d5a39b6594c360d2952e48b5d43ee0

10 years agofixed SD and BD integrator OpenMP performance
Berk Hess [Wed, 5 Jun 2013 22:09:37 +0000 (00:09 +0200)]
fixed SD and BD integrator OpenMP performance

SD and BD integrator always integrated single threaded.
Really fixes #1121

Change-Id: I2217c40e9c188c7cd57801e413750035c6488f56

10 years agoFixing a problem when dhdl and replex are not multiples
Michael Shirts [Wed, 19 Jun 2013 02:31:32 +0000 (22:31 -0400)]
Fixing a problem when dhdl and replex are not multiples

Problems is fixed by guaranteeing the free energy information
is now updated at a frequency that is the greatest common
denominator of the relevant internal variables.

An existing gcd function was taken from gmx_genion and put
in the include/maths.h file.

Change-Id: I7473185ab02c7c9a7557fbaa165bb20b63bafb7a

10 years agoflops table now reports CUDA analytical Ewald
Berk Hess [Thu, 23 May 2013 13:21:21 +0000 (15:21 +0200)]
flops table now reports CUDA analytical Ewald

Change-Id: I72dfdc3b3f1ecb651897922c2e7ffec784c3bf60

10 years agoDefine both C and C++ compilers in BGQ toolchains; use -O3
Jeff Hammond [Sun, 16 Jun 2013 19:59:47 +0000 (19:59 +0000)]
Define both C and C++ compilers in BGQ toolchains; use -O3

When using either the C or C++ toolchain, the complimentary compiler is
not properly identified, rather /usr/bin/g{cc,++} is, which may cause
configuration problems.  this patch fixes this issue.

ALCF strongly recommends the use of -O3 unless there is clear evidence
that higher optimization has a (positive) effect on the quality of the
code generation from XL.  we find that XL frequently generates no faster
and even slower code with -O4 and -O5 unless the code is specifically
designed to be optimized for BGQ.

Fixes #1283

Change-Id: If32a507c6394e23106555741bdefbc0d554c3765

10 years agoUse more obvious name of BGQ compiler MPI wrappers
Jeff Hammond [Sun, 16 Jun 2013 19:10:26 +0000 (19:10 +0000)]
Use more obvious name of BGQ compiler MPI wrappers

While it is true that mpicc points to the XL compilers when it is the
one found in xl.ndebug/bin, this is not generally true and thus the use
of mpicc as a wrapper for XL violates the principle of least surprise.
the mpixl* wrappers are unambiguous and equally valid.

Fixes #1282

Change-Id: I460e829e55a221d8be35a70932864555feb21a95

10 years agofix CMake bug related to TestQPX.c location
Jeff Hammond [Sun, 16 Jun 2013 19:08:40 +0000 (19:08 +0000)]
fix CMake bug related to TestQPX.c location

cmake/TestQPX.c was not found because it lacked the
appropriate relative path.

Fixes #1281

Change-Id: I5fcc8598c91e39a86c337f14497b6d5faff91116

10 years agofixed a typo (unclosed bracket) that cause CMake to fail
Jeff Hammond [Sun, 16 Jun 2013 18:59:21 +0000 (18:59 +0000)]
fixed a typo (unclosed bracket) that cause CMake to fail

Fixes #1280

Change-Id: I987c860052923602b0ce7e6837a6905ad81a9f22

10 years agofixed minor g_bar output issues
Berk Hess [Tue, 11 Jun 2013 10:56:05 +0000 (12:56 +0200)]
fixed minor g_bar output issues

Replaced one s_A by s_B in the help text.
Replaced %g by %f in all gmx_fatal calls.

Change-Id: I306703eace9c6b3251981d0b9f3a05bdc9c617ff

10 years agoRemove unused variables
Mark Abraham [Wed, 29 May 2013 12:24:05 +0000 (14:24 +0200)]
Remove unused variables

Change-Id: I8c6ce4e83474d720bb8565453c13247132289e22

10 years agoFixes syntax for FAHCORE in CMakeLists.txt.
Peter Kasson [Thu, 6 Jun 2013 15:39:45 +0000 (08:39 -0700)]
Fixes syntax for FAHCORE in CMakeLists.txt.

GMX_FAHCORE triggered a set_property() call that was missing
a PROPERTY identifier and thus triggered a cmake error message.
Syntax at
http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:set_property

Change-Id: I95108ba3332e6ce5c15a4dc4bfa165c3a8e3ac8f

10 years agoAdd a GMX_NO_CREDITS variable to not show credits
Pedro Lacerda [Fri, 31 May 2013 06:11:08 +0000 (03:11 -0300)]
Add a GMX_NO_CREDITS variable to not show credits

It's annoying to get output loaded of credits messages, especially when
running scripts. This commit add GMX_NO_CREDITS environment variable,
when set no copyright is shown.

Related to #1267.

Change-Id: Ia8482a73bde733b08cb37680ecceb713560872f5

10 years agoVarious fixes for genion
Pedro Lacerda [Fri, 31 May 2013 02:02:15 +0000 (23:02 -0300)]
Various fixes for genion

Remove genion non-random insertion of ions, by side effect it stops
writting useless log file. This commit also warns user about -conc
option overriding -nn or -np.

Fixes #1236, #615, and #1208

Change-Id: Icb7e411cda10abb3a7fea4137534f253b0777def

10 years agofixed DD internal state corruption with energy minimization
Berk Hess [Mon, 3 Jun 2013 18:56:19 +0000 (20:56 +0200)]
fixed DD internal state corruption with energy minimization

With energy minimization we need to reload old DD states after
steps are rejected. There were two bookkeeping issues in the reload.
This could lead to all kinds of, but no silent, errors.
Fixes #1272

Change-Id: Ia44c3bad27f3efdee76fa93dd281690e44dde700

10 years agoFixed inconsistent locality_order array for thread affinity.
Sander Pronk [Wed, 29 May 2013 12:17:06 +0000 (14:17 +0200)]
Fixed inconsistent locality_order array for thread affinity.

The locality_order array from gmx_cpuid (determining which threads
map onto which processors) is inconsistent if run with valgrind. This
patch checks the consistency and creates a fallback linear ordering if
that happens.

Change-Id: I59c0cef487134f9cb4115faf364dcfdad7f0d0e6

10 years agoFixed deadlock on Mac OS X during thread affinity check.
Sander Pronk [Mon, 3 Jun 2013 11:15:04 +0000 (13:15 +0200)]
Fixed deadlock on Mac OS X during thread affinity check.

During thread affinity setting, an erroneous #ifndef APPLE caused the Mac OS X
binary to enter the code path that assumes thread affinity support to exist,
leading to a deadlock later on. This is fixed, by making the printing of a
warning platform-specific, but not the rest of the code path, as presumably
originally intended.

Change-Id: I95bd808552869ece45efd1b818c1b5e1be03ed94

10 years agoSplit cmake thread detection into core thread and thread_mpi.
Teemu Murtola [Sun, 26 May 2013 09:45:47 +0000 (12:45 +0300)]
Split cmake thread detection into core thread and thread_mpi.

This makes it possible to use core threading facilities
(mutex/cond-var/affinity, etc) on builds that don't use thread_mpi.

Change-Id: I0f0f43e86da642c4645fd7ac3c4796098cf9cd5e

10 years agofixed deadlock with replica exchange and -maxh
Berk Hess [Mon, 3 Jun 2013 19:42:21 +0000 (21:42 +0200)]
fixed deadlock with replica exchange and -maxh

Fixes #1273

Change-Id: Ib93cce59adf60afe0971944ef41df3a7d9883edc

10 years agoNew patch release 4.6.2
Mark Abraham [Thu, 30 May 2013 14:00:03 +0000 (16:00 +0200)]
New patch release 4.6.2

Added details of Pronk, et al 2013 paper to README

Bumped version to 4.6.3-dev. The v4.6.2 tag points to the actual
version that built the tarball, which was patch set 1.

Change-Id: I9b17cd80f34e2d175dbed0d87677a0611254b7c7

10 years agofix unnecessary switch to polling GPU wait
Szilárd Páll [Thu, 7 Mar 2013 02:50:47 +0000 (03:50 +0100)]
fix unnecessary switch to polling GPU wait

Commit 84597ae introduced an incorrect condition for testing
whether mdrun should and can switch to polling GPU wait.
This minor bug results in swithching to polling wait even when this
is unnecessary (i.e. when the driver in use is >=v5.0), This is
rather harmless, but the polling wait is fragile, so we should use
it only when really necessary.

This commit fixes the switching as well as reorganizes the conditionals
to make it more clear that switching is needed when ECC is on and the
NVIDIA GPU driver is older than v5.0.

Change-Id: I9106cb34c9a8fde2f9b54045d9b03ee5f5d50d8b

10 years agofix thread-safety issue in affinity layout detection
Szilard Pall [Mon, 27 May 2013 17:23:00 +0000 (19:23 +0200)]
fix thread-safety issue in affinity layout detection

The pinning stride variable is shared by thread_mpi ranks and its
value is changed only when its initial value is 0. This posed a
thread-safety issue and in some cases the selected pinning stride was
only reported in the log if rank 0 happened to arrive first to the
affinity layout detection.

Refs #1254

Change-Id: Id32af8cbeacea2205fd15c30b46320ec7dd35e5e

10 years agoadd workaround for clang on AMD with FMA
Szilard Pall [Mon, 29 Apr 2013 16:56:48 +0000 (18:56 +0200)]
add workaround for clang on AMD with FMA

The clang bug which causes incorrect code to be generated on AMD
with FMA (Piledriver and Bulldozer) is in fact caused by an assembler
bug and can be worked around by switching to an external assembler.
This commit implements such the workaround for clang 3.1 and 3.2.
The bug was fix in clang version 3.2-svn-r173176:
http://llvm.org/bugs/show_bug.cgi?id=15040
Hence, no workaround is needed for clang 3.3 with AVX_128_FMA
acceleration.

This workaround is ineffective on Mac OS because there is no suitable
external assembler, but distinguishing between vanilla and Apple clang
requires more code than what's worth adding to cover the case of
AMD-based Hackintoshes (all Mac-s are Intel-based).

It is appropriate to amend only C and not C++ compilation for
release-4-6 branch, but when merging this to master branch, reconsider
the detail of the implementation.

Refs #1099

Change-Id: I835e0f2436ee33507514d3bc3980fcc227e2e36f

10 years agoAdded GROMOS96 54A7 force field files.
Justin Lemkul [Wed, 22 May 2013 12:24:55 +0000 (08:24 -0400)]
Added GROMOS96 54A7 force field files.

Files are taken from ATB, which is hosted by Alan Mark, who
was an author on the GROMACS96 54A7 paper, which is cited in
forcefields.doc. So these files are effectively equivalent to
the reference implementation.

Fixes #773.

Change-Id: I800da3d3535a09cd5beb7f2b4d1b42422cc4329f

10 years agofix thread offset + stride check
Szilard Pall [Mon, 27 May 2013 17:07:30 +0000 (19:07 +0200)]
fix thread offset + stride check

This commit fixes the check which makes sure that the combination of
thread offset and stride does not cause pinning beyond the last hardware
thread.

Additionally, also improved pinning-related warnings and notes.

Change-Id: Ia33610cacb7526dca2ff69491aac2973c7333022

10 years agoFixing the constraint dhdl term in shake
Michael Shirts [Sun, 26 May 2013 14:22:09 +0000 (10:22 -0400)]
Fixing the constraint dhdl term in shake

Addresses and corrects new issues with #1255,
with additional comments explaining what else
may need to be done in the future to make sure
that the theory of the changes are completely
correctly founded.  See the redmine entry #1255
to see the numerical validation of the current choices.
Also adds possible missing constraint dHdl contribution.
Fixes #1268

Change-Id: Ibe3980c2e265cced49b03b966e02143c5cf9f07c

10 years agoFixes #1194 error reading 4.5.5 tpr files with dihres
David van der Spoel [Wed, 1 May 2013 13:08:29 +0000 (15:08 +0200)]
Fixes #1194 error reading 4.5.5 tpr files with dihres

Somehow the tpx_version produced by 4.5.5 was higher (73)
than expected, making the the tpx reading incorrectly
assuming this was using the new file format.
Now set to the version before the
first official 4.6 tpx format, 82 to match the tpr files
in the regression tests. Duh!

Change-Id: I40d8ffa0d350cf3b690f8dfb071fc191f027d02f

10 years agoWork around for correct treatment of all-vs-all
Mark Abraham [Fri, 24 May 2013 14:50:37 +0000 (16:50 +0200)]
Work around for correct treatment of all-vs-all

Neither C or accelerated all-vs-all kernels work in 4.6. The group
SIMD kernels do not work either. The non-accelerated kernel is OK,
though.

Fixes #1249 (for certain values of "fixes"), refs #1095

Change-Id: Id52c0ba110aa915e77859585c2cbfd4d529fe3ca

10 years agoFixed calculation of slab buffer size for flexible potentials.
Carsten Kutzner [Tue, 21 May 2013 14:31:46 +0000 (16:31 +0200)]
Fixed calculation of slab buffer size for flexible potentials.

The slab buffer size is difference in slabs between the reference and
the current positions of the rotation group. This was originally
calculated once in the init_rot_group() routine. However, it needs
to be calculated at every step since it changes when the rotation group
expands or contracts along the rotation vector.

Change-Id: I3b1fac41f88744e14e712454ae546c94f9b26750

10 years agoFix an error in selection online help.
Teemu Murtola [Fri, 24 May 2013 03:56:59 +0000 (06:56 +0300)]
Fix an error in selection online help.

Fixes #1262.

Change-Id: Ia9144690327b852dfab58e833cc2fdc20579b277

10 years agoFix for a rare condition in flexible rotation potentials.
Carsten Kutzner [Thu, 23 May 2013 16:23:41 +0000 (18:23 +0200)]
Fix for a rare condition in flexible rotation potentials.

Change-Id: Icc6c7fceaba3fa53f3f2d627c3c205469fc9d710

10 years agominor function argument cleanup
Szilard Pall [Mon, 27 May 2013 17:37:18 +0000 (19:37 +0200)]
minor function argument cleanup

Removed an unused function argument and changed anoehter one to not pass
the entire nonbonded verlet data structure to the nbnxn_cuda module, but
only what's needed from it.

Change-Id: I89699548f69245eba6d8451683ba6dc36af75dc2

10 years agoCode cleanup in enforced rotation module, remove warnings.
Carsten Kutzner [Wed, 22 May 2013 13:47:47 +0000 (15:47 +0200)]
Code cleanup in enforced rotation module, remove warnings.

Change-Id: Iceb458b06f2c003c6325c77c3258edb112e449f6

11 years agoFix of memory leak
Michael Shirts [Sun, 26 May 2013 15:52:52 +0000 (11:52 -0400)]
Fix of memory leak

Fixes #1265 (probably)

freeing data in expanded ensemble code that should have been freed all along.

Change-Id: I115ee068c56e4edab8fcea828e60ee1386f00716

11 years agoMake FFT detection quieter when nothing is changing
Mark Abraham [Sun, 14 Apr 2013 16:01:45 +0000 (18:01 +0200)]
Make FFT detection quieter when nothing is changing

Change-Id: I58ae8571de21eb81998a6dbce5883c1343552eeb

11 years agoFixed a potential race condition in tMPI_Thread_create()
Sander Pronk [Tue, 21 May 2013 13:33:18 +0000 (15:33 +0200)]
Fixed a potential race condition in tMPI_Thread_create()

The pthreads version of tMPI_Thread_create contained a potential race
condition where the tMPI_Thread_t structure may not be fully populated
as the child thread starts.

Refs #1254

Change-Id: I86e8faaa3d27b88269257be8d7df66ef728dbb0d

11 years agoClarify g_gyrate -h
Mark Abraham [Wed, 22 May 2013 10:06:38 +0000 (12:06 +0200)]
Clarify g_gyrate -h

The description could be better still, but since I don't know
exactly what g_gyrate does, I will leave it alone.

Partial fix for #934

Change-Id: If797ed87f07d119ef5d778e341735e2c1d48ff9e

11 years agoFix g_chi -omega
Mark Abraham [Mon, 29 Apr 2013 22:48:24 +0000 (00:48 +0200)]
Fix g_chi -omega

Per IUPAC, we should calculate peptide omega angles from
Calpha-C-N-Calpha, and there are only n-1 such angles defined for a
polypeptide of n amino acid residues.

There are some other IUPAC violations in make_chi_ind(), but solving
those is deferred to 5.0, not least because there will be a
behavioural change when we conform to IUPAC.

The problem that led to the report had several causes. The hard-coding
of the string names for hydrogen bound to peptide nitrogen (which in
CHARMM27 is "HN") meant that an H atom was not found. has_dihedral()
then checked whether a Calpha was found, which was true. Then
make_chi_ind() computed the angle based on H without doing any further
check. So some garbage coordinate was looked up when computing the
angle.

A proper fix for this kind of stuff for 5.0 requires finding all the
places we try to guess what atoms are from their names and using
properly implemented selections.

Also removed orphaned header file.

Fixes #953, details and links there

Change-Id: I63257a1d6d8ed46d251b8bc0cb308dfbd2864a97

11 years agoFix genion -nq and -pq when using -neutral
Pedro Lacerda [Mon, 20 May 2013 05:11:16 +0000 (02:11 -0300)]
Fix genion -nq and -pq when using -neutral

Currently genion can't neutralize (-neutral) systems when -nq/-pq
differs from -1/+1. This commit fixes the problem.

Change-Id: If2a82ace079555d8a684ea876daa947677d5e442

11 years agoUpdated grompp cut-off and PME-Switch checks
Mark Abraham [Thu, 25 Apr 2013 14:34:23 +0000 (16:34 +0200)]
Updated grompp cut-off and PME-Switch checks

Added a warning with PME-Switch when switching over more than 5%.
Charge-group size rlist notes/warnings now also appear when
potential modifiers are used.
Documented effect of potential-modifiers on the group scheme cut-off
treatment in mdp_opt.html.

Fixes #1179

Change-Id: Ide00caf5ae378104f99611bf197e896d1b53d7d7

11 years agoFix -neutral option in genion
P S Lacerda [Fri, 17 May 2013 06:14:41 +0000 (03:14 -0300)]
Fix -neutral option in genion

The help for -neutral says that it "will add enough ions to neutralize
the system", but this option can only be used in combination with -conc.
This commit makes -neutral independent.

Change-Id: I08b019b05cf3d8511757c4665c24dcaa37968ceb

11 years agoFixed problem with bond constraint dhdl being left out
Michael Shirts [Fri, 17 May 2013 18:44:00 +0000 (14:44 -0400)]
Fixed problem with bond constraint dhdl being left out

At some point, the dhdl from the holonomic bond constraints got left out,
because the term got zeroed before being added to the bonded energy.

Also, I made some of the variable names involved more descriptive to
clarify the logic.

Removed velocity constraint calls, as don't contribute to dhdl.

Fixes redmine #1255

Change-Id: I2eebf357d1a922b7636dc015b09f286827283dd0

11 years agoFujitsu Sparc64 acceleration and general fixes for non-x86 builds
Erik Lindahl [Sun, 6 Jan 2013 13:50:23 +0000 (14:50 +0100)]
Fujitsu Sparc64 acceleration and general fixes for non-x86 builds

Fixes configurations not to assume x86 and avoid warnings, in
particular if a non-x86 acceleration is used.
The cpu detection code has been extended to parse /proc/cpuinfo on
Linux in cases where the x86 CPUID instruction (or the inline
assembly to execute it) is not available.
Finally, there are new group kernels accelerated for use on the
K computer, which uses the Sparc64 HPC-ACE instruction set. These
kernels are roughly ~35% faster than the compiled C version, which
means Gromacs-4.6 is now ~70% faster on K than Gromacs-4.5.

Change-Id: I92559f0ac6159b504f100447a41a03e4b33fec19

11 years agoNew version of thread_mpi with many minor enhancements
Sander Pronk [Fri, 26 Apr 2013 11:59:19 +0000 (13:59 +0200)]
New version of thread_mpi with many minor enhancements

- Fixed issues with collective calls with 1 thread
- Fixed deadlocks with copy buffer turned on
- Turned off copy buffers by default for Gromacs
- Fixed error handling on low-level calls
- Low-level errors are now propagated correctly through MPI
- Simplified the atomics
- Compiles for platforms for which atomics are not supported.
- Added Fujitsu Sparc64 support

Change-Id: I3553906d6630cea8b1efe59fca293fe3c066c8d9

11 years agoHack compiler flags to silence warnings on gcc 4.8
Mark Abraham [Mon, 20 May 2013 22:13:38 +0000 (00:13 +0200)]
Hack compiler flags to silence warnings on gcc 4.8

GCC changed its default behaviour when reporting a number of different
kinds of warnings. We don't want to fix these in the bugfix branch
because even where it is possible it looks too invasive. We plan to
address these issues in a less heavy-handed manner in master branch.

Note when merging to master, do not include this patch.

Change-Id: I14f00357195424dd538aca4b319e5c2c120c691d

11 years agoIntroduce fatal error for GB with FE
Mark Abraham [Wed, 1 May 2013 15:06:56 +0000 (17:06 +0200)]
Introduce fatal error for GB with FE

Old code silently computed zeroes for Coulomb(SR) when using
Generalized Born and the free energy kernel, because of the
inappropriate use of a default branch of a switch statement.

Fixed the default branch for icoul and ivdw switch statements to issue
gmx_incons (similar to usage in the Verlet kernel code). Now we invoke
explicit code paths for all legal values of icoul and ivdw. Added
gmx_fatal for un-implemented GB case (similar to the gmx_fatal for
Buckingham with this free energy kernel).

Partial fix for #1237

Change-Id: I30684aed9fba9beac9b1b87eb99e2cbc7e7e374d

11 years agoFixed g_sgangle legends.
Justin Lemkul [Wed, 15 May 2013 14:28:58 +0000 (10:28 -0400)]
Fixed g_sgangle legends.

There were no legends previously, and questions are often asked
about the interpretation of the data.  This commit adds proper
s0 and s1 legends in XmGrace format.

Change-Id: I7bdcb57167eb3a0cef90a9b9dba9d04b86ba7cbd

11 years agoChoose the PBC image of each rotation group atom depending
Carsten Kutzner [Tue, 30 Apr 2013 15:32:04 +0000 (17:32 +0200)]
Choose the PBC image of each rotation group atom depending
on the current position of it reference atom. Therefore,
1) in choose_pbc_image() the correctly rotated reference position
has to be used (the addition of the pivot vector was missing)
2) in init_rot_group(), the reference positions have to be
correctly determined for restarts. In these cases, the initial
angle of the reference group is different from zero.

Change-Id: I57f886c507317385619e42bf387e407479b0c08d

11 years agoMerge "fixed incorrect scaling of cos-acceleration viscosity" into release-4-6
Christoph Junghans [Wed, 15 May 2013 19:53:56 +0000 (21:53 +0200)]
Merge "fixed incorrect scaling of cos-acceleration viscosity" into release-4-6

11 years agoMerge "Fixing handling of perturbation mass changes." into release-4-6
Sander Pronk [Fri, 10 May 2013 13:17:11 +0000 (15:17 +0200)]
Merge "Fixing handling of perturbation mass changes." into release-4-6

11 years agoMerge "Fixes "Function type U-B not implemented in ip_pert."" into release-4-6
Mark Abraham [Fri, 10 May 2013 12:14:43 +0000 (14:14 +0200)]
Merge "Fixes "Function type U-B not implemented in ip_pert."" into release-4-6

11 years agoMerge "improve build with OpenMM, still not 100% fixed" into release-4-6
Mark Abraham [Fri, 10 May 2013 11:53:04 +0000 (13:53 +0200)]
Merge "improve build with OpenMM, still not 100% fixed" into release-4-6

11 years agoMerge "fixing rerun with free energy + .xtc or .gro" into release-4-6
Mark Abraham [Fri, 10 May 2013 09:45:08 +0000 (11:45 +0200)]
Merge "fixing rerun with free energy + .xtc or .gro" into release-4-6

11 years agoimprove build with OpenMM, still not 100% fixed
Christoph Junghans [Fri, 18 Jan 2013 03:30:30 +0000 (20:30 -0700)]
improve build with OpenMM, still not 100% fixed

* introduced in e508a07b6e127fa1cf31d263bcbd33e4040066cb

Change-Id: I6ad45fd2d5766d1c4a91ef2e0c442ff030fc1296

11 years agofixed incorrect scaling of cos-acceleration viscosity
Berk Hess [Wed, 8 May 2013 16:07:38 +0000 (18:07 +0200)]
fixed incorrect scaling of cos-acceleration viscosity

The cos-acceleration 1/viscosity output contained an anomalous factor
1/volume. This factor is now removed.
Fixes #1244

Change-Id: I9bf318b4e6557720683d50a0c2e887e306bacc3f

11 years agofixing rerun with free energy + .xtc or .gro
Michael Shirts [Tue, 7 May 2013 05:37:56 +0000 (01:37 -0400)]
fixing rerun with free energy + .xtc or .gro

When running rerun specifying init-fep-state rather than lambda (which
is necessary if the vector components are specified separately), the
init-fep-state in the .mdp is ignored. There .trr appears to already work
correctly.

Fixes bug #1240

Change-Id: Id118ae9273ef67438797306a74ac3bccfb8c4dba

11 years agoFix extant references to former GPL licensing
Mark Abraham [Tue, 7 May 2013 18:06:59 +0000 (20:06 +0200)]
Fix extant references to former GPL licensing

Some files did not have the copyright header I applied in 2012, so
I have re-applied that header as I would have then.

Some references remain in src/contrib and share/top/residues.dtd,
because I do not know whether they should change.

Change-Id: Ia80adc0c55ac1776297754a90cc0f8b5de7eae8f

11 years agoFixes #1238 g_hydorder does not call set_pbc.
David van der Spoel [Thu, 2 May 2013 06:30:23 +0000 (08:30 +0200)]
Fixes #1238 g_hydorder does not call set_pbc.

Now it does.

Change-Id: I1085ca9ad8e8ece1803feee605d39932483a77f9

11 years agoFixing handling of perturbation mass changes.
Michael Shirts [Sun, 28 Apr 2013 00:57:19 +0000 (20:57 -0400)]
Fixing handling of perturbation mass changes.

Fixes redmine #1232

in force.c, sum_dhdl

 * moved F_DKDL to match the order in efpt_names.  Not required, but
   harmonizes the code (lack of clarity probably helped cause the
   problems before), has no code effect.

 * no longer treating the F_DKDL term separately from the other
   derivative components.  Will be added to F_DVDL if the mass-lambda
   term is not separately specified.  Results in a bit of a misnomer
   (F_DVDL becomes the derivative of the entire hamiltonian), but
   makes it much easier to collapse all molecular perturbation terms
   into a single component for output, where it is no longer really
   F_DVDL.  I think that's better than always printing out a F_DVDL
   and a F_DKDL for everything where F_DKDL will probably usually
   be zero.

in md_support.c, compute_globals

 * Synchronize the behaviors of the dhdls by writing first to the linear component
   corresponding to the mass, and then later transferring it to F_DKDL

in group.h, struct gmx_ekindata_t
 * add pointer to per-thread accumulation variable for dekindl

in tgroup.c, sum_ekin

 * For velocity verlet integrators, computes the dekindl correctly as
   the derivatives of the current ekin.  Shouldn't really affect the results
   in any significant way, since the average contribution will be the same
   regardless, but this is more consistent.

in tgroup.c, init_ekindata

 * reduce use of numeric constants in allocating memory

 * initialize new ekindata_t member

in update.c, calc_ke_part_normal

 * zero the accumulator for dekindl before using it,
   fixing bug introduced in 7b6508e8

in update.c, in calc_ke_part_normal and calc_ke_part_visc

 * sign error in mass change; if mass B is greater than mass A, then the
   change in free energy is positive, not negative.

Change-Id: I9deaf546bca66d400e0eb2c4015abeeda302dd1d

11 years agoFixes "Function type U-B not implemented in ip_pert."
Magnus Lundborg [Mon, 29 Apr 2013 19:33:52 +0000 (21:33 +0200)]
Fixes "Function type U-B not implemented in ip_pert."

Fixes this bug, occuring when running free energy calculations using
the CHARMM ff. Refs #1115.

Change-Id: Ia3becd61eca93447c936bdb3297570684ae29a28

11 years agoEvaluate enforced rotation potenial with Verlet, fixes #1155
Carsten Kutzner [Thu, 14 Mar 2013 10:37:36 +0000 (11:37 +0100)]
Evaluate enforced rotation potenial with Verlet, fixes #1155

Change-Id: I6231a9a6cd9cd4004d53b721922e5d9298af76a2

11 years agoMerge "Update linking to MKL and document same" into release-4-6
Mark Abraham [Mon, 29 Apr 2013 18:16:39 +0000 (20:16 +0200)]
Merge "Update linking to MKL and document same" into release-4-6

11 years agoMerge "general SIMD acceleration for angles+dihedrals" into release-4-6
Mark Abraham [Mon, 29 Apr 2013 15:21:26 +0000 (17:21 +0200)]
Merge "general SIMD acceleration for angles+dihedrals" into release-4-6

11 years agoMerge "PME load balancing now checks for PME grid restrictions" into release-4-6
Mark Abraham [Mon, 29 Apr 2013 14:43:01 +0000 (16:43 +0200)]
Merge "PME load balancing now checks for PME grid restrictions" into release-4-6

11 years agogeneral SIMD acceleration for angles+dihedrals
Berk Hess [Thu, 28 Feb 2013 17:05:40 +0000 (18:05 +0100)]
general SIMD acceleration for angles+dihedrals

Implemented SIMD intrinsics for angle potential and pbc_dx.
Changed SSE2 intrinsics to general SIMD using gmx_simd_macros.h.
Improves performance significantly, especially with AVX-256
and reduces load imbalance, especially with GPUs.

Change-Id: Ic83441cce68714ae91c6d5ca2a6e1069a62cd2ae

11 years agoMerge "Fixing a problem with dh/dl 1-4 interactions" into release-4-6
Mark Abraham [Mon, 29 Apr 2013 11:20:53 +0000 (13:20 +0200)]
Merge "Fixing a problem with dh/dl 1-4 interactions" into release-4-6

11 years agoMerge "CUDA PME kernels with analytical Ewald correction" into release-4-6
Mark Abraham [Fri, 26 Apr 2013 17:04:11 +0000 (19:04 +0200)]
Merge "CUDA PME kernels with analytical Ewald correction" into release-4-6

11 years agoPME load balancing now checks for PME grid restrictions
Berk Hess [Thu, 21 Mar 2013 11:30:22 +0000 (12:30 +0100)]
PME load balancing now checks for PME grid restrictions

To enable this, the PME restrictions checks have been moved
to a separate function called gmx_pme_check_restrictions.
Also allowed nkx==nnodes_major*(order-1) again with threading.

Change-Id: I50b6f8cfaeba5e360c534424c80c320515812e43

11 years agoMerge "improved load balancing with Verlet cut-off scheme" into release-4-6
Mark Abraham [Fri, 26 Apr 2013 16:51:33 +0000 (18:51 +0200)]
Merge "improved load balancing with Verlet cut-off scheme" into release-4-6

11 years agoFixing a problem with dh/dl 1-4 interactions
Michael Shirts [Sat, 20 Apr 2013 15:57:55 +0000 (11:57 -0400)]
Fixing a problem with dh/dl 1-4 interactions

In some cases, dh/dl interactions are added twice when the
couple-intermol keyword is not used.

These lines were originally removed in 7763fa8f while fixing thread
safety in free-energy calculations, but were erroneously re-introduced
in f40969c. Versions 4.6 and 4.6.1 were affected.

Fixes #1225

Change-Id: If24177833eb4a96a6c6ef0d1ecc9a23bf80a90b1

11 years agoUpdate linking to MKL and document same
Mark Abraham [Mon, 11 Mar 2013 11:31:15 +0000 (12:31 +0100)]
Update linking to MKL and document same

Works using nifty feature from icc 11 and up, or any other compiler if
the user does the legwork (which is all we ever used to offer).

Code that used HAVE_LIBMKL had a bug, which we never saw because
the top-level CMakeLists.txt set HAVE_MKL. Fixed that.

Removed unused TextMKL.c code - check_function_exists() is sufficient.

Refs #1110,#1186

Change-Id: I39a66673e5fe571a5f8b0691bbe2ec619cd60778

11 years agoMerge "v-rescale works with tau-t >= 0" into release-4-6
Christoph Junghans [Fri, 26 Apr 2013 00:48:52 +0000 (02:48 +0200)]
Merge "v-rescale works with tau-t >= 0" into release-4-6

11 years agoMerge "Merge branch 'release-4-5-patches'" into release-4-6
Mark Abraham [Thu, 25 Apr 2013 13:33:36 +0000 (15:33 +0200)]
Merge "Merge branch 'release-4-5-patches'" into release-4-6

11 years agoMerge "Use git snapshots of the tests if are on git" into release-4-6
Mark Abraham [Mon, 22 Apr 2013 21:47:48 +0000 (23:47 +0200)]
Merge "Use git snapshots of the tests if are on git" into release-4-6

11 years agov-rescale works with tau-t >= 0
Mark Abraham [Fri, 19 Apr 2013 14:17:11 +0000 (16:17 +0200)]
v-rescale works with tau-t >= 0

Bug introduced in c7a82654

Change-Id: Iee2d1c8fc5d34811dc022ffbe097114abc10030b

11 years agoMerge branch 'release-4-5-patches'
Teemu Murtola [Fri, 19 Apr 2013 03:50:37 +0000 (06:50 +0300)]
Merge branch 'release-4-5-patches'

Tested that the selection fixes work also in release-4-6.

Conflicts:
src/gmxlib/selection/compiler.c (trivial)

Change-Id: Ib679b1babaf29457c13ca1f10fde5a612ddc3055

11 years agochanged mdrun -nsteps to gmx_large_int_t
Berk Hess [Thu, 18 Apr 2013 15:51:20 +0000 (17:51 +0200)]
changed mdrun -nsteps to gmx_large_int_t

Fixes #1224

Change-Id: Idc66a0de4b8c6463be2df92ee7b8261a90eb5014

11 years agoCUDA PME kernels with analytical Ewald correction
Szilard Pall [Tue, 12 Mar 2013 02:18:43 +0000 (03:18 +0100)]
CUDA PME kernels with analytical Ewald correction

The analytical Ewald kernels have been used in the CPU SIMD kernels, but
due to CUDA compiler issues it has been difficult to determine in which
cases does this provide a performance advantage compared to the
tabulated kernels.Although the nvcc optimizations are rather unreliable,
on Kepler (SM 3.x) the analytical Ewald kernels are up to 5% faster, but
on Fermi (SM 2.x) 7% slower than the tabulated. Hence, this commit
enables the analytical kernels as default for Kepler GPUs, but keeps the
tabulated kernels as default on Fermi.

Note that the analytical Ewald correction is not implemented in the
legacy kernels as these are anyway only used on Fermi.

Additional minor change is the back-port of some variable (re)naming and
simple optimizations from the default to the legacy CUDA kernels which
give 2-3% performance improvement and better code readability.

Change-Id: Idd4659ef3805609356fe8865dc57fd19b0b614fe

11 years agoUse git snapshots of the tests if are on git
Christoph Junghans [Tue, 5 Mar 2013 18:05:49 +0000 (11:05 -0700)]
Use git snapshots of the tests if are on git

* Snapshots are available from http://repo.or.cz/w/gromacs
  but hidden by forwards from http://gerrit.gromacs.org/snapshot
* Discussion on I7ba82b22a75532516f481dcb5e4a870047c0bfe8

Change-Id: If3d00d2de8d7286c3b5d7f4b67d468b8d628e28f

11 years agoMerge "corrected grompp rvdw charge-group radii check" into release-4-6
David van der Spoel [Tue, 16 Apr 2013 12:05:23 +0000 (14:05 +0200)]
Merge "corrected grompp rvdw charge-group radii check" into release-4-6

11 years agoMerge "added mdrun check for Verlet+perturbed atoms" into release-4-6
David van der Spoel [Sat, 13 Apr 2013 14:53:10 +0000 (16:53 +0200)]
Merge "added mdrun check for Verlet+perturbed atoms" into release-4-6

11 years agoimproved load balancing with Verlet cut-off scheme
Berk Hess [Fri, 12 Apr 2013 12:47:34 +0000 (14:47 +0200)]
improved load balancing with Verlet cut-off scheme

With the Verlet scheme the force calculation order is now like group:
non-bonded, bonded, PME
The non-bonded were done after PME, which prevented load balancing,
unless separate PME nodes were used.

Change-Id: I81588ac810ce7c022bd6809f29a19c41ba13449f

11 years agoMerge "removed x86 specifics from nbnxn SIMD kernels" into release-4-6
Mark Abraham [Fri, 12 Apr 2013 11:46:50 +0000 (13:46 +0200)]
Merge "removed x86 specifics from nbnxn SIMD kernels" into release-4-6

11 years agoMerge "corrected log file wall time breakdown" into release-4-6
Mark Abraham [Fri, 12 Apr 2013 07:55:19 +0000 (09:55 +0200)]
Merge "corrected log file wall time breakdown" into release-4-6

11 years agoMerge "made PME work with a mix of 1 and more threads" into release-4-6
Mark Abraham [Fri, 12 Apr 2013 07:54:08 +0000 (09:54 +0200)]
Merge "made PME work with a mix of 1 and more threads" into release-4-6

11 years agoFix another bug in selection subexpression handling.
Teemu Murtola [Wed, 10 Apr 2013 18:21:59 +0000 (21:21 +0300)]
Fix another bug in selection subexpression handling.

In this case, it did not work correctly if a variable with a dynamic
value was used both
1. in a boolean expression such that its evaluation group was not known
   in advance, and
2. in a context where it was always evaluated for all atoms (either as
   a selection, or as a parameter to a selection method),
and additionally the latter context appeared later in the selection set.
The initialization of the SEL_CDATA_STATICEVAL flag has a dependency on
SEL_CDATA_FULLEVAL flag, and they were not initialized in the correct
sequence in the above case.

Fixes #1219.

Backported from master with the same Change-Id.

Change-Id: Ic95d37a424c82c796806b3a5b39678e206c467a1

11 years agoFix bug in selection subexpression handling.
Teemu Murtola [Wed, 10 Apr 2013 18:17:36 +0000 (21:17 +0300)]
Fix bug in selection subexpression handling.

Did not work correctly if
1. a static expression was passed to a SPAR_ATOMVAL parameter,
2. other parameters to the same selection method were dynamic
   (so that the expression would not be completely eliminated during
   compilation), and
3. the evaluation group of the SEL_EXPRESSION element was dynamic
   (so that the SPAR_ATOMVAL expression could be evaluated for a
   different group during evaluation and compilation).
In this case, the static atom-valued parameter got evaluated during
compilation for the maximal evaluation group and replaced by a constant.
During evaluation, if the evaluation group was smaller, the values for
that expression were no longer correct.
See #1216 for what kinds of concrete selections this applies to.

Fixes #1216.

Backported from master with the same Change-Id.
Needed to also pull in part of the changes from
6e877567d9d3d08a3f6fb436f7bbfbaf35b95f8e.

Change-Id: Ic6b7f9b8df661a9c78d7862b981a07e65a7ebdbf

11 years agoMerge "Merge release-4-5-patches into release-4-6" into release-4-6
Teemu Murtola [Wed, 10 Apr 2013 17:07:57 +0000 (19:07 +0200)]
Merge "Merge release-4-5-patches into release-4-6" into release-4-6

11 years agoMerge "Added install guide section for BLAS/LAPACK" into release-4-6
Christoph Junghans [Fri, 29 Mar 2013 17:16:37 +0000 (18:16 +0100)]
Merge "Added install guide section for BLAS/LAPACK" into release-4-6

11 years agoremoved x86 specifics from nbnxn SIMD kernels
Berk Hess [Mon, 18 Feb 2013 16:57:45 +0000 (17:57 +0100)]
removed x86 specifics from nbnxn SIMD kernels

All x86 specific preprossing and SIMD intrinsics in
nbxn_kernel_simd_???_outer/inner.h have been replaced by generic SIMD
macro code. Exclusion masks are now loaded iso set and the treatment
is the same for most setups and can use only floating point intrinsics.
Moved half-width SIMD from gmx_simd_macros.h to two 2xnn .h files.
Half-width load macros now take the output as an argument,
in preparation for Intel MIC SIMD instrinsics.
Replaced _SSE suffixes by _S in the abovementioned files.

Change-Id: Ib634726af6e51a99c904e05528b0ac10ecbc2462

11 years agocorrected log file wall time breakdown
Berk Hess [Wed, 27 Mar 2013 09:19:41 +0000 (10:19 +0100)]
corrected log file wall time breakdown

The recent commit 873b9854 doubled the wall times in the breakdown
table in the log file when not using separate PME nodes.
Note that this didn't affect cycle count or total timing prints.
Fixes #1210

Change-Id: Ia2b1d5e6c21543990465b7c7a4a8a1e687c41528

11 years agoMerge release-4-5-patches into release-4-6
Roland Schulz [Tue, 26 Mar 2013 19:15:20 +0000 (15:15 -0400)]
Merge release-4-5-patches into release-4-6

Conflicts:
CMakeLists.txt
configure.ac
src/tools/gmx_mindist.c

Change-Id: I303318f17527a8e1bfe494eb174565b8d5491870

11 years agomade PME work with a mix of 1 and more threads
Berk Hess [Thu, 21 Mar 2013 09:33:07 +0000 (10:33 +0100)]
made PME work with a mix of 1 and more threads

Using a mix of 1 and more OpenMP threads on different MPI ranks
would make mdrun terminate with an MPI error.
Fixes #1171

Change-Id: Iffa16e18baf0f74be826b59503208dca01d1ec14

11 years agoMerge "Essential dynamics: fixed legend in ED .xvg output file" into release-4-6
Christoph Junghans [Tue, 19 Mar 2013 17:42:28 +0000 (18:42 +0100)]
Merge "Essential dynamics: fixed legend in ED .xvg output file" into release-4-6

11 years agocorrected grompp rvdw charge-group radii check
Berk Hess [Thu, 14 Mar 2013 11:13:09 +0000 (12:13 +0100)]
corrected grompp rvdw charge-group radii check

The grompp note for charge-group radii larger than the buffer size
for VdW interactions only checked for rlist, not rlistlong.
Fixes #1164

Change-Id: I85a615e6c004503440bcae52c220540a843107d0

11 years agoMerge "fix broken things in mkhtml" into release-4-6
Mark Abraham [Tue, 12 Mar 2013 17:36:44 +0000 (18:36 +0100)]
Merge "fix broken things in mkhtml" into release-4-6