{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "chem-bla-ics",
  "description": "Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.",
  "home_page_url": "https://chem-bla-ics.linkedchemistry.info/",
  "feed_url": "https://chem-bla-ics.linkedchemistry.info/2010/04/22/cip-rules-for-stereochemistry.json",
  "icon": "https://chem-bla-ics.linkedchemistry.info/assets/images/chem-bla-ics_logo.png",
  "language": "en",
  "authors": [
    {
      "name": "Egon Willighagen",
      "url": "https://orcid.org/0000-0001-7542-0286",
      "_orcid": "0000-0001-7542-0286"
    }
  ],
  "items": [

    {
      "id": "https://doi.org/10.59350/1n6nz-z2572",
      "url": "https://chem-bla-ics.linkedchemistry.info/2010/04/22/cip-rules-for-stereochemistry.html",
      "title": "CIP rules for stereochemistry",
      "content_html": "<p>Uniquely identifying <a href=\"http://en.wikipedia.org/wiki/Stereochemistry\">stereochemical enantiomers</a> is an important aspect of data\nexchange of chemical structures. The simplest, most neglected solution is to pass around 3D models, but a lot of people like to\nstick to things like <a href=\"http://www.opensmiles.org/\">SMILES</a>, or <a href=\"http://www.chem.qmul.ac.uk/iupac/\">IUPAC names</a>. Now, given that\nwe want to uniquely represent the stereochemistry, we can use special rules. One example for enantiomers are the\n<a href=\"http://en.wikipedia.org/wiki/Cahn%E2%80%93Ingold%E2%80%93Prelog_priority_rules\">Cahn-Ingold-Prelog (CIP) rules</a>.</p>\n\n<p>The <a href=\"http://cdk.sf.net/\">CDK</a> does not have an implementation of (part of) the CIP rules. However, we recently started a\ncollaboration with Dr <a href=\"http://se.linkedin.com/pub/lars-carlsson/9/641/203\">Lars Carlsson</a> in the Computational Toxicology,\nGlobal Safety Assessment group at <a href=\"http://www.astrazeneca.se/om_oss/verksamheten-i-Sverige/Forskning/Molndal/?itemId=3118278\">AstraZeneca R&amp;D Mölndal</a>,\nheaded by Dr Scott Boyer. Within this collaboration I have started an partial implementation of the CIP rules. The full set of\nrules is quite extensive, and some subrules are outside the scope of the collaboration. For example, we will likely not look at\naxial or helical stereochemistry within this collaboration. The kind of things it is able to do is distinguish between these\nmirror images (yeah, I should use <a href=\"http://www.jmol.org/\">Jmol</a>, but <a href=\"https://qlever.scholia.wiki/\">Scholia</a> needs more plugging\nright now: click the images):</p>\n\n<p><a href=\"https://qlever.scholia.wiki/chemical/Q105313057\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\">\n  <img border=\"0\" src=\"/assets/images/(R)-bromo(chloro)iodomethane.png\" />\n</a>\n<a href=\"https://qlever.scholia.wiki/chemical/Q140196930\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\">\n  <img border=\"0\" src=\"/assets/images/(S)-bromo(chloro)iodomethane.png\" />\n</a></p>\n\n<p>The current patch is not looking into the problem of which atom is chiral; that problem is quite complex in itself, and Tim\nis writing up a nice set of <a href=\"http://timvdm.blogspot.com/2010/03/detecting-stereogenic-units-alternative.html\">blogs</a>\n<a href=\"http://timvdm.blogspot.com/2009/09/more-para-stereocenters-permutation.html\">about</a> <a href=\"http://timvdm.blogspot.com/2009/09/as-promised-here-are-some-molecules.html\">that</a>.\nFurther, the current aims focuses only at application to atoms of ligancy four; that is, carbons.</p>\n\n<p>The CIP rules uniquely define the stereochemistry of such a carbon, by uniquely ordering the ligands around the atom. Using\nrules the ligands are ordered, and they include rules defining priority based on atomic number, mass number, etc. It is the\nrecursion that makes things more interesting, but I will not delve into the details of the algorithm here (see the aforelinked\nWikipedia page instead, or a cheminformatics book like the one shown on the right). Here, I want to introduce some of the API\nof the current patch for the CDK.</p>\n\n<h2 id=\"ligands-and-their-priorities\">Ligands and their Priorities</h2>\n\n<p>Core to the implementation are the CIP priority rules, that allow ordering of the ligand. So, we define a molecule, and ligands:</p>\n\n<div class=\"language-java highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nc\">IMolecule</span> <span class=\"n\">molecule</span> <span class=\"o\">=</span> <span class=\"n\">parser</span><span class=\"o\">.</span><span class=\"na\">parseSmiles</span><span class=\"o\">(</span><span class=\"s\">\"IC(Br)(Cl)[H]\"</span><span class=\"o\">);</span>\n<span class=\"nc\">ILigand</span> <span class=\"n\">ligand1</span> <span class=\"o\">=</span> <span class=\"k\">new</span> <span class=\"nc\">Ligand</span><span class=\"o\">(</span>\n  <span class=\"n\">molecule</span><span class=\"o\">.</span><span class=\"na\">getAtom</span><span class=\"o\">(</span><span class=\"mi\">1</span><span class=\"o\">),</span> <span class=\"n\">molecule</span><span class=\"o\">.</span><span class=\"na\">getAtom</span><span class=\"o\">(</span><span class=\"mi\">2</span><span class=\"o\">)</span>\n<span class=\"o\">);</span>\n<span class=\"nc\">ILigand</span> <span class=\"n\">ligand2</span> <span class=\"o\">=</span> <span class=\"k\">new</span> <span class=\"nc\">Ligand</span><span class=\"o\">(</span>\n  <span class=\"n\">molecule</span><span class=\"o\">,</span> <span class=\"n\">molecule</span><span class=\"o\">.</span><span class=\"na\">getAtom</span><span class=\"o\">(</span><span class=\"mi\">1</span><span class=\"o\">),</span> <span class=\"n\">molecule</span><span class=\"o\">.</span><span class=\"na\">getAtom</span><span class=\"o\">(</span><span class=\"mi\">0</span><span class=\"o\">)</span>\n<span class=\"o\">);</span>\n<span class=\"nc\">ISequenceSubRule</span> <span class=\"n\">rule</span> <span class=\"o\">=</span> <span class=\"k\">new</span> <span class=\"nc\">CIPLigandRule</span><span class=\"o\">();</span>\n<span class=\"nc\">Assert</span><span class=\"o\">.</span><span class=\"na\">assertEquals</span><span class=\"o\">(-</span><span class=\"mi\">1</span><span class=\"o\">,</span> <span class=\"n\">rule</span><span class=\"o\">.</span><span class=\"na\">compare</span><span class=\"o\">(</span><span class=\"n\">ligand1</span><span class=\"o\">,</span> <span class=\"n\">ligand2</span><span class=\"o\">));</span>\n<span class=\"nc\">Assert</span><span class=\"o\">.</span><span class=\"na\">assertEquals</span><span class=\"o\">(</span><span class=\"mi\">1</span><span class=\"o\">,</span> <span class=\"n\">rule</span><span class=\"o\">.</span><span class=\"na\">compare</span><span class=\"o\">(</span><span class=\"n\">ligand2</span><span class=\"o\">,</span> <span class=\"n\">ligand1</span><span class=\"o\">));</span>\n</code></pre></div></div>\n\n<p>This <a href=\"http://www.junit.org/\">JUnit</a> test looks at the chiral compound given earlier, but without specifying the stereochemistry\nusing the @@/@ SMILES syntax; we get to that later. Here, the example defines two ligands around atom 1 (which is the carbon;\nthe index starts at 0). The first ligand is the bromine, the second ligand is the iodine. Because the latter takes priority\naccording to the CIP rules, the compare(ligand1, ligand2) returns -1.</p>\n\n<h2 id=\"the-ciptool\">The CIPTool</h2>\n\n<p>This <em>CIPLigandRule</em> is used in the CIPTool to provide more user-oriented methods. The goal, obviously, is this bit of code:</p>\n\n<div class=\"language-java highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nc\">IMolecule</span> <span class=\"n\">molecule</span> <span class=\"o\">=</span> <span class=\"n\">parser</span><span class=\"o\">.</span><span class=\"na\">parseSmiles</span><span class=\"o\">(</span><span class=\"s\">\"ClC(Br)(I)[H]\"</span><span class=\"o\">);</span>\n<span class=\"nc\">LigancyFourChirality</span> <span class=\"n\">chirality</span> <span class=\"o\">=</span>\n  <span class=\"nc\">CIPTool</span><span class=\"o\">.</span><span class=\"na\">defineLigancyFourChirality</span><span class=\"o\">(</span>\n    <span class=\"n\">molecule</span><span class=\"o\">,</span> <span class=\"mi\">1</span><span class=\"o\">,</span> <span class=\"mi\">4</span><span class=\"o\">,</span> <span class=\"mi\">0</span><span class=\"o\">,</span> <span class=\"mi\">2</span><span class=\"o\">,</span> <span class=\"mi\">3</span><span class=\"o\">,</span> <span class=\"no\">STEREO</span><span class=\"o\">.</span><span class=\"na\">CLOCK_WISE</span>\n  <span class=\"o\">);</span>\n<span class=\"nc\">Assert</span><span class=\"o\">.</span><span class=\"na\">assertEquals</span><span class=\"o\">(</span>\n  <span class=\"no\">CIP_CHIRALITY</span><span class=\"o\">.</span><span class=\"na\">R</span><span class=\"o\">,</span>\n  <span class=\"nc\">CIPTool</span><span class=\"o\">.</span><span class=\"na\">getCIPChirality</span><span class=\"o\">(</span><span class=\"n\">chirality</span><span class=\"o\">)</span>\n<span class=\"o\">);</span>\n</code></pre></div></div>\n\n<p>Because we do not have 3D coordinates in our SMILES, we define the stereochemistry as CLOCK_WISE and ANTI_CLOCK_WISE.\nThe former here means that, looking from the first ligand, following atoms 2, 3, and 4 are oriented in a circle in a\nclock-wise turn. This defines uniquely the geometrical orientation, but which changes between CLOCK_WISE and ANTI_CLOCK_WISE\nupon every atom-atom exchange. Therefore, we uniquely prioritize the ligands, project, and translate the resulting\nCLOCK_WISE or ANTI_CLOCK_WISE in the appropriate R and S stereochemistry.</p>\n\n<p>That’s all for now. Questions, ideas and others most welcome in the comment!</p>",
      "summary": "Uniquely identifying stereochemical enantiomers is an important aspect of data exchange of chemical structures. The simplest, most neglected solution is to pass around 3D models, but a lot of people like to stick to things like SMILES, or IUPAC names. Now, given that we want to uniquely represent the stereochemistry, we can use special rules. One example for enantiomers are the Cahn-Ingold-Prelog (CIP) rules.",
      "image": "https://chem-bla-ics.linkedchemistry.info/assets/images/(R)-bromo(chloro)iodomethane.png",
      "date_published": "2010-04-22T00:00:00+00:00",
      "date_modified": "2026-06-14T00:00:00+00:00",
      "tags": ["cdk","chemistry","cheminf","scholia"],
      
      
      
      
      
      
        "authors": [ { "name": "Egon Willighagen", "url": "https://orcid.org/0000-0001-7542-0286" } ]
      
    }

  ]
}
