Hi All,

Does anyone have any experience of storing, handling, or editing chemical structure inside of Drupal?

The two formats I am thinking of are SMILES and ISIS draw.

SMILES is directly achievable as it's stored as a text string, and could thus easily go into the database. However, on display a link to a rendering engine would be actually show the structure, rather than the string - so the entry/edit & display would occur in different formats.

ISIS draw is more complex, and generated an encoded character string (not just text I believe). This would need to display in it's own viewer, and the double-click to edit event from this viewer would on return need to update the value stored in the node.

This is probably best done as a CCK content type - does anyone have a shell content type or good (read: easy!) tutorial on how to create one?

Many thanks,
Gareth

Comments

mradcliffe’s picture

You would probably handle this with an input filter that would draw up an image on the fly. I'm not sure if there are any SMILE php parsers out there, but I guess it could be possible.

gareth_w’s picture

but I'm not sure an input filter would do what I need - especially with regards to editing. I have java code to visualise the molecule object, so just need to embed this into the data type somehow - which is why I'm thinking CCK.

Thanks again,
Gareth