Class RCDK::Util::Image
In: lib/rcdk/util.rb
Parent: Object

Raster and SVG 2-D molecular images.

Methods

Included Modules

Net::Sf::Structure::Cdk::Util

Public Class methods

Writes a width by height JPG image to path_to_jpg using iupac_name. Coordinates are automatically assigned.

[Source]

     # File lib/rcdk/util.rb, line 210
210:       def self.iupac_to_jpg(iupac_name, path_to_jpg, width, height)
211:         mol = XY.coordinate_molecule(Lang.read_iupac(iupac_name))
212:         
213:         ImageKit.writeJPG(mol, width, height, path_to_jpg)
214:       end

Writes a width by height PNG image to path_to_png using iupac_name. Coordinates are automatically assigned.

[Source]

     # File lib/rcdk/util.rb, line 192
192:       def self.iupac_to_png(iupac_name, path_to_png, width, height)
193:         mol = XY.coordinate_molecule(Lang.read_iupac(iupac_name))
194:         
195:         ImageKit.writePNG(mol, width, height, path_to_png)
196:       end

Writes a width by height SVG document to path_to_svg using iupac_name. Coordinates are automatically assigned.

[Source]

     # File lib/rcdk/util.rb, line 201
201:       def self.iupac_to_svg(iupac_name, path_to_svg, width, height)
202:         mol = XY.coordinate_molecule(Lang.read_iupac(iupac_name))
203:         
204:         ImageKit.writeSVG(mol, width, height, path_to_svg)
205:       end

Writes a width by height JPG image to path_to_jpg using molfile.

[Source]

     # File lib/rcdk/util.rb, line 158
158:       def self.molfile_to_jpg(molfile, path_to_jpg, width, height)
159:         ImageKit.writeJPG(Lang.read_molfile(molfile), width, height, path_to_jpg)
160:       end

Writes a width by height PNG image to path_to_png using molfile.

[Source]

     # File lib/rcdk/util.rb, line 146
146:       def self.molfile_to_png(molfile, path_to_png, width, height)
147:         ImageKit.writePNG(Lang.read_molfile(molfile), width, height, path_to_png)
148:       end

Writes a width by height SVG document to path_to_svg using molfile.

[Source]

     # File lib/rcdk/util.rb, line 152
152:       def self.molfile_to_svg(molfile, path_to_svg, width, height)
153:         ImageKit.writeSVG(Lang.read_molfile(molfile), width, height, path_to_svg)
154:       end

Writes a width by height JPG image to path_to_jpg using smiles. Coordinates are automatically assigned.

[Source]

     # File lib/rcdk/util.rb, line 183
183:       def self.smiles_to_jpg(smiles, path_to_jpg, width, height)
184:         mol = XY.coordinate_molecule(Lang.read_smiles(smiles))
185:         
186:         ImageKit.writeJPG(mol, width, height, path_to_jpg)
187:       end

Writes a width by height PNG image to path_to_png using smiles. Coordinates are automatically assigned.

[Source]

     # File lib/rcdk/util.rb, line 165
165:       def self.smiles_to_png(smiles, path_to_png, width, height)
166:         mol = XY.coordinate_molecule(Lang.read_smiles(smiles))
167:         
168:         ImageKit.writePNG(mol, width, height, path_to_png)
169:       end

Writes a width by height SVG document to path_to_svg using smiles. Coordinates are automatically assigned.

[Source]

     # File lib/rcdk/util.rb, line 174
174:       def self.smiles_to_svg(smiles, path_to_svg, width, height)
175:         mol = XY.coordinate_molecule(Lang.read_smiles(smiles))
176:         
177:         ImageKit.writeSVG(mol, width, height, path_to_svg)
178:       end

[Validate]