Class: CDK::SmilesReader

Inherits:
Object
  • Object
show all
Defined in:
lib/cdk/lang.rb

Overview

String-based SMILES reader.

Instance Method Summary collapse

Constructor Details

#initializeSmilesReader

Returns a new instance of SmilesReader.



66
67
68
# File 'lib/cdk/lang.rb', line 66

def initialize
  @reader = SmilesParser.new
end

Instance Method Details

#read(smiles) ⇒ Object

Returns the molecule encoded by the given SMILES string.

call-seq:

InChIReader.read(inchi) => org.openscience.cdk.Molecule


76
77
78
# File 'lib/cdk/lang.rb', line 76

def read smiles
  @reader.parse_smiles smiles
end