Class: Chem::CDK::CDKAtom

Inherits:
Object
  • Object
show all
Includes:
Atom, Transform::TwoDimension
Defined in:
lib/chem/utils/cdk.rb

Constant Summary

Constants included from Atom

Atom::MDLAtomLineFormat

Instance Attribute Summary collapse

Attributes included from Atom

#charge, #color, #label, #mass, #ob_atom, #rings, #v_pos, #visible, #z

Instance Method Summary collapse

Methods included from Atom

#atomic_number, #electro_negativity, #method_missing, #natural_bond_order, #to_mdl, #to_sybyl, #weight

Methods included from Transform::ThreeDimension

#z, #z=

Methods included from Transform::TwoDimension

#pos, #x=, #y=

Constructor Details

#initialize(cdk_atom) ⇒ CDKAtom

Returns a new instance of CDKAtom.



23
24
25
# File 'lib/chem/utils/cdk.rb', line 23

def initialize(cdk_atom)
  @cdk_atom = cdk_atom
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Chem::Atom

Instance Attribute Details

#cdk_atomObject (readonly)

Returns the value of attribute cdk_atom.



21
22
23
# File 'lib/chem/utils/cdk.rb', line 21

def cdk_atom
  @cdk_atom
end

Instance Method Details

#elementObject



27
# File 'lib/chem/utils/cdk.rb', line 27

def element ; @cdk_atom.getSymbol.intern   ; end

#xObject



28
# File 'lib/chem/utils/cdk.rb', line 28

def x ;       @cdk_atom.getX2d             ; end

#yObject



29
# File 'lib/chem/utils/cdk.rb', line 29

def y ;       @cdk_atom.getY2d             ; end