Similarity searching

Introduction

In order to be able to set up searches we will need to import the ccdc.search module. Let us also import the ccdc.io module to allow us to read in and write out molecules.

>>> import ccdc.search
>>> import ccdc.io

As a preamble let us also set up a variable for a temporary directory and a file path to a testosterone molecule.

>>> import tempfile
>>> tempdir = tempfile.mkdtemp()
>>> filepath = 'testosterone.mol2'

To get access to the molecule in the testosterone mol2 file we make use of a ccdc.io.MoleculeReader.

>>> reader = ccdc.io.MoleculeReader(filepath)
>>> testosterone = reader[0]