Module: ChemScanner

Includes:
Geometry
Defined in:
lib/chem_scanner.rb,
lib/chem_scanner/cdx.rb,
lib/chem_scanner/doc.rb,
lib/chem_scanner/docx.rb,
lib/chem_scanner/cdxml.rb,
lib/chem_scanner/version.rb,
lib/chem_scanner/export/cml.rb,
lib/chem_scanner/perkin_eln.rb,
lib/chem_scanner/chem_draw/parser.rb,
lib/chem_scanner/configuration/util.rb,
lib/chem_scanner/interpreter/scheme.rb,
lib/chem_scanner/chem_draw/node/bond.rb,
lib/chem_scanner/chem_draw/node/text.rb,
lib/chem_scanner/chem_draw/cdx_reader.rb,
lib/chem_scanner/extension/element_map.rb,
lib/chem_scanner/chem_draw/node/graphic.rb,
lib/chem_scanner/chem_draw/node/fragment.rb,
lib/chem_scanner/configuration/superatom.rb,
lib/chem_scanner/extension/geometry/line.rb,
lib/chem_scanner/interpreter/scheme_base.rb,
lib/chem_scanner/chem_draw/node/base_node.rb,
lib/chem_scanner/extension/geometry/point.rb,
lib/chem_scanner/interpreter/element/atom.rb,
lib/chem_scanner/chem_draw/node/base_value.rb,
lib/chem_scanner/chem_draw/node/font_table.rb,
lib/chem_scanner/interpreter/element/arrow.rb,
lib/chem_scanner/chem_draw/node/color_table.rb,
lib/chem_scanner/configuration/abbreviation.rb,
lib/chem_scanner/extension/geometry/polygon.rb,
lib/chem_scanner/extension/geometry/segment.rb,
lib/chem_scanner/interpreter/formula_to_mol.rb,
lib/chem_scanner/chem_draw/node/bracket_group.rb,
lib/chem_scanner/chem_draw/node/chem_geometry.rb,
lib/chem_scanner/chem_draw/node/fragment_node.rb,
lib/chem_scanner/interpreter/element/fragment.rb,
lib/chem_scanner/interpreter/element/molecule.rb,
lib/chem_scanner/interpreter/element/reaction.rb,
lib/chem_scanner/interpreter/pre_process/arrow.rb,
lib/chem_scanner/extension/geometry/bounding_box.rb,
lib/chem_scanner/interpreter/pre_process/graphic.rb,
lib/chem_scanner/interpreter/pre_process/molecule.rb,
lib/chem_scanner/chem_draw/node/bracket_attachment.rb,
lib/chem_scanner/interpreter/element/reaction_step.rb,
lib/chem_scanner/interpreter/post_process/assemble.rb,
lib/chem_scanner/interpreter/element/molecule_group.rb,
lib/chem_scanner/interpreter/text_group/bold_groups.rb,
lib/chem_scanner/interpreter/post_process/text_label.rb,
lib/chem_scanner/interpreter/post_process/reaction_info.rb,
lib/chem_scanner/interpreter/post_process/reaction_step.rb,
lib/chem_scanner/interpreter/post_process/reagent_label.rb,
lib/chem_scanner/interpreter/text_group/retrieve_n_atoms.rb,
lib/chem_scanner/interpreter/post_process/text_as_molecule.rb,
lib/chem_scanner/interpreter/post_process/label_by_molecule.rb,
lib/chem_scanner/interpreter/text_group/molecule_text_group.rb,
lib/chem_scanner/interpreter/text_group/retrieve_alias_info.rb,
lib/chem_scanner/interpreter/text_group/reaction_text_groups.rb,
lib/chem_scanner/interpreter/reaction_detection/molecule_group.rb,
lib/chem_scanner/interpreter/text_group/text_group_interpreter.rb,
lib/chem_scanner/interpreter/reaction_detection/text_assignment.rb,
lib/chem_scanner/interpreter/reaction_detection/assign_to_reaction.rb,
lib/chem_scanner/interpreter/reaction_detection/duplicate_reagents.rb,
lib/chem_scanner/interpreter/reaction_detection/remove_separated_mol.rb,
lib/chem_scanner/interpreter/reaction_detection/multi_line_chain_reaction.rb

Overview

ChemScanner main module

Defined Under Namespace

Modules: ChemDraw, ConfigurationUtil, Export, Extension, Interpreter Classes: Abbreviation, Cdx, Cdxml, Doc, Docx, ElementMap, PerkinEln, Superatom

Constant Summary collapse

VERSION =
"0.1.3"
CONFIG_PATH =
File.join(__dir__)

Class Method Summary collapse

Class Method Details

.add_abbreviation(abb, smi) ⇒ Object



65
66
67
# File 'lib/chem_scanner.rb', line 65

def self.add_abbreviation(abb, smi)
  @abbreviation.add(abb, smi)
end

.add_abbreviation_hash(hash) ⇒ Object



69
70
71
# File 'lib/chem_scanner.rb', line 69

def self.add_abbreviation_hash(hash)
  @abbreviation.add_hash(hash)
end

.add_superatom(satom, smi) ⇒ Object



37
38
39
# File 'lib/chem_scanner.rb', line 37

def self.add_superatom(satom, smi)
  @superatom.add(satom, smi)
end

.all_abbreviationsObject



53
54
55
# File 'lib/chem_scanner.rb', line 53

def self.all_abbreviations
  @abbreviation.all
end

.all_superatomsObject



21
22
23
# File 'lib/chem_scanner.rb', line 21

def self.all_superatoms
  @superatom.all
end

.custom_superatomsObject



29
30
31
# File 'lib/chem_scanner.rb', line 29

def self.custom_superatoms
  @superatom.custom
end

.get_abbreviation(abb) ⇒ Object



57
58
59
60
61
62
63
# File 'lib/chem_scanner.rb', line 57

def self.get_abbreviation(abb)
  if @superatom.get_superatom(abb).empty?
    @abbreviation.get_abbreviation(abb)
  else
    ""
  end
end

.get_superatom(superatom) ⇒ Object



33
34
35
# File 'lib/chem_scanner.rb', line 33

def self.get_superatom(superatom)
  @superatom.get_superatom(superatom)
end

.predefined_abbreviationsObject



45
46
47
# File 'lib/chem_scanner.rb', line 45

def self.predefined_abbreviations
  @abbreviation.predefined
end

.predefined_superatomsObject



25
26
27
# File 'lib/chem_scanner.rb', line 25

def self.predefined_superatoms
  @superatom.predefined
end

.remove_abbreviation(abb) ⇒ Object



73
74
75
# File 'lib/chem_scanner.rb', line 73

def self.remove_abbreviation(abb)
  @abbreviation.remove(abb)
end

.remove_superatom(satom) ⇒ Object



41
42
43
# File 'lib/chem_scanner.rb', line 41

def self.remove_superatom(satom)
  @superatom.remove(satom)
end

.solventsObject



49
50
51
# File 'lib/chem_scanner.rb', line 49

def self.solvents
  @abbreviation.solvents
end

.sync_custom_superatomObject



17
18
19
# File 'lib/chem_scanner.rb', line 17

def self.sync_custom_superatom
  @superatom.sync_custom
end