The following items are included:
cano.net.dll — .Net 2.0 assemblylib32/cano.dll — 32-bit C++ library exposing C interfacelib64/cano.dll — 64-bit C++ library exposing C interfaceDepending on the architecture, proper DLLs are loaded automatically from lib32 or lib64 directories. Path
to those directories may be set up via Cano.init().
Cano class has only static methods.
void init (String prefix)
Receives the relative path to lib32 and lib64 directories (see distribution
section above for details). E.g. if the libraries are stored in lib/Cano/lib32 and lib/Cano/lib64, call
init(“lib/Cano”).
You can skip the init() call, in this case the libraries will be taken from ./lib32 or ./lib64
directory, depending on what platform your program is running on.
String getVersion ()
Returns the version of the library.
String getCanonicalSmiles (String molecule, String options)
Computes the canonical SMILES of the given molecule with given options. The molecule is either SMILES or
MDL (Symyx) Molfile (the format is detected automatically). The options string can contain space-separated
words AROMATICITY, TETRAHEDRAL, and CISTRANS, each preceded with plus or minus sign. You can pass null
in place of options string. The default option is all options on: +AROMATICITY, +TETRAHEDRAL, and
+CISTRANS.
String getLayeredCode (String molecule, String options)
Computes the canonical layered code if the given molecule with given options. The molecule and options
are the same as in getCanonicalSmiles().
When something goes wrong, Cano throws CanoException (which inherits the system Exception class). The
Message field normally contains the error information passed by the underlying C++ library.
try
{
System.Console.WriteLine(Cano.getVersion());
System.Console.WriteLine(Cano.getCanonicalSmiles("C1C=CC=CC=1", null));
System.Console.WriteLine(Cano.getCanonicalSmiles("C1C=CC=CC=1", "-AROMATICITY"));
System.Console.WriteLine(Cano.getLayeredCode("ONC1C=CC=CC=1", null));
}
catch (Exception ex)
{
System.Console.WriteLine(ex.Message);
}