Maxim Koltsov [Fri, 28 Aug 2015 19:41:05 +0000 (22:41 +0300)]
cmdlinerunner.cpp: use ICommandLineOptionsModule
Make TrajectoryAnalysisCommandLineRunner a subclass of
ICommandLineOptionsModule for unification reasons. Resolve duplications
issues with run/writeHelp.
This should ease implementing of Python based trajectory tools later,
along with more refactoring and generalizations.
IOptionsContainer interface was extended with addGroup and addManager
methods from Options class, thus untying runner from Options itself.
Former support for batches was removed in favor of upcoming
implementation.
Alexey Shvetsov [Sun, 2 Aug 2015 19:36:37 +0000 (22:36 +0300)]
Merge branch 'master' into pygromacs
David van der Spoel [Fri, 31 Jul 2015 14:51:17 +0000 (16:51 +0200)]
Change initial parameters for testing expfit.
The initial parameters for fitting the effnVAC function were very far
off the optimal ones, which leads to test failures.
Fixes an index error in the printing of the data and the fitted function,
which is useful for debugging.
Fixes #1789.
Change-Id: I3d45a3352fac735bce750bb2d9205590065b9fc2
David van der Spoel [Mon, 27 Jul 2015 09:01:40 +0000 (11:01 +0200)]
Code for checking xvg files in testutils.
Some new code to check xvg files is introduced in the testutils.
For now it only checks the contents as doubles in case they are
lines with a number of columns of numbers. The tolerance for checking
should be specified by the caller. A test case is provided.
TODO
Add checks for legends.
Change-Id: I00e3c2768c520c8bc90cf7195870a23a1ad83b76
Erik Lindahl [Wed, 8 Jul 2015 14:32:06 +0000 (16:32 +0200)]
Moved another bunch of mdlib utils to C++
Changed calls to pow() where the second argument is 2 so we use
the sqr() function instead. Tables.c has been left as C since the
C++ version exposed a bug in icc-14 targeting MIC - this will be
addressed in a separate change.
Change-Id: Ie537519f4c7c7ab17a1aee575c00f83e3f71a068
Erik Lindahl [Wed, 8 Jul 2015 20:43:17 +0000 (22:43 +0200)]
Fix a table generation bug for pme-shift
The shift correction was not applied correctly to PME and PME-user
tables, but a value of 0 was used instead. This will not have
influenced any normal runs since the shift correction is applied
directly (analytically) in the current kernels. In theory it
might have resulted in 10^-5 relative errors at the cutoff that
are only likely to be visible in double precision if you were
(1) using PME-user electrostatics with custom tables, and
(2) applying shift modifiers (switch is fine). This is not a
setup we are testing anyway, and the PME-user options are likely
to go soon.
Change-Id: Ibd4d2388713879a6613938929edc2cba142b7c9b
Erik Lindahl [Sat, 25 Jul 2015 06:58:35 +0000 (08:58 +0200)]
Update naming standards to avoid hungarian notation in C++
Our coding standards still contained lines specifying hungarian
notation for boolean and enumerated types, which is mostly a remnant
from our (really) old C practice. While apps hungarian might provide
some safety (i.e., using one prefix for rows and another for columns),
there is little or no value in systems hungarian where the prefix
is just based on type - in particular when we frequently assign
variables between those types. This recommends us to use long
descriptive names instead, including a verb for boolean variables.
When we eventually get C++11 support we should switch to class enums
to have the compiler to more checking, but that is not yet possible.
Change-Id: I5da9d528a8ef4f23ef67eae3fb72655ea92a9c6a
Erik Lindahl [Sat, 11 Jul 2015 16:56:01 +0000 (18:56 +0200)]
Moved second half of gmxana tools to C++
Code that the static analyzer found to be
unused or irrelevant have been removed.
Change-Id: I9acb45f953d6fd8fde04c9bed29272772f93ad58
Erik Lindahl [Fri, 10 Jul 2015 20:43:55 +0000 (22:43 +0200)]
Moved first batch of analysis tool source to C++
Mostly trivial C to C++ changes. Some code paths that
were unused or simply not implemented have been
removed for now.
Change-Id: I1204777dc90db95e0d4a7b92191c299fe0982f0b
Alexey Shvetsov [Tue, 28 Jul 2015 17:03:39 +0000 (20:03 +0300)]
Update headers, fix style for some py files
Change-Id: Iee373c180a280c5842ac5cee78cf47f3838c3a6d
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Alexey Shvetsov [Tue, 28 Jul 2015 16:37:24 +0000 (19:37 +0300)]
Uncrustify files
Change-Id: I07a194d10afdbcf27755bcde1e291d869360725d
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Maxim Koltsov [Tue, 28 Jul 2015 16:05:14 +0000 (19:05 +0300)]
Merge branch 'pygromacs' of git+ssh://biod.pnpi.spb.ru/alexxy/gromacs into pygromacs
Maxim Koltsov [Tue, 28 Jul 2015 15:58:17 +0000 (18:58 +0300)]
Adapt to latest changes in GROMACS
Introduce IOptionsContainer class, fix changed method signatures.
Alexey Shvetsov [Tue, 28 Jul 2015 13:56:52 +0000 (16:56 +0300)]
Merge branch 'master' into pygromacs
Roland Schulz [Thu, 9 Oct 2014 23:40:54 +0000 (19:40 -0400)]
Converted 2xnn kernel to C++
Change-Id: I91ee2fbc73cba487a9c5ba6d6f7a96ce35958e30
Alexey Shvetsov [Tue, 28 Jul 2015 11:46:30 +0000 (14:46 +0300)]
Merge branch 'master' into pygromacs
Erik Lindahl [Thu, 9 Jul 2015 23:27:57 +0000 (01:27 +0200)]
Convert support files in gmxana to C++
Renamed symbols using reserved C++ names, and removed geminate
and ballistic code paths that just resulted in GROMACS errors
messages about missing code when they were called. Unused parts
of gmx_hbond have been cleaned up according to comments from
Erik Marklund.
Change-Id: I925b1b5ca4a8420e0c8a38ca99f56361359d713b
Erik Lindahl [Thu, 16 Jul 2015 17:06:15 +0000 (19:06 +0200)]
Moved timing source to C++
Change-Id: I175cf79b68330767b90e0780829f67aa9ca50af5
Alexey Shvetsov [Mon, 27 Jul 2015 18:53:14 +0000 (21:53 +0300)]
Merge branch 'master' into pygromacs
Erik Lindahl [Fri, 17 Jul 2015 19:40:41 +0000 (21:40 +0200)]
Moved additional gmxlib sources to C++
Moved functions into std:: namespace and changed try->attempt
to avoid using reserved names. gmx_cpuid.c has been left
as C for now, both because __cpuid() and __cpuidex() does
not appear to be present in C++ source, and because it will
anyway be replaced with a proper C++ module that can also
interface to hwloc.
Change-Id: I6f10b19a499209b375ee154540a3386f882457bd
Alexey Shvetsov [Mon, 27 Jul 2015 07:17:28 +0000 (10:17 +0300)]
Merge branch 'master' into pygromacs
Mark Abraham [Tue, 7 Jul 2015 10:03:30 +0000 (12:03 +0200)]
Convert some mdrun utility code to C++
Eliminated unused variables, used std::min/max, renamed "try" variable
to "attempt" to avoid reserved word, moved declaration of MPI-specific
variables, added space between string literals intended for
concatenation, moved some variable declarations inside matching
preprocessor regions.
Change-Id: Id16fea81d90f15de9a8e8e6eadeb364df954fff7
Erik Lindahl [Sun, 26 Jul 2015 17:32:49 +0000 (19:32 +0200)]
Merge branch release-5-1
No conflicts.
Change-Id: Ia0b6529e06e5f2a9c3c1bb49dd31870df7d4cea0
Mark Abraham [Sun, 26 Jul 2015 11:51:46 +0000 (13:51 +0200)]
Merge branch release-5-0 into release-5-1
Conflicts:
CMakeLists.txt
Version numbering management code has moved to new home, nothing
needs to change here from the bumps to numbering in release-5-0
branch.
Change-Id: I8e45709c83d5c181900cca50b2ccba489630bbe7
Mark Abraham [Tue, 7 Jul 2015 12:45:06 +0000 (14:45 +0200)]
Stop mdrun printing potentially undefined value
Variable pv is only defined with conditions that need not be identical
with the presence of pressure coupling. Definitely compilers aren't
sure about it.
Change-Id: I80670e12b799c7f476caa565ef7ce9c3e38b0686
Mark Abraham [Sun, 26 Jul 2015 09:31:00 +0000 (11:31 +0200)]
Version bumps after new release
Change-Id: Icfa27c2f62f4eb83cc57102e8b9239e1d8891e38
Alexey Shvetsov [Sun, 26 Jul 2015 09:00:05 +0000 (12:00 +0300)]
Merge branch 'master' into pygromacs
Change-Id: I3cbb006177c6117e4310ad182d15bdbc3aa6ed79
Teemu Murtola [Sun, 19 Jul 2015 14:38:43 +0000 (17:38 +0300)]
Remove Options::isSet()
Replace uses with alternative means. Add storeIsSet() to all options to
make it convenient to just check whether an option is set.
Remove Options parameters from methods where its only purpose was to
provide access to isSet(), reducing exposure of the concrete class and
making the interface cleaner.
Change-Id: If1207c8cf3af86e306c52748f8878480e35e2fc0
Teemu Murtola [Sun, 19 Jul 2015 06:44:06 +0000 (09:44 +0300)]
Add basic grouping to Options
- Add simple Options::addGroup() to create groups within an option,
allowing out-of-order creation of options. In the future, this can
also be used for improved help output.
- Replace multiple Options objects in trajectory analysis runner with a
single Options and groups within that container. This is a
significant step to make also this code use ICommandLineOptionsModule
instead of a custom implementation.
- Remove complicated code with some dubious corner-case behavior from
the command-line parsing code, now that all command-line options are
in a single Options object.
addSubSection() in Options is now unused, and its general design does
not match that of the other Options code. Will refactor and/or remove
it separately.
Change-Id: Ifaa28a210b46edc0a2b25e7e5c335f0708f532f8
Teemu Murtola [Fri, 17 Jul 2015 10:29:06 +0000 (13:29 +0300)]
Extract IOptionsContainer from Options
- Create a separate interface that declares addOption(), and make
Options implement it.
- Change methods that took an Options just to call addOption() to take
an instance of the new interface instead of a full Options object.
- Adjust documentation.
This isolates callers that only provide options from other details of
the options implementation, and allows further refactoring (that will
provide more implementations for this same interface).
Change-Id: I26d3f03602a8edd130d05231b3b0ee14b598ec8e
Alexey Shvetsov [Fri, 24 Jul 2015 17:16:56 +0000 (20:16 +0300)]
Merge branch 'master' into pygromacs
Mark Abraham [Fri, 24 Jul 2015 14:40:41 +0000 (16:40 +0200)]
Merge branch release-5-1
Conflicts:
src/gromacs/commandline/shellcompletions.cpp
Removed line no longer appropriate, now that zsh completion
is supported. Master had changed the previous line, which
git flags as a merge conflict.
Change-Id: Id9d37615b2bd121b1206ca0e6e8eac62fcf38f01
Rossen Apostolov [Wed, 3 Jun 2015 10:13:01 +0000 (12:13 +0200)]
Converted correlationfuntcions to C++.
Change-Id: If5a478eb05fc295670cfa982525838c5e1e255b7
Mark Abraham [Fri, 24 Jul 2015 13:57:42 +0000 (15:57 +0200)]
Version 5.0.6
Removed -dev tags from versions. Bumped regressiontest hash.
Change-Id: Ie86dd0d7a375c3fc86d59f59494c03bf350fde38
Teemu Murtola [Mon, 20 Jul 2015 09:35:31 +0000 (12:35 +0300)]
Rename trnio routines
- Rename all routines from trnio.h to gmx_trr_*, and replace trn with
trr also in the implementation. Use more comprehensible names than
read_htrn().
- Fix one missing gmx_trr_close() in eigio.c.
- Get rid of contrib/anaf.c, which was some cut-down version of gmx dump.
Change-Id: Id4ea14e83ce14089bbdf0e672f15531cf0f22e61
Teemu Murtola [Mon, 20 Jul 2015 07:00:01 +0000 (10:00 +0300)]
Rename trnio.* to trrio.*
These routines write .trr files, and the old name was really confusing,
as there is also an efTRN, which means something different...
The routines will be renamed in a separate commit.
Removed unnecessary includes of trnio.h.
Change-Id: If02f561ad51c73eb2080195587795d0c8ae1b082
Alexey Shvetsov [Fri, 24 Jul 2015 06:40:20 +0000 (09:40 +0300)]
Merge branch 'master' into pygromacs
Teemu Murtola [Thu, 23 Jul 2015 03:28:30 +0000 (06:28 +0300)]
Split espresso I/O routines from confio.cpp
Move routines to read/write Espresso files to a separate espio.* files
from confio.cpp. Now confio.cpp provides the wrappers that allow
writing different formats with a unified API, and each individual format
is handled by a separate file (which is named after the format
extension), making the code easier to find and understand. Further
refactoring to follow beyond just code motion.
Change-Id: I8e1df41f59d65e8a69d6d4a9d30b2f36bc489584
Teemu Murtola [Wed, 22 Jul 2015 18:08:39 +0000 (21:08 +0300)]
Split gro I/O routines from confio.cpp
Move routines to do gro-format I/O to a separate file. As with g96io.h,
this would ideally be internal to the fileio module, but unfortunately a
few tools peek into the details of some specific format.
The naming of the routines will be changed separately.
Change-Id: Ia0b190a95f4fb2cd223a6581531aaf45e99d3440
Teemu Murtola [Wed, 22 Jul 2015 17:45:41 +0000 (20:45 +0300)]
Split g96 I/O routines from confio.cpp
Move routines to read/write g96 files to g96io.*.
Ideally, these would be internal to the fileio/ module, but trjconv
has some ugliness.
Silence a pedantic clang warning that makes it impossible to minimize
header dependencies for mixed C/C++ code, and where problems would
anyways trigger as compilation failures in C code.
Change-Id: I20a88234bec8527f8fd41a614fb37e3144eb7532
Teemu Murtola [Wed, 22 Jul 2015 04:38:45 +0000 (07:38 +0300)]
Move read_tps_conf() to confio.h
This function is nearly identical to read_stx_conf(), and they even
share some helper functions, so they are better in the same file. Now
tpxio.h is all about reading/writing tpr files, and code to handle
multiple formats is elsewhere.
Change-Id: I348a5bae5fe8aae2ad68ec29fe54068fccd97501
Teemu Murtola [Wed, 22 Jul 2015 04:14:14 +0000 (07:14 +0300)]
Add basic tests for reading/writing structure files
For each of the supported format (except for tpr), make a simple
roundtrip test, starting from a dummy topology, and doing a
write-read-write cycle, checking that the output files remain the same.
Additional tests for preservation of various properties of the topology
could also be added later.
Test both read_tps_conf() and read_stx_conf() separately for now.
Added to support refactoring of the code.
Change-Id: Idbdfb4fc39b124d9236a54896ef4613ebfe80ceb
Maxim Koltsov [Tue, 21 Jul 2015 13:44:08 +0000 (16:44 +0300)]
Adapt python bindings for Options changes
options.setDescription was moved to settings.setHelpText. Python
bindings now use this new API.
Teemu Murtola [Mon, 20 Jul 2015 04:15:46 +0000 (07:15 +0300)]
Merge release-5-0 into release-5-1
Conflicts:
src/gromacs/gmxpreprocess/grompp.c (adjacent changes, took both)
Additionally, added a declaration for a variable in sasa.cpp that had
been removed from enclosing scopes.
Change-Id: I15c10ef00416aa1f791a58b97d79669efab9a1c5
Mark Abraham [Mon, 13 Jul 2015 12:16:42 +0000 (14:16 +0200)]
Update advice about grompp -t
grompp -t state.cpt does not copy coupling-algorithm state from a .cpt
into the new .tpr, even though it can still do so from grompp -e.
Refs #1775
Change-Id: I8c4d68fc8d3750b79f30c0f77115c80e1f3cf9b3
Alexey Shvetsov [Sun, 19 Jul 2015 08:31:37 +0000 (11:31 +0300)]
Merge branch 'master' into pygromacs
Alexey Shvetsov [Sat, 18 Jul 2015 08:38:51 +0000 (11:38 +0300)]
Adapt changes from
7a6907d to py interface
Change-Id: I0845bb6ff2f96bd8ee33868bc23a7bc791128274
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Alexey Shvetsov [Sat, 18 Jul 2015 07:51:30 +0000 (10:51 +0300)]
Merge branch 'master' into pygromacs
Teemu Murtola [Fri, 17 Jul 2015 04:05:53 +0000 (07:05 +0300)]
Move Options::setDescription() elsewhere
Pass the help text for programs using other means, clarifying
responsibilities in the code. Now Options is closer to being just a
container of options. Further refactoring to follow.
Change-Id: I398ebef7884d88111ab1bddcd9397882835b39b4
Teemu Murtola [Wed, 15 Jul 2015 05:46:23 +0000 (08:46 +0300)]
Change naming convention for C++ interfaces
- Describe the new convention in naming.rst, together with some
rationale. The new I prefix is a very common convention, and makes
the code generally more readable than a long Interface suffix that
does not add much information.
- Do a bulk rename from \w*Interface to I\1, skipping
::testing::WithParamInterface.
- Rename helptopicinterface.h to ihelptopic.h to keep the naming
consistent.
- Run uncrustify on the result.
Change-Id: I4b27ae0164ad89e45693d35055730caab0832bed
Carlo Camilloni [Thu, 16 Jul 2015 14:16:47 +0000 (16:16 +0200)]
Fixed gmx sasa output residue numbering
gmx sasa with -or was writing the wrong residue numbers
Change-Id: I52b13f1eeec2ee028e5ec580139c0290df7b69c9
Erik Lindahl [Thu, 16 Jul 2015 16:28:06 +0000 (18:28 +0200)]
Moved statistics source to C++
The unused statistics_test.c was removed; it was not so much
any tests as routines to print data - we will have to add
proper tests later.
Change-Id: I08ffd8c774bd2600d743a6504d72776b92ff6fe6
Alexey Shvetsov [Fri, 17 Jul 2015 06:46:25 +0000 (09:46 +0300)]
Merge branch 'master' into pygromacs
Erik Lindahl [Sat, 11 Jul 2015 18:54:44 +0000 (20:54 +0200)]
Fixed static analyzer warnings
Removed code that had no effect since ct_estimate was reassigned
in expfit.cpp. Initialize variables that are set/used in different
semi-complex switch statements in angle.cpp, and clarify a
switch statement.
Change-Id: I15bb2942e268eb053644d1f457f136d60bc63cfb
Erik Lindahl [Mon, 13 Jul 2015 10:10:29 +0000 (12:10 +0200)]
Fix incorrect warning about only using single core
check_resource_division_efficiency() warned that only
a single core could be used, even when one of
thread-MPI or OpenMP support was present, but not both.
Fixes #1776.
Change-Id: I6ac98954c2ef74ed860750627f7a1b9f0710561e
Alexey Shvetsov [Wed, 15 Jul 2015 23:37:44 +0000 (02:37 +0300)]
Fix build failure in view/filter.cpp
This only happen if you have GMX_X11=ON
Change-Id: I6d8d82985c88d2fb03bfaafc0afa32f0c3483803
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Maxim Koltsov [Thu, 16 Jul 2015 14:12:59 +0000 (17:12 +0300)]
Allow access to data produced by modules in pipeline
Alexey Shvetsov [Wed, 15 Jul 2015 22:03:31 +0000 (01:03 +0300)]
Merge branch 'master' into pygromacs
Carsten Kutzner [Wed, 15 Jul 2015 13:31:59 +0000 (15:31 +0200)]
Removed information about obsolete .edo file format
Essential dynamics output is written to edsam.xvg file since version 4.6
Change-Id: I0daca58fab1ebc953e8799de7e1667c4956b460e
James W. Barnett [Tue, 14 Jul 2015 23:24:40 +0000 (18:24 -0500)]
Implement zsh shell completions.
zsh completions when gmx prefix was used were not implemented. Use zsh builtin
bashcompinit to use the bash completions. Remove 'shopt -s extglob'
from gmx-completion.bash and place it in GMXRC.bash, since it is incompatible
with zsh. gmx-completion.bash and gmx-completion-gmx.bash can now be used for
completions in both bash and zsh.
Change-Id: Ib8f3cf0535d39e91a6b31933f41aa7548755b351
Maxim Koltsov [Wed, 15 Jul 2015 13:27:21 +0000 (16:27 +0300)]
Add high-level pipeline API
GromacsPipeline wrapper enables you to construct a pipeline of Gromacs
modules and run it in a single pass with one trajectory.
James W. Barnett [Mon, 13 Jul 2015 02:29:39 +0000 (21:29 -0500)]
Update example old mdp file in user guide.
Update mdp file in user guide. Remove obsolete parameters, and choose parameters
that will not give error and warning by default. Also remove the contents of
mdout.mdp, since the user can easily retrieve that with the given command, and
the file is now much larger. Add note on parameters being dependent on force
fields. Fixes #1774.
Change-Id: I2d5f1cfcf933275f95352c25891ee0792944212c
Erik Lindahl [Sat, 11 Jul 2015 20:51:14 +0000 (22:51 +0200)]
Move fileio sources to C++
String functions have been moved into std namespace,
unused variables removed. The internal XDR implementation has
been modified to work in C++, and while doing so it has been
renamed to gmx_internal_xdr.cpp to avoid confusion with the
external system implementations.
Change-Id: Iadaf812da88ba24530b637b8e3259fd3cac417e0
Mark Abraham [Fri, 10 Jul 2015 11:31:10 +0000 (13:31 +0200)]
Converted gmxpreprocess to compile as C++
Used std:: math function and header, eliminated unused code, vars and
params, used some size_t variables when handling strings.
Added assertions for sqrt operations intended to work on integers that
are perfect squares.
Converted existing assert calls to GMX_ASSERT
Removed include guards from headers
Refactored some ter_db code to be clearer about how generic vs
specific termini are handled.
Made string parameter to _mod into const char *.
Noted TODOs for clean up required for pdb2gmx -merge
Change-Id: Ibe8b8c4b208a39325e6fe450a41d8521daa5d8f0
Erik Lindahl [Wed, 8 Jul 2015 14:59:06 +0000 (16:59 +0200)]
Move remaining C files in utility to C++
Added spaces between strings and literals. The string handling
code should eventually be replaced with proper C++ versions using
std::string, so for this reason I have not bothered improving them.
Change-Id: I78b871113f4a3891139a412c7831a1e5209bfaec
James W. Barnett [Mon, 13 Jul 2015 15:18:37 +0000 (10:18 -0500)]
Fix spelling errors in user guide.
Fix spelling errors in user guide. Also update spelling to American
English, only because that is what is used in the manual and in other
documentation (e.g., neighbour -> neighbor).
Change-Id: Ib11d5be727bef88750a8aa45f2592d10aabb929e
Roland Schulz [Sat, 11 Jul 2015 02:23:47 +0000 (22:23 -0400)]
Update kernel templates to match kernels
Change-Id: I20f41dc9b3e9da670e0c940697fa35d2473ab33b
Erik Lindahl [Tue, 7 Jul 2015 09:45:31 +0000 (11:45 +0200)]
Use cmakedefine01 for more trivial defines
This patch does the move for GMX_CXX11, HAVE_EXTRAE,
GMX_NO_RENAME, all the QMMM defines, GMX_X11, HAVE_POSIX_REGEX,
HAVE_CXX11_REGEX, HAVE_SIGUSR1, GMX_COOL_QUOTES, HAVE_PIPES,
HAVE_FEENABLEEXCEPT and HAVE_ZLIB.
Change-Id: I2c915c608d9fd16d584b605373c1151dcf3cc010
Alexey Shvetsov [Fri, 10 Jul 2015 16:38:05 +0000 (19:38 +0300)]
Merge branch 'master' into pygromacs
Erik Lindahl [Wed, 8 Jul 2015 23:47:28 +0000 (01:47 +0200)]
Moved tools files to C++
Added extern-c declarations to gmxcpp.h for calling
from the new C++ source.
Change-Id: I7b21398808a1d58849bff44690ece4d1f4e9db04
Teemu Murtola [Thu, 9 Jul 2015 16:52:54 +0000 (19:52 +0300)]
More gmxfio simplification
- Remove gmx_fio_setdebug() and all implementation related to it;
getting the source code location printed to stderr is not really
useful for errors that typically originate from the file system.
- Move gmx_fio_setprecision() to gmxfio-xdr, since it logically belongs
there.
- Remove bOpen, as the only case where any code could observe
bOpen==FALSE requires a use-after-free, and possibly also an ugly
race condition on top of that.
- Reduce use of iFTP member within gmxfio, where the purpose is to check
whether the fio->xdr member is not NULL.
- Remove checks from gmx_fio_open() that overlapped with those in
gmx_ffopen(). There are some corner cases that now work differently:
gmxfio no longer bypasses the check for .Z/.gz files for xdr files,
but lets things through to gmx_ffopen(), and with GMX_FAHCORE there is
no longer any kind of existence check for xdr files (it is
questionable whether the previous behavior was intentionally different
for xdr and non-xdr files, anyways).
- Remove dead code: fio->fp is always non-NULL if fio->xdr is.
Change-Id: Icd1588bfbb510543a55f57fb86e0e1e2a1fce236
Teemu Murtola [Thu, 9 Jul 2015 14:21:15 +0000 (17:21 +0300)]
Fix -deffnm -multi[dir]
Make -deffnm work even when all other functionality in
FileNameOptionManager is disabled (which happens with -multi and
-multidir). Add a test for the broken case.
Fixes #1769.
Change-Id: I0f729eaa1ab6e9a4a25d1d121cbfe5b5b2673e4b
Erik Lindahl [Thu, 9 Jul 2015 10:56:19 +0000 (12:56 +0200)]
Merge "Merge release-5-1 into master"
Roland Schulz [Thu, 9 Jul 2015 02:55:44 +0000 (22:55 -0400)]
New quotes
Change-Id: I57deba0f9f4b4cc5a2f5dc58e3d2c4fe4284691b
Roland Schulz [Wed, 8 Jul 2015 17:34:31 +0000 (13:34 -0400)]
Merge release-5-1 into master
Conflicts:
cmake/gmxVersionInfo.cmake
Change-Id: Iab02dc56743ef0c79e0a0c3f9e7cee7dc18442aa
Roland Schulz [Wed, 8 Jul 2015 07:35:13 +0000 (03:35 -0400)]
Merge release-5-0 into release-5-1
Conflicts:
src/gromacs/gmxana/gmx_dos.c
Change-Id: I06208bcafb880b9bac3f45050d709fae5eab9a9d
Erik Lindahl [Wed, 8 Jul 2015 10:57:35 +0000 (12:57 +0200)]
Move generalized born to C++
Change-Id: Ie4498eed9923b7c4df8589cc1abc75d92155abdb
Erik Lindahl [Mon, 6 Jul 2015 12:56:23 +0000 (14:56 +0200)]
Move FFT defines to use cmakedefine01
Change-Id: Ie9fface5ea2ec365aa740cfe60243d195e1039ba
Mark Abraham [Tue, 7 Jul 2015 13:08:54 +0000 (15:08 +0200)]
Give bTypePerturbed a valid initial value
Commit
a6ae71b202 didn't do this correctly, so FEP with LJPME has had
broken PME load estimates (only).
Change-Id: I88235c34b499e6dfca650138d66cdc17bd40afb4
Berk Hess [Fri, 27 Feb 2015 09:19:31 +0000 (10:19 +0100)]
Separated bonded and Ewald correction threading
The bonded and Ewald correction threading code used the same data
structures. These have now been separated and the bonded threading
data is opaque and defined in listed-internal.h.
This change is only code refactoring, except for the removal of
the thread local ewald correction force array and reduction, which
were never needed.
Change-Id: I162255107aa9e153a4c8ff41d786867d6fbed444
Erik Lindahl [Mon, 6 Jul 2015 13:19:40 +0000 (15:19 +0200)]
Move endian, float format and XDR settings to cmakedefine01
Also modify gmxtree.py to understand the new protocol
Change-Id: I68f1bfff9528d71d4a683082aaa4d637f8b10a64
Mark Abraham [Tue, 7 Jul 2015 12:30:51 +0000 (14:30 +0200)]
Fix grompp .edr IO estimate for free-energy calcs
This has been wrong since it was introduced in
c7a82654f. It doesn't
really matter, except that the variable is unused and converting to
C++ complains about it.
Change-Id: I8e13a07e2680cfe5b69fac170d500b235a5ba113
Erik Lindahl [Tue, 7 Jul 2015 15:02:36 +0000 (17:02 +0200)]
Cleanup and remove unused SSE2 generalized born code
This code has been disabled for quite a while due to
a bug. Since we should anyway move to verlet-style
kernels there is no point in keeping these files around.
Change-Id: Idfd65ac2d0d9f304d548c97e4dbabbaf72df7a7b
Roland Schulz [Wed, 8 Jul 2015 07:28:27 +0000 (03:28 -0400)]
Merge release-4-6 into release-5-0
Change-Id: I25fea1226adfaa332c5c7b0630e99031266178f4
Erik Lindahl [Tue, 7 Jul 2015 20:02:24 +0000 (22:02 +0200)]
Move old neighborsearch code to C++
This will eventually be removed in favor of the new
verlet code, but for now it will make life simpler to
have everything moved to C++.
Change-Id: I3242e5f345769a42ffb99d1953bc1bef39324ff5
Erik Lindahl [Tue, 7 Jul 2015 20:50:41 +0000 (22:50 +0200)]
Move QMMM source to C++
Tested by enabling the four different QM/MM interfaces,
but not linking to the actual programs since those calls
are still unaltered.
Change-Id: I86163a0db56003687e6226a78169141af98940b7
Teemu Murtola [Sun, 5 Jul 2015 04:12:43 +0000 (07:12 +0300)]
Wrap uses of thread_mpi/mutex.h
Introduce gmx::Mutex and gmx::lock_guard to hide the actual C++ mutex
implementation used, and make all code that was using tMPI::Mutex use
these.
For now, the implementation is just directly imported from thread-MPI,
but this allows changing the implementation (e.g., to C++11 std::mutex
or to a TBB mutex) when thread-MPI is no longer appropriate, with mainly
changing this single header. Also, this makes it clearer to introduce
new C++ wrappers for things like tMPI_Lock_t, as they can now be written
in this wrapper layer, instead of in thread-MPI where they will
introduce additional such dependencies.
Change-Id: Ie4c91d4e74c5dbc5e4d2b5d7fb5a76b73ef5616b
Mark Abraham [Mon, 29 Jun 2015 22:49:57 +0000 (00:49 +0200)]
First 5.1 release candidate
Change-Id: I89776d6dd4d170d4f259fa8ee761cf4f6878cbe0
Berk Hess [Wed, 1 Jul 2015 13:46:40 +0000 (15:46 +0200)]
Fix too small GPU pair count estimates
For triclinic unit-cells with DD the non-local cluster pair count
estimate was too high, especially for thin local domains, due to an
incorrect estimate of the cluster size. Since the pair count estimate
for the local pair-list was determined as a total minus a non-local
estimate, the local estimate could get negative and cause exceptions.
Fixed the cluster size estimate and added a lower limit for the local
size estimate.
Fixes #1762.
Change-Id: I3489550968f66bc03ba4e6056017a58eba37f7cc
Berk Hess [Sat, 4 Jul 2015 08:18:05 +0000 (10:18 +0200)]
Fix bug in GPU list balancing
The function split_sci_entry could produce empty lists. This seems
not to have caused incorrect results, only slight extra processing
of empty workunits in the CUDA kernel. Incorrect Coulomb energies
could appear for empty lists with shift=CENTRAL, but that does not
seem to happen.
Refs #1767.
Change-Id: I0b0ff0a450734d4863f1e9636ff5741d4f1a68da
Teemu Murtola [Mon, 29 Jun 2015 10:43:11 +0000 (13:43 +0300)]
Improve gmx help -export Sphinx rebuild behavior
Make 'gmx help -export rst' only touch those files whose contents have
actually changed. This means that rerunning Sphinx is much faster when,
e.g., checking the help text for a single tool after fixes.
Use the file output redirection mechanism to capture all output into
intermediate buffers, and only write it to a file if that file is
missing or has incorrect contents.
Update the reference data to avoid future confusion, as the files are
now written out in a different order (but the tests pass irrespective of
the order of the stuff in the reference data).
Change-Id: I41d764e16aa68a5aaa7da879f4b600e268ca70f2
Berk Hess [Thu, 2 Jul 2015 14:03:34 +0000 (16:03 +0200)]
Fix DD DLB state issue
The introduction of DLB locking for PME load balancing added another
DLB state, which was stored in a third variable. These variables
were not always all properly checked. Simplified the code by merging
these three state variables into one. In added there was a fourth
variable (bGridJump) is gmx_domdec_t, this is replaced by calls to
a functions returning is DLB is on.
Refs #1760.
Change-Id: I80d499149e4e5bfd689e76208384a8ba61e2842a
Berk Hess [Fri, 3 Jul 2015 20:28:52 +0000 (22:28 +0200)]
Fix bug in GPU list balancing
The function split_sci_entry could produce empty lists, which can
cause illegal memory access or incorrect energies. Before commit
6106367b this bug was never triggered, since nsp_max was never smaller
than a full cj4 entry. But
6106367b introduced a but that could
produce negative nsp_max.
Fixes #1767.
Change-Id: I2007cf6851f94f4f2ca62f609a0628725014dbe7
Teemu Murtola [Mon, 29 Jun 2015 10:02:11 +0000 (13:02 +0300)]
Fix error wrapping in interactive selection input
Resolve a TODO that was introduced when making the selection prompting
use text streams about wrapping error messages like they used to be
wrapped.
The use of console width within the generic error formatting code is a
bit ugly, but that needs to be resolved separately (and the old code
also had the console width hardcoded in a similar level).
Change-Id: Ia832a4884eef9bded50431fb5008d8191f52c246
Teemu Murtola [Sat, 27 Jun 2015 17:39:33 +0000 (20:39 +0300)]
Tests for interactive selection input
Add InteractiveTestHelper to test interactive sessions that use streams
from textstream.h. Use this to test the behavior of interactive
selection input. Errors in the input or the help is not tested (yet),
and some corner cases may be missing, but most of the code is now
covered. Separate set of tests is needed for SelectionOptionManager
prompts (will be added separately).
Remove obsolete special case handling from the interactive parser
(verified to not change any of the now tested behavior).
Change-Id: I448d470bcc240659a380ffa2d3b492949420c64b
Teemu Murtola [Sat, 4 Jul 2015 17:45:11 +0000 (20:45 +0300)]
Fix copy-paste bug in gmx distance
The -oxyz option did not behave properly (the computed values should be
fine, but the behavior of where the output goes can be unpredictable).
Change-Id: Idcd389c3809189f85a630094b9aaea6d61a5f954
Teemu Murtola [Mon, 29 Jun 2015 04:58:04 +0000 (07:58 +0300)]
Refactor for testing interactive selection input
Introduce a parseInteractive() method that works otherwise as
parseFromStdin(), except that the caller can provide alternative
streams for input and status output. Make all input and output use
these streams instead of stdin or stderr directly. Unit tests using
this will be added separately.
There is slight regression in the formatting of errors during
interactive selection input (noted in TODO in exceptions.cpp), but that
will be resolved separately to keep the commits smaller.
Change-Id: I0b6b885621c81a5e526b5f93b40d32b9248626f1
Teemu Murtola [Fri, 26 Jun 2015 04:16:48 +0000 (07:16 +0300)]
Remove gmx::File (except for File::exists())
Move remaining static methods to either path.h, or to the file stream
classes.
Change-Id: I53e910051b9ef57e501adad4cec1a4b5295d24a7
Teemu Murtola [Fri, 26 Jun 2015 03:52:03 +0000 (06:52 +0300)]
Replace direct uses of gmx::File with streams
Replace all cases that used gmx::File with a stream-based
implementation. Only static methods in gmx::File are called from
outside file.cpp (will be removed separately).
This is only direct replacement to remove uses of gmx::File; some
additional refactoring is necessary to support alternative streams for
unit testing.
Change-Id: I5e5905f9f8956909f3396359b18e9660f100bcaa
Teemu Murtola [Sat, 4 Jul 2015 03:48:44 +0000 (06:48 +0300)]
Bump various version numbers
It is unclear what will the next version be numbered, but bumped the
version numbers nonetheless to make the distinction between master and
release-5-1 clear.
Change-Id: I1cfe9f2a2523056f20cc825025425fc9429c89b6