MiMiCPy is the companion utility package for MiMiC, with a collection of tools for preparing and debugging MiMiC input files. It is written in Python and can be installed from the Python Package Index (PyPI) using the package installer for Python (pip). MiMiCPy can be installed directly in the current Python installation or within a virtual environment. The process is described in detail below.
MiMiCPy requires Python 3.5+ and certain packages. MiMiCPy also provides plugins for the molecular visualization packages VMD and PyMOL. These can be optionally activated during the MiMiCPy installation process.
Install from PyPI
To install the latest stable version of MiMiCPy from the PyPI, run the following command:
$ python -m pip install mimicpy
To install with VMD and/or PyMOL support, pass the plugin path using the environment
PYMOLDIR. This path is usually either the
path to VMD/PyMOL installation directory or the user’s home directory. For example:
$ PYMOLDIR="/usr/home/" VMDDIR="/usr/home/" python -m pip install mimicpy
This will create (or append to, if it already exists) a
vmd.rc on Windows) file in the given paths (in this case
/usr/home/). If these files are in the current directory, the user’s home
directory, or the installation directory of the visualization package, they will be
read and loaded by PyMOL and VMD on startup. This makes the
command available to them.
To check that MiMiCPy has been correctly installed, you can access the help via:
$ mimicpy --help
Installing from the PyPI is the recommended option. However, if you would like to install the current development version of MiMiCPy, clone the source using git (or download it directly):
$ git clone https://gitlab.com/MiMiC-projects/MiMiCPy.git $ python -m pip install MiMiCPy/
Conda allows the user to create, export, list, remove, and update environments that have different versions of Python and/or packages installed in them. If you are not familiar with conda, check the conda installation instructions for details about the installation and the conda environments documentation for more information about conda environments in general.
You can set up a conda environment for MiMiCPy with the following commands (in this example, Python 3.7 is used):
$ conda create --name mimicpy python=3.7 ipython $ conda activate mimicpy
This will create and activate a conda environment. The conda environment can be deactivated by running the command:
$ conda deactivate
To install MiMiCPy, you can now use pip as explained previously. You can install pip in your conda environment by running:
$ conda activate mimicpy $ conda install pip
To install MiMiCPy with VMD and/or PyMOL support, you can proceed as explained in the previous section, after having installed VMD and/or PyMOL in the conda environment. This can be easily done with the following commands:
$ conda install vmd $ conda install -c schrodinger pymol
When installing MiMiCPy with VMD or PyMOL support, make sure to pass the path
corresponding to the VMD and/or PyMOL installation directory
path-to-conda-directory/envs/mimicpy/lib/) in the virtual environment:
$ PYMOLDIR="path-to-conda-directory/envs/mimicpy/lib/" VMDDIR="path-to-conda-directory/envs/mimicpy/lib/" pip install mimicpy
Python Virtual Environments
Python has built-in support for virtual environments that can be created and activated as follows:
$ python -m venv mimicpy_venv $ . mimicpy_venv/bin/activate
This will create and activate a virtual environment that will be located in
mimicpy_venv, which is created in the directory from
where you run the commands. You can, in principle, choose any name for the
environment but avoid using names that clash with Python package names. The
virtual environment can be deactivated by running the following command:
To install MiMiCPy, you can now use pip as explained previously. Make sure to run pip from within the virtual environment (i.e., after activating it).