The following items are included:
com/indigo/Cano.class — com.indigo.Cano wrapper classcom/indigo/Cano.java — the source code of the wrapper classlib directory containing binaries for all supported platforms:lib/Linux/x86/libcanojni.so — 32-bit Linux binarylib/Linux/x64/libcanojni.so — 64-bit Linux binarylib/Mac/10.5/libcanojni.dylib — universal Mac OS X 10.5 binary (32-bit, 64-bit, 64-bit PPC)lib/Mac/10.6/libcanojni.dylib — universal Mac OS X 10.6 binary (32-bit, 64-bit, 64-bit PPC)lib/Win/x86/canojni.dll — 32-bit Windows binarylib/Win/x64/canojni.dll — 64-bit Windows binaryDepending on the OS and architecture, proper binaries are loaded automatically.
Cano (String path);
Receives the path to Win, Linux, and Mac directories containing binary modules (see
distribution section above for details). E.g., if the libraries are stored in
lib/Win/, lib/Linux, and lib/Mac directories, call new Cano(“lib”). You can specify absolute paths as
well.
Cano ();
Same as Cano(“lib”).
Instances are independent and are safe to be used in parallel.
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 getCanonicalSmiles (String molecule)
The same as the above, with no options.
String getLayeredCode (String molecule, String options)
Computes the canonical layered code of the given molecule. The molecule and options are the same as for
getCanonicalSmiles() call.
String getLayeredCode (String molecule)
The same as the above, with no options.
public static void main (String[] args) throws IOException
{
try
{
Cano cano = new Cano();
System.out.println(cano.getVersion());
System.out.println(cano.getCanonicalSmiles("C1C=CC=CC=1", null));
System.out.println(cano.getCanonicalSmiles("NC1C=C(Br)C=CC=1", ""));
System.out.println(cano.getCanonicalSmiles("NC1C=C(Br)C=CC=1", "-AROMATICITY"));
System.out.println(cano.getCanonicalSmiles("N1(C(SCC1C(=O)N[C@@H](CCO)C)C1CC2CCC1C2)C(CN(CC)C)=O |a:8|"));
System.out.println(cano.getLayeredCode("NC1C=C(Br)C=CC=1"));
System.out.println(cano.getLayeredCode("C[C@@H]1CC(C(=O)N1)1N2CC(C)3CN1CC(C)(C2)C3=O", "-CISTRANS"));
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
}