I need to "build" an organometallic molecule in Blender/Python then represent it resting on a crystal surface.

I'm looking at a PubChem summary for Chloroaluminum phthalocyanine and I can download some JSON files and generate a crude plot for it.

According to the description this is a calculated shape and size and for my purposes that sounds like it should be close enough for me for now, as much as +/-5 % is acceptable at the moment. I just want to see roughly how large this molecule is.

I am assuming that the coordinates are in Angstroms, but I can not find anything that says that explicitly here.

The problem is that the 2D JSON shows it to be about 11 Angstroms from one end to the other, but the 3D JSON shows a molecule that will be more like 16 Angstroms when stretched out.

That substantial difference suggests I can't yet assume those coordinates are what I think they are, so I'd like to ask:

Question: How can I interpret the 2D and 3D coordinates of atom locations from a PubChem summary of an organometallic molecule? Which of these JSON files should I use? The molecule's "arms" are shown bent in the 3D representation, am I free to "flatten" them to show the molecule laying flat?

note: This is for illustration/animation purposes, not for deriving information about interaction.


above: Structure2D_CID_123667.json

below: Conformer3D_CID_5282330.json


A three-dimensional representation of the compound. The 3D structure is not experimentally determined, but computed by PubChem. More detailed information on this conformer model is described in the PubChem3D thematic series published in the Journal of Cheminformatics.

screenshot click for larger

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D 
import json

# https://pubchem.ncbi.nlm.nih.gov/compound/Chloroaluminum-phthalocyanine

fnames = ('Conformer3D_CID_5282330.json',

molecule = dict()

for fname in fnames:
    if '3D' in fname:
        dim = '3D'
        dim = '2D'
    with open(fname, 'r') as infile:
        info = json.load(infile)

    data       = info['PC_Compounds'][0]
    atoms      = data['atoms']  
    atom_id    = atoms['aid']  
    element_id = atoms['element']  
    coords     = data['coords'][0]['conformers'][0]
    if dim == '3D':
        x, y, z = [coords[axis] for axis in 'xyz']
        x, y    = [coords[axis] for axis in 'xy']
        z       = len(x) * [0]
    things = zip(atom_id, element_id, x, y, z)

    mol = dict()
    molecule[dim] = mol
    for thing in things:
            mol[thing[1]] = [thing]
with open('molecule', 'w') as outfile:
    json.dump(molecule, outfile)

if True:
    # plot 2D
    fig = plt.figure()
    ax  = fig.add_subplot(1, 1, 1, projection='3d')
    for elem, data in molecule['2D'].items():
        atom_id, element_id, x, y, z = zip(*data)
        ax.plot(x, y, z, 'o', markersize=16)
        print('elem: ', elem, len(x))

    # plot 3D
    fig = plt.figure()
    ax  = fig.add_subplot(1, 1, 1, projection='3d')
    for elem, data in molecule['3D'].items():
        atom_id, element_id, x, y, z = zip(*data)
        ax.plot(x, y, z, 'o', markersize=16)
        print('elem: ', elem, len(x))
  • $\begingroup$ @Buttonwood Thank you for all the advice! Yes I think I see what you mean now about the conformer. Once I'm on campus I'll check for access to CSD; there's a synchrotron nearby so I'm certain somebody will be able to help! I'd never thought of checking for crystallographic results but of course I should have. Yes this is a much better way to proceed. As for this question, if no answer is forthcoming I may modify in a few days to just ask about the molecule without specifying the PubChem info the target. update: Oh those four .cif files seem to be all I need, I'll plot them up soon! $\endgroup$
    – uhoh
    Dec 10, 2020 at 6:57
  • $\begingroup$ @Buttonwood got it, yippee! :-D $\endgroup$
    – uhoh
    Dec 10, 2020 at 6:57
  • 1
    $\begingroup$ @Buttonwood You seem to have a lot of insight into this user's question! Do you think you would be able to put together an answer? I'm trying to help shorten the unanswered queue here :) $\endgroup$ Feb 28, 2021 at 5:16

1 Answer 1


The brief answer, remodeled from the comments earlier given: See the entries of COD, https://www.crystallography.net/cod/4331895.html, and their #4331896, #7220156, and #7220157 -- all coordinated with Al, and all (more or less) dish-like flat:

enter image description here

(credit to COD, entry #4331895).

This is because the ligand is engaged in complexation of the Al in the centre. This fixation prevents much of the possible distortion of an empty ligand if a website constructs a 3D model from scratch with some (computationally cheap) force field to identify one plausible conformer. Of course the two (here randomly attributed) protons in the centre equally want to minimize steric interaction, too:

enter image description here

(based on the conformation of PubChem's .sdf about entry #5282330)

If you are interested into the coordinates experimentally determined, I would suggest to consult a crystallographic database. If you are within a university, CCDC's CSD database may be one resource much more comfortable to search than this because of its interfaces including conquest, and CSD Python API (a primer, the CCDC moderated user forum (since July 2021 read-only)). The structures may be exported in the .cif format; if you are fine with loosing some of information, however, exports as .pdb, .mol2, .xyz and SMILES strings are equally among the offered formats which may be processed further, e.g., by OpenBabel. Compared to other chemistry relevant databases, and taking into account the broad scope of applications, it is a smaller yet well affordable databases. Often, research groups join each other under stewardship of a library to purchase e.g., 5 FTE at once, and subsequently share IT infrastructure and license fees.

Complementary to CSD (about small organic and organometallic), and ICSD about inorganic materials is the COD with some overlap of coverage with the two former. Their access policies differ from the former and actively encourage share and mirroring of the data. There is are GUIs to search in this repository (e.g., by text, or structure) but equally offers an API and a number of helper programs (cod-tools) like codcif2sfd to convert a .cif into a chemically healed .sdf to support programs like DataWarrior as optional add-on.

  • $\begingroup$ I appreciate your answer, thank you very much! It deserves some serious time and attention so I will need a few more days before I can dig in. $\endgroup$
    – uhoh
    Mar 3, 2021 at 15:44
  • $\begingroup$ ...still digging in (reminder to self; dig in!) $\endgroup$
    – uhoh
    Nov 1, 2021 at 1:49
  • 2
    $\begingroup$ @uhoh Note, in July, CCDC closed the CSD Python API user forum (as in «no new posts are accepted») to read-only. $\endgroup$
    – Buttonwood
    Nov 1, 2021 at 9:46
  • $\begingroup$ Thanks, got it! $\endgroup$
    – uhoh
    Nov 1, 2021 at 11:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .