Class: Rafflesia::MoleculeDescriptors
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MoleculeDescriptors
- Defined in:
- lib/rafflesia/molecules/molecule_descriptors.rb
Constant Summary collapse
- HASH_ATTRS =
{ aromatic_atoms: :aromatic_atoms, aromatic_fraction: :aromatic_fraction, hbond_acceptors: :hbond_acceptors, hbond_donors: :hbond_donors, heavy_atoms: :heavy_atoms, logp: :logp, molecular_weight: :molecular_weight, rings: :rings, rotatable_bonds: :rotatable_bonds, tpsa: :tpsa }.freeze
Instance Attribute Summary collapse
-
#aromatic_atoms ⇒ Object
Returns the value of attribute aromatic_atoms.
-
#aromatic_fraction ⇒ Object
Returns the value of attribute aromatic_fraction.
-
#hbond_acceptors ⇒ Object
Returns the value of attribute hbond_acceptors.
-
#hbond_donors ⇒ Object
Returns the value of attribute hbond_donors.
-
#heavy_atoms ⇒ Object
Returns the value of attribute heavy_atoms.
-
#logp ⇒ Object
Returns the value of attribute logp.
-
#molecular_weight ⇒ Object
Returns the value of attribute molecular_weight.
-
#rings ⇒ Object
Returns the value of attribute rings.
-
#rotatable_bonds ⇒ Object
Returns the value of attribute rotatable_bonds.
-
#tpsa ⇒ Object
Returns the value of attribute tpsa.
Instance Method Summary collapse
-
#initialize(json) ⇒ MoleculeDescriptors
constructor
A new instance of MoleculeDescriptors.
Constructor Details
#initialize(json) ⇒ MoleculeDescriptors
Returns a new instance of MoleculeDescriptors.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 33 def initialize(json) super() hash = self.class.normalize(json) @aromatic_atoms = hash[:aromatic_atoms] @aromatic_fraction = hash[:aromatic_fraction] @hbond_acceptors = hash[:hbond_acceptors] @hbond_donors = hash[:hbond_donors] @heavy_atoms = hash[:heavy_atoms] @logp = hash[:logp] @molecular_weight = hash[:molecular_weight] @rings = hash[:rings] @rotatable_bonds = hash[:rotatable_bonds] @tpsa = hash[:tpsa] end |
Instance Attribute Details
#aromatic_atoms ⇒ Object
Returns the value of attribute aromatic_atoms.
21 22 23 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 21 def aromatic_atoms @aromatic_atoms end |
#aromatic_fraction ⇒ Object
Returns the value of attribute aromatic_fraction.
21 22 23 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 21 def aromatic_fraction @aromatic_fraction end |
#hbond_acceptors ⇒ Object
Returns the value of attribute hbond_acceptors.
21 22 23 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 21 def hbond_acceptors @hbond_acceptors end |
#hbond_donors ⇒ Object
Returns the value of attribute hbond_donors.
21 22 23 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 21 def hbond_donors @hbond_donors end |
#heavy_atoms ⇒ Object
Returns the value of attribute heavy_atoms.
21 22 23 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 21 def heavy_atoms @heavy_atoms end |
#logp ⇒ Object
Returns the value of attribute logp.
21 22 23 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 21 def logp @logp end |
#molecular_weight ⇒ Object
Returns the value of attribute molecular_weight.
21 22 23 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 21 def molecular_weight @molecular_weight end |
#rings ⇒ Object
Returns the value of attribute rings.
21 22 23 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 21 def rings @rings end |
#rotatable_bonds ⇒ Object
Returns the value of attribute rotatable_bonds.
21 22 23 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 21 def rotatable_bonds @rotatable_bonds end |
#tpsa ⇒ Object
Returns the value of attribute tpsa.
21 22 23 |
# File 'lib/rafflesia/molecules/molecule_descriptors.rb', line 21 def tpsa @tpsa end |