StructureComponent
Extends:
Component wrapping a Structure object
Example:
// get a structure component by loading a structure file into the stage
stage.loadFile( "rcsb://4opj" ).then( function( structureComponent ){
structureComponent.addRepresentation( "cartoon" );
structureComponent.autoView();
} );
Constructor Summary
Public Constructor | ||
public |
constructor(stage: Stage, structure: Structure, params: ComponentParameters) Create structure component |
Member Summary
Public Members | ||
public |
|
|
public |
Events emitted by the component |
|
public |
The wrapped structure |
|
public |
View on StructureComponent#structure. |
|
public |
|
|
public get |
Component type |
Private Members | ||
private |
Selection for StructureComponent#structureView |
Method Summary
Public Methods | ||
public |
addRepresentation(type: String, params: StructureRepresentationParameters): RepresentationComponent Add a new structure representation to the component |
|
public |
addTrajectory(trajPath: String | Frames, params: TrajectoryComponentParameters | TrajectoryParameters): TrajectoryComponent Add a new trajectory component to the structure |
|
public |
Automatically center and zoom the component |
|
public |
dispose() |
|
public |
|
|
public |
|
|
public |
Rebuild all representations |
|
public |
Rebuild all trajectories |
|
public |
|
|
public |
setDefaultAssembly(value: String): undefined Set the default assembly |
|
public |
setSelection(string: String): StructureComponent Set selection of StructureComponent#structureView |
|
public |
|
|
public |
|
Private Methods | ||
private |
initSelection(sele: String): undefined Initialize selection |
Inherited Summary
From class Component | ||
public get |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
Events emitted by the component |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
addAnnotation(position: Vector3, content: String | Element, params: Object): Annotation Add an anotation object |
|
public |
|
|
public |
addRepresentation(type: String, object: Object, params: RepresentationParameters): RepresentationComponent Add a new representation to the component |
|
public |
Automatically center and zoom the component |
|
public |
dispose() |
|
public |
eachAnnotation(callback: Function): undefined Iterator over each annotation and executing the callback |
|
public |
eachRepresentation(callback: Function): undefined Iterator over each representation and executing the callback |
|
public |
|
|
public abstract |
|
|
public |
|
|
public |
|
|
public |
getZoom() |
|
public |
|
|
public |
Remove all annotations from the component |
|
public |
Removes all representation components |
|
public |
removeAnnotation(annotation: Annotation): undefined Remove the give annotation from the component |
|
public |
Removes a representation component |
|
public |
setName() |
|
public |
setPosition(p: Vector3 | Array): Component Set position transform |
|
public |
setRotation(r: Quaternion | Euler | Array): Component Set rotation transform |
|
public |
Set scale transform |
|
public |
|
|
public |
setTransform(m: Matrix4): Component Set general transform. |
|
public |
setVisibility(value: Boolean): Component Set the visibility of the component, including added representations |
|
public |
|
|
public |
|
Public Constructors
public constructor(stage: Stage, structure: Structure, params: ComponentParameters) source
Create structure component
Override:
Component#constructorParams:
Name | Type | Attribute | Description |
stage | Stage | stage object the component belongs to |
|
structure | Structure | structure object to wrap |
|
params | ComponentParameters | component parameters |
Public Members
public defaultAssembly source
public signals: StructureComponentSignals source
Events emitted by the component
Override:
Component#signalspublic structureView: StructureView source
View on StructureComponent#structure. Change its selection via StructureComponent#setSelection.
public trajList source
Private Members
Public Methods
public addRepresentation(type: String, params: StructureRepresentationParameters): RepresentationComponent source
Add a new structure representation to the component
Override:
Component#addRepresentationParams:
Name | Type | Attribute | Description |
type | String | the name of the representation, one of: axes, backbone, ball+stick, base, cartoon, contact, distance, helixorient, hyperball, label, licorice, line surface, ribbon, rocket, rope, spacefill, trace, tube, unitcell. |
|
params | StructureRepresentationParameters | representation parameters |
Return:
RepresentationComponent | the created representation wrapped into a representation component object |
public addTrajectory(trajPath: String | Frames, params: TrajectoryComponentParameters | TrajectoryParameters): TrajectoryComponent source
Add a new trajectory component to the structure
Params:
Name | Type | Attribute | Description |
trajPath | String | Frames | path or frames object |
|
params | TrajectoryComponentParameters | TrajectoryParameters | parameters |
public autoView(sele: String | Integer, duration: Integer): undefined source
Automatically center and zoom the component
Override:
Component#autoViewpublic removeTrajectory() source
public setDefaultAssembly(value: String): undefined source
Set the default assembly
Params:
Name | Type | Attribute | Description |
value | String | assembly name |
public setSelection(string: String): StructureComponent source
Set selection of StructureComponent#structureView
Params:
Name | Type | Attribute | Description |
string | String | selection string |
public setVisibility() source
Set the visibility of the component, including added representations