alexxy/gromacs.git
9 years agoFix MacOSX rpath
Roland Schulz [Thu, 26 Jun 2014 05:02:47 +0000 (01:02 -0400)]
Fix MacOSX rpath

d9d2b0aa74 added rpath for MacOSX but the install rpath
was wrong for MacOSX.

Change-Id: I33984696a0800baf0c58bc13ffbdddc514008750

9 years agoUpdated Amber GBSA parameters
Erik Lindahl [Mon, 9 Jun 2014 19:06:04 +0000 (21:06 +0200)]
Updated Amber GBSA parameters

Updated parameters according to Per Larsson's post on
gmx-users in November 2012 (076230.html) that found energies
to agree to at least within 0.2kJ/mol (OK, not great).

Fixes #1161.

Change-Id: I1666238c332fb9d8cc82ab6faea672e016d78757

9 years agoMake source compile under Linux X32 ABI
Erik Lindahl [Mon, 23 Jun 2014 19:30:51 +0000 (21:30 +0200)]
Make source compile under Linux X32 ABI

The X32 ABI uses 32-bit pointers in combination with all
other features of x86-64 to save memory. This requires two
minor changes to x86 inline assembly macro checks, where we
need check for __LP64__ (64-bit pointers) rather than
__x86_64__ (which is set for X32). The resulting binaries
run approximately 2% faster, but since it requires all
dependent libraries to be available in X32 format it is
not something we will enable with a simple setting for now.
To use it manually, set CFLAGS and CXXFLAGS to "-O3 -mx32".

Fixes #1263.

Change-Id: I2555b2c68d4bba24f4e581268c472a47fe7d1531

9 years agoMake it harder for compiler to optimize away SIMD CMake tests
Erik Lindahl [Sun, 22 Jun 2014 06:26:40 +0000 (08:26 +0200)]
Make it harder for compiler to optimize away SIMD CMake tests

On at least one old version of Linux, a new compiler in
combination with an old assembler led to the compiler
understanding the SIMD code but optimizing it away, which made
the test pass even though the assembler could not handle it.
This changes the return value of the CMake tests to be based on
the SIMD operations, which should make them a lot more
difficult to optimize away.

Fixes #1493.

Change-Id: I3e021c3c718cf54afaadf131c5fa911b3933f61e

9 years agoAdded check for domain decomposition and shells.
David van der Spoel [Wed, 25 Jun 2014 07:06:30 +0000 (09:06 +0200)]
Added check for domain decomposition and shells.

Fixes #1376 in as much as that it prevents incorrect calculations.
Can be left out when merging to 5.0 that does not support
particle decomposition. In 5.0 we can write a message about OpenMP
if that works with shells.
Change-Id: Ic07ae70cd3cd5298b6b2d579719da4d267b2d8fb

9 years agoManual fixes
Mark Abraham [Fri, 13 Jun 2014 13:53:11 +0000 (15:53 +0200)]
Manual fixes

* updates for cut-off schemes
* used more Roman fonts for abbreviations that are not algebraic
* fixed layout and bounding boxes of figures
* removed references to removed GROMACS-87 force fields
* changed formatting of column of [moleculetype] parameter-listing
  table because we now have some interactions with really long names
  (and some consequent changes to how footnotes and labels
  have to work)
* removed out-of-date appendix B section on Modifying GROMACS
* fixed aspects of CHARMM description, including adding the second
  reference for nucleic acids, and adding a link to the CHARMM36 port

Change-Id: Icb8c0a6087af282a653bb528d71f77e1bb04fae1

9 years agoImproved check to decide if to add chain/residue.
Magnus Lundborg [Thu, 19 Jun 2014 08:56:00 +0000 (10:56 +0200)]
Improved check to decide if to add chain/residue.

Together with the latest TNG library updates this
fixes #1507

Change-Id: Iea7160cc1194fc398f9c4db0cc66f4bd43ce724a

9 years agoAdded check in grompp for shells and inputrec issues.
David van der Spoel [Mon, 23 Jun 2014 08:42:00 +0000 (10:42 +0200)]
Added check in grompp for shells and inputrec issues.

Some combinations of inputrec settings do not work with shells,
in particular nstcalcenergy > 1 or use of a twin range cutoff.
This is now checked for in grompp. Fixes #1376.

Change-Id: I4382bcf5231920b22c725a7cf8e7b4e17c2526d9

9 years agoFixed the sign of mass perturbed contribution
Berk Hess [Tue, 24 Jun 2014 14:10:31 +0000 (16:10 +0200)]
Fixed the sign of mass perturbed contribution

Corrected the sign of the kinetic energy contribution to dHdl and dH.

Fixes #1527.

Change-Id: Ia1a2f708cdbba9a5a120a2ba8510cc2498f4d054

9 years agoFixed GROMOS assignment of PRO-NH terminus torsions
Erik Lindahl [Mon, 23 Jun 2014 00:34:37 +0000 (02:34 +0200)]
Fixed GROMOS assignment of PRO-NH terminus torsions

This patch also adjusts the parameters for torsions
over N-CA bonds in the termini, according to
suggestions by Justin Lemkul & Drazen Petrov.

Fixes #1022.

Change-Id: Ib00d69eeddf924b1e7e2de33475d774d7da54899

9 years agoMake sure duplicates bondeds are set from hackblocks
Erik Lindahl [Mon, 23 Jun 2014 00:01:56 +0000 (02:01 +0200)]
Make sure duplicates bondeds are set from hackblocks

Previously the rtp file could end up containing two
entries when the N/C termini databases added interactions.
These were then quicksorted, which could make the
assignment random. We now check for duplicates and
discard the rtp entry in favor of the hackblock.

Fixes #1395.

Change-Id: I505cfbb7e6c8e8050e6e2935cc417e49a515d8d8

9 years agoClean up CMAP placement in parameter list
Erik Lindahl [Mon, 23 Jun 2014 12:03:17 +0000 (14:03 +0200)]
Clean up CMAP placement in parameter list

Some of the CMAP variables were always placed into and
read from the first entry of the parameter list. While this
did not result in any errors, this patch now places them
correctly in the F_CMAP position.

Fixes #1345.

Change-Id: Ic6e09e46c352976cfc1f57ff903c082b4ec43df8

9 years agoAdded multisimulation info to log/output
Erik Lindahl [Mon, 23 Jun 2014 21:05:53 +0000 (23:05 +0200)]
Added multisimulation info to log/output

mdrun now reports that it is part of a multisimulation
setup, how many simulations there are, and that the
detailed MPI/OpenMP data applies to the individual
simulation.

Fixes #1204.

Change-Id: I04f1edf9a7fd1eda202b83713bdd877807242dca

9 years agoFixed recent bug with disp.corr. and vdwtype=shift
Erik Lindahl [Tue, 24 Jun 2014 08:32:10 +0000 (10:32 +0200)]
Fixed recent bug with disp.corr. and vdwtype=shift

The very recent commit dced970a introduced a small error
in the dispersion correction with vdwtype=shift.

Change-Id: I23c082ed190a5eda096504a23b277fb879c5feb4

9 years agoExtend version checking/warnings for checkpoint continuation
Rossen Apostolov [Thu, 19 Jun 2014 10:26:27 +0000 (12:26 +0200)]
Extend version checking/warnings for checkpoint continuation

Detect if the major/minor versions differ, and write a more
explicit warning that both explains this type of continuation
is unsupported, and recommend to use the -noappend option.
In contrast, for cases where only the patch level differs,
we now only issue a note that the binary has changed, since
this is fully supported.

Fixes #1230.

Change-Id: Ifec509de0e5a05d170ada89fd000c961e311c9ca

9 years agoConverted runner.c to C++
Mark Abraham [Tue, 27 May 2014 12:48:06 +0000 (14:48 +0200)]
Converted runner.c to C++

Used std::max, eliminated unused variables, used const char *, used
size_t instead of int, declared constant variable of type float
rather than type double.

Moved declaration of cr_old to where it is used.

Renamed variables relating to automated nstlist choice to better
reflect what is actually going on.

Added some assertions to help static analysis and humans understand
what is going on. This is a problem because static analysis can't
reason correctly about cr and fr while we continue to pass them
everywhere as non-const.

Change-Id: I1afe0c5e96c0ccdc6b46f772f8746402af471234

9 years agoIncreased precision of distance output
Paul van Maaren [Fri, 20 Jun 2014 18:21:16 +0000 (19:21 +0100)]
Increased precision of distance output

In some cases one wants better precision for distances, e.g. when
measuring short distances between atoms and vsites or atoms and
shells. This is particularly useful when debugging force fields.

Change-Id: If78a163b2a0cbfd2858390846327d86b50df9959

9 years agoEnable terminus-specific atom translation
Erik Lindahl [Mon, 23 Jun 2014 22:28:15 +0000 (00:28 +0200)]
Enable terminus-specific atom translation

By adding protein-nterm and protein-cterm classes for atom
name translation in xlateat.dat we now avoid replacing
names such as O2 in non-standard amino acids. This patch
also corrects a cosmetic issue in the number of residues
claimed to be found in each chain by pdb2gmx.

Fixes #567.

Change-Id: I5956991e3ff3e5e1202330a857fd773f9e9b6945

9 years agoAdded tip5p to the list of watermodels in some FF.
Rossen Apostolov [Thu, 12 Jun 2014 15:21:10 +0000 (17:21 +0200)]
Added tip5p to the list of watermodels in some FF.

Added support for flexible tip5p to OPLSAA and parameters
were taken from the Amber/Charmm tip5p.itp files.

There are, however, various problems with that water model.
This commit doesn't resolve them so the bug report below
will need to be followed up at later stage.

watermodels.dat now includes a note about these issues
and refers users to the redmine report.

Refs #1348.

Change-Id: I3adaae21f35efbb4240716e91f1bb5d256c8853e

9 years agoEnable 4-letter resname in PDB output, keeps more pdbinfo.
Erik Lindahl [Sat, 21 Jun 2014 21:30:50 +0000 (23:30 +0200)]
Enable 4-letter resname in PDB output, keeps more pdbinfo.

This still fully adheres to the PDB standard since column 21
is not used by the standard. All common programs (PyMol, VMD, etc)
understand the 4-letter format, and programs that only read three
letters will still read the same filename as they used to. In
particular, this conserves most residue names during pdb<->gro
format conversions. We have also killed the non-standard
wide pdb format to avoid writing broken PDB files.

Fixes #725. Refs #917.

Change-Id: I9b6b8f2e191acdfb65ca2b5d96f39249cd71ea98

9 years agoDetect non-fatal warnings when trying CFlags for source
Erik Lindahl [Thu, 12 Jun 2014 08:30:44 +0000 (10:30 +0200)]
Detect non-fatal warnings when trying CFlags for source

We now first check the flag itself (and catch warnings),
after which we check if our SIMD source compiles with it.

Fixes #1461.

Change-Id: Ic6ae99f62c5657195a59dc83ab08399d3491249a

9 years agoEnable xvgr output and labels for g_principal
Erik Lindahl [Mon, 23 Jun 2014 10:59:19 +0000 (12:59 +0200)]
Enable xvgr output and labels for g_principal

g_principal now writes proper xgr files instead of raw
data files, and the output has more explanatory axis
labels as well as legends for the data sets.

Fixes #609.

Change-Id: I1eb7914a25661734e6a95e70413194ef723f9635

9 years agoDisallow extracting V/F from XTC files in g_traj
Erik Lindahl [Fri, 20 Jun 2014 15:52:51 +0000 (17:52 +0200)]
Disallow extracting V/F from XTC files in g_traj

We now issue a fatal error if the user asks for velocities or
forces to be written to as output from g_traj when the input
XTC file does not contain these quantities.

Fixes #1298.

Change-Id: I45a12fb1e5db5b2b2e1b072444e5430373fbaaa3

9 years agoWarn if using nsteps=0 without continuation=yes
Erik Lindahl [Sun, 22 Jun 2014 22:01:47 +0000 (00:01 +0200)]
Warn if using nsteps=0 without continuation=yes

To achieve true single-point energy evaluations for a structure
we should not constrain the initial conformation. This is
typically done by settings nsteps=0, so grompp now warns if this
is used while keeping continuation = no (the default).

Fixes #1231.

Change-Id: I4e65b66f6535da4206e7dbd5f7769a33c94ec12d

9 years agoImplemented fatal error for nstcalcenergy!=1 with shells.
David van der Spoel [Sun, 22 Jun 2014 20:30:51 +0000 (22:30 +0200)]
Implemented fatal error for nstcalcenergy!=1 with shells.

The combination of using shell particles with a value for
nstcalcenergy that is different from 1 leads to energies
not being communicated around on a parallel machine and hence
a meaningless shell relaxation procedure. This patch will just
bail out with a fatal error if the combination is detected.
Fixes #1376.

Change-Id: Ia54f1480b2358355438acb5de31dfa56b7f8d603

9 years agoMore clear message for undefined pullgroups.
Rossen Apostolov [Wed, 18 Jun 2014 14:19:03 +0000 (16:19 +0200)]
More clear message for undefined pullgroups.

When a pull group was not defined in the index file,
grompp didn't report in a clear way where the problem was.

Fixes #1446.

Change-Id: If571b46b91f6ad28213808b6e18d96e1da0be79d

9 years agoMake log file option listing similar to mdp names
Erik Lindahl [Sun, 22 Jun 2014 14:15:09 +0000 (16:15 +0200)]
Make log file option listing similar to mdp names

Modify names to be consistent with the mdp file spelling
and abbreviations, to the extent possible. This patch also
removes the unused ndelta option.

Fixes #1514.

Change-Id: I3e56ee3dc773d027b2c0c5ca060fa34e4930a4d6

9 years agoUse ${CMAKE_INSTALL_LIBDIR} as lib directory for tng_io library
Vedran Miletić [Thu, 19 Jun 2014 13:48:46 +0000 (15:48 +0200)]
Use ${CMAKE_INSTALL_LIBDIR} as lib directory for tng_io library

Directory lib was used as library directory for tng_io library. This
causes problems on Debian wheezy (and future versions), which expect
libraries to be installed under lib/<arch>. GROMACS already uses
${CMAKE_INSTALL_LIBDIR} for libgromacs.so, and this patch makes
libtng_io and libtng_compress install in the same location.

This was also addressed in the TNG repository and this commit
corresponds to commit e8fa7bf3abfc74acf60a048cdfe1f65fdbc0dc2d in
the TNG repository.

This patch also bumps minimum CMake version required for building
tng_io from 2.8 to 2.8.8 due to inclusion of GNUInstallDirs module.

Change-Id: I68b2196ab77e3e18c3a50717327e59b3482f2a29

9 years agoMake sure masses are copied from termini databases
Erik Lindahl [Fri, 20 Jun 2014 20:50:52 +0000 (22:50 +0200)]
Make sure masses are copied from termini databases

Masses should always be copied from termini databases,
where they are mandatory since they are specified before
the charge, rather than picking them from atomtypes.atp.
This patch also adjusts a few of the default CHARMM27
charges in atomtypes.atp that deviated in the 3rd decimal.

Fixes #1207.

Change-Id: I6f0c87989ae285ff435cd56c64432988c6634824

9 years agoConvert checkpoint.c to C++ compilation
Teemu Murtola [Sat, 21 Jun 2014 04:12:36 +0000 (07:12 +0300)]
Convert checkpoint.c to C++ compilation

- Remove unused variables.
- Some minor include cleanup.
- Fix some variable types and return value propagation.

The main motivation is that this file is the single caller for
Program(), which has a C++ replacement.  Using that (not done here)
would allow removing the old C function.

Change-Id: I58567ff177d2a2c193f9a926e484c6ff30601661

9 years agoFix g_mindist with pbc=XY
Berk Hess [Fri, 20 Jun 2014 07:01:33 +0000 (09:01 +0200)]
Fix g_mindist with pbc=XY

Fixes #1189.

Change-Id: I7c8242df6f2644bebc49c13c86412f8bc1d37428

9 years agoFixed typo in oplsaa ASPH charges.
Rossen Apostolov [Thu, 19 Jun 2014 13:08:46 +0000 (15:08 +0200)]
Fixed typo in oplsaa ASPH charges.

Part of #1395.

Change-Id: I03c88c8377affadc629c7b9a04d5e8ddd1cb946a

9 years agoFix that seeking was wrong if frame time was modified
Roland Schulz [Sat, 14 Jun 2014 01:07:43 +0000 (21:07 -0400)]
Fix that seeking was wrong if frame time was modified

The trjconv -t0 option causes fr->time to be modified and
this then causes the skipping to be incorrect. Alternative
we could document that fr->time shouldn't be modified
and change that trjconv makes a copy of fr before changing
time. This change has the advantage it is less likely
to reintroduce the problem.

Fixes #1405, #1406

Change-Id: Ibd692dfecdf175450fc43f7f35b774bf4446b316

9 years agoRemoved unused parameters and cleanup of inputrec.
Rossen Apostolov [Thu, 5 Jun 2014 11:40:24 +0000 (13:40 +0200)]
Removed unused parameters and cleanup of inputrec.

Removed optimize_fft, dihre_fc, nstcheckpoint.

Fixes #820, related to #552.

Change-Id: I8d1c3700834e5575972165410b3b29cbb56cba53

9 years agoFixed shells with particle decomposition
Berk Hess [Fri, 20 Jun 2014 05:33:57 +0000 (07:33 +0200)]
Fixed shells with particle decomposition

In the spirit of version 5.0, the recent Verlet scheme fix for shells,
commit debd482d, removed the support for PD. Now it's back.

Refs #1429.

Change-Id: I686d4287ec8946e418aa98e739a1a81a0b7f7055

9 years agoFix ref error in constraint pull code
Roland Schulz [Wed, 14 May 2014 22:08:16 +0000 (18:08 -0400)]
Fix ref error in constraint pull code

With multiple pull constraints, the convergence check would use
the reference distance of the last constraint for all constraints.

Change-Id: Ic15d5dd618acc6d3aa5ca0f1e009c6f8096ed0d1

9 years agoMerge release-5-0 into master
Roland Schulz [Thu, 19 Jun 2014 19:21:55 +0000 (15:21 -0400)]
Merge release-5-0 into master

Conflicts:
CMakeLists.txt (trivial/backport)

Reverted change to cmake/gmxCFlags.cmake which
shouldn't be merged into master.

Change-Id: I1285fa0b892cbcfc14b53d18b547e396bec5bec3

9 years agoSmall typos in surface tension description.
Rossen Apostolov [Thu, 19 Jun 2014 09:29:56 +0000 (11:29 +0200)]
Small typos in surface tension description.

Fixes #816.

Change-Id: I9273f186ad17b5c373d4a3e87fcf0a981dba40e3

9 years agoBumped the TNG library to the latest version.
Magnus Lundborg [Mon, 16 Jun 2014 15:15:08 +0000 (17:15 +0200)]
Bumped the TNG library to the latest version.

This is commit f7083045c6f7d23bac47b8302e413becd53fc030
in the TNG repository.

Change-Id: I1f5a9edbaf1588b6d1cee6cf86a7ea254aad23a1

9 years agoDisable maybe-uninitialized warning
Roland Schulz [Thu, 19 Jun 2014 01:59:46 +0000 (21:59 -0400)]
Disable maybe-uninitialized warning

Causes false positives with old gmx_fatal. Don't merge
into master branch.

Change-Id: I48e9d7798bbf1990cfeb79efaeabc354ab469746

9 years agoAdd ASAN build configuration
Roland Schulz [Sun, 11 May 2014 20:26:14 +0000 (16:26 -0400)]
Add ASAN build configuration

Also renamed ThreadSanitizer to TSAN

Change-Id: I4373a626acc3962bfb8f163297ab146684bd5ea6

9 years agoMerge release-5-0 into master
Roland Schulz [Wed, 18 Jun 2014 14:06:23 +0000 (10:06 -0400)]
Merge release-5-0 into master

Conflicts:
- src/gromacs/legacyheaders/types/simple.h
  moved changes into src/gromacs/utility/real.h
- src/gromacs/gmxlib/network.c &
  src/gromacs/utility/basenetwork.cpp
  changes to network.c partially applied to itself
  and paritally to basenetwork.
- src/gromacs/legacyheaders/network.h (trivial)
- src/programs/mdrun/md.cpp (trivial)

Change-Id: Iaeae5bcc691a3fa84978ee261ceb4a5d2aeb4f62

9 years agoFixed CMake 2.8.12+ CUDA dylib bugs and warnings on OS X
Erik Lindahl [Tue, 17 Jun 2014 15:26:33 +0000 (17:26 +0200)]
Fixed CMake 2.8.12+ CUDA dylib bugs and warnings on OS X

This patch fixes up a number of minor compilation issues
with CUDA on OS X. The __STRICT_ANSI__ define has been
added to make CUDA work with gcc version 4.8 and 4.9,
a dummy variable has been added to the dummy c++ gpu utils
file to avoid warnings about empty objects, and we now
properly handle both RPATH (newer CMake) and INSTALL_NAME_DIR
(older CMake) without warnings. CMake-2.8.12 introduced
a bug that caused Gromacs executables to be malformed since
the rpath to the CUDA libraries was added twice. This is
caused by fairly deep internal changes in CMake, but it has
been worked around by removing the rpath (which FindCUDA.cmake
only adds on OS X) manually for CMake>2.8.11.

Fixes #1471.

Change-Id: I8b01204dc07678bc305821162f20db65e0e7b88d

9 years agoAdded reference to cmap in pdb2gmx.
Rossen Apostolov [Tue, 17 Jun 2014 12:16:50 +0000 (14:16 +0200)]
Added reference to cmap in pdb2gmx.

Fixes #886.

Change-Id: Ib4c84a50962ed90ce145ad001322a9a46c8a2ab0

9 years agoFixed sign error in posres dvdl
Berk Hess [Mon, 16 Jun 2014 07:17:35 +0000 (09:17 +0200)]
Fixed sign error in posres dvdl

For position restraints the sign of the contribution of the change
in reference location was incorrect. Note that the contribution of
the change in force constant was and is correct.

Fixes #1408.

Change-Id: I75210c3855d13fdd58e0a698d6c5d7c7116f456b

9 years agoMade mdrun warn when generic kernels are used
Mark Abraham [Tue, 17 Jun 2014 14:33:49 +0000 (16:33 +0200)]
Made mdrun warn when generic kernels are used

mdrun now issues a warning if the generic group-scheme, or plain-C
Verlet-scheme kernels actually did some work. Such kernels should not
be called during routine use of mdrun.

It would be possible to do the check for the use of the generic
group-scheme kernel earlier in mdrun, but it's not easy to ensure we
only write the output at the first such step. Given that the group
scheme is deprecated, warning only at the end is sufficiently nice
behaviour.

Change-Id: Ib9b15165e53510f537687a4b448aaa01f1418522

9 years agoDisabled replica exchange when T not in order
Erik Lindahl [Wed, 11 Jun 2014 21:56:42 +0000 (23:56 +0200)]
Disabled replica exchange when T not in order

There are issues when the replica property is not increasing
with the replica index. This patch has a partial fix. But since
there are still issues, unordered replicas now lead to a fatal error.

Fixes #1377.

Change-Id: I272d9831df85fdc18c1b2fe5724cbfc06e73444e

9 years agoFix a Replica Exchange output problem
Carlo Camilloni [Tue, 17 Jun 2014 14:48:31 +0000 (15:48 +0100)]
Fix a Replica Exchange output problem

when running NPT simulations a "b" was added at the beginning
of the Repl Ex line thus breaking demux.pl

Change-Id: I72781d40187d94216e844a8ea522c5d1832bba09

9 years agoUpdated mdrun -npme documentation
Berk Hess [Fri, 13 Jun 2014 12:01:39 +0000 (14:01 +0200)]
Updated mdrun -npme documentation

The number of nodes at which PME nodes are used has increased.
Added note on PME nodes not being selected automatically with GPUs.

Fixes #1374.

Change-Id: Ie1de87abd3d1204d99af8b4f8e6809e7806f5c08

9 years agoFix that skipping fails if target is 2nd frame
Roland Schulz [Sat, 14 Jun 2014 03:39:20 +0000 (23:39 -0400)]
Fix that skipping fails if target is 2nd frame

With bSeekForwardOnly the current file position should be an inclusive boundary,
but because the binary search stops if the search region (high-low) becomes
header_size, the current frame wasn't found. Because trjconv always reads the
first frame before calling seek, it failed if the target was the 2nd frame.

Fixes #1154

Change-Id: Id4151f0106abdb68d6067f02fe2927a4ec6d77a0

9 years agoRemoved rounding issue in nbnxn Ewald table
Berk Hess [Mon, 9 Jun 2014 13:12:12 +0000 (15:12 +0200)]
Removed rounding issue in nbnxn Ewald table

The nbnxn Ewald table could got the spacing dx passed as a real.
Changing this to double improves the accuracy of the single precision
table by two orders of magnitude, because rounding errors are avoided.

Change-Id: I11b6c27bd3f4e306c412da8f01761b03dc337ce7

9 years agoSmall changes in appendix A of the manual.
Rossen Apostolov [Tue, 17 Jun 2014 12:01:03 +0000 (14:01 +0200)]
Small changes in appendix A of the manual.

Final fixes #552.

Change-Id: I8e7939ae70eb14d2e1fc0a25b50774d472889bd1

9 years agoConvert gmx_residuetype_t to a non-pointer
Teemu Murtola [Thu, 5 Jun 2014 18:44:04 +0000 (21:44 +0300)]
Convert gmx_residuetype_t to a non-pointer

This uses the agreed format for forward declarations in #1490.
This removes the need to include residuetypes.h in any headers, and can
serve as a simple demonstration of the concept.

Change-Id: Ia82d4f96a1ea97e97e11e9840563f8beebe268c8

9 years agoRemove unused figures from share/html/
Teemu Murtola [Sun, 8 Jun 2014 04:22:47 +0000 (07:22 +0300)]
Remove unused figures from share/html/

Some of the flowchart images are also unused, but left them there for
completeness.

Change-Id: Ia47f9ac62f865f60c6f1998f407d62c9ba6c66f2

9 years agoFixed PME bug with #OpenMP-threads a large prime
Berk Hess [Thu, 12 Jun 2014 13:01:40 +0000 (15:01 +0200)]
Fixed PME bug with #OpenMP-threads a large prime

With hybrid MPI+OpenMP parallelization and the rank local FFT grid
size for a dimension not divisible by the number of OpenMP threads
in that dimension, a very small amount of the FFT grid overlap part
could set/added twice. This would only occur at low-medium MPI
parallelization with OpenMP thread counts with large prime factors,
which is practice means almost never. Even when it occured, no actual
differences in PME energies or forces were observed.
This issue was due to a leftover from when space was uniformly
divided over the grids iso assigning whole grid lines.

Fixes #1388.

Change-Id: I22904c7f55d2e96fc4b8cd1498af2087eaed47ac

9 years agoAdded tip5pe water model to oplsa.
Rossen Apostolov [Tue, 10 Jun 2014 08:10:25 +0000 (10:10 +0200)]
Added tip5pe water model to oplsa.

The model introduces a small modification to the tip5p model
to reproduce better experimental data for simulations using
Ewald summation.

Reference publication J. Chem. Phys. 120 (2004) 6085-6093.

Fixes #1016.

Change-Id: I1afba614d65d1e4e8eb8594e99eea41e31f1e391

9 years agoMake sure figure legends are adapted to xmgr/xmgrace
Erik Lindahl [Thu, 12 Jun 2014 12:39:24 +0000 (14:39 +0200)]
Make sure figure legends are adapted to xmgr/xmgrace

A few programs were not using the xvgr_legend call. g_mdmat
has been modified to use it, and for g_analyse and g_enemat
I at least fixed the existing direct-writing code by adding
a conditional.

Fixes #783.

Change-Id: I782af539b93737b570f266ba744e718fbd846e5f

9 years agoChanged appending file name error message
Berk Hess [Thu, 12 Jun 2014 09:36:30 +0000 (11:36 +0200)]
Changed appending file name error message

The error message now mentiones potential names issues.

Fixes #1497.

Change-Id: I0c0195abd21c5012b49119024505b18a906078be

9 years agoFix memory-usage error in g_chi
David van der Spoel [Thu, 12 Jun 2014 07:58:11 +0000 (09:58 +0200)]
Fix memory-usage error in g_chi

Out of array bounds writing error as pointed out by valgrind
is fixed by this patch, preventing a SEGV.

Fixes #1503

Change-Id: I57959f4751f3eb645ff66bbcd4418607af56c1a4

9 years agoMake nbnxn template and generated files match
Roland Schulz [Wed, 11 Jun 2014 06:02:13 +0000 (02:02 -0400)]
Make nbnxn template and generated files match

Change-Id: I80b80e242d920862a64db22ae2321dcdb532faa1

9 years agoForce g_bond to use structure file
Erik Lindahl [Wed, 11 Jun 2014 23:10:14 +0000 (01:10 +0200)]
Force g_bond to use structure file

Previous versions of Gromacs never wrote broken molecules, but
this is no longer true for domain decomposition. Box dimensions
are set from the trajectory, but the molecular connectivity
from the structure file.

Fixes #834.

Change-Id: I61ecb4957ef11e03bfeef10095a406cbddd23a34

9 years agoMade shells work with the Verlet scheme
Berk Hess [Thu, 12 Jun 2014 08:23:27 +0000 (10:23 +0200)]
Made shells work with the Verlet scheme

The issue was that atoms iso charge group should be put in the box.
Additionally water_pol only worked within a charge group, now fixed.
Note that with shells working across charge groups, which is always
the case with the Verlet scheme, no shell prediction is done.
We should implement prediction, since it improves performance.

Fixes #1429.

Change-Id: I2ebfc2d91fc161167f8f2573b61e1f519cf11fd8

9 years agoCleanup environment variables.
Rossen Apostolov [Thu, 12 Jun 2014 16:27:30 +0000 (18:27 +0200)]
Cleanup environment variables.

Renamed variables to more descriptive names and
removed unused ones.

Fixes #976.

Change-Id: I0c17443c93efe581bf728f783893181e5a7f8ed8

9 years agoAdded dummy mass for charmm TYR aromatic vsites
Erik Lindahl [Wed, 11 Jun 2014 22:49:12 +0000 (00:49 +0200)]
Added dummy mass for charmm TYR aromatic vsites

pdb2gmx was not able to create aromatic vsites
for charmm27 since this dummy mass center was missing.
Note that aromatic vsites are still largely untested,
and not recommended for general usage.

Fixes #587.

Change-Id: Ic7d2976536c6269d1dcf12b7d33bddab096c353f

9 years agoFixed perturbed wall interactions
Berk Hess [Mon, 9 Jun 2014 14:25:57 +0000 (16:25 +0200)]
Fixed perturbed wall interactions

With free-energy calculations, the B-state wall force and potential
were set to zero.
Fixes #1501

Change-Id: Ib53073c19fee19979ade96455b6505001187a2fa

9 years agoMade gmxcheck -rmsd work again with forces
Berk Hess [Mon, 9 Jun 2014 13:22:06 +0000 (15:22 +0200)]
Made gmxcheck -rmsd work again with forces

Change-Id: I776b282b17ee7c6cc4e56130dd804aa0ea04bce6

9 years agoMake sure genrestr uses the disre_up2 parameter
Erik Lindahl [Wed, 11 Jun 2014 23:45:48 +0000 (01:45 +0200)]
Make sure genrestr uses the disre_up2 parameter

Previously, a constant value of 1.0 was used instead of the
margin read from the command line.

Fixes #1357.

Change-Id: I65ef225159e7b6ef818c71d062b619e78fa7ea22

9 years agoRemoved undocumented -map and -mdata options from g_sham.
Erik Lindahl [Wed, 11 Jun 2014 22:24:32 +0000 (00:24 +0200)]
Removed undocumented -map and -mdata options from g_sham.

Both options and code were completely undocumented, and
nobody seemed interested in helping document them for the
last two years, so for now they are gone.

Fixes #812.

Change-Id: I4d60cf3d58da89d76a4461cdc2e75f031676d2c9

9 years agoAlways write output from genion
Erik Lindahl [Thu, 22 May 2014 23:23:22 +0000 (01:23 +0200)]
Always write output from genion

To facilitate scripting we now copy the input conformation
and write it to the output, even if no ions are to be added.

Refs #1458.

Change-Id: I3e467169e30bc7448758c2d506ca35f49b001b50

9 years agoDecoupled repl_ex_nst from nstcalcenergy
Berk Hess [Tue, 10 Jun 2014 12:38:04 +0000 (14:38 +0200)]
Decoupled repl_ex_nst from nstcalcenergy

The replica exchange frequency is automatically changed by mdrun
to a multiple of nstcalcenergy, which is annoying. It turns out that
it doesn't need to be a multiple, so this changing has been removed.
Fixes #1494

Change-Id: I00833f92fd468924f61879aff8b7c85fe79d3c2e

9 years agoMapped HIS1 to HSD in charmm27.
Rossen Apostolov [Mon, 26 May 2014 13:52:05 +0000 (15:52 +0200)]
Mapped HIS1 to HSD in charmm27.

Fixes #1133.

Change-Id: I6c289af9b58c8e7cd66f36982bf118505aa38f7d

9 years agoFixes bug where -e and -dt flags did not work anymore.
David van der Spoel [Wed, 11 Jun 2014 20:36:58 +0000 (22:36 +0200)]
Fixes bug where -e and -dt flags did not work anymore.

This was introduced recently during the overhaul of the option
processing.

Change-Id: Ife68ee4f53b54198333c1c135f7f5d9994081b1f

9 years agoMade repl_ex time step more readable
Berk Hess [Wed, 11 Jun 2014 06:56:12 +0000 (08:56 +0200)]
Made repl_ex time step more readable

A recent change made the repl_ex time print %e, now it's %.5f,
as in the log file.

Refs #1486.

Change-Id: I2e669d91a61e6a696ce6d123c701fa8b773a3c2f

9 years agoAvoid writing xvgr formatting with -xvg none
Erik Lindahl [Fri, 6 Jun 2014 06:57:43 +0000 (08:57 +0200)]
Avoid writing xvgr formatting with -xvg none

Several tools were writing xvgr formatting code directly
to output files, even when the users selects -xvg none as
a command line option.

Fixes #1407, #1479.

Change-Id: I1db10c2ad7455332e2a415a922885cddaec5efd1

9 years agoPrint in higher precision repl_ex timestep.
Rossen Apostolov [Tue, 10 Jun 2014 13:44:36 +0000 (15:44 +0200)]
Print in higher precision repl_ex timestep.

Fixes #1486.

Change-Id: Ibe5bcee18f761bea96e1b4a432774a4472a40f47

9 years agoProcess negative sigma correctly with combrule 2 or 3
Erik Lindahl [Fri, 6 Jun 2014 07:48:45 +0000 (09:48 +0200)]
Process negative sigma correctly with combrule 2 or 3

The initial combination rule code (for sigma/epsilon)
did not take negative sigma rules into account, which
caused segfaults instead of the values reaching the code
in convparm.c that handles sigma<0 during conversion
to c6/c12 (where it is used to signal c6=0).

Fixes #1391.

Change-Id: I437f06d67c5ecfb58d236590288ad122bcdf2df0

9 years agoReplaced gmx_hostname_num by gmx_physicalnode_id_hash
Berk Hess [Fri, 30 May 2014 15:18:07 +0000 (17:18 +0200)]
Replaced gmx_hostname_num by gmx_physicalnode_id_hash

gmx_hostname_num was only used to distinguish physical nodes.
Since it only worked for hostnames with numbers, we replaced it
by a hash of the hostname.

Fixes #1513

Change-Id: I8e60757707386f43269afe0bb38e8500decefcd6

9 years agoIssue a warning for using gmx_rms -prev with large trajectories.
Rossen Apostolov [Fri, 23 May 2014 11:48:19 +0000 (13:48 +0200)]
Issue a warning for using gmx_rms -prev with large trajectories.

Refs #716.

Change-Id: I607d6a63259e0dd9de7c8c99e4917bbe9f37ff8e

9 years agoInstall libraries in correct directories on multiarch systems.
Rossen Apostolov [Mon, 26 May 2014 08:42:29 +0000 (10:42 +0200)]
Install libraries in correct directories on multiarch systems.

NB: this patch may change the default install dirs on some systems,
and will _not_ overwrite previous installations. Thus make sure to
link to the correct library versions of e.g. libgromacs.

Fixes #591 and #623.

Change-Id: Ibd1d7d216236a0f5841ba9f0ac622a3f8f1a8718

9 years agoSet make_ndx max name length and count to 1024
Berk Hess [Mon, 9 Jun 2014 14:19:11 +0000 (16:19 +0200)]
Set make_ndx max name length and count to 1024

Limits were 30, which was a bit on the low side.
Fixes #1512

Change-Id: I62d5146fdac06b7b5b7f56925addeca561c83173

9 years agoFixed the output format of g_principal
Erik Lindahl [Mon, 26 May 2014 12:41:58 +0000 (14:41 +0200)]
Fixed the output format of g_principal

Gromacs-4.6 and earlier versions had the output transposed. This
patch fixes it such that paxisN.dat contains the x/y/z components
of the N:th prinicipal axis. The default file output names have
been changed to paxisN.dat to increase the probability that users
who rely on old scripts will need to read the help text and find
the changed format.

Fixes #1441, related to #609.

Change-Id: Ic1ed9370145d3389ae8f43c2a419765dabf3a66f

9 years agoFixed typo in description of conversion factors.
Rossen Apostolov [Tue, 3 Jun 2014 13:46:37 +0000 (15:46 +0200)]
Fixed typo in description of conversion factors.

Change-Id: I5f9875ef94e8d5526f84c029f539fab642319a04

9 years agoModify single/double EPS to agree with ISO C
Erik Lindahl [Thu, 5 Jun 2014 14:34:26 +0000 (16:34 +0200)]
Modify single/double EPS to agree with ISO C

The previous Gromacs values were a factor 2 too tight. While
we're at it, we also added float modifiers to the single-precision
constants, increased the accuracy in the double max/min values,
and improved the least significant bit in one of the single-precision
values. The previous relative accuracies for the PME correction
analytical approximations where set fairly arbitrary by dividing a
tightly chose constant with GMX_REAL_EPS, and since this is now a
larger number the unit test tolerance for those corrections has been
increased slightly to avoid triggering false failures.

Fixes #1356.

Change-Id: If29d2ff4141d86fd019e0dbdbfb7737ead28c3d4

9 years agoMerge "Merge release-5-0 into master"
David van der Spoel [Sat, 7 Jun 2014 19:51:18 +0000 (21:51 +0200)]
Merge "Merge release-5-0 into master"

9 years agoMerge release-5-0 into master
David van der Spoel [Sat, 7 Jun 2014 09:54:10 +0000 (11:54 +0200)]
Merge release-5-0 into master

Conflicts:
share/top/gurgle.dat

Change-Id: Ide32a9bfed25cda8eeb7869f1c5a878225c85723

9 years agoClean up FileNameOptionStorage implementation
Teemu Murtola [Sat, 10 May 2014 13:22:15 +0000 (16:22 +0300)]
Clean up FileNameOptionStorage implementation

Get rid of a separate registry, and instead use a static array that
maps OptionFileType to filenm.h types.  FileTypeHandler can now be
created directly with relatively small cost (no memory allocation),
and provide wrappers for the functionality in filenm.h.

Also, use an enum value from filenm.h as the internal type of
FileNameOptionStorage, as the option is not going to get decoupled from
those defines any time soon.  Rename some related variables for clarity.

Change-Id: I8f090c3098adb1f3d48788021f3715bb51a6b80a

9 years agoImprove (Selection|FileName)OptionManager handling
Teemu Murtola [Fri, 9 May 2014 04:40:21 +0000 (07:40 +0300)]
Improve (Selection|FileName)OptionManager handling

The way the managers get passed to the option storage classes is now
reversed: the manager is passed already to the constructor.  This has
several benefits:
 - Already the constructor can use the manager if necessary.
 - It is possible to easily assert on all incorrect usage scenarios.
 - There is much less boilerplate code associated with propagating the
   manager into the storage classes.  There is also less code in
   general: even with an addition of a new file and its copyright
   header, as well as more extensive documentation, there are still
   fewer total lines with the new approach.

The minor disadvantage is that also option types that do not use a
manager get the container passed as an argument to createStorage(), but
they can just ignore the parameter, so the above benefits should clearly
outweigh this.

There was an outdated comment in options.h about the usage of
addSubSection(), which is fixed here.  It is now necessary to add
subsections before any options are added to them, but this is likely a
reasonable constraint for some other future stuff as well.

Change-Id: I4a5e69d3fd596dbe265613f81399219f8b8b19c8

9 years agoReplace all command line parsing with Options
Teemu Murtola [Tue, 6 May 2014 03:32:47 +0000 (06:32 +0300)]
Replace all command line parsing with Options

- Add a more elaborate conversion mechanism in pargs.cpp, that also
  converts the values back for option types where the C and C++ types do
  not match.
- Arguments added in parse_common_args() no longer need to go through
  the conversion, but instead use Options mechanisms directly.
- Time unit option is now handled through TimeUnitManager.  It requires
  extra refactoring to make oenv to use this also internally, but that
  would remove more duplication.
- A few more tweaks to FileNameOption behavior.  The implementation is
  not perhaps the cleanest currently, but refactoring will follow.

There can be some glitches in uncommon cases or on error paths in the
new approach, but in general, error handling should be much more
user-friendly.  Part of future FileNameOption refactoring aims to
improve this part futher.  The only way to find issues is for people to
actually use the new code.

Change-Id: Iea51bd379a3cd04ad62ac76822fcb9f4251ee9d4

9 years agoMove residuetype handling to its own file.
Teemu Murtola [Thu, 5 Jun 2014 04:08:22 +0000 (07:08 +0300)]
Move residuetype handling to its own file.

Change-Id: I430dcb08db65479d4865e032a24effbacc87d28e

9 years agoRemove support for "old" index file format
Teemu Murtola [Thu, 5 Jun 2014 03:28:12 +0000 (06:28 +0300)]
Remove support for "old" index file format

The format wasn't documented anywhere, was at least 10+ years old, and
error handling in the reading code was non-existent.

Change-Id: I5abf97bfaa938f819228cace1eba948b8e45f796

9 years agoMove index.* to topology/
Teemu Murtola [Mon, 2 Jun 2014 18:36:21 +0000 (21:36 +0300)]
Move index.* to topology/

- Move index.h and index.c to topology/.
- Remove some unused and duplicate includes.
- Convert the source file to C++ (scanf issues suppressed for now).

Change-Id: I99374f5d2e53b6c26bf6441b630234177c83affb

9 years agoAdded package version to tng_io CMakelists.txt
Erik Lindahl [Thu, 5 Jun 2014 15:25:26 +0000 (17:25 +0200)]
Added package version to tng_io CMakelists.txt

Without a package version (for tng_io), the CMake 3 beta
versions will issue warnings.

Fixes #1477.

Change-Id: I4a8f64f70e7372118eecfebb69b4a24cd18835cb

9 years agoMerge release-4-6 into release-5-0
Mark Abraham [Thu, 5 Jun 2014 21:34:10 +0000 (23:34 +0200)]
Merge release-4-6 into release-5-0

Conflicts:
src/gromacs/gmxana/gmx_energy.c
Eliminated time parameter (removed in release-5-0),
used gmx_ffclose (fixed in release-5-0).

src/gromacs/mdlib/update.c
Eliminated fplog parameter (removed in release-5-0), otherwise added
new MTS-fixing functionality from release-4-6.

src/programs/mdrun/md.c
Added new code path for MTS (from release-4-6), eliminated
wcycle and bInitStep parameters (from release-5-0).

Change-Id: I303bb649ed2373656aa4420d0afb27f738a9ea30

9 years agoFixed shift and switch modifiers, particularly for free-energy
Berk Hess [Mon, 17 Mar 2014 17:24:50 +0000 (18:24 +0100)]
Fixed shift and switch modifiers, particularly for free-energy

When using tabulated interactions (historically with PME-Switch), the
previous free-energy kernels used tabulated interactions which gave
correct results. However, as we have moved to using the new
interaction modifiers, Ewald short-ranged interactions are computed
analytically. To extend the range over which we apply the soft-core
interaction, the free-energy kernels evaluated interactions by
subtracting the reciprocal-space component, and then applying the
free-energy evaluation to the Coulomb (1/r) short-range
interaction. This works fine for vanilla PME, but led to problems when
combined with a switch modifier, since we are switching a different
function compared to the non-free-energy kernels. This could lead to
large artefacts where the free energy was 100x off if we were applying
the cutoff to r while the switch was applied to the scaled soft-core
radius.

This patch modifies the free-energy kernel so that the vanilla, shift,
and exact-cutoff versions still use the compensation trick, while the
switch modifier always operates on the traditional short-range Ewald
functional form.

The (very small) Ewald shift has also been added when computing free
energy in combination with Ewald summation and potential-shift
modifiers. As the perturbation goes to zero, the interaction will also
approach the non-free-energy interactions. Tested to match the
non-free-energy kernel to with 1e-8 in the fully coupled state, it
conserves energy, and produces reasonable free energies for ethanol in
water.

This also modifies table-generation, table-usage, and
dispersion-correction code to use shift/switch forms (and correctly),
when that has been selected in the interaction modifiers. This
provides much more accurate results for our new shifted interactions.

Correct (unmodified) tables are now generated for 1-4 interactions
in a few corner cases in the presence of modifiers for non-bonded
interactions.

Code paths for using exact cutoffs now work correctly when
rcoulomb-switch != rvdw-switch, or if only one kind of switch is
active.

Free-energy calculations using a plain Coulomb interaction now
incorporate a potential shift if one exists.

The GMX_NB_GENERIC environment variable can now be used to specify the
use of the generic kernel even with shifts or switches active.

Fixes #1463.

Change-Id: Ia63a1ed7d6c9cdf9cd9e6209b6326a49043060ec

9 years agoFix constraint virial with multiple time stepping
Berk Hess [Wed, 14 May 2014 20:36:29 +0000 (22:36 +0200)]
Fix constraint virial with multiple time stepping

With multiple time stepping the additional nstcalclr-1 force
contribution was constrained to remove it from the virial.
This procedure neglected the non-linear contribution due to
the rotation of constraints. Now the contribution of this force
component to the coordinate update is constrained instead and
the corresponding virial contribution is subtracted from the
constraint virial.

Fixes #1400

Change-Id: If3217f52808bf7491998324f8dc3161bc003ec1b

10 years agoNew quotes
Mark Abraham [Mon, 2 Jun 2014 11:30:22 +0000 (13:30 +0200)]
New quotes

Change-Id: Ia8494c51d7bce41594152644a4a25b9188d41da8

10 years agoMerge "Merge release-5-0 into master"
Mark Abraham [Thu, 5 Jun 2014 06:53:11 +0000 (08:53 +0200)]
Merge "Merge release-5-0 into master"

10 years agoUpdated C-/N-terminal partial charges in Amber03.ff.
Rossen Apostolov [Thu, 22 May 2014 13:03:54 +0000 (15:03 +0200)]
Updated C-/N-terminal partial charges in Amber03.ff.

At the time of porting the AmberFFs were validated against
AMBER 8 and the results have matched precisely. However,
that specific AMBER version had a bug due to which CT/NT charges in ff03
were in fact using ff94 charges. The bug correspondingly propagated
to the Gromacs ports. In newer versions of AMBER this has been fixed.

The current GROMACS patch uses charges as specified in the
all_aminoct03.lib and all_aminont03.lib files as
taken from the AmberTools14 distribution.

In that distribution (14) seem to be no updates to the ff9x parameters.

Fixes #1466.

Change-Id: Ie6cfea5702500ff6cd5019edb22f224d29135425

10 years agoMerge release-5-0 into master
Roland Schulz [Tue, 3 Jun 2014 15:06:20 +0000 (11:06 -0400)]
Merge release-5-0 into master

Conflicts:
share/top/gurgle.dat

Change-Id: I95bb9d2ce43ed7fdfe6cfd535e4f88fac9dfb5ea

10 years agoUse RNG correctly for v-rescale thermostat
Mark Abraham [Sun, 25 May 2014 19:38:41 +0000 (21:38 +0200)]
Use RNG correctly for v-rescale thermostat

Two integers were passed in the wrong order. I suspect from the
construction of the RNG that the only effect of this is to permit a
rare re-use of a random number in a different RNG stream (i.e. no
effect in practice).

Change-Id: I1fb8eddbe7c8b029dc3686be80f3f083108fc28c