{
  "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/2008/06/03/finding-differences-between_03.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/9tk1a-d6c07",
      "url": "https://chem-bla-ics.linkedchemistry.info/2008/06/03/finding-differences-between_03.html",
      "title": "Finding differences between IChemObjects #2",
      "content_html": "<p><a href=\"http://cdk.sf.net/\">CDK</a> QSAR descriptors are not allowed to change the input [molecule|atom|bond], and I\nrecently added a unit tests (rev <a href=\"http://cdk.svn.sourceforge.net/viewvc/cdk?view=rev&amp;revision=11138\">11138</a>) for that to the\nabstract class <a href=\"http://cdk.svn.sourceforge.net/viewvc/cdk/cdk/trunk/src/test/org/openscience/cdk/qsar/descriptors/atomic/AtomicDescriptorTest.java?view=log\">AtomicDescriptorTest</a>.</p>\n\n<p>After some code clean up of the diff module code earlier this morning (in anticipation of the rain stopping), I applied this patch\n(rev <a href=\"http://cdk.svn.sourceforge.net/viewvc/cdk?view=rev&amp;revision=11269\">11269</a>) that <code class=\"language-plaintext highlighter-rouge\">noModification</code> unit test:</p>\n\n<div class=\"language-diff highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> public void testCalculate_NoModifications() throws Exception {\n   IAtomContainer mol = someoneBringMeSomeWater();\n   IAtom atom = mol.getAtom(1);\n<span class=\"gd\">-  String priorString = atom.toString();\n</span><span class=\"gi\">+  IAtom clone = (IAtom)mol.getAtom(1).clone();\n</span>   descriptor.calculate(atom, mol);\n<span class=\"gd\">-  String afterString = atom.toString();\n</span><span class=\"gi\">+  String diff = AtomDiff.diff(clone, atom);\n</span>   assertEquals(\n<span class=\"gd\">-    \"The descriptor must not change the passed bond in any respect.\",\n-    priorString, afterString\n</span><span class=\"gi\">+    \"The descriptor must not change the passed bond in any respect, but found this diff: \" + diff,\n+    0, diff.length()\n</span>   );\n }\n</code></pre></div></div>\n\n<p>This is a nice example of where the new <a href=\"https://chem-bla-ics.linkedchemistry.info/2008/06/01/finding-differences-between.html\">diff module <i class=\"fa-solid fa-recycle fa-xs\"></i></a>\nis useful. Instead of dumping to long IAtom.toString()s, the output now gives output like:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>AtomDiff(AtomTypeDiff(, NULL/H, NC:0/1, V:0/1))\n</code></pre></div></div>\n\n<p>This indicates (yes, a bit cryptic) that the formal neighbor count (NC) and the valence (V) fields have been modified, in addition\nto that first field, which I don’t know what it refers too. Indeed, the output still needs a bit more tuning :)</p>",
      "summary": "CDK QSAR descriptors are not allowed to change the input [molecule|atom|bond], and I recently added a unit tests (rev 11138) for that to the abstract class AtomicDescriptorTest.",
      
      "date_published": "2008-06-03T00:00:00+00:00",
      "date_modified": "2025-10-11T00:00:00+00:00",
      "tags": ["cdk","qsar"],
      
      
      
      
      
      
        "authors": [ { "name": "Egon Willighagen", "url": "https://orcid.org/0000-0001-7542-0286" } ]
      
    }

  ]
}
