Installation

From sources

The sources for Double Decoupling Method (DDM) can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git@github.com:IFMlab/DDM.git

Once you have a copy of the source (it is recommanded to create a virtual environment, see Handle virtual environmement for more infos), you can install it with:

$ pip install -r requirements.txt
$ python setup.py install

If you want to be able to launch calculation using only the ‘ddm’ command, use:

$ pip install --editable .

Handle virtual environment

To create a virtual environment for your project, use pyenv (python version management) and virtualenv (manage virtual environments).

You can follow the installation instruction from the GitHub repositories. Here’s a resume if you have an Ubuntu distribution:

pyenv:

  • Clone the repository in a directory ~/.pyenv (as recommanded):
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
  • Define environment variables:
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
  • Add pyenv init to your shell
$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc
  • Install python versions (ddm is written in python 3)
$ pyenv install 3.6.5

If you encounter dependency problems, check pyenv’s wiki.

virtualenv:

  • Clone the repository into pyenv’s plugin directory:
$ git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
  • Create a virtual environment for ddm:
$ pyenv virtualenv 3.6.5 venv_ddm
  • Activate the virtual environment:
$ pyenv activate venv_ddm

The prompt will indicate that the environment is active.

  • Deactivate the environment:
$ pyenv deactivate
  • Delete the virtual environment:
$ pyenv uninstall venv_ddm