CDK Depiction node contribution

Hi All (Stephan...)

I have commited a new CDK node which provides some access to the new Depiction API. 

I made the following changes:

  1. Added SVG dependency to the CDK plugin
  2. Bumped the version number to 1.5.600.qualifier
  3. Added cdk_depiction test case
  4. Created org.openscience.cdk.knime.nodes.depiction and Created org.openscience.cdk.knime.nodes.depiction.util packages
  5. org.openscience.cdk.knime.nodes.depiction has the new Depiction KNIME node
  6. org.openscience.cdk.knime.nodes.depiction.util has CdkSimpleStreamableNodeModel and NodeSettingCollection
  7. CdkSimpleStreamableNodeModel is my attempt at making an abastact implementation of the streaming API for CDK nodes. It uses the CDK adapter cell and extends SimpleStreamableFunctionNodeModel. The DepictionNodeModel gives an example implementation of this abstract class.
  8. I handle the management of node settings differently in the Lhasa nodes. I have adapted this approach for the CDK nodes. I've created a NodeSettingCollection class that implements CDKSettings. This class (example implementation DepictionSettings) handles the saving, loading and validating of settings in a single place

Once the build is working a new Depiction node will be available in the trunk. This node uses the CDK Depiction API to render SVG or PNG images with various settings and can include highlighting when given a single or list of atom and bond numbers. Consecutive nodes should allow for multiple highlighting (wheras the RDKit version allows multiple highlighting from a single node). 

If anyone has an issues let me know. 

Cheers

Sam

Usage of the node:

I've updated the SMARTS Query matcher to provide the option for returning the matched atom and bond positions. This can be used as an input to the depiction node (warning, using the RDKit or indigo matcher may not give the appropriate atom numbers as the CDK cell uses SMILES to store the structure). 

 

 

 

 

Cheers

 

Sam

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.