Ejemplo n.º 1
0
        public void renderGridToFile(IndigoObject items, int[] refatoms, int ncolumns, string filename)
        {
            if (refatoms != null)
            {
                if (refatoms.Length != items.count())
                {
                    throw new IndigoException("renderGridToFile(): refatoms[] size must be equal to the number of objects");
                }
            }

            _indigo.checkResult(_renderer_lib.indigoRenderGridToFile(items.self, refatoms, ncolumns, filename));
        }
Ejemplo n.º 2
0
        public byte[] renderGridToBuffer(IndigoObject items, int[] refatoms, int ncolumns)
        {
            using (IndigoObject bufh = _indigo.writeBuffer()) {
                if (refatoms != null)
                {
                    if (refatoms.Length != items.count())
                    {
                        throw new IndigoException("renderGridToFile(): refatoms[] size must be equal to the number of objects");
                    }
                }

                _indigo.checkResult(_renderer_lib.indigoRenderGrid(items.self, refatoms, ncolumns, bufh.self));
                return(bufh.toBuffer());
            }
        }
Ejemplo n.º 3
0
        public SdfIndigoRecordsEnumerator(Stream stream)
        {
            indigo.setOption("ignore-stereochemistry-errors", "true");
            indigo.setOption("unique-dearomatization", "false");
            indigo.setOption("ignore-noncritical-query-features", "true");
            indigo.setOption("timeout", "600000");

            byte[] buffer = new byte[16 * 1024];
            using (MemoryStream ms = new MemoryStream())
            {
                int read;
                while ((read = stream.Read(buffer, 0, buffer.Length)) > 0)
                {
                    ms.Write(buffer, 0, read);
                }

                reader = indigo.iterateSDF(indigo.loadBuffer(ms.ToArray()));

                index = reader.count();
            }
        }