Class: CDK::InChIReader
- Inherits:
-
Object
- Object
- CDK::InChIReader
- Defined in:
- lib/cdk/lang.rb
Overview
String-based InChI reader.
Instance Method Summary collapse
-
#initialize ⇒ InChIReader
constructor
A new instance of InChIReader.
-
#read(inchi) ⇒ Object
Returns the molecule encoded by the given InChI string.
Constructor Details
#initialize ⇒ InChIReader
Returns a new instance of InChIReader.
47 48 49 |
# File 'lib/cdk/lang.rb', line 47 def initialize @factory = InChIGeneratorFactory.new end |
Instance Method Details
#read(inchi) ⇒ Object
Returns the molecule encoded by the given InChI string.
call-seq:
InChIReader.read(inchi) => org.openscience.cdk.Molecule
57 58 59 |
# File 'lib/cdk/lang.rb', line 57 def read inchi Molecule.new @factory.getInChIToStructure(inchi).atom_container end |