Class: CDK::SmilesReader
- Inherits:
-
Object
- Object
- CDK::SmilesReader
- Defined in:
- lib/cdk/lang.rb
Overview
String-based SMILES reader.
Instance Method Summary collapse
-
#initialize ⇒ SmilesReader
constructor
A new instance of SmilesReader.
-
#read(smiles) ⇒ Object
Returns the molecule encoded by the given SMILES string.
Constructor Details
#initialize ⇒ SmilesReader
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 |