Class: Chem::MDL::MdlMolecule
- Inherits:
-
Object
- Object
- Chem::MDL::MdlMolecule
- Includes:
- MdlMolParser, Chem::Molecule, Enumerable
- Defined in:
- lib/chem/db/mdl.rb
Constant Summary
Constants included from Chem::Molecule
Chem::Molecule::EpsHeader, Chem::Molecule::MDLCountLineFormat
Instance Attribute Summary collapse
-
#edges ⇒ Object
readonly
Returns the value of attribute edges.
-
#nodes ⇒ Object
readonly
Returns the value of attribute nodes.
Attributes included from MdlMolParser
Attributes included from Chem::Molecule
Attributes included from Graph
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ MdlMolecule
constructor
A new instance of MdlMolecule.
Methods included from MdlMolParser
Methods included from Chem::Molecule
#-, #assign_2d_geometry, #breadth_first_search, #canonical_ring, #composition, #connected?, #deep_dup, #delete, #delete_bond, #depth_first_search, #divide, #find_smallest_ring, #find_sssr, #induced_sub, #molecular_weight, #n_hydrogen, #oxidation_number, #save, #save_as_mdl, #save_as_pdf, #search_pubchem, #subset_in_composition?, #to_cansmi, #to_eps, #to_sybyl, #trim
Methods included from Graph
#adj_matrix, #adjacency_list, #adjacent_to, #clustering_coefficient, #connection, #each, #match_by_adj_mat, #match_by_ullmann, #match_exhaustively, #matchable, #matchable_old, #morgan
Constructor Details
#initialize ⇒ MdlMolecule
Returns a new instance of MdlMolecule.
222 223 224 225 |
# File 'lib/chem/db/mdl.rb', line 222 def initialize @nodes = [] @edges = [] end |
Instance Attribute Details
#edges ⇒ Object (readonly)
Returns the value of attribute edges.
220 221 222 |
# File 'lib/chem/db/mdl.rb', line 220 def edges @edges end |
#nodes ⇒ Object (readonly)
Returns the value of attribute nodes.
220 221 222 |
# File 'lib/chem/db/mdl.rb', line 220 def nodes @nodes end |
Class Method Details
.parse(file) ⇒ Object
232 233 234 235 236 |
# File 'lib/chem/db/mdl.rb', line 232 def self.parse file mol = MdlMolecule.new input = open(file) mol.parse input end |
.parse_io(input) ⇒ Object
227 228 229 230 |
# File 'lib/chem/db/mdl.rb', line 227 def self.parse_io input mol = MdlMolecule.new mol.parse input end |