narupa.trajectory.frame_data module¶
-
class
narupa.trajectory.frame_data.ArraysView(raw)¶ Bases:
narupa.trajectory.frame_data.RecordViewGive access to homogeneous arrays from a
FrameData.-
record_name= 'arrays'¶
-
set(key, value)¶
-
singular= 'array'¶
-
-
class
narupa.trajectory.frame_data.FrameData(raw_frame: narupa.protocol.trajectory.frame_pb2.FrameData = None)¶ Bases:
objectWrapper around the GRPC FrameData.
A
FrameDatacontains two kinds of records: single values of any type, or homogeneous arrays. The former kind can be accessed through thevaluesattribute, while the later is accessible through thearraysone. Both attribute behave like a dictionary. Trying to access a key that does not exist raises aKeyError.The set of keys with data in the frame is listed by
value_keys()andarray_keys().The most common frame properties are accessible as attribute in a normalized format. Shortcuts are not guaranteed to contain data. Trying to access a shortcut that does not contain data raises a
MissingDataErrorthat can also be caught as aKeyError.The available shortcuts can be listed using the
shortcutsproperty. The set of shortcuts that contain data is available from theused_shortcuts.-
array_keys¶
-
bond_orders¶
-
bond_pairs¶
-
box_vectors¶
-
chain_count¶
-
chain_names¶
-
copy()¶
-
kinetic_energy¶
-
particle_count¶
-
particle_elements¶
-
particle_names¶
-
particle_positions¶
-
particle_residues¶
-
particle_types¶
-
potential_energy¶
-
raw¶ Underlying GRPC/protobuf object.
-
residue_chains¶
-
residue_count¶
-
residue_ids¶
-
residue_names¶
-
server_timestamp¶
-
set_float_array(key, value)¶ Set an homogeneous array of floats in an existing or a new key.
Parameters: - key – The key under which to store the array.
- value – The array to store.
-
set_index_array(key, value)¶ Set an homogeneous array of indices in an existing or a new key.
Parameters: - key – The key under which to store the array.
- value – The array to store.
-
set_string_array(key, value)¶ Set an homogeneous array of strings in an existing or a new key.
Parameters: - key – The key under which to store the array.
- value – The array to store.
-
shortcuts¶
-
used_shortcuts¶
-
value_keys¶
-
-
exception
narupa.trajectory.frame_data.MissingDataError¶ Bases:
KeyErrorA shortcut does not contain data to return.