{
  "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/04/12/cdk-data-classes-and-change.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/3xsm0-bt478",
      "url": "https://chem-bla-ics.linkedchemistry.info/2006/04/12/cdk-data-classes-and-change.html",
      "title": "The CDK data classes and change notifications",
      "content_html": "<p>The data classes of the <a href=\"http://cdk.sf.net/\">Chemistry Development Kit</a> are mutable, unlike those of\n<a href=\"http://sourceforge.net/projects/octet\">Octet</a>. This means that other classes may need to respond when\nthe content updates. For example, a render class. CDK’s <a href=\"http://cdk.sourceforge.net/api/org/openscience/cdk/ChemObject.html\">ChemObject</a>\nprovides a <code class=\"language-plaintext highlighter-rouge\">notifyChanged()</code> and <code class=\"language-plaintext highlighter-rouge\">addListener()</code> methods for this. However, as was\n<a href=\"http://sourceforge.net/mailarchive/forum.php?thread_id=10001141&amp;forum_id=2178\">recently</a> pointed out,\nwhile this is useful in editors, such as <a href=\"http://jchempaint.sf.net/\">JChemPaint</a>, this is a performance killer in high-throughput\nsitations, such as descriptor calculation, or structure diagram generation runs.</p>\n\n<p>To address this, the <a href=\"http://svn.sourceforge.net/viewcvs.cgi/cdk/trunk/cdk/src/org/openscience/cdk/interfaces/IChemObject.java?view=log\">IChemObject</a>\ninterface has been extended with the methods <code class=\"language-plaintext highlighter-rouge\">setNotification(boolean)</code> and <code class=\"language-plaintext highlighter-rouge\">getNotification()</code>, which allow to temporarily\ndisable change notifications. There are no helper methods yet to disable it for a complete data structure, like\n<code class=\"language-plaintext highlighter-rouge\">ChemModelManipulator.setNotification(ChemModel, boolean)</code>, but I expect these to be written soon.</p>\n\n<p>Alternatively, special data classes may be used if notification is never needed for a special setup, for example, in case the QSAR descriptor calculation. In such cases, the new <a href=\"http://svn.sourceforge.net/viewcvs.cgi/cdk/trunk/cdk/src/org/openscience/cdk/nonotify/NoNotificationChemObjectBuilder.java?view=log\">NoNotificationChemObjectBuilder</a>\ncan be used:</p>\n\n<div class=\"language-java highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nc\">IChemObjectReader</span> <span class=\"n\">reader</span> <span class=\"o\">=</span> <span class=\"k\">new</span> <span class=\"nc\">MDLReader</span><span class=\"o\">(</span><span class=\"k\">new</span> <span class=\"nc\">FileInputStream</span><span class=\"o\">(</span><span class=\"k\">new</span> <span class=\"nc\">File</span><span class=\"o\">(</span><span class=\"s\">\"some.mol\"</span><span class=\"o\">)));</span>\n<span class=\"nc\">IChemObjectBuilder</span> <span class=\"n\">builder</span> <span class=\"o\">=</span> <span class=\"nc\">NoNotificationChemObjectBuilder</span><span class=\"o\">.</span><span class=\"na\">getInstance</span><span class=\"o\">();</span>\n<span class=\"nc\">IMolecule</span> <span class=\"n\">molecule</span> <span class=\"o\">=</span> <span class=\"n\">reader</span><span class=\"o\">.</span><span class=\"na\">read</span><span class=\"o\">(</span><span class=\"n\">builder</span><span class=\"o\">.</span><span class=\"na\">newMolecule</span><span class=\"o\">());</span>\n<span class=\"c1\">// then perform some operation in which the molecule changes a lot</span>\n</code></pre></div></div>\n\n<p>The advantage is that you do not have to manually disable notification for each class you instantiate. This should give a considerable speed up, and I hope soon to give some statistics.</p>",
      "summary": "The data classes of the Chemistry Development Kit are mutable, unlike those of Octet. This means that other classes may need to respond when the content updates. For example, a render class. CDK’s ChemObject provides a notifyChanged() and addListener() methods for this. However, as was recently pointed out, while this is useful in editors, such as JChemPaint, this is a performance killer in high-throughput sitations, such as descriptor calculation, or structure diagram generation runs.",
      
      "date_published": "2006-04-12T00:00:00+00:00",
      "date_modified": "2025-02-13T00:00:00+00:00",
      "tags": ["cdk","cheminf","jchempaint"],
      
      
      
      
      
      
        "authors": [ { "name": "Egon Willighagen", "url": "https://orcid.org/0000-0001-7542-0286" } ]
      
    }

  ]
}
