Class: Chem::TINKER::TinkerAtom

Inherits:
Object
  • Object
show all
Includes:
Atom
Defined in:
lib/chem/db/tinker.rb

Constant Summary

Constants included from Atom

Atom::MDLAtomLineFormat

Instance Attribute Summary collapse

Attributes included from Atom

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

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 Chem::Transform::ThreeDimension

#z=

Methods included from Chem::Transform::TwoDimension

#pos, #x=, #y=

Constructor Details

#initialize(ff, x, y, z, connection) ⇒ TinkerAtom

Returns a new instance of TinkerAtom.



17
18
19
20
21
22
23
24
# File 'lib/chem/db/tinker.rb', line 17

def initialize ff, x, y, z, connection
  @x, @y, @z = x.to_f, y.to_f, z.to_f
  @element = ff[0..0]
  @connection = []
  connection.each do |n|
    @connection.push(n)
  end
end

Dynamic Method Handling

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

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



16
17
18
# File 'lib/chem/db/tinker.rb', line 16

def connection
  @connection
end

#elementObject (readonly)

Returns the value of attribute element.



16
17
18
# File 'lib/chem/db/tinker.rb', line 16

def element
  @element
end

#xObject (readonly)

Returns the value of attribute x.



16
17
18
# File 'lib/chem/db/tinker.rb', line 16

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



16
17
18
# File 'lib/chem/db/tinker.rb', line 16

def y
  @y
end

#zObject (readonly)

Returns the value of attribute z.



16
17
18
# File 'lib/chem/db/tinker.rb', line 16

def z
  @z
end