Class: Aims::SCIteration

Inherits:
Object
  • Object
show all
Defined in:
lib/aims/output.rb

Overview

A single self-consistency iteration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSCIteration

Initialize a new self-consistency iteration



172
173
174
175
176
177
# File 'lib/aims/output.rb', line 172

def initialize
  self.timings = Timings.new
  self.d_eev = 0
  self.d_rho = 0
  self.d_etot = 0
end

Instance Attribute Details

#d_eevObject

The change in the sum of eigenvalues



163
164
165
# File 'lib/aims/output.rb', line 163

def d_eev
  @d_eev
end

#d_etotObject

The change in total energy



160
161
162
# File 'lib/aims/output.rb', line 160

def d_etot
  @d_etot
end

#d_rhoObject

The change in charge density



166
167
168
# File 'lib/aims/output.rb', line 166

def d_rho
  @d_rho
end

#timingsObject

The Timings data for this iteration



169
170
171
# File 'lib/aims/output.rb', line 169

def timings
  @timings
end

Instance Method Details

#total_cpu_timeObject

Return the total CPU time for this iteration



180
181
182
183
184
185
186
187
188
189
190
# File 'lib/aims/output.rb', line 180

def total_cpu_time
  self.timings.cpu_time("Time for this iteration")
  # begin
  #   total= self.timings.find{|t| t[:description] =~ /Time for this iteration/}
  #   total[:cpu_time]
  # rescue
  #   self.timings.inject(0){|total, time|
  #     total = total + (time[:cpu_time] || 0)
  #   }
  # end
end

#total_wall_timeObject

Return the total wall clock time for this iteration



193
194
195
196
197
198
199
200
201
202
203
# File 'lib/aims/output.rb', line 193

def total_wall_time
  self.timings.wall_time("Time for this iteration")
  # begin
  #   time = self.timings.find{|t| t[:description] =~ /Time for this iteration/}
  #   time[:wall_time] or 0
  # rescue
  #   self.timings.inject(0){|total, time|
  #     total = total + (time[:wall_clock_time] || 0)
  #   }
  # end
end