nanome.beta.redis_interface module¶
-
class
PluginInstanceRedisInterface
(redis_host, redis_port, redis_password, redis_channel=None)[source]¶ Bases:
object
Provides interface for publishing PluginInstance RPC requests over Redis.
The idea is to feel like you’re using the standard PluginInstance, but all calls are being made through Redis.
-
add_to_workspace
(complex_list: List[nanome.api.structure.complex.Complex])[source]¶ Add a list of complexes to the current workspace.
-
apply_color_scheme
(color_scheme: nanome.util.enums.ColorScheme, target: nanome.util.enums.ColorSchemeTarget, only_carbons: bool = False)[source]¶ Applies a color scheme to selected atoms.
-
center_on_structures
(structures: Union[nanome.api.structure.complex.Complex, nanome.api.structure.molecule.Molecule, nanome.api.structure.chain.Chain, nanome.api.structure.residue.Residue, nanome.api.structure.atom.Atom, nanome.api.structure.bond.Bond])[source]¶ Repositions the workspace such that the provided structure(s) will be in the center of the world.
-
create_writing_stream
(indices_list: List[int], stream_type: nanome.util.enums.StreamType) → nanome.api.streams.stream.Stream[source]¶ Create a stream allowing the plugin to continuously update properties of many objects.
-
get_plugin_data
() → dict[source]¶ Custom function to get data necessary for serialization from the remote plugin.
-
request_complex_list
() → List[nanome.api.structure.complex.Complex][source]¶ Request the list of all complexes in the workspace, in shallow mode.
-
request_complexes
(id_list: List[int]) → List[nanome.api.structure.complex.Complex][source]¶ Requests a list of complexes by their indices.
Complexes returned contains the full structure (atom/bond/residue/chain/molecule)
-
request_controller_transforms
()[source]¶ Requests presenter controller info.
(head position, head rotation, left controller position, left controller rotation, right controller position, right controller rotation)
Requests spatial information of the plugin menu (position, rotation, scale).
-
request_presenter_info
() → nanome.api.user.presenter_info.PresenterInfo[source]¶ Get info about the presenter.
-
request_workspace
() → nanome.api.structure.workspace.Workspace[source]¶ Request the entire workspace, in deep mode
-
send_files_to_load
(files_list: List[str]) → nanome.util.file.LoadInfoDone[source]¶ Send a molecular structure file (PDB, SDF, etc.) to the workspace to render.
-
send_notification
(notification_type: nanome.util.enums.NotificationTypes, message: str)[source]¶ Send a notification to the user
Update the position, scale, and rotation of the menu.
-
update_stream
(stream: nanome.api.streams.stream.Stream, data: List[T])[source]¶ Feed new data into an existing stream.
-
update_structures_deep
(struct_list: List[Union[nanome.api.structure.complex.Complex, nanome.api.structure.molecule.Molecule, nanome.api.structure.chain.Chain, nanome.api.structure.residue.Residue, nanome.api.structure.atom.Atom, nanome.api.structure.bond.Bond]])[source]¶ Update the specific molecular structures in the scene to match the structures in parameter.
Will also update descendent structures and can be used to remove descendent structures.
-
update_structures_shallow
(structures: List[Union[nanome.api.structure.complex.Complex, nanome.api.structure.molecule.Molecule, nanome.api.structure.chain.Chain, nanome.api.structure.residue.Residue, nanome.api.structure.atom.Atom, nanome.api.structure.bond.Bond]])[source]¶ Update the specific molecular structures in the scene to match the structures in parameter.
Only updates the structure’s data, will not update children or other descendents.
-
upload_shapes
(shape_list: List[nanome.api.shapes.shape.Shape])[source]¶ Upload a list of shapes to the server.
Arg: shape_list: List of shapes to upload. Return type: list. List of shape IDs.
-
zoom_on_structures
(structures: Union[nanome.api.structure.complex.Complex, nanome.api.structure.molecule.Molecule, nanome.api.structure.chain.Chain, nanome.api.structure.residue.Residue, nanome.api.structure.atom.Atom, nanome.api.structure.bond.Bond]) → None[source]¶ Repositions and resizes the workspace such that the provided structure(s) will be in the
center of the users view.
-