Install#

Dependencies#

autodE is a Python package that relies on external electronic structure codes and requires:

Python dependencies listed here are best satisfied using conda (anaconda or miniconda); the following guide assumes a conda install.


Conda: Mac OSX / Linux#

autodE is available through conda and can be installed with:

$ conda install autode --channel conda-forge

If the environment cannot be solved see here. A Linux installation tutorial is available here.


Git: Mac OSX / Linux#

To build from source first clone the repository and cd there:

$ git clone https://github.com/duartegroup/autodE.git
$ cd autodE

then, install the appropriate dependencies (you may want to create a new virtual environment) and install:

$ conda install --file requirements.txt --channel conda-forge
$ pip install .

Note

A working C++ compiler supporting C++11 is required. Tested with clang and gcc.

Git: Windows#

Installing autodE on Windows from source is similar to that on Linux/Mac OS, but slightly more involved. A C++ compiler needs to be installed, as it is not provided by default. It is recommended to install Visual C/C++ compiler from here. Note that installing the “Build Tools for Visual Studio” and selecting only “Desktop Development with C++” in the installer menu is sufficient.

Git is also required, this can be either installed in the form of Git for Windows or in a Conda environment. With git, first clone the autodE repository as shown above.

Then open a Conda prompt or shell and cd to the directory where autodE has been cloned and then install with pip as usual ((you may want to create a new virtual environment as mentioned before):

> conda install --file requirements.txt --channel conda-forge
> pip install .

Note

In rare cases pip may not be able to find the Visual C/C++ compiler, despite the build tools being installed and show the error message error: Microsoft Visual C++ 14.0 or greater is required . In this case, run the Visual Studio build tools command prompt, which is usually named “x64 Native Tools Command Prompt for VS 2022” or something similar in the start menu (This will add compiler to the PATH). Then run pip from this command prompt.

Note

Windows installation is also supported within Windows Subsystem for Linux (WSL). Simply follow the instructions for Linux.


Installation Check#

autodE will find any electronic structure theory packages with implemented wrappers (ORCA, NWChem, Gaussian, XTB and MOPAC) that are available from your PATH environment variable. To check the expected high and low level methods are available:

>>> import autode as ade
>>> ade.methods.get_hmethod()
ORCA(available = True)
>>> ade.methods.get_lmethod()
XTB(available = True)

If a MethodUnavailable exception is raised see the troubleshooting page. If autodE cannot be imported please open a issue on GitHub.


Quick EST Test#

If the high and/or low level electronic structure methods have been installed for the first time, it may be useful to check they’re installed correctly. To run a quick optimisation of H2:

>>> import autode as ade
>>> h2 = ade.Molecule(smiles='[H][H]')
>>> h2.optimise(method=ade.methods.get_lmethod())
>>> h2.optimise(method=ade.methods.get_hmethod())
>>> h2.energy
Energy(-1.16401 Ha)
>>> h2.atoms
Atoms([Atom(H, 0.3805, 0.0000, 0.0000), Atom(H, -0.3805, 0.0000, 0.0000)])

If an AtomsNotFound exception is raised it is likely that the electronic structure package is not correctly installed correctly.

Note

Calculations are performed on 4 CPU cores by default, thus the high and low-level methods must be installed as their parallel versions where appropriate.