Class: Chem::MDL::MdlMolecule
- Inherits:
-
Object
- Object
- Chem::MDL::MdlMolecule
- Includes:
- MdlMolParser, Chem::Molecule, Enumerable
- Defined in:
- lib/chem/db/mdl.rb,
lib/chem/db/sdf.rb
Constant Summary
Constants included from Chem::Molecule
Chem::Molecule::DESCRIPTORNAME, Chem::Molecule::ELEMNUM, Chem::Molecule::EpsHeader, Chem::Molecule::MDLCountLineFormat, Chem::Molecule::MDLHeaderLine2Format
Instance Attribute Summary collapse
-
#edges ⇒ Object
readonly
Returns the value of attribute edges.
-
#nodes ⇒ Object
readonly
Returns the value of attribute nodes.
-
#sdf_data ⇒ Object
Returns the value of attribute sdf_data.
Attributes included from MdlMolParser
Attributes included from Chem::Molecule
#cdk2atom, #cdk_mol, #name, #ob_mol, #source
Attributes included from Graph
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ MdlMolecule
constructor
A new instance of MdlMolecule.
Methods included from MdlMolParser
#date_time, #dimensional_codes, #entry, #open, #parse, #program_name
Methods included from Chem::Molecule
#-, #adjacent_index, #assign_2d_geometry, #bit_mat, #box_size, #breadth_first_search, #canonical_ring, #cdk_BCUT, #cdk_CPSA, #cdk_RotatableBondsCount, #cdk_calc_descriptor, #cdk_calc_descriptors, #cdk_find_all_rings, #cdk_fingerprint, #cdk_gasteiger_marsili_partial_charges, #cdk_generate_2D, #cdk_generate_randomly, #cdk_generate_vicinity, #cdk_hose_code, #cdk_hueckel, #cdk_mcs, #cdk_properties, #cdk_rule_of_file, #cdk_save_as, #cdk_setup, #cdk_sssr, #cdk_wiener_numbers, #cdk_xlogp, #composition, #connected?, #deep_dup, #delete, #delete_bond, #depth_first_search, #divide, #f_dfs, #find_smallest_ring, #find_sssr, #fingerprint, #generate_pubchem_subskey, #hilight, #induced_sub, #match, #match_by_ullmann, #method_missing, #molecular_weight, #n_hydrogen, #ob_export_as, #ob_save_as, #oxidation_number, #pubchem_subskeys, #remove_hydrogens!, #save, #save_as_mdl, #save_as_pdf, #subset_in_composition?, #to_cansmi, #to_eps, #to_inchi, #to_sybyl, #typ_str, #use_open_babel
Methods included from Graph
#adjacent_to, #clustering_coefficient, #each, #morgan, #terminal_nodes
Constructor Details
#initialize ⇒ MdlMolecule
Returns a new instance of MdlMolecule.
254 255 256 257 |
# File 'lib/chem/db/mdl.rb', line 254 def initialize @nodes = [] @edges = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Chem::Molecule
Instance Attribute Details
#edges ⇒ Object (readonly)
Returns the value of attribute edges.
252 253 254 |
# File 'lib/chem/db/mdl.rb', line 252 def edges @edges end |
#nodes ⇒ Object (readonly)
Returns the value of attribute nodes.
252 253 254 |
# File 'lib/chem/db/mdl.rb', line 252 def nodes @nodes end |
#sdf_data ⇒ Object
Returns the value of attribute sdf_data.
8 9 10 |
# File 'lib/chem/db/sdf.rb', line 8 def sdf_data @sdf_data end |
Class Method Details
.parse(file) ⇒ Object
264 265 266 267 268 |
# File 'lib/chem/db/mdl.rb', line 264 def self.parse(file) mol = MdlMolecule.new input = open(file) mol.parse input end |
.parse_io(input) ⇒ Object
259 260 261 262 |
# File 'lib/chem/db/mdl.rb', line 259 def self.parse_io(input) mol = MdlMolecule.new mol.parse input end |