Getting started

Virtual environment:

The best way to work with ocelot is within a virtual environment. If you do not have virtualenv installed, you can do this with the command:

$ python3 -m pip install virtualenv

To create a virtual environment, named here oclenv, type:

$ virtualenv -p python3 oclenv

To activate our oclenv environment:

$ source oclenv/bin/activate

When you no longer need to use the environment, you can deactivate with:

$ deactivate

If you have problems with the installation or handling of virtual environments, we suggest you go to the virtualenv page.


We recommend to install ocelot is with pip. With the oclenv virtual environment activated, type:

(oclenv) $ pip install ocelot-quantum

Alternatively, you can install the latest version cloning our git repository

(oclenv) $ git clone
(oclenv) $ cd ocelot
(oclenv) $ python install

Creating a molecule object

In a python file (*.py), we can create a molecule object (methane) with:

# file:

import numpy as np
import ocelot as ocl

carbon1 = ocl.Atom(element = 6, coordinates = [0.86380, 1.07246, 1.16831]) hydrogen1 = ocl.Atom(element = 1, coordinates = [0.76957, 0.07016, 1.64057]) hydrogen2 = ocl.Atom(element = 1, coordinates = [1.93983, 1.32622, 1.04881]) hydrogen3 = ocl.Atom(element = 1, coordinates = [0.37285, 1.83372, 1.81325]) hydrogen4 = ocl.Atom(element = 1, coordinates = [0.37294, 1.05973, 0.17061])

methane = ocl.Molecule(atoms = [carbon1, hydrogen1, hydrogen2, hydrogen3, hydrogen4])

In this file, the variable methane is a Molecule object with some methods as bonds and angles.