{
  "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/2006/08/06/new-atomelementscarbon.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/m0wwb-ty759",
      "url": "https://chem-bla-ics.linkedchemistry.info/2006/08/06/new-atomelementscarbon.html",
      "title": "new Atom(Elements.CARBON);",
      "content_html": "<p>Something I have not completely comfortable with about the <a href=\"http://cdk.sf.net/\">CDK</a> in the past, is the way\n<a href=\"http://cdk.sourceforge.net/api/org/openscience/cdk/Atom.html\">Atom</a>’s are constructed:</p>\n\n<div class=\"language-java highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>  <span class=\"nc\">IAtom</span> <span class=\"n\">carbon</span> <span class=\"o\">=</span> <span class=\"k\">new</span> <span class=\"nc\">Atom</span><span class=\"o\">(</span><span class=\"s\">\"C\"</span><span class=\"o\">);</span>\n</code></pre></div></div>\n\n<p>Not that it is horrible code, but the CDK has an <a href=\"http://cdk.sourceforge.net/api/org/openscience/cdk/Element.html\">Element</a>\ntoo. Why not reuse that? However, until revision 6755 there were not constructors that allowed something like the following:</p>\n\n<div class=\"language-java highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>  <span class=\"nc\">IAtom</span> <span class=\"n\">carbon</span> <span class=\"o\">=</span> <span class=\"k\">new</span> <span class=\"nc\">Atom</span><span class=\"o\">(</span><span class=\"k\">new</span> <span class=\"nc\">Element</span><span class=\"o\">(</span><span class=\"s\">\"C\"</span><span class=\"o\">));</span>\n</code></pre></div></div>\n\n<p>This afternoon I have hacked in constructors for <a href=\"http://cdk.sourceforge.net/api/org/openscience/cdk/ChemObject.html\">ChemObject</a>,\nElement, <a href=\"http://cdk.sourceforge.net/api/org/openscience/cdk/Isotope.html\">Isotope</a>, <a href=\"http://cdk.sourceforge.net/api/org/openscience/cdk/AtomType.html\">AtomType</a>,\nAtom and <a href=\"http://cdk.sourceforge.net/api/org/openscience/cdk/PseudoAtom.html\">PseudoAtom</a> that allow to be constructed from its\ninterface, or the interface of one of its superclasses.</p>\n\n<p>Additionally, in revision 6753, I added <a href=\"http://svn.sourceforge.net/viewvc/cdk/trunk/cdk/src/org/openscience/cdk/config/Elements.java\">cdk.config.Elements</a> with\nstatic IElements for all elements up to atomic number 116, taken from the <a href=\"http://www.blueobelisk.org/\">Blue Obelisk Data Repository</a>.\nTherefore, I can now also write:</p>\n\n<div class=\"language-java highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>  <span class=\"nc\">IAtom</span> <span class=\"n\">carbon</span> <span class=\"o\">=</span> <span class=\"k\">new</span> <span class=\"nc\">Atom</span><span class=\"o\">(</span><span class=\"nc\">Elements</span><span class=\"o\">.</span><span class=\"na\">CARBON</span><span class=\"o\">);</span>\n</code></pre></div></div>",
      "summary": "Something I have not completely comfortable with about the CDK in the past, is the way Atom’s are constructed:",
      
      "date_published": "2006-08-06T00:00:00+00:00",
      "date_modified": "2025-02-15T00:00:00+00:00",
      "tags": ["cdk"],
      
      
      
      
      
      
        "authors": [ { "name": "Egon Willighagen", "url": "https://orcid.org/0000-0001-7542-0286" } ]
      
    }

  ]
}
