Class: Rafflesia::SimulationTrajectoryFrameSample

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/simulations/simulation_trajectory_frame_sample.rb

Constant Summary collapse

HASH_ATTRS =
{
  atom_count: :atom_count,
  bounds: :bounds,
  coordinate_sha256: :coordinate_sha_256,
  frame_index: :frame_index,
  has_time: :has_time,
  residue_count: :residue_count,
  time_ps: :time_ps
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SimulationTrajectoryFrameSample

Returns a new instance of SimulationTrajectoryFrameSample.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/simulations/simulation_trajectory_frame_sample.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @atom_count = hash[:atom_count]
  @bounds = hash[:bounds] ? Rafflesia::SimulationCoordinateBounds.new(hash[:bounds]) : nil
  @coordinate_sha_256 = hash[:coordinate_sha256]
  @frame_index = hash[:frame_index]
  @has_time = hash[:has_time]
  @residue_count = hash[:residue_count]
  @time_ps = hash[:time_ps]
end

Instance Attribute Details

#atom_countObject

Returns the value of attribute atom_count.



18
19
20
# File 'lib/rafflesia/simulations/simulation_trajectory_frame_sample.rb', line 18

def atom_count
  @atom_count
end

#boundsObject

Returns the value of attribute bounds.



18
19
20
# File 'lib/rafflesia/simulations/simulation_trajectory_frame_sample.rb', line 18

def bounds
  @bounds
end

#coordinate_sha_256Object

Returns the value of attribute coordinate_sha_256.



18
19
20
# File 'lib/rafflesia/simulations/simulation_trajectory_frame_sample.rb', line 18

def coordinate_sha_256
  @coordinate_sha_256
end

#frame_indexObject

Returns the value of attribute frame_index.



18
19
20
# File 'lib/rafflesia/simulations/simulation_trajectory_frame_sample.rb', line 18

def frame_index
  @frame_index
end

#has_timeObject

Returns the value of attribute has_time.



18
19
20
# File 'lib/rafflesia/simulations/simulation_trajectory_frame_sample.rb', line 18

def has_time
  @has_time
end

#residue_countObject

Returns the value of attribute residue_count.



18
19
20
# File 'lib/rafflesia/simulations/simulation_trajectory_frame_sample.rb', line 18

def residue_count
  @residue_count
end

#time_psObject

Returns the value of attribute time_ps.



18
19
20
# File 'lib/rafflesia/simulations/simulation_trajectory_frame_sample.rb', line 18

def time_ps
  @time_ps
end