Class: Rafflesia::SimulationTrajectoryInspectData

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

Constant Summary collapse

HASH_ATTRS =
{
  atom_count: :atom_count,
  backend: :backend,
  compatibility: :compatibility,
  frame_count: :frame_count,
  frame_time_step_ps: :frame_time_step_ps,
  has_time: :has_time,
  is_decoded: :is_decoded,
  residue_count: :residue_count,
  sampled_frames: :sampled_frames,
  selection_capabilities: :selection_capabilities,
  supported_measurements: :supported_measurements,
  time_end_ps: :time_end_ps,
  time_start_ps: :time_start_ps,
  topology: :topology,
  topology_format: :topology_format,
  trajectory: :trajectory,
  trajectory_format: :trajectory_format,
  trajectory_id: :trajectory_id,
  trajectory_manifest_object: :trajectory_manifest_object,
  unit_cell_frame_count: :unit_cell_frame_count,
  unsupported_measurements: :unsupported_measurements
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SimulationTrajectoryInspectData

Returns a new instance of SimulationTrajectoryInspectData.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 55

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @atom_count = hash[:atom_count]
  @backend = hash[:backend] ? Rafflesia::SimulationBackendEvidence.new(hash[:backend]) : nil
  @compatibility = hash[:compatibility] ? Rafflesia::SimulationTrajectoryCompatibility.new(hash[:compatibility]) : nil
  @frame_count = hash[:frame_count]
  @frame_time_step_ps = hash[:frame_time_step_ps]
  @has_time = hash[:has_time]
  @is_decoded = hash[:is_decoded]
  @residue_count = hash[:residue_count]
  @sampled_frames = (hash[:sampled_frames] || []).map { |item| item ? Rafflesia::SimulationTrajectoryFrameSample.new(item) : nil }
  @selection_capabilities = (hash[:selection_capabilities] || []).map { |item| item ? Rafflesia::SimulationSelectionCapability.new(item) : nil }
  @supported_measurements = (hash[:supported_measurements] || [])
  @time_end_ps = hash[:time_end_ps]
  @time_start_ps = hash[:time_start_ps]
  @topology = hash[:topology] ? Rafflesia::SimulationInputRef.new(hash[:topology]) : nil
  @topology_format = hash[:topology_format]
  @trajectory = hash[:trajectory] ? Rafflesia::SimulationInputRef.new(hash[:trajectory]) : nil
  @trajectory_format = hash[:trajectory_format]
  @trajectory_id = hash[:trajectory_id]
  @trajectory_manifest_object = hash[:trajectory_manifest_object] ? Rafflesia::ObjectRef.new(hash[:trajectory_manifest_object]) : nil
  @unit_cell_frame_count = hash[:unit_cell_frame_count]
  @unsupported_measurements = (hash[:unsupported_measurements] || [])
end

Instance Attribute Details

#atom_countObject

Returns the value of attribute atom_count.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def atom_count
  @atom_count
end

#backendObject

Returns the value of attribute backend.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def backend
  @backend
end

#compatibilityObject

Returns the value of attribute compatibility.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def compatibility
  @compatibility
end

#frame_countObject

Returns the value of attribute frame_count.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def frame_count
  @frame_count
end

#frame_time_step_psObject

Returns the value of attribute frame_time_step_ps.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def frame_time_step_ps
  @frame_time_step_ps
end

#has_timeObject

Returns the value of attribute has_time.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def has_time
  @has_time
end

#is_decodedObject

Returns the value of attribute is_decoded.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def is_decoded
  @is_decoded
end

#residue_countObject

Returns the value of attribute residue_count.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def residue_count
  @residue_count
end

#sampled_framesObject

Returns the value of attribute sampled_frames.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def sampled_frames
  @sampled_frames
end

#selection_capabilitiesObject

Returns the value of attribute selection_capabilities.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def selection_capabilities
  @selection_capabilities
end

#supported_measurementsObject

Returns the value of attribute supported_measurements.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def supported_measurements
  @supported_measurements
end

#time_end_psObject

Returns the value of attribute time_end_ps.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def time_end_ps
  @time_end_ps
end

#time_start_psObject

Returns the value of attribute time_start_ps.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def time_start_ps
  @time_start_ps
end

#topologyObject

Returns the value of attribute topology.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def topology
  @topology
end

#topology_formatObject

Returns the value of attribute topology_format.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def topology_format
  @topology_format
end

#trajectoryObject

Returns the value of attribute trajectory.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def trajectory
  @trajectory
end

#trajectory_formatObject

Returns the value of attribute trajectory_format.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def trajectory_format
  @trajectory_format
end

#trajectory_idObject

Returns the value of attribute trajectory_id.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def trajectory_id
  @trajectory_id
end

#trajectory_manifest_objectObject

Returns the value of attribute trajectory_manifest_object.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def trajectory_manifest_object
  @trajectory_manifest_object
end

#unit_cell_frame_countObject

Returns the value of attribute unit_cell_frame_count.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def unit_cell_frame_count
  @unit_cell_frame_count
end

#unsupported_measurementsObject

Returns the value of attribute unsupported_measurements.



32
33
34
# File 'lib/rafflesia/simulations/simulation_trajectory_inspect_data.rb', line 32

def unsupported_measurements
  @unsupported_measurements
end