Dear all,
A few releases ago I added a proof-of-concept SWIG wrapper that
allowed parts of the RDKit to be used from java. I've been intending
to come back to this for a while, expand it a bit, and try adding a C#
wrapper. I finally managed to do that today.
If anyone is feeling very adventurous, the relevant code is in
$RDBASE/Code/Demos/SWIG
Here's a little sample of using the C# wrapper from the mono C# shell
under linux:
~/RDKit/Code/Demos/SWIG/csharp_example > csharp -r:RDKFuncs.dll
Mono C# Shell, type "help;" for help
Enter statements below.
csharp> var rxn =
RDKFuncs.ReactionFromSmarts("[N:1][C:2].[OH][C:3]=[O:4]>>[C:2][N:1][C:3]=[O:4]");
csharp> var amine = RDKFuncs.MolFromSmiles("CCCN");
csharp> var acid = RDKFuncs.MolFromSmiles("C1CC1CC(=O)O");
csharp> ROMol[] rs = {amine,acid};
csharp> ROMol_Vect rv = new ROMol_Vect(rs);
csharp> var ps=rxn.runReactants(rv);
csharp> RDKFuncs.MolToSmiles(ps[0][0]);
"CCCNC(=O)CC1CC1"
csharp>
This is a long way from being fully useful, but it's still quite
encouraging to see that it works at all.
-greg
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss