Sha256: 098502ccbf9176b439bfa8cd7f833b391e0ed4cf00ae66a6a3a61a1ed58054cb

Contents?: true

Size: 330 Bytes

Versions: 6

Compression:

Stored size: 330 Bytes

Contents

#
# Class for dealing with POTCAR.
#
module Potcar
  def self.load_file(file)
    results = {}
    results[:name] = file

    elements = Array.new
    File.open( file, "r" ).each do |line|
      if line =~ /VRHFIN\s*=\s*([A-Za-z]*)/
        elements << $1
      end
    end
    results[:elements] = elements
    results
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vasputils-0.0.9 lib/vasputils/potcar.rb
vasputils-0.0.8 lib/vasputils/potcar.rb
vasputils-0.0.7 lib/vasputils/potcar.rb
vasputils-0.0.6 lib/vasputils/potcar.rb
vasputils-0.0.5 lib/vasputils/potcar.rb
vasputils-0.0.4 lib/vasputils/potcar.rb