Class: Chem::G98::AtomicOrbital

Inherits:
Object
  • Object
show all
Defined in:
lib/chem/db/g98.rb

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ AtomicOrbital

Returns a new instance of AtomicOrbital.



592
593
594
595
# File 'lib/chem/db/g98.rb', line 592

def initialize type
  @type = type
  @coefficient = Array.new
end

Instance Method Details

#push(coef) ⇒ Object



596
597
598
# File 'lib/chem/db/g98.rb', line 596

def push coef
  @coefficient.push coef
end

#to_sObject



599
600
601
602
603
604
605
# File 'lib/chem/db/g98.rb', line 599

def to_s
  s = sprintf("%5s ", @type)
  @coefficient.each do |coef|
    s = s + sprintf("%2.2f ", coef)
  end
  return s
end