Our third  meeting, CCK-3, on Tuesday, July 12th, 2016, will be a little different: it will be a two-parter, CCK-3.1 and CCK-3.2:

The Cambridge Crystallographic Data Centre (CCDC) has been hosting and distributing the Cambridge Structural Database (CSD) for 50 years, and its latest release, CSD 2016, is the “world’s essential database of crystal structures, [with] over 800,000 entries”.


1:30-3:30 pm
IT Teaching Laboratory (LG.02) of the Department of Statistics, 24-29 St Giles’, Oxford, OX1 3LB:

Andrew Maloney & Peter Wood (CCDC): CSD Python API Workshop and Hackathon. (We are planning to provide hands-on access to the API, and since  there are only 48 desktops, so you should make sure to book a ticket.)

Register for CCK-3.1.


5.00 – 6:00 pm
Talks and refreshments/beer, will again be held in the Abbot’s Kitchen in the Inorganic Chemistry Laboratory, South Parks Road, Oxford, OX1 3QR:

Register for CCK-3.2.

If you have a 5-minute Lightning Talk you’d like to give, get in touch!

Also, if you have some code you’d like demo, bring your laptop/mobile device.
Refreshments will be provided, including beer. (Thank you to Prof. Phil Biggin and the MRC Proximity to Discovery Fund for supporting CCK.)

CSD Python API example

Number of non-H atoms in molecules reported in the Cambridge Structural Database

An unexplained phenomenon in the CSD collection of molecular crystal structures is shown below.

The code below is included in Jerome Wicker’s talk from CCK-1 as a simple example of how to iterate through and extract information from the CSD using the Python API. The phenomenon has been noted many times by CCDC researchers.

The CSD Python API is used to retreive each crystal structure entry from the database using the EntryReader() iterator. The number of heavy atoms (non-hydrogen atoms) in the heaviest molecular component of organic crystal structure is appended to a list heavy_atoms.

Finally a histogram of these heavy atom counts shows that molecules with even numbers of heavy atoms are observed more frequently than those with odd numbers in the same range.

In [6]:
%pylab inline
Populating the interactive namespace from numpy and matplotlib

This page is a copy of an interactive Python 2 notebook exported from Jupyter. In Jupyter, the %pylab inline command above loads numerical and plotting libraries and ensures that plots appear in the notebook instead of in a separate window. It isn’t required if running python from the command line, and the required libraries (numpy and matplotlib) are reimported below for convenience.

In [7]:
from import EntryReader
from matplotlib import pyplot as plt
import numpy as np

csd_reader = EntryReader('CSD')
heavy_atoms = []

for entry in csd_reader:
    if entry.is_organic:
            mol = entry.molecule.heaviest_component
plt.xlabel('Number of heavy atoms',fontsize=20)
plt.ylabel('Hits in CSD', fontsize=20)

Limiting the x-axis range:

In [11]:
plt.xlabel('Number of heavy atoms',fontsize=20)
plt.ylabel('Hits in CSD', fontsize=20)
In [ ]:

First meeting

CCK-1 (Tuesday 24th May)

In the spirit of the name, our inaugural meeting, CCK-1 will be held in the Abbott’s Kitchen in the Inorganic Chemistry Laboratory at 5pm on Tuesday May 24th 2016 (5th Week).

Refreshments will be provided.

Jerome Wicker from Chemistry will be speaking about “Machine learning for classification of solid form data extracted from CSD and ZINC”. The software tools discussed include RDKit, CSD, and scikit-learn.

There will also be 2 lightning talks, each ~5 minutes long. Hannah Patel from the Department of Statistics will speak on “Novelty Score: Prioritising compounds that potentially form novel protein-ligand interactions and novel scaffolds using an interaction centric approach”. Software covered will include Django and RDKit. Dr Michael Charlton from InhibOx will also speak on his latest research.