Skip to content

Python API

This section is a Work In Progress. In the meantime, you can type

help()

in the python console to be guided through available commands and docstrings.

Application

quit

Camera

setCameraPosition

setCameraRotation

setCameraFov

setCameraNearClip

setCameraFarClip

setCameraProjectionOrthographic

setCameraProjectionPerspective

resetCamera

orientCamera

straightTravelCamera

getCameraPosition

getCameraRotation

Color

setColorScheme

setColorSchemeSelected

setSecondaryStructureColorScheme

Input and output

makeSnapshot

openFile

associateTrajectory

download

Representation

setRepresentation

setRepresentationSelected

Scene

newScene

deleteSystem

deleteSystemSelected

setColorLayout

setGraphicsConfig

Selection

selectAll

clearSelection

select

getSelectionState

System

getSystemIdByName

getSystemIdByPdb

getSystemIdByFileName

Visibility

showAll

hideAll

setVisibleSelected

setVisible

getVisibleState(systemId, item=SYSTEM_ITEM.SYSTEM, index=None)

Returns the visibility state of a system or one of its items.

Parameters

  • systemId: int — System identifier.
  • item: SYSTEM_ITEM = SYSTEM_ITEM.SYSTEM — Type of item to inspect.
  • index: int | None = None — Item index; omit it for the whole system.

Returns: VISIBLE_STATE — Visibility state of the requested item.