From: Andrey Alekseenko Date: Mon, 18 Oct 2021 14:31:36 +0000 (+0200) Subject: Merge release-2021 into master X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=8073360f849809b7ce4fa5b5f14ae16209ca087f;hp=a20b5229871421b24c2a604bdd2603843f8b734f;p=alexxy%2Fgromacs.git Merge release-2021 into master Brings the following fixes from the release branch into master: - #4148 (!1941) - #4167 (!1966) - #4190 (!2050) - !2039 --- diff --git a/docs/gmxapi/userguide/install.rst b/docs/gmxapi/userguide/install.rst index f0ab2210fb..e1994e9c74 100644 --- a/docs/gmxapi/userguide/install.rst +++ b/docs/gmxapi/userguide/install.rst @@ -517,14 +517,14 @@ or Sometimes the build environment can choose a different Python interpreter than the one you intended. -You can set the ``Python3_ROOT`` or ``CMAKE_PREFIX_PATH`` CMake variable to +You can set the ``Python3_ROOT_DIR`` or ``CMAKE_PREFIX_PATH`` CMake variable to explicitly choose the Python installation or *venv* directory. If you use pyenv or pyenv-virtualenv to dynamically manage your Python version, you can help identify a particular version with ``pyenv version-name`` and the directory with ``pyenv prefix {version}``. For example:: - -DPython3_ROOT=$(pyenv prefix $(pyenv version-name)) + -DPython3_ROOT_DIR=$(pyenv prefix $(pyenv version-name)) Docker web server ----------------- diff --git a/docs/release-notes/2021/2021.4.rst b/docs/release-notes/2021/2021.4.rst index 69a9b7cabe..d162efb241 100644 --- a/docs/release-notes/2021/2021.4.rst +++ b/docs/release-notes/2021/2021.4.rst @@ -16,6 +16,27 @@ in the :ref:`release-notes`. Fixes where mdrun could behave incorrectly ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Fixed crash for large system with virtual sites +""""""""""""""""""""""""""""""""""""""""""""""" + +When large system with virtual sites were ran with domain decomposition +and OpenMP threading, mdrun would crash when the number of atoms in +a domain and its halo were more than 200000. + +:issue:`4167` + +Disabled the use of PME Mixed mode for FEP simulations +"""""""""""""""""""""""""""""""""""""""""""""""""""""" + +The use of Mixed mode PME (``-pme gpu -pmefft cpu``) led to incorrect +computation of :math:`{\frac{\partial V}{\partial {\lambda}}}` in FEP +simulations. + +Mixed mode is only used when explicitly requested by the user. + +:issue:`4190` + + Fixes for ``gmx`` tools ^^^^^^^^^^^^^^^^^^^^^^^ @@ -24,6 +45,19 @@ grompp now prints a note again when combining center of mass motion removal and :issue:`4128` +Static selections of large index groups now work +"""""""""""""""""""""""""""""""""""""""""""""""" + +Commands like ``gmx distance -f traj.xtc -n ndx.ndx -select "group +\"Contacts\""`` only worked if the size of ``Contacts`` was less than +the number of atoms. This restriction was a bug, and has been fixed so +that ``Contacts`` make take any size. + +Other similar uses of static selections derived from index groups will +also now work. + +:issue:`4148` + Fixes that affect portability ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/release-notes/2021/major/portability.rst b/docs/release-notes/2021/major/portability.rst index f688a2b01d..4c1a22e13e 100644 --- a/docs/release-notes/2021/major/portability.rst +++ b/docs/release-notes/2021/major/portability.rst @@ -12,7 +12,7 @@ CMake now detects Python using If you previously used ``PYTHON_EXECUTABLE`` to hint the location of the Python interpreter, you should instead specify the Python "root" or "prefix" path (the directory containing ``./bin/python3``) with CMake variable -``Python3_ROOT`` or ``CMAKE_PREFIX_PATH``. As other infrastructure evolves, +``Python3_ROOT_DIR`` or ``CMAKE_PREFIX_PATH``. As other infrastructure evolves, ``PYTHON_EXECUTABLE`` may cease to have the desired effect without warning. .. Note to developers! diff --git a/src/gromacs/ewald/pme.cpp b/src/gromacs/ewald/pme.cpp index 7438077d0b..e2c87459a0 100644 --- a/src/gromacs/ewald/pme.cpp +++ b/src/gromacs/ewald/pme.cpp @@ -180,6 +180,20 @@ bool pme_gpu_supports_input(const t_inputrec& ir, std::string* error) return errorReasons.isEmpty(); } +bool pme_gpu_mixed_mode_supports_input(const t_inputrec& ir, std::string* error) +{ + gmx::MessageStringCollector errorReasons; + // Before changing the prefix string, make sure that it is not searched for in regression tests. + errorReasons.startContext("PME GPU in Mixed mode does not support:"); + errorReasons.appendIf(ir.efep != FreeEnergyPerturbationType::No, "Free Energy Perturbation."); + errorReasons.finishContext(); + if (error != nullptr) + { + *error = errorReasons.toString(); + } + return errorReasons.isEmpty(); +} + /*! \brief \libinternal * Finds out if PME with given inputs is possible to run on GPU. * This function is an internal final check, validating the whole PME structure on creation, diff --git a/src/gromacs/ewald/pme.h b/src/gromacs/ewald/pme.h index 03d4da52c0..eb0c565175 100644 --- a/src/gromacs/ewald/pme.h +++ b/src/gromacs/ewald/pme.h @@ -300,6 +300,17 @@ bool pme_gpu_supports_hardware(const gmx_hw_info_t& hwinfo, std::string* error); */ bool pme_gpu_supports_input(const t_inputrec& ir, std::string* error); +/*! \brief Checks whether the input system allows to run PME on GPU in Mixed mode. + * Assumes that the input system is compatible with GPU PME otherwise, that is, + * before calling this function one should check that \ref pme_gpu_supports_input returns \c true. + * + * \param[in] ir Input system. + * \param[out] error If non-null, the error message if the input is not supported. + * + * \returns true if PME can run on GPU in Mixed mode with this input, false otherwise. + */ +bool pme_gpu_mixed_mode_supports_input(const t_inputrec& ir, std::string* error); + /*! \brief * Returns the active PME codepath (CPU, GPU, mixed). * \todo This is a rather static data that should be managed by the higher level task scheduler. diff --git a/src/gromacs/mdlib/vsite.cpp b/src/gromacs/mdlib/vsite.cpp index d030f9d4ab..c3f9edb3b2 100644 --- a/src/gromacs/mdlib/vsite.cpp +++ b/src/gromacs/mdlib/vsite.cpp @@ -2760,7 +2760,16 @@ static void assignVsitesToThread(VsiteThread* tData, "a constructing atom that does not belong to our task, such " "vsites should be assigned to the single 'master' task"); - task = nthread + thread; + if (tData->useInterdependentTask) + { + // Assign to the interdependent task + task = nthread + thread; + } + else + { + // Assign to the separate, non-parallel task + task = 2 * nthread; + } } } } @@ -3000,12 +3009,13 @@ void ThreadingInfo::setVirtualSites(ArrayRef ilists, } /* To avoid large f_buf allocations of #threads*vsite_atom_range - * we don't use task2 with more than 200000 atoms. This doesn't - * affect performance, since with such a large range relatively few - * vsites will end up in the separate task. - * Note that useTask2 should be the same for all threads. + * we don't use the interdependent tasks with more than 200000 atoms. + * This doesn't affect performance, since with such a large range + * relatively few vsites will end up in the separate task. + * Note that useInterdependentTask should be the same for all threads. */ - tData.useInterdependentTask = (vsite_atom_range <= 200000); + const int c_maxNumLocalAtomsForInterdependentTask = 200000; + tData.useInterdependentTask = (vsite_atom_range <= c_maxNumLocalAtomsForInterdependentTask); if (tData.useInterdependentTask) { size_t natoms_use_in_vsites = vsite_atom_range; diff --git a/src/gromacs/mdrun/runner.cpp b/src/gromacs/mdrun/runner.cpp index 3bf1d5071c..887e7ba709 100644 --- a/src/gromacs/mdrun/runner.cpp +++ b/src/gromacs/mdrun/runner.cpp @@ -907,6 +907,7 @@ int Mdrunner::mdrunner() hw_opt.nthreads_tmpi); useGpuForPme = decideWhetherToUseGpusForPmeWithThreadMpi(useGpuForNonbonded, pmeTarget, + pmeFftTarget, numAvailableDevices, userGpuTaskAssignment, *hwinfo_, @@ -1012,6 +1013,7 @@ int Mdrunner::mdrunner() gpusWereDetected); useGpuForPme = decideWhetherToUseGpusForPme(useGpuForNonbonded, pmeTarget, + pmeFftTarget, userGpuTaskAssignment, *hwinfo_, *inputrec, diff --git a/src/gromacs/selection/evaluate.cpp b/src/gromacs/selection/evaluate.cpp index 23781cee8c..079f906cb9 100644 --- a/src/gromacs/selection/evaluate.cpp +++ b/src/gromacs/selection/evaluate.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 2009,2010,2011,2012,2013 by the GROMACS development team. * Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,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. @@ -522,6 +522,7 @@ void _gmx_sel_evaluate_static(gmx_sel_evaluate_t* /* data */, { if (sel->flags & SEL_UNSORTED) { + gmx_ana_index_reserve(sel->v.u.g, sel->u.cgrp.isize); // This only works if g contains all the atoms, but that is currently // the only supported case. gmx_ana_index_copy(sel->v.u.g, &sel->u.cgrp, false); diff --git a/src/gromacs/taskassignment/decidegpuusage.cpp b/src/gromacs/taskassignment/decidegpuusage.cpp index 36c4650f06..62010fe269 100644 --- a/src/gromacs/taskassignment/decidegpuusage.cpp +++ b/src/gromacs/taskassignment/decidegpuusage.cpp @@ -157,6 +157,7 @@ bool decideWhetherToUseGpusForNonbondedWithThreadMpi(const TaskTarget non bool decideWhetherToUseGpusForPmeWithThreadMpi(const bool useGpuForNonbonded, const TaskTarget pmeTarget, + const TaskTarget pmeFftTarget, const int numDevicesToUse, const std::vector& userGpuTaskAssignment, const gmx_hw_info_t& hardwareInfo, @@ -168,8 +169,15 @@ bool decideWhetherToUseGpusForPmeWithThreadMpi(const bool useGpuFor if ((pmeTarget == TaskTarget::Cpu) || !useGpuForNonbonded || !pme_gpu_supports_build(nullptr) || !pme_gpu_supports_hardware(hardwareInfo, nullptr) || !pme_gpu_supports_input(inputrec, nullptr)) { - // PME can't run on a GPU. If the user required that, we issue - // an error later. + // PME can't run on a GPU. If the user required that, we issue an error later. + return false; + } + + if (pmeFftTarget == TaskTarget::Cpu && !pme_gpu_mixed_mode_supports_input(inputrec, nullptr)) + { + /* User requested PME FFT on CPU, but the current system is not compatible with Mixed mode, + * so we don't use GPUs at all. + * If the user had -pme gpu, we issue an error later. */ return false; } @@ -330,6 +338,7 @@ bool decideWhetherToUseGpusForNonbonded(const TaskTarget nonbondedTarge bool decideWhetherToUseGpusForPme(const bool useGpuForNonbonded, const TaskTarget pmeTarget, + const TaskTarget pmeFftTarget, const std::vector& userGpuTaskAssignment, const gmx_hw_info_t& hardwareInfo, const t_inputrec& inputrec, @@ -377,6 +386,16 @@ bool decideWhetherToUseGpusForPme(const bool useGpuForNonbonded, } return false; } + if (pmeFftTarget == TaskTarget::Cpu && !pme_gpu_mixed_mode_supports_input(inputrec, &message)) + { + /* User requested PME FFT on CPU, but the current system is not compatible with Mixed mode, + * so we don't use GPUs at all. */ + if (pmeTarget == TaskTarget::Gpu) + { + GMX_THROW(NotImplementedError("Cannot compute PME interactions in Mixed mode, because " + message)); + } + return false; + } if (pmeTarget == TaskTarget::Cpu) { diff --git a/src/gromacs/taskassignment/decidegpuusage.h b/src/gromacs/taskassignment/decidegpuusage.h index 3404bebb6a..76b6f40042 100644 --- a/src/gromacs/taskassignment/decidegpuusage.h +++ b/src/gromacs/taskassignment/decidegpuusage.h @@ -137,6 +137,7 @@ bool decideWhetherToUseGpusForNonbondedWithThreadMpi(TaskTarget non * \param[in] useGpuForNonbonded Whether GPUs will be used for nonbonded interactions. * \param[in] pmeTarget The user's choice for mdrun -pme for where to assign * long-ranged PME nonbonded interaction tasks. + * \param[in] pmeFftTarget The user's choice for mdrun -pmefft for where to run FFT. * \param[in] numDevicesToUse The number of compatible GPUs that the user permitted us to use. * \param[in] userGpuTaskAssignment The user-specified assignment of GPU tasks to device IDs. * \param[in] hardwareInfo Hardware information @@ -150,6 +151,7 @@ bool decideWhetherToUseGpusForNonbondedWithThreadMpi(TaskTarget non * InconsistentInputError If the user requirements are inconsistent. */ bool decideWhetherToUseGpusForPmeWithThreadMpi(bool useGpuForNonbonded, TaskTarget pmeTarget, + TaskTarget pmeFftTarget, int numDevicesToUse, const std::vector& userGpuTaskAssignment, const gmx_hw_info_t& hardwareInfo, @@ -209,6 +211,7 @@ bool decideWhetherToUseGpusForNonbonded(TaskTarget nonbondedTarget, * * \param[in] useGpuForNonbonded Whether GPUs will be used for nonbonded interactions. * \param[in] pmeTarget The user's choice for mdrun -pme for where to assign long-ranged PME nonbonded interaction tasks. + * \param[in] pmeFftTarget The user's choice for mdrun -pmefft for where to do FFT for PME. * \param[in] userGpuTaskAssignment The user-specified assignment of GPU tasks to device IDs. * \param[in] hardwareInfo Hardware information * \param[in] inputrec The user input @@ -222,6 +225,7 @@ bool decideWhetherToUseGpusForNonbonded(TaskTarget nonbondedTarget, * InconsistentInputError If the user requirements are inconsistent. */ bool decideWhetherToUseGpusForPme(bool useGpuForNonbonded, TaskTarget pmeTarget, + TaskTarget pmeFftTarget, const std::vector& userGpuTaskAssignment, const gmx_hw_info_t& hardwareInfo, const t_inputrec& inputrec, diff --git a/src/gromacs/trajectoryanalysis/tests/distance.cpp b/src/gromacs/trajectoryanalysis/tests/distance.cpp index 49b0f8cb63..95706b6426 100644 --- a/src/gromacs/trajectoryanalysis/tests/distance.cpp +++ b/src/gromacs/trajectoryanalysis/tests/distance.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,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. @@ -90,4 +90,20 @@ TEST_F(DistanceModuleTest, HandlesDynamicSelections) runTest(CommandLine(cmdline)); } +TEST_F(DistanceModuleTest, HandlesSelectionFromGroup) +{ + const char* const cmdline[] = { "distance", "-select", "group \"Contacts\"" }; + setInputFile("-n", "simple.ndx"); + setTopology("simple.gro"); + runTest(CommandLine(cmdline)); +} + +TEST_F(DistanceModuleTest, HandlesSelectionFromLargeGroup) +{ + const char* const cmdline[] = { "distance", "-select", "group \"ManyContacts\"" }; + setInputFile("-n", "simple.ndx"); + setTopology("simple.gro"); + runTest(CommandLine(cmdline)); +} + } // namespace diff --git a/src/gromacs/trajectoryanalysis/tests/refdata/DistanceModuleTest_HandlesSelectionFromGroup.xml b/src/gromacs/trajectoryanalysis/tests/refdata/DistanceModuleTest_HandlesSelectionFromGroup.xml new file mode 100644 index 0000000000..73018700e8 --- /dev/null +++ b/src/gromacs/trajectoryanalysis/tests/refdata/DistanceModuleTest_HandlesSelectionFromGroup.xml @@ -0,0 +1,2094 @@ + + + + distance -select 'group "Contacts"' + + + + 0 + + 1 + + 1 + 0 + + + + + 1 + + 1 + + 1 + 0 + + + + + + + 0 + + 1 + + 1 + + + + + + + 0 + + 2 + + 1 + + + 1 + + + + + + + 0.00050000000000000001 + + 1 + + 0 + 0 + + + + + 0.0015 + + 1 + + 0 + 0 + + + + + 0.0025000000000000001 + + 1 + + 0 + 0 + + + + + 0.0035000000000000001 + + 1 + + 0 + 0 + + + + + 0.0045000000000000005 + + 1 + + 0 + 0 + + + + + 0.0054999999999999997 + + 1 + + 0 + 0 + + + + + 0.0065000000000000006 + + 1 + + 0 + 0 + + + + + 0.0074999999999999997 + + 1 + + 0 + 0 + + + + + 0.0085000000000000006 + + 1 + + 0 + 0 + + + + + 0.0095000000000000015 + + 1 + + 0 + 0 + + + + + 0.010500000000000001 + + 1 + + 0 + 0 + + + + + 0.0115 + + 1 + + 0 + 0 + + + + + 0.012500000000000001 + + 1 + + 0 + 0 + + + + + 0.013500000000000002 + + 1 + + 0 + 0 + + + + + 0.014500000000000001 + + 1 + + 0 + 0 + + + + + 0.0155 + + 1 + + 0 + 0 + + + + + 0.016500000000000001 + + 1 + + 0 + 0 + + + + + 0.017500000000000002 + + 1 + + 0 + 0 + + + + + 0.018500000000000003 + + 1 + + 0 + 0 + + + + + 0.0195 + + 1 + + 0 + 0 + + + + + 0.020500000000000001 + + 1 + + 0 + 0 + + + + + 0.021500000000000002 + + 1 + + 0 + 0 + + + + + 0.022499999999999999 + + 1 + + 0 + 0 + + + + + 0.0235 + + 1 + + 0 + 0 + + + + + 0.024500000000000001 + + 1 + + 0 + 0 + + + + + 0.025500000000000002 + + 1 + + 0 + 0 + + + + + 0.026500000000000003 + + 1 + + 0 + 0 + + + + + 0.0275 + + 1 + + 0 + 0 + + + + + 0.028500000000000001 + + 1 + + 0 + 0 + + + + + 0.029500000000000002 + + 1 + + 0 + 0 + + + + + 0.030499999999999999 + + 1 + + 0 + 0 + + + + + 0.0315 + + 1 + + 0 + 0 + + + + + 0.032500000000000001 + + 1 + + 0 + 0 + + + + + 0.033500000000000002 + + 1 + + 0 + 0 + + + + + 0.034500000000000003 + + 1 + + 0 + 0 + + + + + 0.035500000000000004 + + 1 + + 0 + 0 + + + + + 0.036500000000000005 + + 1 + + 0 + 0 + + + + + 0.037499999999999999 + + 1 + + 0 + 0 + + + + + 0.0385 + + 1 + + 0 + 0 + + + + + 0.0395 + + 1 + + 0 + 0 + + + + + 0.040500000000000001 + + 1 + + 0 + 0 + + + + + 0.041500000000000002 + + 1 + + 0 + 0 + + + + + 0.042500000000000003 + + 1 + + 0 + 0 + + + + + 0.043500000000000004 + + 1 + + 0 + 0 + + + + + 0.044499999999999998 + + 1 + + 0 + 0 + + + + + 0.045499999999999999 + + 1 + + 0 + 0 + + + + + 0.0465 + + 1 + + 0 + 0 + + + + + 0.047500000000000001 + + 1 + + 0 + 0 + + + + + 0.048500000000000001 + + 1 + + 0 + 0 + + + + + 0.049500000000000002 + + 1 + + 0 + 0 + + + + + 0.050500000000000003 + + 1 + + 0 + 0 + + + + + 0.051500000000000004 + + 1 + + 0 + 0 + + + + + 0.052500000000000005 + + 1 + + 0 + 0 + + + + + 0.053499999999999999 + + 1 + + 0 + 0 + + + + + 0.0545 + + 1 + + 0 + 0 + + + + + 0.055500000000000001 + + 1 + + 0 + 0 + + + + + 0.056500000000000002 + + 1 + + 0 + 0 + + + + + 0.057500000000000002 + + 1 + + 0 + 0 + + + + + 0.058500000000000003 + + 1 + + 0 + 0 + + + + + 0.059500000000000004 + + 1 + + 0 + 0 + + + + + 0.060499999999999998 + + 1 + + 0 + 0 + + + + + 0.061499999999999999 + + 1 + + 0 + 0 + + + + + 0.0625 + + 1 + + 0 + 0 + + + + + 0.063500000000000001 + + 1 + + 0 + 0 + + + + + 0.064500000000000002 + + 1 + + 0 + 0 + + + + + 0.065500000000000003 + + 1 + + 0 + 0 + + + + + 0.066500000000000004 + + 1 + + 0 + 0 + + + + + 0.067500000000000004 + + 1 + + 0 + 0 + + + + + 0.068500000000000005 + + 1 + + 0 + 0 + + + + + 0.069500000000000006 + + 1 + + 0 + 0 + + + + + 0.070500000000000007 + + 1 + + 0 + 0 + + + + + 0.071500000000000008 + + 1 + + 0 + 0 + + + + + 0.072500000000000009 + + 1 + + 0 + 0 + + + + + 0.073499999999999996 + + 1 + + 0 + 0 + + + + + 0.074499999999999997 + + 1 + + 0 + 0 + + + + + 0.075499999999999998 + + 1 + + 0 + 0 + + + + + 0.076499999999999999 + + 1 + + 0 + 0 + + + + + 0.077499999999999999 + + 1 + + 0 + 0 + + + + + 0.0785 + + 1 + + 0 + 0 + + + + + 0.079500000000000001 + + 1 + + 0 + 0 + + + + + 0.080500000000000002 + + 1 + + 0 + 0 + + + + + 0.081500000000000003 + + 1 + + 0 + 0 + + + + + 0.082500000000000004 + + 1 + + 0 + 0 + + + + + 0.083500000000000005 + + 1 + + 0 + 0 + + + + + 0.084500000000000006 + + 1 + + 0 + 0 + + + + + 0.085500000000000007 + + 1 + + 0 + 0 + + + + + 0.086500000000000007 + + 1 + + 0 + 0 + + + + + 0.087500000000000008 + + 1 + + 0 + 0 + + + + + 0.088499999999999995 + + 1 + + 0 + 0 + + + + + 0.089499999999999996 + + 1 + + 0 + 0 + + + + + 0.090499999999999997 + + 1 + + 0 + 0 + + + + + 0.091499999999999998 + + 1 + + 0 + 0 + + + + + 0.092499999999999999 + + 1 + + 0 + 0 + + + + + 0.0935 + + 1 + + 0 + 0 + + + + + 0.094500000000000001 + + 1 + + 0 + 0 + + + + + 0.095500000000000002 + + 1 + + 0 + 0 + + + + + 0.096500000000000002 + + 1 + + 0 + 0 + + + + + 0.097500000000000003 + + 1 + + 0 + 0 + + + + + 0.098500000000000004 + + 1 + + 0 + 0 + + + + + 0.099500000000000005 + + 1 + + 0 + 0 + + + + + 0.10050000000000001 + + 1 + + 0 + 0 + + + + + 0.10150000000000001 + + 1 + + 0 + 0 + + + + + 0.10250000000000001 + + 1 + + 0 + 0 + + + + + 0.10350000000000001 + + 1 + + 0 + 0 + + + + + 0.10450000000000001 + + 1 + + 0 + 0 + + + + + 0.1055 + + 1 + + 0 + 0 + + + + + 0.1065 + + 1 + + 0 + 0 + + + + + 0.1075 + + 1 + + 0 + 0 + + + + + 0.1085 + + 1 + + 0 + 0 + + + + + 0.1095 + + 1 + + 0 + 0 + + + + + 0.1105 + + 1 + + 0 + 0 + + + + + 0.1115 + + 1 + + 0 + 0 + + + + + 0.1125 + + 1 + + 0 + 0 + + + + + 0.1135 + + 1 + + 0 + 0 + + + + + 0.1145 + + 1 + + 0 + 0 + + + + + 0.11550000000000001 + + 1 + + 0 + 0 + + + + + 0.11650000000000001 + + 1 + + 0 + 0 + + + + + 0.11750000000000001 + + 1 + + 0 + 0 + + + + + 0.11850000000000001 + + 1 + + 0 + 0 + + + + + 0.11950000000000001 + + 1 + + 0 + 0 + + + + + 0.1205 + + 1 + + 0 + 0 + + + + + 0.1215 + + 1 + + 0 + 0 + + + + + 0.1225 + + 1 + + 0 + 0 + + + + + 0.1235 + + 1 + + 0 + 0 + + + + + 0.1245 + + 1 + + 0 + 0 + + + + + 0.1255 + + 1 + + 0 + 0 + + + + + 0.1265 + + 1 + + 0 + 0 + + + + + 0.1275 + + 1 + + 0 + 0 + + + + + 0.1285 + + 1 + + 0 + 0 + + + + + 0.1295 + + 1 + + 0 + 0 + + + + + 0.1305 + + 1 + + 0 + 0 + + + + + 0.13150000000000001 + + 1 + + 0 + 0 + + + + + 0.13250000000000001 + + 1 + + 0 + 0 + + + + + 0.13350000000000001 + + 1 + + 0 + 0 + + + + + 0.13450000000000001 + + 1 + + 0 + 0 + + + + + 0.13550000000000001 + + 1 + + 0 + 0 + + + + + 0.13650000000000001 + + 1 + + 0 + 0 + + + + + 0.13750000000000001 + + 1 + + 0 + 0 + + + + + 0.13850000000000001 + + 1 + + 0 + 0 + + + + + 0.13950000000000001 + + 1 + + 0 + 0 + + + + + 0.14050000000000001 + + 1 + + 0 + 0 + + + + + 0.14150000000000001 + + 1 + + 0 + 0 + + + + + 0.14250000000000002 + + 1 + + 0 + 0 + + + + + 0.14350000000000002 + + 1 + + 0 + 0 + + + + + 0.14450000000000002 + + 1 + + 0 + 0 + + + + + 0.14549999999999999 + + 1 + + 0 + 0 + + + + + 0.14649999999999999 + + 1 + + 0 + 0 + + + + + 0.14749999999999999 + + 1 + + 0 + 0 + + + + + 0.14849999999999999 + + 1 + + 0 + 0 + + + + + 0.14949999999999999 + + 1 + + 0 + 0 + + + + + 0.15049999999999999 + + 1 + + 0 + 0 + + + + + 0.1515 + + 1 + + 0 + 0 + + + + + 0.1525 + + 1 + + 0 + 0 + + + + + 0.1535 + + 1 + + 0 + 0 + + + + + 0.1545 + + 1 + + 0 + 0 + + + + + 0.1555 + + 1 + + 0 + 0 + + + + + 0.1565 + + 1 + + 0 + 0 + + + + + 0.1575 + + 1 + + 0 + 0 + + + + + 0.1585 + + 1 + + 0 + 0 + + + + + 0.1595 + + 1 + + 0 + 0 + + + + + 0.1605 + + 1 + + 0 + 0 + + + + + 0.1615 + + 1 + + 0 + 0 + + + + + 0.16250000000000001 + + 1 + + 0 + 0 + + + + + 0.16350000000000001 + + 1 + + 0 + 0 + + + + + 0.16450000000000001 + + 1 + + 0 + 0 + + + + + 0.16550000000000001 + + 1 + + 0 + 0 + + + + + 0.16650000000000001 + + 1 + + 0 + 0 + + + + + 0.16750000000000001 + + 1 + + 0 + 0 + + + + + 0.16850000000000001 + + 1 + + 0 + 0 + + + + + 0.16950000000000001 + + 1 + + 0 + 0 + + + + + 0.17050000000000001 + + 1 + + 0 + 0 + + + + + 0.17150000000000001 + + 1 + + 0 + 0 + + + + + 0.17250000000000001 + + 1 + + 0 + 0 + + + + + 0.17350000000000002 + + 1 + + 0 + 0 + + + + + 0.17450000000000002 + + 1 + + 0 + 0 + + + + + 0.17550000000000002 + + 1 + + 0 + 0 + + + + + 0.17649999999999999 + + 1 + + 0 + 0 + + + + + 0.17749999999999999 + + 1 + + 0 + 0 + + + + + 0.17849999999999999 + + 1 + + 0 + 0 + + + + + 0.17949999999999999 + + 1 + + 0 + 0 + + + + + 0.18049999999999999 + + 1 + + 0 + 0 + + + + + 0.18149999999999999 + + 1 + + 0 + 0 + + + + + 0.1825 + + 1 + + 0 + 0 + + + + + 0.1835 + + 1 + + 0 + 0 + + + + + 0.1845 + + 1 + + 0 + 0 + + + + + 0.1855 + + 1 + + 0 + 0 + + + + + 0.1865 + + 1 + + 0 + 0 + + + + + 0.1875 + + 1 + + 0 + 0 + + + + + 0.1885 + + 1 + + 0 + 0 + + + + + 0.1895 + + 1 + + 0 + 0 + + + + + 0.1905 + + 1 + + 0 + 0 + + + + + 0.1915 + + 1 + + 0 + 0 + + + + + 0.1925 + + 1 + + 0 + 0 + + + + + 0.19350000000000001 + + 1 + + 0 + 0 + + + + + 0.19450000000000001 + + 1 + + 0 + 0 + + + + + 0.19550000000000001 + + 1 + + 0 + 0 + + + + + 0.19650000000000001 + + 1 + + 0 + 0 + + + + + 0.19750000000000001 + + 1 + + 0 + 0 + + + + + 0.19850000000000001 + + 1 + + 0 + 0 + + + + + 0.19950000000000001 + + 1 + + 1000 + 0 + + + + + + + 0 + + 1 + + 1 + 0 + + + + + + + 0 + + 6 + + 0 + + + 1 + + + 0 + + + 0 + + + 1 + + + 0 + + + + + + diff --git a/src/gromacs/trajectoryanalysis/tests/refdata/DistanceModuleTest_HandlesSelectionFromLargeGroup.xml b/src/gromacs/trajectoryanalysis/tests/refdata/DistanceModuleTest_HandlesSelectionFromLargeGroup.xml new file mode 100644 index 0000000000..01ed5a171b --- /dev/null +++ b/src/gromacs/trajectoryanalysis/tests/refdata/DistanceModuleTest_HandlesSelectionFromLargeGroup.xml @@ -0,0 +1,2270 @@ + + + + distance -select 'group "ManyContacts"' + + + + 0 + + 1 + + 1 + 0 + + + + + 1 + + 1 + + 1.4142135623730951 + 0 + + + + + 2 + + 1 + + 3.1622776601683795 + 0 + + + + + 3 + + 1 + + 2.2360679774997898 + 0 + + + + + 4 + + 1 + + 2.8284271247461903 + 0 + + + + + 5 + + 1 + + 2 + 0 + + + + + 6 + + 1 + + 1 + 0 + + + + + 7 + + 1 + + 1 + 0 + + + + + 8 + + 1 + + 1.4142135623730951 + 0 + + + + + 9 + + 1 + + 2.2360679774997898 + 0 + + + + + + + 0 + + 1 + + 1.8291267864660339 + + + + + + + 0 + + 10 + + 1 + + + 1.4142135623730951 + + + 3.1622776601683795 + + + 2.2360679774997898 + + + 2.8284271247461903 + + + 2 + + + 1 + + + 1 + + + 1.4142135623730951 + + + 2.2360679774997898 + + + + + + + 0.00050000000000000001 + + 1 + + 0 + 0 + + + + + 0.0015 + + 1 + + 0 + 0 + + + + + 0.0025000000000000001 + + 1 + + 0 + 0 + + + + + 0.0035000000000000001 + + 1 + + 0 + 0 + + + + + 0.0045000000000000005 + + 1 + + 0 + 0 + + + + + 0.0054999999999999997 + + 1 + + 0 + 0 + + + + + 0.0065000000000000006 + + 1 + + 0 + 0 + + + + + 0.0074999999999999997 + + 1 + + 0 + 0 + + + + + 0.0085000000000000006 + + 1 + + 0 + 0 + + + + + 0.0095000000000000015 + + 1 + + 0 + 0 + + + + + 0.010500000000000001 + + 1 + + 0 + 0 + + + + + 0.0115 + + 1 + + 0 + 0 + + + + + 0.012500000000000001 + + 1 + + 0 + 0 + + + + + 0.013500000000000002 + + 1 + + 0 + 0 + + + + + 0.014500000000000001 + + 1 + + 0 + 0 + + + + + 0.0155 + + 1 + + 0 + 0 + + + + + 0.016500000000000001 + + 1 + + 0 + 0 + + + + + 0.017500000000000002 + + 1 + + 0 + 0 + + + + + 0.018500000000000003 + + 1 + + 0 + 0 + + + + + 0.0195 + + 1 + + 0 + 0 + + + + + 0.020500000000000001 + + 1 + + 0 + 0 + + + + + 0.021500000000000002 + + 1 + + 0 + 0 + + + + + 0.022499999999999999 + + 1 + + 0 + 0 + + + + + 0.0235 + + 1 + + 0 + 0 + + + + + 0.024500000000000001 + + 1 + + 0 + 0 + + + + + 0.025500000000000002 + + 1 + + 0 + 0 + + + + + 0.026500000000000003 + + 1 + + 0 + 0 + + + + + 0.0275 + + 1 + + 0 + 0 + + + + + 0.028500000000000001 + + 1 + + 0 + 0 + + + + + 0.029500000000000002 + + 1 + + 0 + 0 + + + + + 0.030499999999999999 + + 1 + + 0 + 0 + + + + + 0.0315 + + 1 + + 0 + 0 + + + + + 0.032500000000000001 + + 1 + + 0 + 0 + + + + + 0.033500000000000002 + + 1 + + 0 + 0 + + + + + 0.034500000000000003 + + 1 + + 0 + 0 + + + + + 0.035500000000000004 + + 1 + + 0 + 0 + + + + + 0.036500000000000005 + + 1 + + 0 + 0 + + + + + 0.037499999999999999 + + 1 + + 0 + 0 + + + + + 0.0385 + + 1 + + 0 + 0 + + + + + 0.0395 + + 1 + + 0 + 0 + + + + + 0.040500000000000001 + + 1 + + 0 + 0 + + + + + 0.041500000000000002 + + 1 + + 0 + 0 + + + + + 0.042500000000000003 + + 1 + + 0 + 0 + + + + + 0.043500000000000004 + + 1 + + 0 + 0 + + + + + 0.044499999999999998 + + 1 + + 0 + 0 + + + + + 0.045499999999999999 + + 1 + + 0 + 0 + + + + + 0.0465 + + 1 + + 0 + 0 + + + + + 0.047500000000000001 + + 1 + + 0 + 0 + + + + + 0.048500000000000001 + + 1 + + 0 + 0 + + + + + 0.049500000000000002 + + 1 + + 0 + 0 + + + + + 0.050500000000000003 + + 1 + + 0 + 0 + + + + + 0.051500000000000004 + + 1 + + 0 + 0 + + + + + 0.052500000000000005 + + 1 + + 0 + 0 + + + + + 0.053499999999999999 + + 1 + + 0 + 0 + + + + + 0.0545 + + 1 + + 0 + 0 + + + + + 0.055500000000000001 + + 1 + + 0 + 0 + + + + + 0.056500000000000002 + + 1 + + 0 + 0 + + + + + 0.057500000000000002 + + 1 + + 0 + 0 + + + + + 0.058500000000000003 + + 1 + + 0 + 0 + + + + + 0.059500000000000004 + + 1 + + 0 + 0 + + + + + 0.060499999999999998 + + 1 + + 0 + 0 + + + + + 0.061499999999999999 + + 1 + + 0 + 0 + + + + + 0.0625 + + 1 + + 0 + 0 + + + + + 0.063500000000000001 + + 1 + + 0 + 0 + + + + + 0.064500000000000002 + + 1 + + 0 + 0 + + + + + 0.065500000000000003 + + 1 + + 0 + 0 + + + + + 0.066500000000000004 + + 1 + + 0 + 0 + + + + + 0.067500000000000004 + + 1 + + 0 + 0 + + + + + 0.068500000000000005 + + 1 + + 0 + 0 + + + + + 0.069500000000000006 + + 1 + + 0 + 0 + + + + + 0.070500000000000007 + + 1 + + 0 + 0 + + + + + 0.071500000000000008 + + 1 + + 0 + 0 + + + + + 0.072500000000000009 + + 1 + + 0 + 0 + + + + + 0.073499999999999996 + + 1 + + 0 + 0 + + + + + 0.074499999999999997 + + 1 + + 0 + 0 + + + + + 0.075499999999999998 + + 1 + + 0 + 0 + + + + + 0.076499999999999999 + + 1 + + 0 + 0 + + + + + 0.077499999999999999 + + 1 + + 0 + 0 + + + + + 0.0785 + + 1 + + 0 + 0 + + + + + 0.079500000000000001 + + 1 + + 0 + 0 + + + + + 0.080500000000000002 + + 1 + + 0 + 0 + + + + + 0.081500000000000003 + + 1 + + 0 + 0 + + + + + 0.082500000000000004 + + 1 + + 0 + 0 + + + + + 0.083500000000000005 + + 1 + + 0 + 0 + + + + + 0.084500000000000006 + + 1 + + 0 + 0 + + + + + 0.085500000000000007 + + 1 + + 0 + 0 + + + + + 0.086500000000000007 + + 1 + + 0 + 0 + + + + + 0.087500000000000008 + + 1 + + 0 + 0 + + + + + 0.088499999999999995 + + 1 + + 0 + 0 + + + + + 0.089499999999999996 + + 1 + + 0 + 0 + + + + + 0.090499999999999997 + + 1 + + 0 + 0 + + + + + 0.091499999999999998 + + 1 + + 0 + 0 + + + + + 0.092499999999999999 + + 1 + + 0 + 0 + + + + + 0.0935 + + 1 + + 0 + 0 + + + + + 0.094500000000000001 + + 1 + + 0 + 0 + + + + + 0.095500000000000002 + + 1 + + 0 + 0 + + + + + 0.096500000000000002 + + 1 + + 0 + 0 + + + + + 0.097500000000000003 + + 1 + + 0 + 0 + + + + + 0.098500000000000004 + + 1 + + 0 + 0 + + + + + 0.099500000000000005 + + 1 + + 0 + 0 + + + + + 0.10050000000000001 + + 1 + + 0 + 0 + + + + + 0.10150000000000001 + + 1 + + 0 + 0 + + + + + 0.10250000000000001 + + 1 + + 0 + 0 + + + + + 0.10350000000000001 + + 1 + + 0 + 0 + + + + + 0.10450000000000001 + + 1 + + 0 + 0 + + + + + 0.1055 + + 1 + + 0 + 0 + + + + + 0.1065 + + 1 + + 0 + 0 + + + + + 0.1075 + + 1 + + 0 + 0 + + + + + 0.1085 + + 1 + + 0 + 0 + + + + + 0.1095 + + 1 + + 0 + 0 + + + + + 0.1105 + + 1 + + 0 + 0 + + + + + 0.1115 + + 1 + + 0 + 0 + + + + + 0.1125 + + 1 + + 0 + 0 + + + + + 0.1135 + + 1 + + 0 + 0 + + + + + 0.1145 + + 1 + + 0 + 0 + + + + + 0.11550000000000001 + + 1 + + 0 + 0 + + + + + 0.11650000000000001 + + 1 + + 0 + 0 + + + + + 0.11750000000000001 + + 1 + + 0 + 0 + + + + + 0.11850000000000001 + + 1 + + 0 + 0 + + + + + 0.11950000000000001 + + 1 + + 0 + 0 + + + + + 0.1205 + + 1 + + 0 + 0 + + + + + 0.1215 + + 1 + + 0 + 0 + + + + + 0.1225 + + 1 + + 0 + 0 + + + + + 0.1235 + + 1 + + 0 + 0 + + + + + 0.1245 + + 1 + + 0 + 0 + + + + + 0.1255 + + 1 + + 0 + 0 + + + + + 0.1265 + + 1 + + 0 + 0 + + + + + 0.1275 + + 1 + + 0 + 0 + + + + + 0.1285 + + 1 + + 0 + 0 + + + + + 0.1295 + + 1 + + 0 + 0 + + + + + 0.1305 + + 1 + + 0 + 0 + + + + + 0.13150000000000001 + + 1 + + 0 + 0 + + + + + 0.13250000000000001 + + 1 + + 0 + 0 + + + + + 0.13350000000000001 + + 1 + + 0 + 0 + + + + + 0.13450000000000001 + + 1 + + 0 + 0 + + + + + 0.13550000000000001 + + 1 + + 0 + 0 + + + + + 0.13650000000000001 + + 1 + + 0 + 0 + + + + + 0.13750000000000001 + + 1 + + 0 + 0 + + + + + 0.13850000000000001 + + 1 + + 0 + 0 + + + + + 0.13950000000000001 + + 1 + + 0 + 0 + + + + + 0.14050000000000001 + + 1 + + 0 + 0 + + + + + 0.14150000000000001 + + 1 + + 0 + 0 + + + + + 0.14250000000000002 + + 1 + + 0 + 0 + + + + + 0.14350000000000002 + + 1 + + 0 + 0 + + + + + 0.14450000000000002 + + 1 + + 0 + 0 + + + + + 0.14549999999999999 + + 1 + + 0 + 0 + + + + + 0.14649999999999999 + + 1 + + 0 + 0 + + + + + 0.14749999999999999 + + 1 + + 0 + 0 + + + + + 0.14849999999999999 + + 1 + + 0 + 0 + + + + + 0.14949999999999999 + + 1 + + 0 + 0 + + + + + 0.15049999999999999 + + 1 + + 0 + 0 + + + + + 0.1515 + + 1 + + 0 + 0 + + + + + 0.1525 + + 1 + + 0 + 0 + + + + + 0.1535 + + 1 + + 0 + 0 + + + + + 0.1545 + + 1 + + 0 + 0 + + + + + 0.1555 + + 1 + + 0 + 0 + + + + + 0.1565 + + 1 + + 0 + 0 + + + + + 0.1575 + + 1 + + 0 + 0 + + + + + 0.1585 + + 1 + + 0 + 0 + + + + + 0.1595 + + 1 + + 0 + 0 + + + + + 0.1605 + + 1 + + 0 + 0 + + + + + 0.1615 + + 1 + + 0 + 0 + + + + + 0.16250000000000001 + + 1 + + 0 + 0 + + + + + 0.16350000000000001 + + 1 + + 0 + 0 + + + + + 0.16450000000000001 + + 1 + + 0 + 0 + + + + + 0.16550000000000001 + + 1 + + 0 + 0 + + + + + 0.16650000000000001 + + 1 + + 0 + 0 + + + + + 0.16750000000000001 + + 1 + + 0 + 0 + + + + + 0.16850000000000001 + + 1 + + 0 + 0 + + + + + 0.16950000000000001 + + 1 + + 0 + 0 + + + + + 0.17050000000000001 + + 1 + + 0 + 0 + + + + + 0.17150000000000001 + + 1 + + 0 + 0 + + + + + 0.17250000000000001 + + 1 + + 0 + 0 + + + + + 0.17350000000000002 + + 1 + + 0 + 0 + + + + + 0.17450000000000002 + + 1 + + 0 + 0 + + + + + 0.17550000000000002 + + 1 + + 0 + 0 + + + + + 0.17649999999999999 + + 1 + + 0 + 0 + + + + + 0.17749999999999999 + + 1 + + 0 + 0 + + + + + 0.17849999999999999 + + 1 + + 0 + 0 + + + + + 0.17949999999999999 + + 1 + + 0 + 0 + + + + + 0.18049999999999999 + + 1 + + 0 + 0 + + + + + 0.18149999999999999 + + 1 + + 0 + 0 + + + + + 0.1825 + + 1 + + 0 + 0 + + + + + 0.1835 + + 1 + + 0 + 0 + + + + + 0.1845 + + 1 + + 0 + 0 + + + + + 0.1855 + + 1 + + 0 + 0 + + + + + 0.1865 + + 1 + + 0 + 0 + + + + + 0.1875 + + 1 + + 0 + 0 + + + + + 0.1885 + + 1 + + 0 + 0 + + + + + 0.1895 + + 1 + + 0 + 0 + + + + + 0.1905 + + 1 + + 0 + 0 + + + + + 0.1915 + + 1 + + 0 + 0 + + + + + 0.1925 + + 1 + + 0 + 0 + + + + + 0.19350000000000001 + + 1 + + 0 + 0 + + + + + 0.19450000000000001 + + 1 + + 0 + 0 + + + + + 0.19550000000000001 + + 1 + + 0 + 0 + + + + + 0.19650000000000001 + + 1 + + 0 + 0 + + + + + 0.19750000000000001 + + 1 + + 0 + 0 + + + + + 0.19850000000000001 + + 1 + + 0 + 0 + + + + + 0.19950000000000001 + + 1 + + 1000 + 0 + + + + + + + 0 + + 1 + + 1.8291267864660339 + 0.78478248864286526 + + + + + + + 0 + + 30 + + 0 + + + 1 + + + 0 + + + 1 + + + 1 + + + 0 + + + 1 + + + 3 + + + 0 + + + 2 + + + 1 + + + 0 + + + 2 + + + 2 + + + 0 + + + 0 + + + 2 + + + 0 + + + 0 + + + 1 + + + 0 + + + 1 + + + 0 + + + 0 + + + 1 + + + 1 + + + 0 + + + 2 + + + -1 + + + 0 + + + + + + diff --git a/src/gromacs/trajectoryanalysis/tests/simple.ndx b/src/gromacs/trajectoryanalysis/tests/simple.ndx new file mode 100644 index 0000000000..5f1dde8298 --- /dev/null +++ b/src/gromacs/trajectoryanalysis/tests/simple.ndx @@ -0,0 +1,37 @@ +[ System ] + 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 +[ RNA ] + 1 2 3 7 8 9 10 11 12 +[ RB ] + 4 5 6 +[ RD ] + 13 14 15 +[ Ion ] + 4 5 6 +[ RB ] + 4 5 6 +[ RD ] + 13 14 15 +[ Other ] + 13 14 15 +[ RB ] + 4 5 6 +[ RD ] + 13 14 15 +[ Contacts ] + 2 3 + 1 2 +[ SuccessiveContacts ] + 1 2 + 2 3 +[ ManyContacts ] + 1 2 + 1 6 + 1 8 + 1 10 + 1 11 + 10 12 + 2 3 + 2 6 + 2 7 + 2 9