alexxy/gromacs.git
11 years agoMerge release-4-6 into master
Roland Schulz [Sun, 30 Sep 2012 23:24:42 +0000 (19:24 -0400)]
Merge release-4-6 into master

Conflicts:
cmake/ThreadMPI.cmake (resolved)
src/tools/CMakeLists.txt (resolved)
src/gmxlib/CMakeLists.txt
src/kernel/CMakeLists.txt
src/mdlib/CMakeLists.txt
Last three applied to src/gromacs/CMakeLists.txt and
src/programs/mdrun/CMakeLists.txt.

The release-4-6 version is not the most recent. Merge is being done in
several steps.

Change-Id: Ia9ec3c132a6306701866867aa1a4314541203002

11 years agoFix a few memory leaks in C++ code.
Teemu Murtola [Thu, 13 Sep 2012 04:17:17 +0000 (07:17 +0300)]
Fix a few memory leaks in C++ code.

These were masked by the legacy code suppressions.  The use of
free_t_atoms() is quite ugly still, but at least it frees some of the
memory allocated in symtab.c.

Change-Id: I0007a9235a75a4e78bebd835875051c67b893845

11 years agoFine-tuning for FileNameOption.
Teemu Murtola [Sun, 9 Sep 2012 17:28:26 +0000 (20:28 +0300)]
Fine-tuning for FileNameOption.

- Change behavior of required options with default values such that the
  default value is now used without an error if the option is not
  provided.  This is how it used to work with file name options.  For
  most other cases, this combination doesn't make much sense, but
  changed it such that it works consistently for all cases.
- Add FileNameOption::defaultBasename() as a more intuitive interface
  for providing a default for file name options.  The name makes it
  clear that no extension is expected, and the option also transparently
  treats required/optional arguments without the user needing to
  understand the difference between defaultValue() and
  defaultValueIfSet().

Closes #642; there is still some things to be improved, but should now
provide about the same features and about the same input options as
the old t_filenm-based system.

Change-Id: Ibcaf0667180e0b24b08604869d855baf23476681

11 years agoAdd pdbname selection keyword.
Teemu Murtola [Mon, 24 Sep 2012 04:48:01 +0000 (07:48 +0300)]
Add pdbname selection keyword.

As a supporting change, remove trailing space from t_pdbinfo.atomnm, as
the trailing whitespace does not seem to be used anywhere.
This makes it possible to use it easily in the selection code.

Fixes #1007 in master, will backport to 4.5 branch separately.

Change-Id: Iac36bda8a84d0a6c131445e7f47ad91d7209fb10

11 years agoAdd some valgrind suppressions for Mac.
Teemu Murtola [Tue, 18 Sep 2012 11:48:43 +0000 (14:48 +0300)]
Add some valgrind suppressions for Mac.

Should suppress valgrind warnings that currently affect all changes
submitted to the master branch.

Change-Id: Ieab8fb3a6f094b07eb069836be0782473850301c

11 years agoMerge *optioninfo.h to *option.h.
Teemu Murtola [Sun, 9 Sep 2012 10:38:29 +0000 (13:38 +0300)]
Merge *optioninfo.h to *option.h.

Merge each *optioninfo.h header to the header that declared the
corresponding public option classes (setManagerForSelectionOptions() was
moved to selectionoptionmanager.*).  After 030c229 (I143592ed), there is
little need to have these in separate headers, as the OptionInfo classes
are now required when creating options.

Not having the implementation split over so many headers makes the code
easier to understand and to maintain, and this outweighs the small
benefits from being able to use the OptionInfo classes without adding a
dependency also on the Option classes (only OptionVisitor would
currently benefit from that).

Adjusted Doxygen documentation for OptionInfo and SelectionOptionInfo
(and some of the files) as part of the reorganization and did some
include cleanup related to the reorganization.  Otherwise, this change
only moves existing code around with no functional changes.

Change-Id: Ic1c62739beca09028887179da26b33516d01624b

11 years agoMerge "Allow 'atomname' and 'atomtype' in selections."
Christoph Junghans [Mon, 10 Sep 2012 19:01:15 +0000 (21:01 +0200)]
Merge "Allow 'atomname' and 'atomtype' in selections."

11 years agoMerge "Fix VMD plugins on Windows" into release-4-6
Christoph Junghans [Fri, 7 Sep 2012 19:29:06 +0000 (21:29 +0200)]
Merge "Fix VMD plugins on Windows" into release-4-6

11 years agoMerge "Check that gmx_detectcpu runs correctly" into release-4-6
Christoph Junghans [Fri, 7 Sep 2012 19:28:31 +0000 (21:28 +0200)]
Merge "Check that gmx_detectcpu runs correctly" into release-4-6

11 years agoPrint more information on exceptions.
Teemu Murtola [Fri, 7 Sep 2012 10:20:23 +0000 (13:20 +0300)]
Print more information on exceptions.

- Identify a few more exception types instead of printing "Unknown
  exception".  Print the dynamic type of the exception for the unknown
  exception case as well as some other cases.
- Print errno information if it is included in the exception.

Part of #838.

Change-Id: If64bd37e32e2585f78fb95a29a4a2eef95b79142

11 years agoBetter error messages for SelectionFileOption.
Teemu Murtola [Mon, 3 Sep 2012 04:29:05 +0000 (07:29 +0300)]
Better error messages for SelectionFileOption.

Use the added exception context information to provide the file name in
the error message when there is a problem with a selection provided with
-sf.  Also improve the error messages for cases where the number of
selections in the file does not match what is expected, or where the
assignment of selections to options is ambiguous.

Closes #656.

Change-Id: I6158960a970e6a22fb28f3872538f1de16883887

11 years agoBetter context information handling for exceptions.
Teemu Murtola [Fri, 31 Aug 2012 18:39:17 +0000 (21:39 +0300)]
Better context information handling for exceptions.

- GromacsException now has a prependContext() method that can be used in
  a catch block to add additional context information to the exception
  before rethrowing it.
- It is possible to nest exceptions instead of embedding all information
  into the exception message string.

Information added by these new methods is currently not easily
accessible outside the exception implementation, but it is not needed
either.  Such access can be implemented once it is more clear what are
the requirements.

Closes #985.

Change-Id: I2b9ed1d11ee3cb36cc7da927cf6730c6f8c353b2

11 years agoRestructure fatal error formatting.
Teemu Murtola [Wed, 22 Aug 2012 17:52:57 +0000 (20:52 +0300)]
Restructure fatal error formatting.

Split printFatalError() in errorformat.h to separate functions that
print the error header, (part of) the actual message, and the footer.
This makes it possible to print the message in calling code
incrementally instead of formatting it into a string buffer.
It is easier to print the message in parts this way, and there is also
less complications in handling possible std::bad_alloc errors from
manipulating a std::string.

Also added line wrapping functionality to the message writing function,
and improved the appearance of the header.

Part of #838 and #985.

Change-Id: Ief7399d8c7c2c0529e0bc8492726bff827e18c4c

11 years agoMore features for TextLineWrapper.
Teemu Murtola [Mon, 27 Aug 2012 17:53:06 +0000 (20:53 +0300)]
More features for TextLineWrapper.

Add more control over formatting the wrapped lines:
- Add possibility to indent the wrapped lines.
- Add possibility to indent the first line after an explicit line break
  differently from other lines.
- Add possibility to mark line continuation using an explicit character.
- Add possibility to either remove or keep leading whitespace after an
  explicit line break.
All except the last are already useful for the current console output.
Depending on the chosen solution, some or all of these are also needed
for #969.

Also expose the lower-level interface used internally that makes it
possible to write code that iterates over the wrapped lines and does
something else than just format them into a buffer.  May be useful for
some cases in #969, but is necessary to use the wrapper for #838 (line
wrapping in error messages).

Change-Id: I905ba29856773656bf000c4b2e14d1ed2ba4de31

11 years agoFix illegal call to MPI without being initialized
Roland Schulz [Thu, 6 Sep 2012 19:42:04 +0000 (15:42 -0400)]
Fix illegal call to MPI without being initialized

Introduced by babdd87ca126

Change-Id: I428ef8ce706cc3a23fc980fa54c3e26e7a6d68b2

11 years agoCheck that gmx_detectcpu runs correctly
Roland Schulz [Wed, 5 Sep 2012 10:04:00 +0000 (06:04 -0400)]
Check that gmx_detectcpu runs correctly

If it doesn't run correctly set acceleration to None and
print warning. Same as check whether it compiled, which already
existed.

Change-Id: I59a2d531c41f931d162725540d5483b39aa7a3df

11 years agoFixed an undefined return value in tMPI_Scan()
Sander Pronk [Wed, 5 Sep 2012 09:36:23 +0000 (11:36 +0200)]
Fixed an undefined return value in tMPI_Scan()

As caught by Szilárd, the tMPI_Scan() return value was undefined
for rank==0. Also removed an unused variable in tMPI_Thread_create().

Change-Id: I0b15f55089f50e0c237635ad322c7d38ce82c275

11 years agoMerge "Fixes too many backup files for *.nroff files" into release-4-6
Christoph Junghans [Tue, 4 Sep 2012 16:42:00 +0000 (18:42 +0200)]
Merge "Fixes too many backup files for *.nroff files" into release-4-6

11 years agoMerge "Reorganize CommandLineHelpWriter implementation."
Christoph Junghans [Tue, 4 Sep 2012 16:41:17 +0000 (18:41 +0200)]
Merge "Reorganize CommandLineHelpWriter implementation."

11 years agoMerge "Fix SelectionParserParameter move constructor problem."
Christoph Junghans [Tue, 4 Sep 2012 16:40:50 +0000 (18:40 +0200)]
Merge "Fix SelectionParserParameter move constructor problem."

11 years agoAllow 'atomname' and 'atomtype' in selections.
Teemu Murtola [Tue, 4 Sep 2012 03:48:25 +0000 (06:48 +0300)]
Allow 'atomname' and 'atomtype' in selections.

'atomname' is now synonymous to 'name', and similarly for 'atomtype' and
'type'.  This reduces confusion, as the code uses atomname and atomtype
internally.  Also use the aliases in tests.

Change-Id: Ifa96840c1fc9c519be53b1bb5aae4f4910cdb0ff

11 years agoMerge branch 'release-4-5-patches' into release-4-6
Szilard Pall [Mon, 3 Sep 2012 10:40:56 +0000 (12:40 +0200)]
Merge branch 'release-4-5-patches' into release-4-6

Conflicts:
src/mdlib/tpi.c

Change-Id: I1b5d92291ece7cf3194b4e1d88cd686a5aa18696

11 years agoFix VMD plugins on Windows
Roland Schulz [Mon, 3 Sep 2012 02:49:27 +0000 (22:49 -0400)]
Fix VMD plugins on Windows

VMD libraries are named *.so even on Windows

Change-Id: I4502af3a716b79820502c70fcfe2fc68749a77fc

11 years agoFix stack error in grompp
Roland Schulz [Sun, 2 Sep 2012 16:26:22 +0000 (12:26 -0400)]
Fix stack error in grompp

vsiteatoms array was one to short

Fixes #997

Change-Id: I0897694dfc431a20bd1ebf769b24d09038d588b2

11 years agoReorganize CommandLineHelpWriter implementation.
Teemu Murtola [Sun, 26 Aug 2012 03:50:07 +0000 (06:50 +0300)]
Reorganize CommandLineHelpWriter implementation.

Instead of separate classes to write out descriptions and different
types of options, there is now three main local classes:
 - OptionsFilter: has output format independent logic to do the
   filterting that was previously implemented in each class separately.
 - OptionsFormatterInterface: interface that OptionsFilter uses to do
   output format specific formatting for the options.
 - OptionsConsoleFormatter: implements the above interface to produce
   the console help that was previously done by the separate classes.

Prerequisite for #969 independent of the chosen solution.
May need additional work as part of that issue.

Change-Id: Ica506f3567b4527f210c48c1b43069d4b64007ec

11 years agoRemove obsolete .gitignore entries.
Teemu Murtola [Fri, 31 Aug 2012 04:30:13 +0000 (07:30 +0300)]
Remove obsolete .gitignore entries.

Now that binaries are built under bin/ and libraries under lib/, most
.gitignore files are unnecessary (and they didn't work previously that
well, either).

Change-Id: Id438f45e896a0d0018c80feafc32242067248855

11 years agoMore generic way to obtain OptionInfo for options.
Teemu Murtola [Thu, 30 Aug 2012 19:08:55 +0000 (22:08 +0300)]
More generic way to obtain OptionInfo for options.

Options::addOption() now returns a pointer to the OptionInfo object that
corresponds to the created option.  This provides a nicer and more
generic way compared to SelectionOption::getAdjuster(), and hopefully
makes it easier for static analysis and compilers to understand that the
info object always gets initialized to a non-NULL value.

Since this change requires the declaration of the corresponding info
object to be available whenever addOption() is called, one could also
get rid of the separate *optioninfo.h headers and merge them to the
corresponding *option.h headers.  This would reduce the number of files
for one option type, and possibly make it a bit easier to maintain.
Didn't do that in this change to keep it more clear.

Change-Id: I143592ed3a0750d3908c6bc8897179d9059ea546

11 years agoFixes too many backup files for *.nroff files
Roland Schulz [Thu, 30 Aug 2012 03:34:21 +0000 (23:34 -0400)]
Fixes too many backup files for *.nroff files

Problem introduced by 26bd5f7ac7af. nroff files are generated
automatically and one could get erorr message when 99 backup files
existed.

Change-Id: Ia0a5c7e04064a0d304266e1dc6af347d3e846864

11 years agoFix SelectionParserParameter move constructor problem.
Teemu Murtola [Thu, 30 Aug 2012 02:58:05 +0000 (05:58 +0300)]
Fix SelectionParserParameter move constructor problem.

C++11 only declares move constructors implicitly if a class does not
have a user-defined destructor.

Change-Id: I3c12b0e93920c102d77bb436c417ceef90a9c6c6

11 years agobug fix for pme.c MPI_COMM_NULL fix dcf8b67e
Berk Hess [Wed, 29 Aug 2012 16:00:08 +0000 (18:00 +0200)]
bug fix for pme.c MPI_COMM_NULL fix dcf8b67e

Change-Id: Idb233db1337bcb881041caec96572e5df6183e6e

11 years agoEnable C++ use in selection methods.
Teemu Murtola [Fri, 24 Aug 2012 09:56:42 +0000 (12:56 +0300)]
Enable C++ use in selection methods.

The method that frees the internal data structure for a selection method
now also has the responsibility of freeing the data structure itself.
This makes it possible to allocate the data structure using operator new
in the initialization function, and then correctly free it.

Prerequisite for using C++ types in selection methods before #652 is
implemented.

Change-Id: I99e5a907cbdc4975d20becb0fb1d33e0026c135c

11 years agoAdd syntax to force selection string matching mode.
Teemu Murtola [Fri, 24 Aug 2012 09:42:19 +0000 (12:42 +0300)]
Add syntax to force selection string matching mode.

The selection syntax for string keyword matching no longer depends on
whether regular expression support is available.  Instead, an error is
now given if the string looks like a regexp (the logic for the deduction
is not changed), but regexp support is not available.  Added syntax to
force the string matching to use either literal, wildcard, or regexp
matching.

This change allows removing a few more direct prints to stderr (related
to #655).

Closes #938.

Change-Id: I7b998050c8b00b5f1229ed23a0a15685c514010f

11 years agoRemove remaining GMX_ERROR uses.
Teemu Murtola [Thu, 23 Aug 2012 17:44:31 +0000 (20:44 +0300)]
Remove remaining GMX_ERROR uses.

Replaced those still left in selection parsing code by exceptions or
assertions.

Related to #655 and #880.

Change-Id: I89bff0c03eb15176e699529888aaae532f0c4138

11 years agoFix internal error with selection "resname help".
Teemu Murtola [Thu, 23 Aug 2012 04:00:56 +0000 (07:00 +0300)]
Fix internal error with selection "resname help".

- Always recognize "help" as a help request token, which then causes a
  syntax error in invalid context instead of an internal error in the
  tokenizer symbol table lookup.
- Change the internal error in question to use an exception for error
  reporting to make it possible to easily check it in a unit test.

Change-Id: I4a4057840b47a818cc840654945e84ec536e35b0

11 years agoHandle SelectionParserParameter as a value type.
Teemu Murtola [Thu, 23 Aug 2012 03:24:07 +0000 (06:24 +0300)]
Handle SelectionParserParameter as a value type.

Now that SelectionParserValue is also a C++ object, it is
straightforward to treat SelectionParserParameter as a (movable, but not
copyable) value type instead of storing it through a smart pointer in a
container.  Leads to more consistent and less complex code.

Related to #655 and #880.

Change-Id: I377bac05b1bd990ad95b38887f0f7b825bf0a805

11 years agoC++ classes for selection parser values.
Teemu Murtola [Wed, 22 Aug 2012 15:32:29 +0000 (18:32 +0300)]
C++ classes for selection parser values.

Converted t_selexpr_value to gmx::SelectionParserValue and introduced
smart pointers and standard containers to manage all memory related to
these objects.

Related to #655 and #880.

Change-Id: Ide2d9db80e89f36c94dccc25085d49959e4115a8

11 years agoC++ classes for selection parser parameters.
Teemu Murtola [Fri, 17 Aug 2012 11:13:40 +0000 (14:13 +0300)]
C++ classes for selection parser parameters.

Converted t_selexpr_param to gmx::SelectionParserParameter and
introduced smart pointers and standard containers to manage all memory
related to these objects.  Solves several exception safety issues in the
selection parser.

Related to #655 and #880.

Change-Id: Ia4c477f1313b49cd1da3b0407bec6e7a1a8b9296

11 years agoC++ classes for selection parser symbol table.
Teemu Murtola [Sat, 11 Aug 2012 11:53:38 +0000 (14:53 +0300)]
C++ classes for selection parser symbol table.

Convert the implementation of selection parser symbol table to use C++
classes.
 - Removes a few exception safety issues that were present in the
   initialization, as well as direct prints to stderr.
 - Documentation now follows the new Doxygen layout.
 - Removes some underscore-prefixed global names.

Related to #655 and #880.

Change-Id: Iecb690fa2e413c9dc487aacffac62a248ea3867a

11 years agoRationalize selection element name handling.
Teemu Murtola [Thu, 2 Aug 2012 19:13:24 +0000 (22:13 +0300)]
Rationalize selection element name handling.

The name of SelectionTreeElement is now a plain std::string that manages
its own memory instead of pointing to memory managed somewhere else.
The original design has been a pain to maintain at times, as the memory
for the name easily gets freed, leaving a dangling pointer.

Change-Id: I7b975c67ce9eee7f981128e29d8d9dd75fc70c89

11 years agoMoved selection parser helpers into separate file.
Teemu Murtola [Sun, 12 Aug 2012 09:24:45 +0000 (12:24 +0300)]
Moved selection parser helpers into separate file.

Makes parser.y much more streamlined, as there is now nearly only Bison
declarations and the actual semantic actions.  Also, editing the helpers
no longer requires regenerating the parser (which most likely also
changes the line numbers in parser.cpp, which is typically the largest
part of such changes).

Change-Id: I60e76b95725fb9f647f3cddf64773b3f94185b06

11 years agoUse smart pointers to manage the selection tree.
Teemu Murtola [Thu, 2 Aug 2012 04:14:25 +0000 (07:14 +0300)]
Use smart pointers to manage the selection tree.

Changed t_selelem to gmx::SelectionTreeElement and t_selelem * to
gmx::SelectionTreeElementPointer (or a const reference).  The latter is
a boost::shared_ptr because there may be multiple references to some
elements in the evaluation tree.  Some exceptions to the above rule are
present, because it was not straightforward to change those parts.

Prerequisite for using exceptions throughout the selection code, which
in turn is a prerequisite for many tasks that would introduce more C++
there.

There are some parts that are not yet exception-safe, but may throw
std::bad_alloc as the result of these changes.  Will fix those in
subsequent commits.

Related to #655 and #880.

Change-Id: Ib36c08bac1ab2c9818604e45e2eb14a90069efdb

11 years agoRemove most uses of t_selelem::refcount.
Teemu Murtola [Sat, 28 Jul 2012 19:35:28 +0000 (22:35 +0300)]
Remove most uses of t_selelem::refcount.

This is a prerequisite for using smart pointers to manage the selection
evaluation tree, as it's difficult to keep a similar reference count
up-to-date and (or use pointer reference counts for the purposes it is
currently used for).

Related to #655 and #880.

Change-Id: I9e6ae98067f8fe96d39aea6df076e2675ecb8a1f

11 years agoAdded a sfree_guard for exception safety.
Teemu Murtola [Thu, 2 Aug 2012 04:11:44 +0000 (07:11 +0300)]
Added a sfree_guard for exception safety.

Added a helper class for calling sfree() on scope exit.  This is useful
for exception safety in code that calls old C functions, as well as in
piecewise conversion of old code to use exceptions.

Change-Id: Ie31483734b66895ad8148eff3db0300ae28b38b4

11 years agoNewer version of thread_mpi, with various fixes, including tMPI_Scan()
Sander Pronk [Tue, 21 Aug 2012 11:10:45 +0000 (13:10 +0200)]
Newer version of thread_mpi, with various fixes, including tMPI_Scan()

- Implements tMPI_Scan()
- Many doxygen fixes
- removed unused variables from atomic operations
- Added C++11 compatible thread and mutex class

Change-Id: I4cce48627fa846da3c599a7de64d3898c358390b

11 years agoAdded PGLU entry in aminoacids.n.tdb for OPLS-AA.
Bogdan Iorga [Wed, 22 Aug 2012 16:30:26 +0000 (18:30 +0200)]
Added PGLU entry in aminoacids.n.tdb for OPLS-AA.

Previously, pdb2gmx would fail during terminus selection for this residue.

Change submitted initially on the master branch, then abandoned.
(https://gerrit.gromacs.org/#/c/1290/)

Fixes #804.

Change-Id: Ic810242dc65019858c0332d352ef1ba96d4662d6

11 years agoMerge "Fixing of things associated with aminoacid.rtp header" into release-4-6
Christoph Junghans [Mon, 20 Aug 2012 17:52:48 +0000 (19:52 +0200)]
Merge "Fixing of things associated with aminoacid.rtp header" into release-4-6

11 years agoMerge "Clean up some variable naming for eigensolving" into release-4-6
Christoph Junghans [Mon, 20 Aug 2012 17:51:08 +0000 (19:51 +0200)]
Merge "Clean up some variable naming for eigensolving" into release-4-6

11 years agoMerge "Fix coordinate is zero check in gmxcheck" into release-4-5-patches
Christoph Junghans [Mon, 20 Aug 2012 17:50:53 +0000 (19:50 +0200)]
Merge "Fix coordinate is zero check in gmxcheck" into release-4-5-patches

11 years agoMerge "Explicitly noted an issue with use of genbox -maxsol" into release-4-6
Christoph Junghans [Mon, 20 Aug 2012 17:50:35 +0000 (19:50 +0200)]
Merge "Explicitly noted an issue with use of genbox -maxsol" into release-4-6

11 years agoMerge "fix AdResS and long-range electrostatics warning" into release-4-6
Roland Schulz [Sat, 18 Aug 2012 19:30:09 +0000 (21:30 +0200)]
Merge "fix AdResS and long-range electrostatics warning" into release-4-6

11 years agoFix coordinate is zero check in gmxcheck
Roland Schulz [Thu, 16 Aug 2012 23:50:15 +0000 (19:50 -0400)]
Fix coordinate is zero check in gmxcheck

Change-Id: I7504d235edc659b586d61243f3cbf72add2f92b2

11 years agoOptional computation of fluct. props in g_energy. Fixes #954
David van der Spoel [Thu, 16 Aug 2012 07:45:41 +0000 (09:45 +0200)]
Optional computation of fluct. props in g_energy. Fixes #954

Added a command line option -fluct_props to turn on the computation
of heat capacity etc. in g_energy. This prevents a warning message
from appearing on the screen each time the program is run.

Change-Id: I0cac44494ec5a366762d4d0a915146298d2ce1e0

11 years agoExplicitly noted an issue with use of genbox -maxsol
Mark Abraham [Tue, 14 Aug 2012 05:02:34 +0000 (15:02 +1000)]
Explicitly noted an issue with use of genbox -maxsol

Change-Id: I6f16c94296e7e17150331e4d3072d6430fb87bff

11 years agoDon't silently accept genbox -nmol without -ci
Mark Abraham [Tue, 14 Aug 2012 04:59:11 +0000 (14:59 +1000)]
Don't silently accept genbox -nmol without -ci

Change-Id: Ia50da1ee741eec9ea49ec04eb9fd14dd6b3116fc

11 years agofix AdResS and long-range electrostatics warning
Christoph Junghans [Mon, 13 Aug 2012 01:57:56 +0000 (19:57 -0600)]
fix AdResS and long-range electrostatics warning

Change-Id: Ibe6615e327a1a386f2fec5746e843fcf8fba5401

11 years agoClean up some variable naming for eigensolving
Mark Abraham [Fri, 10 Aug 2012 01:41:25 +0000 (11:41 +1000)]
Clean up some variable naming for eigensolving

Change-Id: I42c1751f505e931c7245a4804c1609d0e369e23f

11 years agoMake GCC OpenMP libraries static if GMX_PREFER_STATIC_OPENMP
Roland Schulz [Sat, 28 Jul 2012 18:32:18 +0000 (14:32 -0400)]
Make GCC OpenMP libraries static if GMX_PREFER_STATIC_OPENMP

Change-Id: I9ef26070c289f83f9d0f9e76635bb3a3dd493570

11 years agoGuarantee OpenMP flags for linker and make them user modifiable
Roland Schulz [Sat, 28 Jul 2012 17:25:34 +0000 (13:25 -0400)]
Guarantee OpenMP flags for linker and make them user modifiable

- Linker files were set only C/C++ compiler flags. For Fortran
  language it wasn't guranteed that the linker had the correct flags.
- The FindOpenMP module doesn't check for correct openmp linker flags
  and we assumed that compiler, library-linker, and executable linker
  flags are all the same.
- This also allows to create binaries with OpenMP linked in
  statically.

Change-Id: Ifde1d3f875bb779f04aa44a969138fe04620f224

11 years agoFixing of things associated with aminoacid.rtp header
Mark Abraham [Sat, 5 May 2012 03:54:18 +0000 (13:54 +1000)]
Fixing of things associated with aminoacid.rtp header

Code, commenting and documentation changes, including
* expanded self-documention boolean variable names
* clean up of dihedral generation code
* more reuse of output code
* more use of t_restp objects
* documentation in every force field's .rtp files
* clarified why and when generated dihedrals get superseded

Change-Id: I384f498f1124795e33c0ec1707ad52558bf15eb1

11 years agoAdded TIP4P back into CHARMM27
Mark Abraham [Tue, 31 Jul 2012 01:05:19 +0000 (11:05 +1000)]
Added TIP4P back into CHARMM27

I think Par erroneously removed this in 73b6d636a

Change-Id: Ie9f64636b1b28030ec86248649acad343b7c9a76

11 years agofixed trjconv not writing velocities with cpt input
Berk Hess [Thu, 9 Aug 2012 12:25:24 +0000 (14:25 +0200)]
fixed trjconv not writing velocities with cpt input

Fixes #930

Change-Id: I554dd729484a4238620f2773b5c3b3672cab72ee

11 years agoImprove the build system for gmx_header_config.h.
Teemu Murtola [Wed, 8 Aug 2012 04:02:38 +0000 (07:02 +0300)]
Improve the build system for gmx_header_config.h.

- Configure gmx_header_config.h in the binary directory to make it work
  with multiple coexisting binary directories.
- Or rather, configure a gmx_header_config_gen.h there, and include it
  using a relative path from a fixed gmx_header_config.h.  Add location
  of the generated file to include path.  This makes relative include
  paths still work in the source, as headers can continue to include
  gmx_header_config.h, which is still in the source tree.
- Add Doxygen comments for the files, with an explicit todo item to try
  to get rid of the CMake-generated defines (or even better, all of
  them).
- Make config.h include gmx_header_config.h to make it easier (and less
  error-prone) to move stuff between these two headers.  Remove
  unnecessary (after this change) #includes for gmx_header_config.h
  from source files.

Fixes #991.

Change-Id: Ib9686356c681b8fd2cce34511557566c9f4d20a2

11 years agoMerge "fixed incorrect TPI results with dynamic box" into release-4-5-patches
Christoph Junghans [Tue, 7 Aug 2012 16:10:56 +0000 (18:10 +0200)]
Merge "fixed incorrect TPI results with dynamic box" into release-4-5-patches

11 years agoFixed essential dynamics / flooding group PBC serial
Carsten Kutzner [Tue, 7 Aug 2012 09:15:59 +0000 (11:15 +0200)]
Fixed essential dynamics / flooding group PBC serial

In former versions, the PBC representation of essential dynamics /
flooding group atoms could be incorrect in serial runs if the ED group
contained more than a single molecule. In multi-molecule cases, the required
steps to choose the correct PBC image in communicate_group_positions()
therefore need to be performed also in serial runs. Since the PBC representation
can only change in neigborsearching steps, we only need to check the
shifts then. In parallel, NS is signalled by the bUpdateShifts
variable, which is set in dd_make_local_ed_indices(). The latter
function is however not called in serial runs; but still we can pass
the bNS boolean to do_flood() to signal the NS status. For essential
dynamics, unfortunately, since do_edsam() is called from constrain(), there
is no information about the NS status at that point. Until someone
comes up with a better idea, we therefore do the PBC check in every step
in serial essential dynamics - the performance impact will be negligible
anyway.

Change-Id: I86336a5e34131bdeac7e28f35b1ccb633450e54e

11 years agofixed incorrect TPI results with dynamic box
Berk Hess [Mon, 6 Aug 2012 18:52:59 +0000 (20:52 +0200)]
fixed incorrect TPI results with dynamic box

TPI with a box in the -rerun file different from the tpr gave systematic
errors. In Gromacs 4.0 there was a minor error, but not systematic.
Now TPI with any box setup is fully correct. Fixes #799

Change-Id: I69279874c2d1192e63efa224a0f035d43e919e88

11 years agoMerge "Clarify TestFileManager naming and comments."
Christoph Junghans [Mon, 6 Aug 2012 17:20:32 +0000 (19:20 +0200)]
Merge "Clarify TestFileManager naming and comments."

11 years agoMerge "Added comment in get_structure about which structures are included" into relea...
Christoph Junghans [Mon, 6 Aug 2012 17:18:50 +0000 (19:18 +0200)]
Merge "Added comment in get_structure about which structures are included" into release-4-5-patches

11 years agoFixed calculation of projection for STAR and/or SORI
Carsten Kutzner [Mon, 6 Aug 2012 13:45:08 +0000 (15:45 +0200)]
Fixed calculation of projection for STAR and/or SORI

Both for STAR and for SORI, if provided to make_edi, the
fit structure and the average structure can be the same
(in these cases the old code works fine), or one can do
the fit on another (possibly larger) part of the molecule.
In the latter case, STAR (or SORI) contains first the fit and
then the average structure (concatenated). Here, the fit has to
be performed using the fit structure while the projection(s) have
to be calculated using the average structure. This is now
taken care of by the 'avindex' index variable.

Change-Id: Id97235030f3394df2931e30249083ad439dbe791

11 years agoAdded comment in get_structure about which structures are included
Carsten Kutzner [Mon, 6 Aug 2012 12:26:53 +0000 (14:26 +0200)]
Added comment in get_structure about which structures are included

This patch just adds a comment and refactors natoms -> nav to better
clarify when we deal with the AVERAGE and when with the REFERENCE (fit)
structure. 'natoms' is not a good choice if we are talking about
the number of atoms in the average structure only.

Change-Id: I7025fb6ea59af0a7bcd7953a25abd09be0dd2979

11 years agoRemove share/tutor
Roland Schulz [Sun, 5 Aug 2012 23:01:45 +0000 (19:01 -0400)]
Remove share/tutor

Not up-to-date and better tutorials exists.

Fixes #811

Change-Id: I52708a534e641039ccb05538e0a5387079370761

11 years agoImprove Doxygen output layout.
Teemu Murtola [Mon, 11 Jun 2012 04:35:30 +0000 (07:35 +0300)]
Improve Doxygen output layout.

- Move detailed description to the top.  Mainly wanted to do this for
  modules (because the member lists can be quite long, and the
  description is the most interesting part), but did it for other
  entities as well for consistency.
- Move the file list to the end of the module documentation because it
  takes so much space.
- Removed namespace documentation from file docs, since there aren't
  that many namespaces, so it doesn't make sense to repeat their
  documentation for each file.
- Rename the "Related Pages" tab to "Other Docs" and move it after the
  "Modules" tab.

Related to #638.

Change-Id: Iefccac61d611be9d7a13dfef4df29781e3b54cca

11 years agoClarify TestFileManager naming and comments.
Teemu Murtola [Sun, 5 Aug 2012 05:54:09 +0000 (08:54 +0300)]
Clarify TestFileManager naming and comments.

- Rename datapath.* to testfilemanger.*, since they now only declare
  that one class.
- Make functions that return input data paths have "Input" explicitly in
  their name to make it clear what data path they are returning.  Also
  remove redundant "Test" from the names and replace "Path" by
  "Directory" for the functions that deal with directories.
- Some Doxygen documentation updates.

Change-Id: If80b5d83d075f3ce29b7b40c0d17f319166332b8

11 years agoMerge "Fixed segv in essential dynamics module" into release-4-5-patches
Roland Schulz [Sat, 4 Aug 2012 18:12:18 +0000 (20:12 +0200)]
Merge "Fixed segv in essential dynamics module" into release-4-5-patches

11 years agoFixed segv in essential dynamics module
Carsten Kutzner [Thu, 2 Aug 2012 09:52:41 +0000 (11:52 +0200)]
Fixed segv in essential dynamics module

Change-Id: Ia5657a535e7e31d55bf2b310a20dfee2a5e3b7f4

11 years agoFix overlapping memcpy
Roland Schulz [Fri, 3 Aug 2012 02:02:09 +0000 (22:02 -0400)]
Fix overlapping memcpy

The memcpy were not neccessary.

Fixes #984

Change-Id: Iea1d34756444cba2493940ab3f2252e7c108323f

11 years agoAdd note about SD integrator and t-coupling
Christoph Junghans [Wed, 1 Aug 2012 23:32:17 +0000 (17:32 -0600)]
Add note about SD integrator and t-coupling

Change-Id: I6c2bd1a332abbaf5312c9ad46de24bcd7205a085

11 years agoFix use after free memory error with adress
Roland Schulz [Wed, 1 Aug 2012 00:38:43 +0000 (20:38 -0400)]
Fix use after free memory error with adress

Change-Id: I481a55704a0a93235df531269bbbe40240dd12dc

11 years agoAdded a check for efep that was missing.
Michael Shirts [Mon, 30 Jul 2012 03:19:19 +0000 (21:19 -0600)]
Added a check for efep that was missing.

Fixes #983

Change-Id: Icdc1dd68f782fd6385fd55b616993fadea0c4448

11 years agoMerge "Clarified reasons for termination of EM" into release-4-6
Christoph Junghans [Tue, 31 Jul 2012 00:24:04 +0000 (02:24 +0200)]
Merge "Clarified reasons for termination of EM" into release-4-6

11 years agoClarified reasons for termination of EM
Mark Abraham [Thu, 26 Jul 2012 14:34:11 +0000 (00:34 +1000)]
Clarified reasons for termination of EM

"Step size too small" can be misinterpreted as nsteps is too small,
and so the error message is now more explicit.

Change-Id: I5680b3d13f34f7186ce28c553ac5736c4a74818e

11 years agoFix in when to call the constraints for andersen.
Michael Shirts [Wed, 18 Jul 2012 13:59:53 +0000 (09:59 -0400)]
Fix in when to call the constraints for andersen.

Change-Id: Ifa7eebd3a23312cb5abe66f7bf0d7a3299740f9a

11 years agoFix GMX_USE_RELATIVE_INSTALL_PATH with GMX_INTERNAL_BOOST
Roland Schulz [Sun, 29 Jul 2012 15:12:37 +0000 (11:12 -0400)]
Fix GMX_USE_RELATIVE_INSTALL_PATH with GMX_INTERNAL_BOOST

GMX_USE_RELATIVE_INSTALL_PATH was added by 62967269 and the merge
3791fc5e didn't make the required change for boost.

Change-Id: I5b9b890a2fac034b39d6b07fc39ca429f608c40a

11 years agoFix Segfaults in Genion
Roland Schulz [Sun, 29 Jul 2012 07:24:26 +0000 (03:24 -0400)]
Fix Segfaults in Genion

Introduced by babdd87c and c7a82654f

Change-Id: Id42042966931f3b7dfbd2eebcde29d659f80c0f0
Fixes: 982

11 years agoReorganize Doxygen build.
Teemu Murtola [Mon, 23 Jul 2012 15:55:44 +0000 (18:55 +0300)]
Reorganize Doxygen build.

- All doxygen-related cmake code and input files are now under
  doxygen/.
- Renamed the unsuffixed Doxyfile to Doxyfile-full for consistency, and
  renamed the output directory and custom target as well.
- Added a target to build all three types of doxygen documentation in
  one go.
- Added an index.html file as a starting point for browsing all three
  levels of documentation.

Related to #638.

Change-Id: Ia977c1aa93c55f152a15e560a60c8a1323e5d3f8

11 years agoMerge "Increase miminum boost version to 1.44"
Christoph Junghans [Sat, 28 Jul 2012 23:53:18 +0000 (01:53 +0200)]
Merge "Increase miminum boost version to 1.44"

11 years agoMerge "Fix a few doxygen warnings."
Christoph Junghans [Sat, 28 Jul 2012 23:52:23 +0000 (01:52 +0200)]
Merge "Fix a few doxygen warnings."

11 years agoMerge "Fix clang 3.2 warnings."
Roland Schulz [Sat, 28 Jul 2012 21:44:22 +0000 (23:44 +0200)]
Merge "Fix clang 3.2 warnings."

11 years agoIncrease miminum boost version to 1.44
Roland Schulz [Sat, 28 Jul 2012 00:18:42 +0000 (20:18 -0400)]
Increase miminum boost version to 1.44

Tested serveral earlier version and they had each different problems.
1.43: Warnings without C++11, Error with C++11 (gcc 4.7.1)

Change-Id: If94ead13fca410d7ae6c70888d11de5feb1e3921

11 years agoFix clang 3.2 warnings.
Teemu Murtola [Fri, 27 Jul 2012 17:39:50 +0000 (20:39 +0300)]
Fix clang 3.2 warnings.

Majority of these were false positives, but the fixes were simple.
Took the simplest route with gtest and edited the source.  We just need
to fix this thing again if/when we update to a newer version if it isn't
fixed upstream.

Change-Id: I5007d26ac9f38c61d5f0258d5bd4ccb7c08f4336

11 years agoFix a few doxygen warnings.
Teemu Murtola [Fri, 27 Jul 2012 04:25:36 +0000 (07:25 +0300)]
Fix a few doxygen warnings.

These gave warnings only on some versions of Doxygen. The issue in
numa_alloc.h resulted in undesirable output on 1.8, which didn't give
the warning.

Change-Id: I8129b3cab156eda601cdb7e4ccc0073bb9602854

11 years agoMerge remote-tracking branch 'origin/release-4-6' into HEAD
Roland Schulz [Thu, 26 Jul 2012 23:32:43 +0000 (19:32 -0400)]
Merge remote-tracking branch 'origin/release-4-6' into HEAD

Conflicts:
CMakeLists.txt

Change-Id: Icf9d0d92b977e35d42d55f1a077a2cdc8fbad86f

11 years agoMerge changes I33cd59e6,I8a2e539f
Christoph Junghans [Thu, 26 Jul 2012 22:41:06 +0000 (00:41 +0200)]
Merge changes I33cd59e6,I8a2e539f

* changes:
  Draft support for multiple help output formats.
  Improve option initialization in traj. analysis.

11 years agoFix that VMD version check was performed for binary not plugin
Roland Schulz [Tue, 3 Jul 2012 00:05:19 +0000 (20:05 -0400)]
Fix that VMD version check was performed for binary not plugin

Gromacs is not using the VMD binary and thus it is not very
insightful to check the VMD binary version. Also checking the VMD
binary version was potential very slow.
The new code tries to find and load one of the VMD plugins and
check the version of the plugin.

Change-Id: Iba7be9cb742c530ce4edb8963597b8ea467e5520

11 years agoMerge "cmake: allow switch between single and double" into release-4-6
Roland Schulz [Wed, 25 Jul 2012 23:27:56 +0000 (01:27 +0200)]
Merge "cmake: allow switch between single and double" into release-4-6

11 years agoMerge "fix a segfault in sse_mask_init" into release-4-6
Roland Schulz [Wed, 25 Jul 2012 23:24:54 +0000 (01:24 +0200)]
Merge "fix a segfault in sse_mask_init" into release-4-6

11 years agoFix installation rules for man pages: don't install gromacs.7.cmakein
Roland Schulz [Tue, 24 Jul 2012 11:44:07 +0000 (07:44 -0400)]
Fix installation rules for man pages: don't install gromacs.7.cmakein

8c87e60 added gromacs.7.cmakein and didn't add an exclusion rule.

Change to CPackInit.cmake: Removing wrong (incorrect path) and unnessary file in message.

Change-Id: I8fe7436b8164d80ad6db64eb54dc81424cd44e4a

11 years agoAdd default root folder to cpack archives
Roland Schulz [Tue, 24 Jul 2012 11:26:07 +0000 (07:26 -0400)]
Add default root folder to cpack archives

Fixes that source archives had no root folder. If non-default
root folder for binary archives is wanted, this still can be
achived by:
cmake -DGMX_INSTALL_PREFIX={path}/ -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=0

Fixes #977

Change-Id: Iaf42afd3617873e5c1e5e7cb7c327986efa20fcd

11 years agoMerge remote-tracking branch 'gerrit/release-4-6'
Teemu Murtola [Tue, 24 Jul 2012 04:37:37 +0000 (07:37 +0300)]
Merge remote-tracking branch 'gerrit/release-4-6'

Conflicts:
    src/gromacs/selection/compiler.cpp (resolved in favor of master)

Change-Id: I4d6696dbac8c2cc4dd9fdd1f3b9601bd1856dff0

11 years agoClean up of environment variables
Mark Abraham [Tue, 24 Jul 2012 00:16:27 +0000 (10:16 +1000)]
Clean up of environment variables

In particular, reduce ambiguous usage of "force".

Refs #974

Change-Id: Ia6178ce3392f66451341dd7a4af98312f9e72c0f

11 years agocmake: allow switch between single and double
Christoph Junghans [Thu, 19 Jul 2012 22:34:54 +0000 (16:34 -0600)]
cmake: allow switch between single and double

* only use FFTW_INCLUDE_DIR and FFTW_LIBRARY if user set them
* otherwise do not initialize them
* description will still show up in ccmake as advanced
* fixes #971 (linking error when switching without "make rebuild_cache")

Change-Id: Idfce7d912c3d432f48fd3a7021c8c04d6311569b