alexxy/gromacs.git
10 years agoNew analysis tool to compute the free volume and total volume.
David van der Spoel [Thu, 28 Mar 2013 16:25:38 +0000 (17:25 +0100)]
New analysis tool to compute the free volume and total volume.

Works with selections, such that the freevolume in a box containing
a subset of all atoms can be computed.
Added excessive comments so that others can use this as a reference
for implementing analysis tools as well.
Added a test system as well, but this is somewhat tricky due to
real precision and the Monte Carlo algorithm.
literature reference.
valgrind.

Change-Id: I2acb48b829c9495e399c60e9dc927662e2958d69

10 years agoAdded ability to use cppcheck from the command line.
Teemu Murtola [Tue, 28 May 2013 18:54:46 +0000 (21:54 +0300)]
Added ability to use cppcheck from the command line.

CMake now detects cppcheck, and enables "make cppcheck" to run
cppcheck on all source files, generated kernels and some other files
excluded.  Commands are more or less the same as used in Jenkins.
A separate target is produced for each input file, allowing one to use
build system parallelism (tested that it doesn't have much effect on the
overall run time).  This also adds a nice property that after the
initial run, cppcheck gets only run on modified files.  All errors
(including those from unmodified files) are also collected into a single
text file for easier processing.

No effort has been made to make it particularly robust or portable,
e.g., with respect to different cppcheck versions, as it is mostly for
developer convenience to be able to reproduce the runs from Jenkins.

Ideally, Jenkins would also run cppcheck using the generated rules,
which would allow changing the cppcheck configuration in sync with
source code changes if that is necessary.  For this purpose, a CMake
option to switch to XML output files is provided.

Change-Id: Ib88e2ba87cd4f091484fe09beac5ef108b0fad77

10 years agoBetter averaging for analysis data modules.
Teemu Murtola [Wed, 3 Apr 2013 17:17:12 +0000 (20:17 +0300)]
Better averaging for analysis data modules.

Added an AnalysisDataFrameAverager for functionality common to analysis
data modules that compute averages over frames.  Currently, it only
accumulates the average and variance in double precision (using better
formula than before), but provides a useful base for implementing other
functionality:
 - Block averaging or other methods of better estimating the error.
 - Parallelization support to allow these modules to work in parallel
   after #869 is implemented.
For all of these, after the implementation is done in this common class,
it is easy to have that functionality in all the modules.  Some
interface changes may be required for some of the above, though.

Also some improvements to AnalysisDataAverageModule documentation.

Change-Id: I06ae7a92d36a0ee7e2fc0a1602ac40e6b8212d1d

10 years agoMove wman.* to src/gromacs/onlinehelp/.
Teemu Murtola [Thu, 23 May 2013 17:22:35 +0000 (20:22 +0300)]
Move wman.* to src/gromacs/onlinehelp/.

It naturally belongs together with this functionality.
It is used only internally by the library, so no need to install it.
Also removed unnecessary declarations from the header.

One less header in legacyheaders/, ~220 to go...

Change-Id: I371de95faedc26873a85441901be88dbf60ad9ba

11 years agoOnly build base thread support with GMX_THREAD_MPI=OFF.
Teemu Murtola [Sun, 26 May 2013 09:45:47 +0000 (12:45 +0300)]
Only build base thread support with GMX_THREAD_MPI=OFF.

Restore the old behavior of only building the basic threading primitives
from thread_mpi if the MPI parts are not needed.

Change-Id: I0f0f43e86da642c4645fd7ac3c4796098cf9cd5e

11 years agoMerge "Merge branch 'release-4-6'"
Mark Abraham [Thu, 30 May 2013 21:30:50 +0000 (23:30 +0200)]
Merge "Merge branch 'release-4-6'"

11 years agoMerge branch 'release-4-6'
Teemu Murtola [Fri, 24 May 2013 17:59:13 +0000 (20:59 +0300)]
Merge branch 'release-4-6'

Omitted the patch with the hacks for silencing warnings with gcc-4.8,
since we plan to do a proper job of that in master branch.

Some minor conflicts resolved.

Conflicts:
CMakeLists.txt
cmake/ThreadMPI.cmake
src/config.h.cmakein
src/programs/mdrun/md.c

Change-Id: I2c1f1b9b40100c269eea6b06b7b073491b5e17d6

11 years agoAdd a few sequence diagrams to Doxygen docs.
Teemu Murtola [Sun, 10 Mar 2013 18:48:02 +0000 (20:48 +0200)]
Add a few sequence diagrams to Doxygen docs.

- Add detection for mscgen to be used with Doxygen.  If the tool is not
  found, the diagrams are simply not generated (missing images on the
  HTML pages).
- Add a separate wrapper script for running Doxygen to show warnings
  more clearly (in particular errors from mscgen were difficult to spot
  otherwise).  This script also prints a note if mscgen is not available
  when the documentation is built.
- Add a few sequence diagrams for the analysis framework to clarify
  interactions between parts and illustrate the parallelization design
  (although parallelization itself isn't implemented yet, it is useful
  to see the plan to fully understand the design).  Added some text to
  describe the diagrams; this could perhaps be better integrated into
  the other documentation (currently, more or less the same text may
  also be found elsewhere).
- Fix a few Doxygen issues (missing links etc.) noticed while adding the
  diagrams.

Change-Id: If26049560b8db3be1e202d0aef6e08f0db7d5e73

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 agoMerge release-4-6 into master
Roland Schulz [Tue, 21 May 2013 04:33:22 +0000 (00:33 -0400)]
Merge release-4-6 into master

Conflicts:
CMakeLists.txt
cmake/FindMKL.cmake (deleted in 4.6)
src/gromacs/selection/compiler.cpp (was backport)
src/mdlib/nbnxn_cuda/nbnxn_cuda_types.h
src/ngmx/CMakeLists.txt
src/programs/grompp/gpp_tomorse.h

was incorrectly identified as rename target:
src/gromacs/trajectoryanalysis/tests/CMakeLists.txt
change instead belonged to:
        src/gromacs/mdlib/nbnxn_cuda/CMakeLists.txt

moved changes for OpenMM to src/programs/mdrun/CMakeLists.txt:
src/kernel/CMakeLists.txt
Deleted in 5.0 - only copyright changed:
share/template/template.c
share/template/template_doc.c
FFT_LIBRARIES change already in 5.0:
src/gmxlib/CMakeLists.txt
src/mdlib/CMakeLists.txt
src/tools/CMakeLists.txt
Removed GMX_*_EXPORT:
        src/gromacs/legacyheaders/domdec.h
        src/gromacs/legacyheaders/pme.h

Change-Id: Ib1d4abe66ea7b29c418dba687f8e7c1d645d39c4

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 agoFixed two compilation issues.
David van der Spoel [Thu, 9 May 2013 16:29:35 +0000 (18:29 +0200)]
Fixed two compilation issues.

With new compilers and boost 1.5.3, since that version adds an
"explicit operator bool()" to the smart pointer classes, if
the compiler supports it.

Change-Id: I31862314479990adc8333e834dd16cbddbfcc387

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 agoMerge "Improve master-specific CMake behavior."
Mark Abraham [Thu, 2 May 2013 10:56:01 +0000 (12:56 +0200)]
Merge "Improve master-specific CMake behavior."

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 agoMerge "Updated source for Van der Waals radii."
David van der Spoel [Wed, 1 May 2013 17:05:23 +0000 (19:05 +0200)]
Merge "Updated source for Van der Waals radii."

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 agoRemove gmx_ana_index_t::name and unused code.
Teemu Murtola [Fri, 12 Apr 2013 11:18:41 +0000 (14:18 +0300)]
Remove gmx_ana_index_t::name and unused code.

Remove the name field from gmx_ana_index_t, which was in most cases
NULL, and was a source of multiple ugly hacks in the selection code to
avoid leaking the memory allocated for the name.
Now that SelectionTreeElement has a proper std::string name member,
there is no need for this name field anywhere in the selection code
where the atom groups are handled as selection values.

Also remove unused code from indexutil.* (that would have required extra
effort to not break it).

Change-Id: I14698c17da3b479de4016a6188fcd235514b9e2a

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 "Fix another bug in selection subexpression handling."
Christoph Junghans [Mon, 29 Apr 2013 18:56:50 +0000 (20:56 +0200)]
Merge "Fix another bug in selection subexpression handling."

11 years agoMerge "Fix bug in selection subexpression handling."
Christoph Junghans [Mon, 29 Apr 2013 18:55:52 +0000 (20:55 +0200)]
Merge "Fix bug in selection subexpression handling."

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 agoUpdated source for Van der Waals radii.
David van der Spoel [Fri, 12 Apr 2013 09:34:32 +0000 (11:34 +0200)]
Updated source for Van der Waals radii.

Implemented new Van der Waals radii in atomprop. This may
have an effect on results from gmx sas or editconf and therefore
a message is printed to notify the users of this.
The genbox program is adapted to have an extra option to scale
the Van der Waals radii, in case it is difficult to add extra
atoms. The default value for this option is 0.57 which gives approximately
the same density as old genbox.

Change-Id: Ib5d86a920ae7732ee8a29505449e6d34e3d3980c

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 agoAdd check for empty selections.
Teemu Murtola [Fri, 12 Apr 2013 04:35:18 +0000 (07:35 +0300)]
Add check for empty selections.

The framework now checks that provided selections are not
unconditionally empty, and produces error messages in those cases.
Added an option for controlling this if there is some rare case where
selecting "none" would be reasonable input.

Change-Id: I7066fa89bcebfc883483cf2ddb769a31c3942260

11 years agoImplement remaining SelectionOption flags.
Teemu Murtola [Fri, 12 Apr 2013 04:19:40 +0000 (07:19 +0300)]
Implement remaining SelectionOption flags.

- If onlyAtoms() is specified, check the condition after the selections
  have been compiled.
- If onlyAtoms() is specified for all selection options, remove the
  -seltype command-line option, as it has no use.
- Removed unimplemented dynamicOnlyWhole() as the way it worked in 4.5
  is not really compatible with the current handling of selections.
  It was any way only affecting a default value, but not enforcing
  anything.

Change-Id: I0cd4ff6d425cc017bead090be12867b4f41e7783

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 agoMerge "Add histogram output for 'gmx gangle'."
David van der Spoel [Fri, 12 Apr 2013 18:34:54 +0000 (20:34 +0200)]
Merge "Add histogram output for 'gmx gangle'."

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 agoFix another bug in selection subexpression handling.
Teemu Murtola [Tue, 9 Apr 2013 18:57:15 +0000 (21:57 +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.

Change-Id: Ic95d37a424c82c796806b3a5b39678e206c467a1

11 years agoFix bug in selection subexpression handling.
Teemu Murtola [Sat, 6 Apr 2013 04:17:57 +0000 (07: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.

Subexpression handling in the selections is starting to (again) get very
messy, but that is a topic for a larger-scale refactoring...

Fixes #1216.

Change-Id: Ic6b7f9b8df661a9c78d7862b981a07e65a7ebdbf

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 agoImprove master-specific CMake behavior.
Teemu Murtola [Sat, 23 Mar 2013 19:55:04 +0000 (21:55 +0200)]
Improve master-specific CMake behavior.

- Make GMX_BUILD_UNITTESTS independent of GMX_XML.  It now gets it
  default value based on whether libxml2 is found.  Also, if it is
  explicitly set, but libxml2 is not found, give a fatal error instead
  of silently disabling the tests.
- Mark GMX_XML as advanced and make it a no-op that it currently is
  (nothing in libgromacs actually depends on libxml2).
- Rename GMX_INTERNAL_BOOST to GMX_EXTERNAL_BOOST to match BLAS/LAPACK
  settings.  Set the default for it based on whether Boost is
  actually found.  Print the existing message on the first run if
  GMX_EXTERNAL_BOOST was not explicitly set.  Give a fatal error if
  boost is not found and GMX_EXTERNAL_BOOST=ON instead of silently
  changing to use the internal boost.
- Move installation rules etc. for boost towards the end of the
  CMakeLists.txt file to use INCL_INSTALL_DIR in them.

Now, cached values for these variables really describe what is going to
get build.  Also, explicit user choices are never overridden, but result
in fatal errors if they cannot be satisfied.

Change-Id: I5b3f93eecff2ccc4bf8d348392dd4ae30efd9f92

11 years agoAdd histogram output for 'gmx gangle'.
Teemu Murtola [Tue, 26 Mar 2013 04:43:57 +0000 (06:43 +0200)]
Add histogram output for 'gmx gangle'.

This analysis module can now compute histograms of the angles with -oh.
Bin width can be set with -binw.

Change-Id: Ib4f72e43c84706685f1dbc9584bd31ca1abda297

11 years agoMerge libgmxana into libgromacs.
Teemu Murtola [Sun, 24 Mar 2013 13:49:31 +0000 (15:49 +0200)]
Merge libgmxana into libgromacs.

- Move contents of src/tools/ into src/gromacs/gmxana/, except for
  g_tune_pme.c and g_pme_error.c.
- Delete unused src/tools/g_membed.c.
- Adjust the build system accordingly, removing references to gmxana.
- Merge contents of libgmxana.pc into libgromacs.pc and remove the
  former.
- Move src/gromacs/legacyheaders/gmx_ana.h into src/gromacs/gmxana/ and
  adjust files that include it accordingly.  Removed a few unnecessary
  inclusions of this header.  Don't install it, as it doesn't do much
  good.
- Merge src/contrib/g_sdf.c into src/contrib/gmx_sdf.c to make it
  independent of gmx_ana.h.  Remove gmx_sdf() from gmx_ana.h.

Closes #1013.

Change-Id: I34ba52fc938823833103123c8ada06d169abf7de

11 years agoFix problems with intel-mpi
Roland Schulz [Mon, 11 Mar 2013 05:19:46 +0000 (01:19 -0400)]
Fix problems with intel-mpi

The mpich version with intel-mpi has a naming conflict of SEEK_SET
between stdio and the C++ binding of MPI. It would be sufficient
to set MPICH_IGNORE_CXX_SEEK or change the include order, but
given that the C++ binding is deprecated and not used it seems
more constistent to simply disable the MPI C++ binding as a whole.

Also moves the #ifdef for lib-mpi/thread-mpi into one file
and thus simplifies the code.

Change-Id: I9702b840f1d1ac51e99b610a7c125d97cda69164

11 years agoMerge "Merge release-4-6 into master"
Teemu Murtola [Fri, 22 Mar 2013 12:27:22 +0000 (13:27 +0100)]
Merge "Merge release-4-6 into master"

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 release-4-6 into master
Roland Schulz [Sun, 10 Mar 2013 21:25:44 +0000 (17:25 -0400)]
Merge release-4-6 into master

Conflicts:
CMakeLists.txt (trivial)
bootstrap (deleted)

Reverted: tests/CMakeLists.txt (GMXLIB - not necessary)

Change-Id: I2f0810ac6343b3629f01169b13c06784ccfd56cf

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

11 years agoAdded install guide section for BLAS/LAPACK
Mark Abraham [Mon, 11 Mar 2013 13:15:21 +0000 (14:15 +0100)]
Added install guide section for BLAS/LAPACK

Fixes #1186

Change-Id: If9e95f93cd216b86143685fd0ae9bfbc5d26792e

11 years agoMerge "Fixes linkage with FFTW + MKL for BLAS/LAPACK" into release-4-6
Mark Abraham [Mon, 11 Mar 2013 11:10:49 +0000 (12:10 +0100)]
Merge "Fixes linkage with FFTW + MKL for BLAS/LAPACK" into release-4-6

11 years agoEssential dynamics: fixed legend in ED .xvg output file
Carsten Kutzner [Fri, 8 Mar 2013 16:07:26 +0000 (17:07 +0100)]
Essential dynamics: fixed legend in ED .xvg output file

If one performs flooding only and none of the standard essential dynamics
protocols are turned on, the .xvg output file did still print ED legends.
I moved the bNeedDoEdsam check from init_edi() to write_edo_legend(), so
that already here we can check whether ED or only flooding is performed.

Change-Id: Ic3a784b63b335059c17aed852d1b4a4f3126841a

11 years agoBetter test assertions for exceptions.
Teemu Murtola [Fri, 8 Mar 2013 11:49:12 +0000 (13:49 +0200)]
Better test assertions for exceptions.

Google Test assertions (ASSERT|EXPECT)(_NO)?_THROW only print
"Actual: it throws." or similar when the assertion fails.  Added
Gromacs-specific exception assertions to improve output in these cases.
The new assertions have a _GMX suffix, and are used the same as the
Google Test ones.

The only real code changes are in src/testutils/testasserts.h and in
src/gromacs/utility/exceptions.*; all the other changes are mechanical
replacement of existing macros.

Change-Id: Iadcf08a0148fdcb6228e0abccea89c33d817a018

11 years agoImprove enum option interface.
Teemu Murtola [Tue, 12 Feb 2013 12:44:17 +0000 (14:44 +0200)]
Improve enum option interface.

It is no longer necessary to have explicit NULL terminating arrays
passed to StringOption::enumValue().  Instead, let the compiler deduce
the size of the array.  Reduces the potential for coding mistakes, as it
is now impossible to forget to terminate the array.

Added a separate enumValueFromNullTerminatedArray() for those rare cases
where the array is programmatically constructed or the compiler for
other reasons doesn't know its size at compile time.

Change-Id: I5e7d63db1eeea6d9d271fa299c98c781f52bd89c

11 years agoMore flexible handling of enum option descriptions.
Teemu Murtola [Fri, 21 Dec 2012 05:59:10 +0000 (07:59 +0200)]
More flexible handling of enum option descriptions.

Instead of always appending the list of allowed values to the
description of enum options, expose the list through StringOptionInfo
and construct the final description in cmdlinehelpwriter.cpp.

This gives better control for printing the option lists in different
formats.  Also allows removal of AbstractOption::createDescription(),
streamlining the core option implementation slightly.

Prerequisite for #969.

Change-Id: I26494f79757ad6894f1930b1bff2f2c74cc26f9c

11 years agoFix copyright notices for new C++ code.
Teemu Murtola [Sun, 17 Feb 2013 14:12:45 +0000 (16:12 +0200)]
Fix copyright notices for new C++ code.

Replace the copyright headers with the new headers in all source files.
Add the new header to most build system files and some other files.
May have missed some files that should have the header, but most files
new in the master branch should now have the new header, with a
reasonable set of copyrightable years.

Update the list of years as the years where there have been commits to
those files (excluding most recent copyright and uncrustification
changes).  Remove copyright years that predate existence of the code.

Regenerated the selection parser files from source to fix line numbers
caused by different number of lines in the new copyright header.
Add copyright declarations to generated selection parser files.
Some other changes in the generated parser.* caused by Bison updates
(now used 2.6.2, previously had used 2.5).

Part of #818.

Change-Id: I38c18c03b1ee0ff55fd112951d3f741274ad59af

11 years agoUpdate my e-mail address on author lines.
Teemu Murtola [Wed, 20 Feb 2013 20:10:07 +0000 (22:10 +0200)]
Update my e-mail address on author lines.

Left CBR some years ago, so use replaced the CBR e-mail address with the
one that I've been using after that in all commits.  This one will
hopefully stay the same in the foreseeable future...

Change-Id: I479426c4b7b323d6613e5f91588880c624e78cf1

11 years agoMerge "Uncrustify template.cpp and selection.cpp."
Teemu Murtola [Thu, 7 Mar 2013 18:44:22 +0000 (19:44 +0100)]
Merge "Uncrustify template.cpp and selection.cpp."

11 years agoMerge "Merge release-4-6 into master"
Teemu Murtola [Thu, 7 Mar 2013 18:44:03 +0000 (19:44 +0100)]
Merge "Merge release-4-6 into master"

11 years agoFixes #1183 PBC bug in g_mindist
David van der Spoel [Thu, 7 Mar 2013 18:26:23 +0000 (19:26 +0100)]
Fixes #1183 PBC bug in g_mindist

Fixes minimum size of the box if triclinic when checking
the periodic image distance.

Change-Id: I54cb593c42f791b6540147233c345069f84e2f33

11 years agoMerge "fixed PME time print with -ntomp_pme != -ntomp" into release-4-6
Roland Schulz [Wed, 6 Mar 2013 04:57:14 +0000 (05:57 +0100)]
Merge "fixed PME time print with -ntomp_pme != -ntomp" into release-4-6

11 years agoNew patch release 4.6.1
Mark Abraham [Fri, 15 Feb 2013 23:05:48 +0000 (00:05 +0100)]
New patch release 4.6.1

Change-Id: I60998e3be8c0c7289d0aa5279e554cc79fb74310

11 years agoFix automated regression testing GMXLIB value
Mark Abraham [Tue, 5 Mar 2013 15:56:34 +0000 (16:56 +0100)]
Fix automated regression testing GMXLIB value

Change-Id: I3030a85df4d649106f4620b48374ee41a9bdebc9

11 years agofixed bug with DD cut-off check and PME DLB
Berk Hess [Thu, 28 Feb 2013 17:10:34 +0000 (18:10 +0100)]
fixed bug with DD cut-off check and PME DLB

During the initial stage of PME DLB, the cut-off limit check for the
DD DLB was not checked correcty. This reduced the effectiveness of
both DD and PME DLB and could lead to missing interactions during
a very limited number of steps.
Fixes #1169

Change-Id: I0b0cac22d4abbe8a9b0c16488aeb662d7d4d9bcc