Module: Alumina::HIN::Writer::Molecule
- Included in:
- Molecule
- Defined in:
- lib/alumina/hin/writer.rb
Overview
Adds methods for writing data in HIN format to Molecule objects.
Instance Method Summary collapse
-
#to_hin ⇒ Object
Outputs this molecule in HIN format.
Instance Method Details
#to_hin ⇒ Object
Outputs this molecule in HIN format.
14 15 16 17 18 19 |
# File 'lib/alumina/hin/writer.rb', line 14 def to_hin lines = atoms.map(&:to_hin) lines.unshift "mol #{id}#{" #{label}" if label}" lines.push "endmol #{id}" lines.join("\n") end |