Class: Chemicalml::Model::BondStereo

Inherits:
Node
  • Object
show all
Defined in:
lib/chemicalml/model/bond_stereo.rb

Overview

Bond stereochemistry. CML <bondStereo> element. Carries either atom_refs2 (for W/H wedge/hatch) or atom_refs4 (for C/T cis/trans). The value is the convention letter: W, H, C, T, or other (with a dict_ref).

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#==, #accept, #children, #hash, short_name

Constructor Details

#initialize(value:, atom_refs2: nil, atom_refs4: nil, dict_ref: nil) ⇒ BondStereo

Returns a new instance of BondStereo.



12
13
14
15
16
17
# File 'lib/chemicalml/model/bond_stereo.rb', line 12

def initialize(value:, atom_refs2: nil, atom_refs4: nil, dict_ref: nil)
  @value = value
  @atom_refs2 = atom_refs2
  @atom_refs4 = atom_refs4
  @dict_ref = dict_ref
end

Instance Attribute Details

#atom_refs2Object

Returns the value of attribute atom_refs2.



10
11
12
# File 'lib/chemicalml/model/bond_stereo.rb', line 10

def atom_refs2
  @atom_refs2
end

#atom_refs4Object

Returns the value of attribute atom_refs4.



10
11
12
# File 'lib/chemicalml/model/bond_stereo.rb', line 10

def atom_refs4
  @atom_refs4
end

#dict_refObject

Returns the value of attribute dict_ref.



10
11
12
# File 'lib/chemicalml/model/bond_stereo.rb', line 10

def dict_ref
  @dict_ref
end

#valueObject

Returns the value of attribute value.



10
11
12
# File 'lib/chemicalml/model/bond_stereo.rb', line 10

def value
  @value
end

Instance Method Details

#value_attributesObject



19
20
21
22
23
24
25
26
# File 'lib/chemicalml/model/bond_stereo.rb', line 19

def value_attributes
  {
    value: value,
    atom_refs2: atom_refs2,
    atom_refs4: atom_refs4,
    dict_ref: dict_ref
  }
end