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

String-based molfile writer.

Methods

new   write  

Public Class methods

[Source]

    # File lib/cdk/lang.rb, line 88
88:     def initialize
89:       @writer = MDLWriter.new
90:     end

Public Instance methods

Returns the molfile representation of the given molecule.

[Source]

     # File lib/cdk/lang.rb, line 97
 97:     def write mol
 98:       string_writer = StringWriter.new
 99: 
100:       @writer.set_writer string_writer
101:       @writer.write_molecule mol
102:       @writer.close
103: 
104:       string_writer.to_string
105:     end

[Validate]