Class: AsciiChem::Model::ZMatrix
- Defined in:
- lib/asciichem/model/zmatrix.rb
Overview
A Z-Matrix: internal coordinates (bond lengths, angles, torsions).
Syntax:
zmatrix{
C1
H2 C1 1.09
H3 C1 1.09 H2 109.5
H4 C1 1.09 H2 109.5 H3 120.0
}
Defined Under Namespace
Classes: ZRow
Instance Attribute Summary collapse
-
#rows ⇒ Object
Returns the value of attribute rows.
Instance Method Summary collapse
- #children ⇒ Object
- #diagnostic_label ⇒ Object
-
#initialize(rows: []) ⇒ ZMatrix
constructor
A new instance of ZMatrix.
- #value_attributes ⇒ Object
Methods inherited from Node
#==, #accept, #hash, short_name, #to_cml, #to_html, #to_latex, #to_mathml, #to_svg, #to_text
Constructor Details
#initialize(rows: []) ⇒ ZMatrix
Returns a new instance of ZMatrix.
19 20 21 |
# File 'lib/asciichem/model/zmatrix.rb', line 19 def initialize(rows: []) @rows = rows end |
Instance Attribute Details
#rows ⇒ Object
Returns the value of attribute rows.
17 18 19 |
# File 'lib/asciichem/model/zmatrix.rb', line 17 def rows @rows end |
Instance Method Details
#children ⇒ Object
27 28 29 |
# File 'lib/asciichem/model/zmatrix.rb', line 27 def children [] end |
#diagnostic_label ⇒ Object
31 32 33 |
# File 'lib/asciichem/model/zmatrix.rb', line 31 def diagnostic_label "ZMatrix(#{rows.length} rows)" end |
#value_attributes ⇒ Object
23 24 25 |
# File 'lib/asciichem/model/zmatrix.rb', line 23 def value_attributes { rows: rows } end |