Merge remote-tracking branch 'origin/release-2021' into merge-2021-into-master
authorAndrey Alekseenko <al42and@gmail.com>
Thu, 19 Aug 2021 09:51:13 +0000 (12:51 +0300)
committerAndrey Alekseenko <al42and@gmail.com>
Thu, 19 Aug 2021 10:10:25 +0000 (13:10 +0300)
Resolved conflicts:
 - cmake/gmxVersionInfo.cmake
 - docs/CMakeLists.txt
 - python_packaging/src/gmxapi/export_system.cpp
 - python_packaging/src/setup.py
 - src/gromacs/domdec/domdec.cpp
 - src/gromacs/gmxana/gmx_chi.cpp

22 files changed:
cmake/gmxVersionInfo.cmake
docs/CMakeLists.txt
docs/reference-manual/analysis/curve-fitting.rst
docs/release-notes/2021/2021.3.rst
docs/release-notes/2021/2021.4.rst [new file with mode: 0644]
docs/release-notes/index.rst
python_packaging/src/CMakeLists.txt
python_packaging/src/LICENSE [new file with mode: 0644]
python_packaging/src/gmxapi/export_system.cpp
python_packaging/src/gmxapi/launch_020.cpp [new file with mode: 0644]
python_packaging/src/gmxapi/launch_021.cpp [new file with mode: 0644]
python_packaging/src/gmxapi/pycontext.cpp
python_packaging/src/gmxapi/pysystem.h
python_packaging/src/setup.py
src/gromacs/correlationfunctions/tests/refdata/ExpfitTest_EffnERREST.xml
src/gromacs/correlationfunctions/tests/testERREST.xvg
src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec.h
src/gromacs/domdec/domdec_internal.h
src/gromacs/gmxana/anadih.cpp
src/gromacs/gmxana/gmx_chi.cpp
src/gromacs/mdrun/runner.cpp

index 185f9f0e501690faebe458641fe7e700b5ad5fa0..c4485a330f4951445b192353fb0abcb689a7b7a2 100644 (file)
@@ -263,7 +263,7 @@ set(REGRESSIONTEST_BRANCH "master")
 # build the regressiontests tarball with all the right naming. The
 # naming affects the md5sum that has to go here, and if it isn't right
 # release workflow will report a failure.
-set(REGRESSIONTEST_MD5SUM "62606f5f6ea37f6114b6e9cf58218f13" CACHE INTERNAL "MD5 sum of the regressiontests tarball for this GROMACS version")
+set(REGRESSIONTEST_MD5SUM "93956ea42c4d16fdd541518c05972989" CACHE INTERNAL "MD5 sum of the regressiontests tarball for this GROMACS version")
 
 math(EXPR GMX_VERSION_NUMERIC
      "${GMX_VERSION_MAJOR}*10000 + ${GMX_VERSION_PATCH}")
index 468c8ed31a43d6c7bcc1a145c76d69f5a9b37591..6eefe6ed5f2788a59b00f363389633587d196dec 100644 (file)
@@ -374,6 +374,7 @@ if (SPHINX_FOUND)
         release-notes/2022/major/portability.rst
         release-notes/2022/major/miscellaneous.rst
         release-notes/2022/major/api.rst
+        release-notes/2021/2021.4.rst
         release-notes/2021/2021.3.rst
         release-notes/2021/2021.2.rst
         release-notes/2021/2021.1.rst
index dafc3eb2e6be70094ec74ad4f8b318fa38efb194..e3650f8bd942dbcffb4fa5de9bc894fd4dc9d7ed 100644 (file)
@@ -58,8 +58,8 @@ Under the hood |Gromacs| implements some more fitting functions, namely a
 function to estimate the error in time-correlated data due to HessĀ \ :ref:`149 <refHess2002a>`:
 
 .. math:: \varepsilon^2(t) =
-          \alpha\tau_1\left(1+\frac{\tau_1}{t}\left(e^{-t/\tau_1}-1\right)\right)
-                + (1-\alpha)\tau_2\left(1+\frac{\tau_2}{t}\left(e^{-t/\tau_2}-1\right)\right)
+          \alpha\tau_1\left(1+\frac{\tau_1}{t}\left(e^{-t/\tau_1}-1\right)\right)
+                + (1-\alpha)\tau_2\left(1+\frac{\tau_2}{t}\left(e^{-t/\tau_2}-1\right)\right)
           :label: eqntimecorrerror
 
 where :math:`\tau_1` and :math:`\tau_2` are time constants (with
index a9cccf969c0043e85d35b2c822bb2e5ba10a0022..1ca55184edda04fa11b8112340c27c6204837d97 100644 (file)
@@ -1,7 +1,7 @@
 GROMACS 2021.3 release notes
 ----------------------------
 
-This version was released on TODO, 2021. These release notes
+This version was released on August 18th, 2021. These release notes
 document the changes that have taken place in GROMACS since the
 previous 2021.2 version, to fix known issues. It also incorporates all
 fixes made in version 2020.6 and earlier, which you can find described
@@ -16,6 +16,14 @@ in the :ref:`release-notes`.
 Fixes where mdrun could behave incorrectly
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+Fix mdrun -ddorder pp_pme
+"""""""""""""""""""""""""
+
+When rank ordering PP-PME, mdrun would deadlock during the initialization
+phase.
+
+:issue:`4114`
+
 Fixed gmxapi MD plugin binding
 """"""""""""""""""""""""""""""
 
@@ -24,12 +32,27 @@ simulation through the gmxapi Python interface.
 This meant that restraint potentials would silently fail to be applied with
 gmxapi versions >= 0.1.
 Updates have been applied internally to gmxapi.
+
+The gmxapi 0.2.2 Python package supports the updated GROMACS API and will
+issue errors if a simulation attempts to bind external plugin code with
+a compatible-but-broken API (GROMACS 2021 through 2021.2).
+
 Third party code should not need to be updated, but developers will
 note an additional "null restraint" in
 https://gitlab.com/gromacs/gromacs/-/tree/master/python_packaging/sample_restraint
 (for illustration and testing purposes).
 
-:issue:`4078`
+:issue:`4078` and :issue:`4102`
+
+Fixed multi-rank restarts from checkpoints written by single-rank simulations
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+Currently a single-rank simulation never uses update groups, however a
+multi-rank run can do so. This fix ensures that the atoms within
+update groups always start in the same periodic image, which was not
+guaranteed if the checkpoint was written by a single-rank simulation.
+
+:issue:`4016`
 
 Fixes for ``gmx`` tools
 ^^^^^^^^^^^^^^^^^^^^^^^
@@ -57,6 +80,28 @@ calculate the number of remaining steps correctly.
 
 :issue:`4056`
 
+Fixed dihedral transition counting in gmx chi and gmx angle
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+When a trajectory of only 1 frame is passed, transition counting is
+avoided (formerly it was attempted and crashed).
+
+When a trajectory of multiple frames is passed, transition counting is
+correct (formerly it did not take place).
+
+Fixed possible crash in gmx chi histogramming
+"""""""""""""""""""""""""""""""""""""""""""""
+
+Formerly an invalid reference to a temporary string was used for a
+residue name, which might have caused a crash.
+
+Fixed gmx chi -chi_prod
+"""""""""""""""""""""""
+
+Formerly it could crash or produce garbage results when the number of
+relevant dihedrals differed from the number of residues
+with dihedrals.
+
 Fixes that affect portability
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/docs/release-notes/2021/2021.4.rst b/docs/release-notes/2021/2021.4.rst
new file mode 100644 (file)
index 0000000..f2d3319
--- /dev/null
@@ -0,0 +1,27 @@
+GROMACS 2021.4 release notes
+----------------------------
+
+This version was released on TODO, 2021. These release notes
+document the changes that have taken place in GROMACS since the
+previous 2021.3 version, to fix known issues. It also incorporates all
+fixes made in version 2020.6 and earlier, which you can find described
+in the :ref:`release-notes`.
+
+.. Note to developers!
+   Please use """"""" to underline the individual entries for fixed issues in the subfolders,
+   otherwise the formatting on the webpage is messed up.
+   Also, please use the syntax :issue:`number` to reference issues on GitLab, without the
+   a space between the colon and number!
+
+Fixes where mdrun could behave incorrectly
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Fixes for ``gmx`` tools
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Fixes that affect portability
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Miscellaneous
+^^^^^^^^^^^^^
+
index 0702e8693404a67b8392a99a84ca667a50957771..1b364f73e1cdff792a12c3f495509fa5f686ba42 100644 (file)
@@ -31,6 +31,7 @@ Patch releases
 .. toctree::
    :maxdepth: 1
 
+   2021/2021.4
    2021/2021.3
    2021/2021.2
    2021/2021.1
index 4fb372dc063c7196e27d5fe368e6e16dfee8d9f4..1e8de44d91aa33430df4e52d76d176de38a63826 100644 (file)
@@ -76,9 +76,13 @@ if(POLICY CMP0074) #3.12
 endif()
 
 if(GMXAPI_MASTER_PROJECT)
-    find_package(gmxapi 0.2.1 REQUIRED
+    find_package(gmxapi 0.2 REQUIRED
                  HINTS "$ENV{GROMACS_DIR}"
                  )
+    if (gmxapi_VERSION VERSION_LESS 0.2.1)
+        message(WARNING "Your GROMACS installation does not support custom MD plugins. "
+                "If you need this feature, please install GROMACS 2021.3 or higher.")
+    endif ()
 endif()
 if(gmxapi_FOUND)
     set(_suffix "")
@@ -132,6 +136,12 @@ pybind11_add_module(_gmxapi
                     ${GMXAPI_PYTHON_EXTENSION_SOURCES}
                     )
 
+if (gmxapi_VERSION VERSION_GREATER_EQUAL 0.2.1)
+    target_sources(_gmxapi PRIVATE gmxapi/launch_021.cpp)
+else()
+    target_sources(_gmxapi PRIVATE gmxapi/launch_020.cpp)
+endif()
+
 target_include_directories(_gmxapi PRIVATE
                            ${CMAKE_CURRENT_SOURCE_DIR}/gmxapi
                            ${CMAKE_CURRENT_BINARY_DIR}/gmxapi
diff --git a/python_packaging/src/LICENSE b/python_packaging/src/LICENSE
new file mode 100644 (file)
index 0000000..9840f40
--- /dev/null
@@ -0,0 +1,459 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
index b504ccb9e74599b62bc3af6d1c91e722ecd7b33f..39eeb91d78c3e0b5c0818aeb2e3a394b896290c0 100644 (file)
@@ -44,6 +44,7 @@
 #include "gmxapi/session.h"
 #include "gmxapi/status.h"
 #include "gmxapi/system.h"
+#include "gmxapi/version.h"
 
 #include "pycontext.h"
 #include "pysystem.h"
@@ -81,14 +82,7 @@ void export_system(py::module& m)
 
     // Export system container class
     py::class_<System, std::shared_ptr<System>> system(m, "MDSystem");
-    system.def(
-            "launch",
-            [](System* system, std::shared_ptr<PyContext> context) {
-                auto work       = gmxapi::getWork(*system->get());
-                auto newSession = context->launch(*work);
-                return newSession;
-            },
-            "Launch the configured workflow in the provided context.");
+    system.def("launch", &launch, "Launch the configured workflow in the provided context.");
 
     // Module-level function
     m.def("from_tpr",
diff --git a/python_packaging/src/gmxapi/launch_020.cpp b/python_packaging/src/gmxapi/launch_020.cpp
new file mode 100644 (file)
index 0000000..65e5262
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2021, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*! \file
+ * \brief Implement Session launcher.
+ *
+ * \ingroup module_python
+ * \author M. Eric Irrgang <ericirrgang@gmail.com>
+ */
+
+#include "pycontext.h"
+#include "pysystem.h"
+
+namespace gmxpy
+{
+
+std::shared_ptr<gmxapi::Session> launch(::gmxapi::System* system, PyContext* context)
+{
+    auto newSession = system->launch(context->get());
+    return newSession;
+}
+
+} // namespace gmxpy
diff --git a/python_packaging/src/gmxapi/launch_021.cpp b/python_packaging/src/gmxapi/launch_021.cpp
new file mode 100644 (file)
index 0000000..44ad5a2
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2021, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*! \file
+ * \brief Implement Session launcher.
+ *
+ * \ingroup module_python
+ * \author M. Eric Irrgang <ericirrgang@gmail.com>
+ */
+
+#include "pycontext.h"
+#include "pysystem.h"
+
+namespace gmxpy
+{
+
+std::shared_ptr<gmxapi::Session> launch(::gmxapi::System* system, PyContext* context)
+{
+    auto work       = gmxapi::getWork(*system->get());
+    auto newSession = context->launch(*work);
+    return newSession;
+}
+
+} // namespace gmxpy
index a2640301d5f5e4e362e2db84fe573fee9c9e25e7..c77238cebadef29b39397ffce39bb93dea9e8fda 100644 (file)
@@ -45,7 +45,7 @@
 #include "gmxapi/md.h"
 #include "gmxapi/session.h"
 #include "gmxapi/status.h"
-
+#include "gmxapi/version.h"
 
 namespace py = pybind11;
 
@@ -102,6 +102,10 @@ PyContext::PyContext() :
 
 void PyContext::addMDModule(const pybind11::object& force_object) const
 {
+    if (!::gmxapi::Version::isAtLeast(0, 2, 1))
+    {
+        throw ::gmxapi::NotImplementedError("Feature requires gmxapi 0.2.1 with GROMACS 2021.3.");
+    }
     // If force_object has a bind method, give it a PyCapsule with a pointer
     // to our C++ object.
     if (py::hasattr(force_object, "bind"))
index 0cafe1ee8499c2a04f31c4cfd4d964f5c079d627..2281df9d0753e6642722282735c04c2590d2b29a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2021, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -53,6 +53,10 @@ namespace gmxpy
 
 std::shared_ptr<gmxapi::System> from_tpr(std::string filename);
 
+class PyContext;
+
+std::shared_ptr<gmxapi::Session> launch(::gmxapi::System* system, PyContext* context);
+
 } // end namespace gmxpy
 
 #endif // header guard
index 27f3408f4cb31e52e04e1b2486fd1b639160fe4c..025aea1c68199c4bef79eda3cd299083d90e225a 100644 (file)
@@ -87,7 +87,7 @@ exist in the same location (with different suffixes) only the first one will be
 used when guessing a toolchain, because setup.py does not know which corresponds
 to the gmxapi support library.
 
-If specifying GMXTOOLCHAINDIR and gmxapi_DIR, the tool chain directory must be 
+If specifying GMXTOOLCHAINDIR and gmxapi_DIR, the tool chain directory must be
 located within a subdirectory of gmxapi_DIR.
 
 Refer to project web site for complete documentation.
@@ -157,6 +157,17 @@ cmake_platform_hints = '-DCMAKE_TOOLCHAIN_FILE={}'.format(gmx_toolchain)
 cmake_gmxapi_hint = '-Dgmxapi_ROOT={}'.format(gmxapi_DIR)
 cmake_args = [cmake_platform_hints, cmake_gmxapi_hint]
 
+long_description = """gmxapi provides Python access to GROMACS molecular simulation tools.
+Operations can be connected flexibly to allow high performance simulation and
+analysis with complex control and data flows. Users can define new operations
+in C++ or Python with the same tool kit used to implement this package.
+
+This Python package requires a compatible GROMACS installation with the API
+libraries and headers.
+
+See http://gmxapi.org/ for details on installation and usage.
+"""
+
 setup(
     name='gmxapi',
 
@@ -174,6 +185,7 @@ setup(
     author='M. Eric Irrgang',
     author_email='info@gmxapi.org',
     description='gmxapi Python interface for GROMACS',
+    long_description=long_description,
     license='LGPL',
     url='http://gmxapi.org/',
 
index 5247edc079ae49f1155cd3d4695f550409fd3c5b..d678c31337d57f750ed177a7079ff04223d37fde 100644 (file)
@@ -3,8 +3,8 @@
 <ReferenceData>
   <Sequence Name="result">
     <Int Name="Length">3</Int>
-    <Real>0.50082180382778319</Real>
-    <Real>1</Real>
-    <Real>103.32999340041971</Real>
+    <Real>1.2</Real>
+    <Real>0.99</Real>
+    <Real>34.5</Real>
   </Sequence>
 </ReferenceData>
index 4f28dfc34b37892acb011e3b41ec5d8829e8afa0..7f794647b44819179a47a16f0c6ee6b5d54ed118 100644 (file)
-1 0.3517423
-17 1.0597503
-33 0.9410293
-49 0.8716023
-65 0.8238423
-81 1.0098463
-97 0.5520603
-113 0.4278303
-129 0.9342923
-145 1.0342603
-161 0.8231863
-177 0.7635853
-193 0.9390683
-209 0.8922163
-225 1.1775333
-241 1.2116213
-257 0.6996663
-273 0.2287793
-289 1.3589063
-305 1.6198323
-321 0.8974273
-337 0.9043013
-353 0.4556703
-369 0.6929363
-385 1.2148863
-401 1.4234283
-417 1.0278523
-433 0.6124313
-449 0.7412923
-465 0.3195843
-481 0.8295103
-497 0.7101183
-513 1.0936703
-529 0.4371843
-545 0.5090993
-561 0.9473693
-577 0.9137463
-593 0.6570103
-609 1.0386173
-625 1.3944973
-641 0.4820373
-657 0.4620413
-673 1.3725933
-689 0.8170593
-705 0.8616223
-721 0.4220783
-737 1.1177493
-753 0.7920653
-769 0.6135533
-785 0.6946533
-801 1.4141893
-817 0.9795273
-833 0.5320023
-849 1.1125843
-865 1.2062423
-881 0.9650543
-897 1.6114013
-913 0.5465363
-929 1.5686003
-945 1.3882573
-961 1.0649153
-977 1.3672613
-993 1.1256913
-1009 0.8110243
-1025 1.0385253
-1041 1.4888273
-1057 1.4508483
-1073 0.9516873
-1089 0.9449663
-1105 0.9077883
-1121 0.5280203
-1137 0.8003353
-1153 0.3715183
-1169 1.1737183
-1185 0.3641943
-1201 0.9924893
-1217 1.4245123
-1233 0.7253083
-1249 1.0137533
-1265 0.8326003
-1281 0.8174633
-1297 0.6439253
-1313 0.9496813
-1329 0.4628573
-1345 1.3082933
-1361 0.3596463
-1377 0.8700153
-1393 1.0316053
-1409 1.2754943
-1425 0.8401303
-1441 1.3051733
-1457 1.7206623
-1473 0.9644593
-1489 0.7674533
-1505 0.9751783
-1521 0.5897953
-1537 0.9886143
-1553 1.5970503
-1569 1.3752943
-1585 1.1988803
-1601 1.0081603
-1617 1.5943493
-1633 0.7405973
-1649 0.6524783
-1665 0.7423293
-1681 1.1931963
-1697 1.2285283
-1713 0.7597933
-1729 0.9291963
-1745 1.5914353
-1761 0.4776883
-1777 1.3845643
-1793 1.4108173
-1809 0.8124203
-1825 1.4891713
-1841 0.8480123
-1857 0.7482803
-1873 1.5186353
-1889 0.8382693
-1905 0.3961233
-1921 0.8167013
-1937 1.3302663
-1953 0.5777863
-1969 1.4406173
-1985 0.4306763
-2001 0.6667753
-2017 -0.0174287
-2033 1.0792663
-2049 0.8624543
-2065 0.7621893
-2081 0.7339673
-2097 0.5926183
-2113 1.0041013
-2129 0.5759933
-2145 1.4805423
-2161 0.9656263
-2177 0.7245373
-2193 0.7458013
-2209 0.7898533
-2225 1.5943193
-2241 0.6717653
-2257 1.2236373
-2273 0.5686843
-2289 1.4059033
-2305 0.8901873
-2321 1.1125003
-2337 0.9947173
-2353 0.7398113
-2369 1.4866303
-2385 1.7170683
-2401 1.1582763
-2417 0.4476063
-2433 0.8380023
-2449 0.7195173
-2465 1.4064993
-2481 1.1095623
-2497 8.13e-05
-2513 0.8899893
-2529 0.9137923
-2545 1.0530973
-2561 1.2563603
-2577 0.3981443
-2593 0.8871053
-2609 0.4778103
-2625 1.1359983
-2641 0.5740863
-2657 1.1778153
-2673 1.3080033
-2689 1.0777173
-2705 1.7451983
-2721 1.9104733
-2737 1.4288603
-2753 2.2134143
-2769 0.9296233
-2785 0.9103213
-2801 0.8418393
-2817 1.2955373
-2833 1.2594723
-2849 0.8617293
-2865 0.2954833
-2881 0.9188513
-2897 1.8631033
-2913 1.9094973
-2929 0.7062733
-2945 1.8554883
-2961 0.9238253
-2977 0.3348663
-2993 0.9353073
-3009 1.2028623
-3025 1.9851123
-3041 1.1466263
-3057 1.5713393
-3073 1.4108013
-3089 0.8622563
-3105 0.8434723
-3121 1.3925823
-3137 1.4874463
-3153 1.2751583
-3169 1.1509373
-3185 1.5736133
-3201 1.5143093
-3217 0.7679413
-3233 1.0632833
-3249 0.9187743
-3265 1.5776033
-3281 1.1580243
-3297 0.8602263
-3313 0.8002063
-3329 0.9148603
-3345 1.3152133
-3361 0.4933133
-3377 0.8761343
-3393 0.6942183
-3409 1.2085083
-3425 1.5972033
-3441 1.2005583
-3457 1.2183353
-3473 0.7577103
-3489 0.6112263
-3505 1.2318773
-3521 1.1326723
-3537 1.1506243
-3553 0.5817003
-3569 0.9014713
-3585 0.8777513
-3601 1.4347963
-3617 0.9277923
-3633 1.1432003
-3649 0.7949343
-3665 1.2829793
-3681 0.2914853
-3697 0.9427083
-3713 1.3510713
-3729 0.8358273
-3745 0.8312423
-3761 1.0880323
-3777 1.7421923
-3793 1.1334733
-3809 0.2839173
-3825 0.8868153
-3841 0.5585983
-3857 0.5283023
-3873 0.2076003
-3889 0.8009313
-3905 0.9836093
-3921 0.8874943
-3937 0.5242053
-3953 0.6777083
-3969 0.2986573
-3985 0.9648863
-4001 0.3936813
-4017 1.5192383
-4033 1.1283383
-4049 0.5402493
-4065 0.8644763
-4081 0.9670683
-4097 1.2198303
-4113 0.8354763
-4129 0.8359803
-4145 1.0664183
-4161 0.4950833
-4177 0.6145223
-4193 0.8997543
-4209 0.2690933
-4225 0.9369703
-4241 1.3704423
-4257 0.5915883
-4273 0.7297033
-4289 0.2907223
-4305 1.0001723
-4321 1.1066633
-4337 1.5133253
-4353 1.3272213
-4369 1.2639593
-4385 0.6724293
-4401 0.6174593
-4417 1.4950913
-4433 0.9158143
-4449 1.9446683
-4465 1.1331683
-4481 0.5225033
-4497 0.8273663
-4513 0.3377963
-4529 0.6311003
-4545 1.4785433
-4561 0.8769733
-4577 0.7451523
-4593 1.0181933
-4609 1.1503113
-4625 1.5157673
-4641 1.2449163
-4657 1.5840353
-4673 1.1181763
-4689 0.8027923
-4705 0.2972533
-4721 0.6047333
-4737 1.3964663
-4753 0.8300983
-4769 1.5832113
-4785 1.7844893
-4801 1.4584933
-4817 1.2985273
-4833 1.1074343
-4849 1.6353573
-4865 1.5705303
-4881 1.7136353
-4897 1.3027233
-4913 1.0545013
-4929 1.0732243
-4945 1.9772463
-4961 1.4843033
-4977 1.4208723
-4993 1.8630953
-5009 0.8611723
-5025 0.7367903
-5041 0.5593233
-5057 0.9989823
-5073 0.5387463
-5089 0.6843843
-5105 0.7769823
-5121 1.1148653
-5137 1.7723363
-5153 0.6389133
-5169 0.6624193
-5185 0.5881323
-5201 0.5588963
-5217 -0.1075927
-5233 0.5866443
-5249 0.4331333
-5265 0.7912493
-5281 0.1760223
-5297 0.8659643
-5313 1.1929063
-5329 0.4952133
-5345 0.6245163
-5361 0.6433383
-5377 0.6050383
-5393 1.1802343
-5409 0.9662523
-5425 1.1449483
-5441 0.4728213
-5457 0.7832533
-5473 1.0352293
-5489 0.8087053
-5505 0.6213123
-5521 0.8185243
-5537 0.2622273
-5553 0.8098043
-5569 0.3489813
-5585 0.5309423
-5601 0.5585833
-5617 -0.0650127
-5633 0.8007403
-5649 1.1783113
-5665 0.8767213
-5681 0.7084473
-5697 0.7087373
-5713 1.2293673
-5729 1.9700823
-5745 1.1370283
-5761 0.8622563
-5777 1.5045673
-5793 1.5535933
-5809 1.6912733
-5825 1.4561283
-5841 1.1133853
-5857 1.0418363
-5873 1.4926883
-5889 0.7510653
-5905 1.4871873
-5921 0.6951643
-5937 0.8722043
-5953 1.0236633
-5969 0.4982503
-5985 1.0484053
-6001 1.4949693
-6017 0.7577103
-6033 1.4756743
-6049 0.9504673
-6065 0.6371503
-6081 0.9289373
-6097 1.6262783
-6113 1.5682493
-6129 1.7294363
-6145 0.8229643
-6161 1.4206823
-6177 1.2592053
-6193 0.8906453
-6209 0.9228333
-6225 0.7128493
-6241 1.0956393
-6257 1.3999223
-6273 1.2278183
-6289 1.3250013
-6305 0.7005813
-6321 0.8609823
-6337 0.9442873
-6353 0.7324343
-6369 1.2111333
-6385 0.9367413
-6401 0.5429203
-6417 0.7491193
-6433 0.6651583
-6449 1.0823103
-6465 1.3247193
-6481 0.8797353
-6497 1.0703243
-6513 0.9107563
-6529 1.8092243
-6545 0.7302523
-6561 1.6127293
-6577 1.2735493
-6593 1.0610703
-6609 0.7459463
-6625 1.0303013
-6641 1.5765423
-6657 1.0391893
-6673 1.1801883
-6689 0.3454793
-6705 0.5029193
-6721 0.7490663
-6737 1.1911363
-6753 1.1398823
-6769 0.8100933
-6785 1.4742703
-6801 1.1287503
-6817 1.4290363
-6833 1.2512253
-6849 1.1904803
-6865 1.1241423
-6881 0.9222003
-6897 0.5952273
-6913 0.8656583
-6929 1.1323363
-6945 1.1635483
-6961 1.3734173
-6977 1.2152753
-6993 0.7563443
-7009 0.6301693
-7025 0.3757603
-7041 0.9500623
-7057 0.9807333
-7073 0.6007513
-7089 1.1412473
-7105 0.8297853
-7121 0.8890813
-7137 0.8713803
-7153 1.0812503
-7169 1.3144803
-7185 1.3724333
-7201 1.7222793
-7217 0.8696183
-7233 1.2517673
-7249 1.0543183
-7265 1.0174603
-7281 1.1306963
-7297 0.4270143
-7313 0.9045993
-7329 1.5317583
-7345 1.1389813
-7361 0.6676073
-7377 0.9130753
-7393 0.5875443
-7409 0.9053693
-7425 0.5835163
-7441 1.1831793
-7457 1.4384203
-7473 0.4676183
-7489 0.7656293
-7505 0.4548773
-7521 1.0648013
-7537 1.0835923
-7553 1.3808793
-7569 1.2125673
-7585 1.2858243
-7601 0.7112093
-7617 0.6617253
-7633 0.8534213
-7649 1.2384923
-7665 1.1525693
-7681 1.8521543
-7697 1.2422913
-7713 1.4445463
-7729 1.0739483
-7745 0.8565343
-7761 0.6647313
-7777 1.2838183
-7793 1.6710863
-7809 1.7629593
-7825 1.7022833
-7841 1.7739233
-7857 1.3768663
-7873 1.7267503
-7889 1.3419463
-7905 1.4587673
-7921 0.8886153
-7937 0.6786163
-7953 0.9597973
-7969 1.7429853
-7985 1.1981473
-8001 1.7303743
+# import numpy as np; t1, a, t2 = 1.2, 0.99, 34.5; t = np.linspace(1, 8001, 501); e2 = 2*a*t1*(1+t1/t*(np.exp(-t/t1)-1)) + 2*(1-a)*t2*(1+t2/t*(np.exp(-t/t2)-1)); np.savetxt('testERREST.xvg', np.array([t, e2]).T, ('%d', '%.7f'), header=open(__file__).readlines()[0])
+# 
+1 0.7738305
+17 2.3534865
+33 2.5354038
+49 2.6393905
+65 2.7115615
+81 2.7650000
+97 2.8059453
+113 2.8380682
+129 2.8637501
+145 2.8846189
+161 2.9018239
+177 2.9161954
+193 2.9283437
+209 2.9387248
+225 2.9476836
+241 2.9554847
+257 2.9623333
+273 2.9683902
+289 2.9737830
+305 2.9786139
+321 2.9829656
+337 2.9869055
+353 2.9904891
+369 2.9937624
+385 2.9967640
+401 2.9995262
+417 3.0020766
+433 3.0044385
+449 3.0066322
+465 3.0086749
+481 3.0105817
+497 3.0123658
+513 3.0140386
+529 3.0156102
+545 3.0170895
+561 3.0184845
+577 3.0198021
+593 3.0210486
+609 3.0222296
+625 3.0233501
+641 3.0244147
+657 3.0254274
+673 3.0263920
+689 3.0273118
+705 3.0281898
+721 3.0290288
+737 3.0298315
+753 3.0306000
+769 3.0313365
+785 3.0320431
+801 3.0327213
+817 3.0333731
+833 3.0339998
+849 3.0346028
+865 3.0351836
+881 3.0357432
+897 3.0362829
+913 3.0368037
+929 3.0373066
+945 3.0377924
+961 3.0382620
+977 3.0387163
+993 3.0391559
+1009 3.0395816
+1025 3.0399940
+1041 3.0403937
+1057 3.0407813
+1073 3.0411573
+1089 3.0415223
+1105 3.0418767
+1121 3.0422211
+1137 3.0425557
+1153 3.0428810
+1169 3.0431974
+1185 3.0435053
+1201 3.0438050
+1217 3.0440968
+1233 3.0443810
+1249 3.0446580
+1265 3.0449279
+1281 3.0451911
+1297 3.0454478
+1313 3.0456982
+1329 3.0459427
+1345 3.0461813
+1361 3.0464143
+1377 3.0466418
+1393 3.0468642
+1409 3.0470815
+1425 3.0472939
+1441 3.0475016
+1457 3.0477047
+1473 3.0479035
+1489 3.0480979
+1505 3.0482882
+1521 3.0484746
+1537 3.0486570
+1553 3.0488357
+1569 3.0490107
+1585 3.0491822
+1601 3.0493503
+1617 3.0495150
+1633 3.0496765
+1649 3.0498349
+1665 3.0499903
+1681 3.0501427
+1697 3.0502922
+1713 3.0504389
+1729 3.0505829
+1745 3.0507242
+1761 3.0508630
+1777 3.0509993
+1793 3.0511332
+1809 3.0512647
+1825 3.0513939
+1841 3.0515208
+1857 3.0516456
+1873 3.0517682
+1889 3.0518887
+1905 3.0520072
+1921 3.0521238
+1937 3.0522384
+1953 3.0523512
+1969 3.0524621
+1985 3.0525712
+2001 3.0526786
+2017 3.0527842
+2033 3.0528882
+2049 3.0529906
+2065 3.0530914
+2081 3.0531907
+2097 3.0532884
+2113 3.0533847
+2129 3.0534795
+2145 3.0535729
+2161 3.0536649
+2177 3.0537555
+2193 3.0538449
+2209 3.0539329
+2225 3.0540197
+2241 3.0541052
+2257 3.0541895
+2273 3.0542727
+2289 3.0543547
+2305 3.0544355
+2321 3.0545152
+2337 3.0545938
+2353 3.0546714
+2369 3.0547479
+2385 3.0548234
+2401 3.0548979
+2417 3.0549714
+2433 3.0550439
+2449 3.0551155
+2465 3.0551861
+2481 3.0552559
+2497 3.0553247
+2513 3.0553927
+2529 3.0554598
+2545 3.0555261
+2561 3.0555915
+2577 3.0556561
+2593 3.0557199
+2609 3.0557830
+2625 3.0558453
+2641 3.0559068
+2657 3.0559676
+2673 3.0560276
+2689 3.0560869
+2705 3.0561456
+2721 3.0562035
+2737 3.0562608
+2753 3.0563174
+2769 3.0563733
+2785 3.0564287
+2801 3.0564833
+2817 3.0565374
+2833 3.0565908
+2849 3.0566437
+2865 3.0566959
+2881 3.0567476
+2897 3.0567987
+2913 3.0568492
+2929 3.0568992
+2945 3.0569487
+2961 3.0569976
+2977 3.0570460
+2993 3.0570938
+3009 3.0571412
+3025 3.0571880
+3041 3.0572344
+3057 3.0572803
+3073 3.0573257
+3089 3.0573706
+3105 3.0574151
+3121 3.0574591
+3137 3.0575026
+3153 3.0575458
+3169 3.0575885
+3185 3.0576307
+3201 3.0576725
+3217 3.0577140
+3233 3.0577550
+3249 3.0577956
+3265 3.0578358
+3281 3.0578756
+3297 3.0579150
+3313 3.0579541
+3329 3.0579927
+3345 3.0580310
+3361 3.0580690
+3377 3.0581065
+3393 3.0581438
+3409 3.0581806
+3425 3.0582172
+3441 3.0582534
+3457 3.0582892
+3473 3.0583247
+3489 3.0583599
+3505 3.0583948
+3521 3.0584294
+3537 3.0584636
+3553 3.0584976
+3569 3.0585312
+3585 3.0585645
+3601 3.0585976
+3617 3.0586303
+3633 3.0586628
+3649 3.0586949
+3665 3.0587268
+3681 3.0587584
+3697 3.0587898
+3713 3.0588208
+3729 3.0588516
+3745 3.0588822
+3761 3.0589125
+3777 3.0589425
+3793 3.0589723
+3809 3.0590018
+3825 3.0590311
+3841 3.0590601
+3857 3.0590889
+3873 3.0591174
+3889 3.0591457
+3905 3.0591738
+3921 3.0592017
+3937 3.0592293
+3953 3.0592567
+3969 3.0592839
+3985 3.0593109
+4001 3.0593376
+4017 3.0593642
+4033 3.0593905
+4049 3.0594166
+4065 3.0594425
+4081 3.0594682
+4097 3.0594937
+4113 3.0595190
+4129 3.0595442
+4145 3.0595691
+4161 3.0595938
+4177 3.0596183
+4193 3.0596427
+4209 3.0596669
+4225 3.0596908
+4241 3.0597146
+4257 3.0597383
+4273 3.0597617
+4289 3.0597850
+4305 3.0598081
+4321 3.0598310
+4337 3.0598538
+4353 3.0598764
+4369 3.0598988
+4385 3.0599210
+4401 3.0599431
+4417 3.0599651
+4433 3.0599869
+4449 3.0600085
+4465 3.0600300
+4481 3.0600513
+4497 3.0600724
+4513 3.0600935
+4529 3.0601143
+4545 3.0601350
+4561 3.0601556
+4577 3.0601761
+4593 3.0601963
+4609 3.0602165
+4625 3.0602365
+4641 3.0602564
+4657 3.0602761
+4673 3.0602957
+4689 3.0603152
+4705 3.0603345
+4721 3.0603537
+4737 3.0603728
+4753 3.0603917
+4769 3.0604105
+4785 3.0604292
+4801 3.0604478
+4817 3.0604662
+4833 3.0604845
+4849 3.0605027
+4865 3.0605208
+4881 3.0605388
+4897 3.0605566
+4913 3.0605744
+4929 3.0605920
+4945 3.0606095
+4961 3.0606268
+4977 3.0606441
+4993 3.0606613
+5009 3.0606783
+5025 3.0606953
+5041 3.0607121
+5057 3.0607289
+5073 3.0607455
+5089 3.0607620
+5105 3.0607784
+5121 3.0607947
+5137 3.0608109
+5153 3.0608271
+5169 3.0608431
+5185 3.0608590
+5201 3.0608748
+5217 3.0608905
+5233 3.0609061
+5249 3.0609217
+5265 3.0609371
+5281 3.0609524
+5297 3.0609677
+5313 3.0609828
+5329 3.0609979
+5345 3.0610129
+5361 3.0610278
+5377 3.0610426
+5393 3.0610573
+5409 3.0610719
+5425 3.0610864
+5441 3.0611009
+5457 3.0611152
+5473 3.0611295
+5489 3.0611437
+5505 3.0611578
+5521 3.0611719
+5537 3.0611858
+5553 3.0611997
+5569 3.0612135
+5585 3.0612272
+5601 3.0612408
+5617 3.0612544
+5633 3.0612679
+5649 3.0612813
+5665 3.0612946
+5681 3.0613078
+5697 3.0613210
+5713 3.0613341
+5729 3.0613471
+5745 3.0613601
+5761 3.0613730
+5777 3.0613858
+5793 3.0613985
+5809 3.0614112
+5825 3.0614238
+5841 3.0614364
+5857 3.0614488
+5873 3.0614612
+5889 3.0614736
+5905 3.0614858
+5921 3.0614980
+5937 3.0615102
+5953 3.0615222
+5969 3.0615342
+5985 3.0615462
+6001 3.0615580
+6017 3.0615699
+6033 3.0615816
+6049 3.0615933
+6065 3.0616049
+6081 3.0616165
+6097 3.0616280
+6113 3.0616394
+6129 3.0616508
+6145 3.0616621
+6161 3.0616734
+6177 3.0616846
+6193 3.0616958
+6209 3.0617068
+6225 3.0617179
+6241 3.0617289
+6257 3.0617398
+6273 3.0617506
+6289 3.0617615
+6305 3.0617722
+6321 3.0617829
+6337 3.0617936
+6353 3.0618042
+6369 3.0618147
+6385 3.0618252
+6401 3.0618356
+6417 3.0618460
+6433 3.0618563
+6449 3.0618666
+6465 3.0618768
+6481 3.0618870
+6497 3.0618972
+6513 3.0619072
+6529 3.0619173
+6545 3.0619272
+6561 3.0619372
+6577 3.0619471
+6593 3.0619569
+6609 3.0619667
+6625 3.0619764
+6641 3.0619861
+6657 3.0619958
+6673 3.0620054
+6689 3.0620149
+6705 3.0620244
+6721 3.0620339
+6737 3.0620433
+6753 3.0620527
+6769 3.0620620
+6785 3.0620713
+6801 3.0620805
+6817 3.0620897
+6833 3.0620989
+6849 3.0621080
+6865 3.0621171
+6881 3.0621261
+6897 3.0621351
+6913 3.0621440
+6929 3.0621530
+6945 3.0621618
+6961 3.0621706
+6977 3.0621794
+6993 3.0621882
+7009 3.0621969
+7025 3.0622055
+7041 3.0622141
+7057 3.0622227
+7073 3.0622313
+7089 3.0622398
+7105 3.0622482
+7121 3.0622567
+7137 3.0622651
+7153 3.0622734
+7169 3.0622817
+7185 3.0622900
+7201 3.0622983
+7217 3.0623065
+7233 3.0623146
+7249 3.0623228
+7265 3.0623309
+7281 3.0623389
+7297 3.0623470
+7313 3.0623550
+7329 3.0623629
+7345 3.0623708
+7361 3.0623787
+7377 3.0623866
+7393 3.0623944
+7409 3.0624022
+7425 3.0624099
+7441 3.0624177
+7457 3.0624253
+7473 3.0624330
+7489 3.0624406
+7505 3.0624482
+7521 3.0624558
+7537 3.0624633
+7553 3.0624708
+7569 3.0624782
+7585 3.0624857
+7601 3.0624931
+7617 3.0625004
+7633 3.0625078
+7649 3.0625151
+7665 3.0625223
+7681 3.0625296
+7697 3.0625368
+7713 3.0625440
+7729 3.0625511
+7745 3.0625583
+7761 3.0625654
+7777 3.0625724
+7793 3.0625795
+7809 3.0625865
+7825 3.0625935
+7841 3.0626004
+7857 3.0626073
+7873 3.0626142
+7889 3.0626211
+7905 3.0626279
+7921 3.0626347
+7937 3.0626415
+7953 3.0626483
+7969 3.0626550
+7985 3.0626617
+8001 3.0626684
index 3324ca2feae691fa90c8fd2a96446acf9645ea3a..3627ea02d6dba4cf196572d380554b653764b384 100644 (file)
@@ -706,7 +706,8 @@ static int ddcoord2simnodeid(const t_commrec* cr, int x, int y, int z)
         }
         else
         {
-            if (cr->dd->comm->ddRankSetup.usePmeOnlyRanks)
+            const DDRankSetup& rankSetup = cr->dd->comm->ddRankSetup;
+            if (rankSetup.rankOrder != DdRankOrder::pp_pme && rankSetup.usePmeOnlyRanks)
             {
                 nodeid = ddindex + gmx_ddcoord2pmeindex(*cr->dd, x, y, z);
             }
@@ -2249,6 +2250,7 @@ static void checkDDGridSetup(const DDGridSetup&   ddGridSetup,
 /*! \brief Set the cell size and interaction limits, as well as the DD grid */
 static DDRankSetup getDDRankSetup(const gmx::MDLogger& mdlog,
                                   int                  numNodes,
+                                  const DdRankOrder    rankOrder,
                                   const DDGridSetup&   ddGridSetup,
                                   const t_inputrec&    ir)
 {
@@ -2261,6 +2263,8 @@ static DDRankSetup getDDRankSetup(const gmx::MDLogger& mdlog,
 
     DDRankSetup ddRankSetup;
 
+    ddRankSetup.rankOrder = rankOrder;
+
     ddRankSetup.numPPRanks = numNodes - ddGridSetup.numPmeOnlyRanks;
     copy_ivec(ddGridSetup.numDomains, ddRankSetup.numPPCells);
 
@@ -2970,7 +2974,8 @@ DomainDecompositionBuilder::Impl::Impl(const MDLogger&                   mdlog,
 
     cr_->npmenodes = ddGridSetup_.numPmeOnlyRanks;
 
-    ddRankSetup_ = getDDRankSetup(mdlog_, cr_->sizeOfDefaultCommunicator, ddGridSetup_, ir_);
+    ddRankSetup_ = getDDRankSetup(
+            mdlog_, cr_->sizeOfDefaultCommunicator, options_.rankOrder, ddGridSetup_, ir_);
 
     /* Generate the group communicator, also decides the duty of each rank */
     cartSetup_ = makeGroupCommunicators(
@@ -3240,3 +3245,42 @@ void dd_init_local_state(const gmx_domdec_t& dd, const t_state* state_global, t_
     init_dfhist_state(state_local, buf[4]);
     state_local->flags = buf[0];
 }
+
+void putUpdateGroupAtomsInSamePeriodicImage(const gmx_domdec_t&      dd,
+                                            const gmx_mtop_t&        mtop,
+                                            const matrix             box,
+                                            gmx::ArrayRef<gmx::RVec> positions)
+{
+    int atomOffset = 0;
+    for (const gmx_molblock_t& molblock : mtop.molblock)
+    {
+        const auto& updateGrouping = dd.comm->systemInfo.updateGroupingsPerMoleculeType[molblock.type];
+
+        for (int mol = 0; mol < molblock.nmol; mol++)
+        {
+            for (int g = 0; g < updateGrouping.numBlocks(); g++)
+            {
+                const auto& block     = updateGrouping.block(g);
+                const int   atomBegin = atomOffset + block.begin();
+                const int   atomEnd   = atomOffset + block.end();
+                for (int a = atomBegin + 1; a < atomEnd; a++)
+                {
+                    // Make sure that atoms in the same update group
+                    // are in the same periodic image after restarts.
+                    for (int d = DIM - 1; d >= 0; d--)
+                    {
+                        while (positions[a][d] - positions[atomBegin][d] > 0.5_real * box[d][d])
+                        {
+                            positions[a] -= box[d];
+                        }
+                        while (positions[a][d] - positions[atomBegin][d] < -0.5_real * box[d][d])
+                        {
+                            positions[a] += box[d];
+                        }
+                    }
+                }
+            }
+            atomOffset += updateGrouping.fullRange().end();
+        }
+    }
+}
index 20a7c6994563644e27c5e591c342e5268681a7fb..3fa388684230a4d90ce1406f56da1b07deb66732 100644 (file)
@@ -291,4 +291,27 @@ void communicateGpuHaloCoordinates(const t_commrec&      cr,
  */
 void communicateGpuHaloForces(const t_commrec& cr, bool accumulateForces);
 
+/*! \brief Wraps the \c positions so that atoms from the same
+ * update group share the same periodic image wrt \c box.
+ *
+ * When DD and update groups are in use, the simulation master rank
+ * should call this to ensure that e.g. when restarting a simulation
+ * that did not use update groups that the coordinates satisfy the new
+ * requirements.
+ *
+ * This function can probably be removed when even single-rank
+ * simulations use domain decomposition, because then the choice of
+ * whether update groups are used is probably going to be the same
+ * regardless of the rank count.
+ *
+ * \param[in]    dd         The DD manager
+ * \param[in]    mtop       The system topology
+ * \param[in]    box        The global system box
+ * \param[in]    positions  The global system positions
+ */
+void putUpdateGroupAtomsInSamePeriodicImage(const gmx_domdec_t&      dd,
+                                            const gmx_mtop_t&        mtop,
+                                            const matrix             box,
+                                            gmx::ArrayRef<gmx::RVec> positions);
+
 #endif
index 40e67444615942618f1793650c51de821f04f3da..d82bafa79fa44fe0323352cb3d839b8fcb6cee45 100644 (file)
@@ -60,6 +60,13 @@ struct t_commrec;
 
 struct BalanceRegion;
 
+namespace gmx
+{
+enum class DdRankOrder : int;
+}
+// namespace
+
+
 //! Indices to communicate in a dimension
 struct gmx_domdec_ind_t
 {
@@ -499,6 +506,9 @@ struct DDSettings
 /*! \brief Information on how the DD ranks are set up */
 struct DDRankSetup
 {
+    /**< The rank ordering */
+    gmx::DdRankOrder rankOrder;
+
     /**< The number of particle-particle (non PME-only) ranks */
     int numPPRanks = 0;
     /**< The DD PP grid */
index 6bae98b5599a0f5af104622f6ecbe2e56368a6aa..7238fa320f9bd253ee694eddac64ea6944803329 100644 (file)
@@ -195,7 +195,7 @@ void low_ana_dih_trans(gmx_bool                bTrans,
     int (*calc_bin)(real, int, real);
     real dt;
 
-    if (1 <= nframes)
+    if (nframes <= 1)
     {
         return;
     }
index 0abd978d194e4b0f3c4d20f97105441204848110..deed54bfdf0fb50b9b931a4e6d3ff918c0994a5a 100644 (file)
@@ -748,7 +748,8 @@ static void histogramming(FILE*                   log,
                     normalize_histo(nbin, his_aa[Dih][i], (360.0 / nbin), normhisto);
                 }
 
-                residue_name = rt->nameFromResidueIndex(i).c_str();
+                std::string residueName = rt->nameFromResidueIndex(i);
+                residue_name            = residueName.c_str();
                 switch (Dih)
                 {
                     case edPhi:
@@ -1555,7 +1556,7 @@ int gmx_chi(int argc, char* argv[])
     }
 
     /* put angles in -M_PI to M_PI ! and correct phase factor for phi and psi
-     * pass nactdih instead of ndih to low_ana_dih_trans and get_chi_product_traj
+     * pass nactdih instead of ndih to low_ana_dih_trans
      * to prevent accessing off end of arrays when maxchi < 5 or 6. */
     nactdih = reset_em_all(nlist, dlist, nf, dih, maxchi);
 
@@ -1682,7 +1683,7 @@ int gmx_chi(int argc, char* argv[])
 
         get_chi_product_traj(dih,
                              nf,
-                             nactdih,
+                             nlist,
                              maxchi,
                              dlist,
                              time,
index e3eb7ff8f227766936c457fa2636eca9d310aa18..2462285bef078b77394308accdff5101000d2387 100644 (file)
@@ -1389,6 +1389,19 @@ int Mdrunner::mdrunner()
         ddBuilder.reset(nullptr);
         // Note that local state still does not exist yet.
     }
+    // Ensure that all atoms within the same update group are in the
+    // same periodic image. Otherwise, a simulation that did not use
+    // update groups (e.g. a single-rank simulation) cannot always be
+    // correctly restarted in a way that does use update groups
+    // (e.g. a multi-rank simulation).
+    if (isSimulationMasterRank)
+    {
+        const bool useUpdateGroups = cr->dd ? ddUsesUpdateGroups(*cr->dd) : false;
+        if (useUpdateGroups)
+        {
+            putUpdateGroupAtomsInSamePeriodicImage(*cr->dd, mtop, globalState->box, globalState->x);
+        }
+    }
 
     // The GPU update is decided here because we need to know whether the constraints or
     // SETTLEs can span across the domain borders (i.e. whether or not update groups are