setPosition: Set Position

View source: R/NGLVieweR.R

setPositionR Documentation

Set Position

Description

Set position for the representation

Usage

setPosition(NGLVieweR, x = 0, y = 0, z = 0)

Arguments

NGLVieweR

A NGLVieweR object.

x

Position along the x-axis in angstroms. Default is 0.

y

Position along the y-axis in angstroms. Default is 0.

z

Position along the z-axis in angstroms. Default is 0.

Value

NGLVieweR object with updated setPosition parameters.

See Also

  • setScale()

  • zoomMove()

  • setRotation()

Other transformations: setRotation(), setScale(), zoomMove()

Examples

NGLVieweR("7CID") %>%
stageParameters(backgroundColor = "white") %>%
addRepresentation("cartoon", param=list(name="cartoon", colorValue="red")) %>%
addRepresentation("ball+stick", param=list(name="ball+stick",
colorValue="yellow",
colorScheme="element",
sele="200")) %>%
setPosition(25, 0, 0)

NGLVieweR documentation built on April 4, 2025, 4:33 a.m.