from Python, build and install *gmxapi* in separate
:ref:`virtual environments <gmxapi venv>`.
-In some cases *gmxapi* still needs help finding infrastructure from the
-GROMACS installation.
-For instance, :py:func:`gmxapi.commandline_operation` is not a pure API utility,
-but a wrapper for command line tools.
-Make sure that the command line tools you intend to use are discoverable in
-your :envvar:`PATH`, such as by "source"ing your :file:`GMXRC` before launching
-a *gmxapi* script.
-
-.. todo:: Get relevant GROMACS paths in Python environment.
-
- :py:class:`gmxapi.commandline_operation` relies on the environment :envvar:`PATH`
- to locate executables, including the :command:`gmx` wrapper binary.
- Relates to `#2961 <https://gitlab.com/gromacs/gromacs/-/issues/2961>`__.
-
.. _parallelism:
Notes on parallelism and MPI
set -ev
-# TODO: (#2756) Centrally manage dependencies on the GROMACS installation.
-# The gmxapi package, virtualenv, or test infrastructure should have an
-# internal mechanism for tracking the correct GROMACS installation.
-source /usr/local/gromacs/bin/GMXRC
-
pytest $HOME/gmxapi/test
pytest $HOME/sample_restraint/tests
set -ev
-# TODO: (#2756) Centrally manage dependencies on the GROMACS installation.
-# The gmxapi package, virtualenv, or test infrastructure should have an
-# internal mechanism for tracking the correct GROMACS installation.
-source /usr/local/gromacs/bin/GMXRC
-
mpiexec -n 2 `which python` -m mpi4py -m pytest $HOME/gmxapi/test
mpiexec -n 2 `which python` -m mpi4py -m pytest $HOME/sample_restraint/tests
# Additional arguments are passed along to pytest.
# See README.md and the gmxapi/ci-<option> Docker images.
-# TODO: GMXRC should not be necessary with either Py 3.7+ or importlib_resources package.
-source /usr/local/gromacs/bin/GMXRC
-
pytest $HOME/gmxapi/test $@
# Additional arguments are passed along to pytest.
# See README.md and the gmxapi/ci-<option> Docker images.
-# TODO: (#2756) Centrally manage dependencies on the GROMACS installation.
-# The gmxapi package, virtualenv, or test infrastructure should have an
-# internal mechanism for tracking the correct GROMACS installation.
-source /usr/local/gromacs/bin/GMXRC
-
pytest $HOME/sample_restraint/tests $@
command = list([arg for arg in command])
executable = shutil.which(command[0])
+ if executable is None:
+ executable = shutil.which(command[0], path=str(cli_bindir()))
if executable is None:
raise exceptions.ValueError('"{}" is not found or not executable.'.format(command[0]))
command[0] = executable
name='gmxapi',
# TODO: single-source version information (currently repeated in gmxapi/version.py and CMakeLists.txt)
- version='0.3.0a2',
+ version='0.3.0a3',
python_requires='>=3.7',
install_requires=['networkx>=2.0',
'numpy>=1'],