Class CDK::SmilesWriter
In: lib/cdk/lang.rb
Parent: Object

String-based SMILES writer.

Methods

new   write  

Public Class methods

[Source]

     # File lib/cdk/lang.rb, line 134
134:     def initialize
135:       @writer = SMILESWriter.new
136:     end

Public Instance methods

Returns the SMILES representation of the given molecule.

[Source]

     # File lib/cdk/lang.rb, line 144
144:     def write mol
145:       string_writer = StringWriter.new
146: 
147:       @writer.set_writer string_writer
148:       @writer.write mol
149:       @writer.close
150: 
151:       string_writer.to_string.strip
152:     end

[Validate]