Class: Aims::GeometryStep
- Inherits:
-
Object
- Object
- Aims::GeometryStep
- Defined in:
- lib/aims/output.rb
Overview
A geometry relaxation step in the calculation
Instance Attribute Summary collapse
-
#chemical_potential ⇒ Object
The chemical potential for this geometry.
-
#forces ⇒ Object
The forces for this geometry.
-
#geometry ⇒ Object
The Aims::Geometry.
-
#sc_iterations ⇒ Object
readonly
An Array of Aims::SCIteration.
-
#step_num ⇒ Object
The relaxation step number.
-
#total_corrected_energy ⇒ Object
The total corrected energy for this geometry as a Float.
-
#total_energy ⇒ Object
The total energy for this geometry as a Float.
Instance Method Summary collapse
-
#initialize ⇒ GeometryStep
constructor
Initialize a new geometry step.
-
#sc_iteration ⇒ Object
Return the last self-consistency iteration for this relaxation step.
-
#timings ⇒ Object
A hash with keys :description, :cpu_time, and :wall_time with detailed time accounting for this geometry step.
-
#total_corrected_energy_per_atom ⇒ Object
Return the total corrected energy per atom for this relaxation step.
-
#total_cpu_time ⇒ Object
The total CPU time deterimed by summing the time for each self-consistency iteration.
-
#total_energy_per_atom ⇒ Object
Return the total energy per atom for this relaxation step.
-
#total_wall_time ⇒ Object
The total wall clock time deterimed by summing the time for each self-consistency iteration.
Constructor Details
#initialize ⇒ GeometryStep
Initialize a new geometry step
28 29 30 31 32 33 34 35 |
# File 'lib/aims/output.rb', line 28 def initialize @sc_iterations = Array.new @forces = Array.new @step_num = -1 @total_energy = Float::NAN @total_corrected_energy = Float::NAN @chemical_potential = Float::NAN end |
Instance Attribute Details
#chemical_potential ⇒ Object
The chemical potential for this geometry
22 23 24 |
# File 'lib/aims/output.rb', line 22 def chemical_potential @chemical_potential end |
#forces ⇒ Object
The forces for this geometry
25 26 27 |
# File 'lib/aims/output.rb', line 25 def forces @forces end |
#geometry ⇒ Object
The Aims::Geometry
13 14 15 |
# File 'lib/aims/output.rb', line 13 def geometry @geometry end |
#sc_iterations ⇒ Object (readonly)
An Array of Aims::SCIteration
10 11 12 |
# File 'lib/aims/output.rb', line 10 def sc_iterations @sc_iterations end |
#step_num ⇒ Object
The relaxation step number
7 8 9 |
# File 'lib/aims/output.rb', line 7 def step_num @step_num end |
#total_corrected_energy ⇒ Object
The total corrected energy for this geometry as a Float
19 20 21 |
# File 'lib/aims/output.rb', line 19 def total_corrected_energy @total_corrected_energy end |
#total_energy ⇒ Object
The total energy for this geometry as a Float
16 17 18 |
# File 'lib/aims/output.rb', line 16 def total_energy @total_energy end |
Instance Method Details
#sc_iteration ⇒ Object
Return the last self-consistency iteration for this relaxation step
38 39 40 |
# File 'lib/aims/output.rb', line 38 def sc_iteration self.sc_iterations.last end |
#timings ⇒ Object
A hash with keys :description, :cpu_time, and :wall_time with detailed time accounting for this geometry step.
54 55 56 57 58 59 60 |
# File 'lib/aims/output.rb', line 54 def timings timings = Timings.new self.sc_iterations.each{|sc_iter| timings.add!(sc_iter.timings) } timings end |
#total_corrected_energy_per_atom ⇒ Object
Return the total corrected energy per atom for this relaxation step
48 49 50 |
# File 'lib/aims/output.rb', line 48 def total_corrected_energy_per_atom self.total_corrected_energy/geometry.size rescue "N/A" end |
#total_cpu_time ⇒ Object
The total CPU time deterimed by summing the time for each self-consistency iteration
64 65 66 67 68 |
# File 'lib/aims/output.rb', line 64 def total_cpu_time self.sc_iterations.inject(0){|tot, sc_iter| tot += sc_iter.total_cpu_time } end |
#total_energy_per_atom ⇒ Object
Return the total energy per atom for this relaxation step
43 44 45 |
# File 'lib/aims/output.rb', line 43 def total_energy_per_atom self.total_energy/geometry.size rescue "N/A" end |
#total_wall_time ⇒ Object
The total wall clock time deterimed by summing the time for each self-consistency iteration
73 74 75 76 77 |
# File 'lib/aims/output.rb', line 73 def total_wall_time self.sc_iterations.inject(0){|tot, sc_iter| tot += sc_iter.total_wall_time } end |