.NET Examples

Table of Contents


1. Setting up a project using Marvin

  1. Download and install (extract) the .NET package
  2. Add the following dll files as references to your project:
    IKVM.AWT.WinForms.dll
    IKVM.OpenJDK.Beans.dll
    IKVM.OpenJDK.Charsets.dll
    IKVM.OpenJDK.Corba.dll
    IKVM.OpenJDK.Core.dll
    IKVM.OpenJDK.Jdbc.dll
    IKVM.OpenJDK.Management.dll
    IKVM.OpenJDK.Media.dll
    IKVM.OpenJDK.Misc.dll
    IKVM.OpenJDK.Naming.dll
    IKVM.OpenJDK.Remoting.dll
    IKVM.OpenJDK.Security.dll
    IKVM.OpenJDK.SwingAWT.dll
    IKVM.OpenJDK.Text.dll
    IKVM.OpenJDK.Util.dll
    IKVM.OpenJDK.XML.API.dll
    IKVM.OpenJDK.XML.Bind.dll
    IKVM.OpenJDK.XML.Crypto.dll
    IKVM.OpenJDK.XML.Parse.dll
    IKVM.OpenJDK.XML.RelaxNG.dll
    IKVM.OpenJDK.XML.Transform.dll
    IKVM.OpenJDK.XML.WebServices.dll
    IKVM.OpenJDK.XML.XPath.dll
    IKVM.Reflection.Emit.dll
    IKVM.Reflection.Emit.PdbWriter.dll
    IKVM.Runtime.dll
    IKVM.Runtime.JNI.dll
    JChem.dll
    JChemExt.dll
    MarvinHelp.dll
  3. Recommended initialization step for Marvin:
    ChemAxon.JChem.Common.Init();

2. Setting up a project using JChem

  1. Download and install the .NET package
  2. Add the following dll files as references to your project:
    IKVM.AWT.WinForms.dll
    IKVM.OpenJDK.Beans.dll
    IKVM.OpenJDK.Charsets.dll
    IKVM.OpenJDK.Corba.dll
    IKVM.OpenJDK.Core.dll
    IKVM.OpenJDK.Jdbc.dll
    IKVM.OpenJDK.Management.dll
    IKVM.OpenJDK.Media.dll
    IKVM.OpenJDK.Misc.dll
    IKVM.OpenJDK.Naming.dll
    IKVM.OpenJDK.Remoting.dll
    IKVM.OpenJDK.Security.dll
    IKVM.OpenJDK.SwingAWT.dll
    IKVM.OpenJDK.Text.dll
    IKVM.OpenJDK.Util.dll
    IKVM.OpenJDK.XML.API.dll
    IKVM.OpenJDK.XML.Bind.dll
    IKVM.OpenJDK.XML.Crypto.dll
    IKVM.OpenJDK.XML.Parse.dll
    IKVM.OpenJDK.XML.RelaxNG.dll
    IKVM.OpenJDK.XML.Transform.dll
    IKVM.OpenJDK.XML.WebServices.dll
    IKVM.OpenJDK.XML.XPath.dll
    IKVM.Reflection.Emit.dll
    IKVM.Reflection.Emit.PdbWriter.dll
    IKVM.Runtime.dll
    IKVM.Runtime.JNI.dll
    JChem.dll
    The following third party dll files may also be required (depending on usage):
    Database drivers
    jtds-1.2.2.dll - Library used to interact with MSSql 2005 database.
    mysql-connector-java-bin.dll - Library used to interact with MySQL database.
    ojdbc14.dll - Library used to interact with Oracle database.
    postgresql-8.3-604.jdbc4.dll - Library used to interact with Postgresql database.

3. API documentation

The API documentation is available in CHM and online.

4. Marvin Examples

Full examples with Visual Studio 2005 solutions are provided by the installer package.

1. Integrating MarvinSketch into a .NET Winforms application

(coming soon)

2. SimpleImport

A simple example showing how to import structures.

View ImportForm.cs

3. MoleculeImage

In this example you will find 2 methods to obtain the image for a structure. The toBinFormat method supports formats like JPEG, PPM, PNG and the second method is using a MolPrinter object to create an EMF image. This method is faster than using toBinFormat.

View MoleculeImage.cs

5. JChem Examples

Full examples with Visual Studio 2005 solutions are provided by the installer package.

1. JChemBaseSearch

A simple example of JChem Base Search.

View BaseSearchForm.cs   View DataAccess.cs   View NetMolImporter.cs

2. InsertDeleteUpdateMolecules

An example with simple insert, delete, update operations for molecules within a database.
You will also find in this example how to use database drivers for Oracle, MSSql2005, MySQL, Postgresql, ODBC connections.

View MainForm.cs

 

 

Do you have a question? Would you like to learn more? Please browse among the related topics on our support forum or search the website. If you want to suggest modifications or improvements to our documentation email our support directly!