[Up]

Index of Rbq - Lua Interface Functions

207 total function(s)

last updated Tue Dec 14 16:06:01 2004

Function Categories


All Functions

Arbq_AddCustomAtomType rbq_GetAtomTypeFromName rbq_GetScriptObjectVarName rbq_IsResidueSelected
rbq_AddForceObjectToGroup rbq_GetAtomTypeName rbq_GetSelectedPdbs rbq_IsSaveDocQueryEnabled
rbq_AddMenuItem rbq_GetAtomTypeVdwRadius rbq_GetSelectedChainIndex rbq_IsScriptObjectFailStateSet
rbq_AddNodeForce rbq_GetBackboneAtomPos rbq_GetSelectedResidueIndex rbq_IsScriptObjectTickEnabled
rbq_AddNodeTorque rbq_GetBitmapTextMetric rbq_GetSelectedResidueIndexes Mrbq_MsgBox
rbq_AddPrevResBond rbq_GetChainBoxCenter rbq_GetSelectionCenter Orbq_OpenFfReportStream
rbq_AddScriptObjectVar rbq_GetChainDescrip rbq_GetSelectionColor rbq_OpenPdbFile
rbq_AddSeparator rbq_GetChainIndex rbq_GetSelectionExtent Prbq_PauseMovie
rbq_AddSubmenu rbq_GetChainMassCenter rbq_GetTimestepCount rbq_PopDrawMatrix
rbq_AppendAtomRecord rbq_GetChainName rbq_GetTimestepInteractionCount rbq_PushDrawMatrix
Crbq_CalcChainRms rbq_GetElementColor rbq_GetTopMenu rbq_ProgressBar_IncPercentDone
rbq_ClearFfCumInteractionCounts rbq_GetElementFromName rbq_GetTotalAtomsInResidue rbq_ProgressBar_Init
rbq_ClearScriptMenu rbq_GetElementMass rbq_GetTotalAtomTypes rbq_ProgressBar_SetDone
rbq_CloseFfReportStream rbq_GetElementVdwRadius rbq_GetTotalChainsInPdb rbq_ProgressBar_WasCancelled
rbq_CmdStatusOff rbq_GetEnergyName rbq_GetTotalDynamicSegmentsInPdb Trbq_TickRecordMovie
rbq_CmdStatusRestore rbq_GetFfCumInteractionCount rbq_GetTotalElements Rrbq_Redraw
rbq_CreateForceGroup rbq_GetFfRunState rbq_GetTotalEnergy rbq_RotateDrawMatrix
rbq_CreateScriptObject rbq_GetFfParams rbq_GetTotalEnergyTypes rbq_RotateForceObject
rbq_CurTimeInSeconds rbq_GetFile rbq_GetTotalFiles rbq_RotateForceObjectNode
Drbq_DeletePdbObject rbq_GetFirstAtomTypeId rbq_GetTotalForceObjectsInDynamicSegment rbq_RotatePdb
rbq_DrawBackbone rbq_GetForceObjectRecordedNodeRotation rbq_GetTotalInterResidueBonds rbq_RotateSelection
rbq_DrawBitmapText rbq_GetForceObjectRecordedNodeTranslation rbq_GetTotalIntraResidueBonds rbq_RotateSelectionCen
rbq_DrawBlockArrow rbq_GetForceObjProperty rbq_GetTotalMovieFrames Srbq_SelectPdb
rbq_DrawBox rbq_GetFreeGraphicObjectName rbq_GetTotalPdbs rbq_SetAtomTypeVdwRadius
rbq_DrawBoxLc rbq_GetGrtRotation rbq_GetTotalResiduesInChain rbq_SetCommandEchoLimit
rbq_DrawCovalent rbq_GetGraphicWinSize rbq_GetTotalScriptObjects rbq_SetCsoVar
rbq_DrawCovalentBondImage rbq_GetInputString rbq_GetTotalScriptObjectVars rbq_SetDrawColor
rbq_DrawCylinder rbq_GetInputVector rbq_GetTotalSelectedChains rbq_SetDrawMatrix
rbq_DrawCylinderLc rbq_GetInterResidueBond rbq_GetTotalSelectedResidues rbq_SetGlNormal
rbq_DrawLine rbq_GetIntraResidueBond rbq_GetViewCenter rbq_SetMovieFrame
rbq_DrawOrthoQuad rbq_GetLuaStackSpace rbq_GetViewLookDir rbq_SetFfReportCondition
rbq_DrawOrthoText rbq_GetMainWinSize rbq_GetViewMatrix rbq_SetForceObjProperty
rbq_DrawQuad rbq_GetMovieFrame rbq_GetViewRotCenter rbq_SetMoviePlaybackDir
rbq_DrawSpacefill rbq_GetMoviePlaybackDir rbq_GetViewUpDir rbq_SetPdbName
rbq_DrawSphere rbq_GetObjectBoxCenter Hrbq_HaveSelection rbq_SetPdbTransformMatrix
rbq_DrawSphereLc rbq_GetObjectIndexFromName Irbq_InputCommand rbq_SetResidueColor
rbq_DrawWireArc rbq_GetObjectMassCenter rbq_InsPdbFile rbq_SetScriptObjectVar
Erbq_EnableCommandStatus rbq_GetObjectExtent rbq_IsAddToSelectionSet rbq_ShowAnnotation
rbq_EnableCustomForceContainer rbq_GetPdbBoxCenter rbq_IsCenterViewOnInsertedObjectSet rbq_ShowWaitCursor
rbq_EnableDrawing rbq_GetPdbFileName rbq_IsChainVisible rbq_SpawnProcess
rbq_EnableLuaError rbq_GetPdbMassCenter rbq_IsCmdStatusEnabled rbq_StdOut
rbq_EnableSaveDocQuery rbq_GetPdbName rbq_IsCreateSingleAtomNodeSet rbq_StepForcefield
rbq_ErrOut rbq_GetPdbIndexFromName rbq_IsFileHere Trbq_TerminateProcess
rbq_ExistAnnotation rbq_GetPdbTransformMatrix rbq_IsForceDisplayLogScaleSet rbq_TransformForceObject
Grbq_GetAppDir rbq_GetResidueBoxCenter rbq_IsForcefieldMovementEnabled rbq_TransformForceObjectNode
rbq_GetAtomElement rbq_GetResidueMassCenter rbq_IsForcefieldRunning rbq_TranslateDrawMatrix
rbq_GetAtomIndex rbq_GetResidueColor rbq_IsForceObjectDrawCovalentSet rbq_TranslateForceObject
rbq_GetAtomName rbq_GetResidueIndex rbq_IsHetAtom rbq_TranslatePdb
rbq_GetAtomPdbName rbq_GetResidueBoxIntersect rbq_IsLuaErrorEnabled rbq_TranslateSelection
rbq_GetAtomPos rbq_GetResidueName rbq_IsMoviePaused Urbq_UpdateForceObjectAtomPositions
rbq_GetAtomSerial rbq_GetScriptObjectName rbq_IsMovieStopped Wrbq_WinExec
rbq_GetAtomType rbq_GetScriptObjectVar rbq_IsNucleicResidue

Annotation Functions

Drbq_DrawBitmapText rbq_DrawOrthoText Grbq_GetBitmapTextMetric
rbq_DrawOrthoQuad Erbq_ExistAnnotation Srbq_ShowAnnotation

ChemDraw Functions

Drbq_DrawBackbone rbq_DrawSpacefill rbq_GetElementVdwRadius rbq_IsForceDisplayLogScaleSet
rbq_DrawCovalent Grbq_GetElementColor rbq_GetResidueColor rbq_IsForceObjectDrawCovalentSet
rbq_DrawCovalentBondImage rbq_GetElementMass Irbq_IsChainVisible Srbq_SetResidueColor

File Functions

Arbq_AppendAtomRecord rbq_GetTotalFiles rbq_IsCenterViewOnInsertedObjectSet rbq_IsLuaErrorEnabled
Grbq_GetFile Irbq_InsPdbFile rbq_IsFileHere Orbq_OpenPdbFile

ForceField Functions

Arbq_AddCustomAtomType Grbq_GetEnergyName rbq_GetTimestepInteractionCount rbq_IsForcefieldRunning
rbq_AddForceObjectToGroup rbq_GetFfCumInteractionCount rbq_GetTotalElements Orbq_OpenFfReportStream
Crbq_ClearFfCumInteractionCounts rbq_GetFfRunState rbq_GetTotalEnergy Srbq_SetFfReportCondition
rbq_CloseFfReportStream rbq_GetFfParams rbq_GetTotalEnergyTypes rbq_StepForcefield
rbq_CreateForceGroup rbq_GetTimestepCount Irbq_IsForcefieldMovementEnabled

ForceObject Functions

Arbq_AddCustomAtomType rbq_GetAtomTypeVdwRadius rbq_GetForceObjProperty rbq_RotateForceObjectNode
rbq_AddForceObjectToGroup rbq_GetElementFromName rbq_GetObjectIndexFromName Srbq_SetAtomTypeVdwRadius
rbq_AddNodeForce rbq_GetElementMass rbq_GetTotalAtomTypes rbq_SetForceObjProperty
rbq_AddNodeTorque rbq_GetElementVdwRadius rbq_GetTotalDynamicSegmentsInPdb Trbq_TransformForceObject
Grbq_GetAtomType rbq_GetFirstAtomTypeId rbq_GetTotalForceObjectsInDynamicSegment rbq_TransformForceObjectNode
rbq_GetAtomTypeFromName rbq_GetForceObjectRecordedNodeRotation Irbq_IsCreateSingleAtomNodeSet rbq_TranslateForceObject
rbq_GetAtomTypeName rbq_GetForceObjectRecordedNodeTranslation Rrbq_RotateForceObject Urbq_UpdateForceObjectAtomPositions

Forcefield Functions

Trbq_TickRecordMovie

Geometry Functions

Crbq_CalcChainRms rbq_GetObjectExtent rbq_GetSelectionCenter Srbq_SetPdbTransformMatrix
Grbq_GetAtomPos rbq_GetPdbBoxCenter rbq_GetSelectionExtent Trbq_TransformForceObject
rbq_GetChainBoxCenter rbq_GetPdbMassCenter Rrbq_RotateForceObject rbq_TransformForceObjectNode
rbq_GetChainMassCenter rbq_GetPdbTransformMatrix rbq_RotateForceObjectNode rbq_TranslateForceObject
rbq_GetGrtRotation rbq_GetResidueBoxCenter rbq_RotatePdb rbq_TranslatePdb
rbq_GetObjectBoxCenter rbq_GetResidueMassCenter rbq_RotateSelection rbq_TranslateSelection
rbq_GetObjectMassCenter rbq_GetResidueBoxIntersect rbq_RotateSelectionCen Urbq_UpdateForceObjectAtomPositions

Graphics Functions

Drbq_DrawBitmapText rbq_DrawOrthoQuad Grbq_GetBitmapTextMetric Srbq_SetDrawColor
rbq_DrawBlockArrow rbq_DrawOrthoText rbq_GetGraphicWinSize rbq_SetDrawMatrix
rbq_DrawBox rbq_DrawQuad rbq_GetMainWinSize rbq_SetGlNormal
rbq_DrawBoxLc rbq_DrawSphere Prbq_PopDrawMatrix Trbq_TranslateDrawMatrix
rbq_DrawCylinder rbq_DrawSphereLc rbq_PushDrawMatrix
rbq_DrawCylinderLc rbq_DrawWireArc Rrbq_Redraw
rbq_DrawLine Erbq_EnableDrawing rbq_RotateDrawMatrix

Movie Functions

Grbq_GetMovieFrame Irbq_IsMoviePaused Trbq_TickRecordMovie
rbq_GetMoviePlaybackDir rbq_IsMovieStopped Srbq_SetMovieFrame
rbq_GetTotalMovieFrames Prbq_PauseMovie rbq_SetMoviePlaybackDir

Pdb Functions

Arbq_AddPrevResBond rbq_GetChainName rbq_GetPdbTransformMatrix rbq_GetTotalPdbs
rbq_AppendAtomRecord rbq_GetElementColor rbq_GetResidueBoxCenter rbq_GetTotalResiduesInChain
Drbq_DeletePdbObject rbq_GetElementFromName rbq_GetResidueMassCenter rbq_GetTotalSelectedChains
Grbq_GetAtomElement rbq_GetElementMass rbq_GetResidueIndex rbq_GetTotalSelectedResidues
rbq_GetAtomIndex rbq_GetElementVdwRadius rbq_GetResidueBoxIntersect Irbq_InsPdbFile
rbq_GetAtomName rbq_GetFirstAtomTypeId rbq_GetResidueName rbq_IsHetAtom
rbq_GetAtomPdbName rbq_GetInterResidueBond rbq_GetSelectedPdbs rbq_IsNucleicResidue
rbq_GetAtomPos rbq_GetIntraResidueBond rbq_GetSelectedChainIndex rbq_IsResidueSelected
rbq_GetAtomSerial rbq_GetObjectBoxCenter rbq_GetSelectedResidueIndex Orbq_OpenPdbFile
rbq_GetAtomType rbq_GetObjectIndexFromName rbq_GetSelectedResidueIndexes Rrbq_RotatePdb
rbq_GetAtomTypeFromName rbq_GetObjectMassCenter rbq_GetSelectionCenter rbq_RotateSelection
rbq_GetAtomTypeName rbq_GetObjectExtent rbq_GetSelectionExtent rbq_RotateSelectionCen
rbq_GetBackboneAtomPos rbq_GetPdbBoxCenter rbq_GetTotalAtomsInResidue Srbq_SelectPdb
rbq_GetChainBoxCenter rbq_GetPdbFileName rbq_GetTotalAtomTypes rbq_SetPdbName
rbq_GetChainDescrip rbq_GetPdbMassCenter rbq_GetTotalChainsInPdb rbq_SetPdbTransformMatrix
rbq_GetChainIndex rbq_GetPdbName rbq_GetTotalInterResidueBonds Trbq_TranslatePdb
rbq_GetChainMassCenter rbq_GetPdbIndexFromName rbq_GetTotalIntraResidueBonds rbq_TranslateSelection

Script Functions

Arbq_AddMenuItem rbq_EnableLuaError rbq_GetTopMenu rbq_ProgressBar_SetDone
rbq_AddScriptObjectVar rbq_EnableSaveDocQuery Hrbq_HaveSelection rbq_ProgressBar_WasCancelled
rbq_AddSeparator rbq_ErrOut Irbq_InputCommand Rrbq_Redraw
rbq_AddSubmenu Grbq_GetAppDir rbq_IsCenterViewOnInsertedObjectSet Srbq_SetCommandEchoLimit
Crbq_ClearScriptMenu rbq_GetFreeGraphicObjectName rbq_IsCmdStatusEnabled rbq_SetCsoVar
rbq_CmdStatusOff rbq_GetGraphicWinSize rbq_IsFileHere rbq_SetScriptObjectVar
rbq_CmdStatusRestore rbq_GetInputString rbq_IsLuaErrorEnabled rbq_ShowWaitCursor
rbq_CreateScriptObject rbq_GetInputVector rbq_IsSaveDocQueryEnabled rbq_SpawnProcess
rbq_CurTimeInSeconds rbq_GetLuaStackSpace Mrbq_MsgBox rbq_StdOut
Erbq_EnableCommandStatus rbq_GetMainWinSize Prbq_ProgressBar_IncPercentDone Trbq_TerminateProcess
rbq_EnableCustomForceContainer rbq_GetScriptObjectVar rbq_ProgressBar_Init Wrbq_WinExec

ScriptObject Functions

Arbq_AddScriptObjectVar rbq_GetScriptObjectName rbq_GetTotalScriptObjects rbq_IsScriptObjectTickEnabled
Crbq_CreateScriptObject rbq_GetScriptObjectVar rbq_GetTotalScriptObjectVars Srbq_SetCsoVar
Grbq_GetFreeGraphicObjectName rbq_GetScriptObjectVarName Irbq_IsScriptObjectFailStateSet rbq_SetScriptObjectVar

Selection Functions

Grbq_GetSelectedPdbs rbq_GetSelectionCenter rbq_GetTotalSelectedResidues Rrbq_RotateSelection
rbq_GetSelectedChainIndex rbq_GetSelectionColor Hrbq_HaveSelection rbq_RotateSelectionCen
rbq_GetSelectedResidueIndex rbq_GetSelectionExtent Irbq_IsAddToSelectionSet Srbq_SelectPdb
rbq_GetSelectedResidueIndexes rbq_GetTotalSelectedChains rbq_IsResidueSelected Trbq_TranslateSelection

Vector Functions

Grbq_GetInputVector

View Functions

Grbq_GetViewCenter rbq_GetViewMatrix rbq_GetViewUpDir rbq_IsLuaErrorEnabled
rbq_GetViewLookDir rbq_GetViewRotCenter Irbq_IsCenterViewOnInsertedObjectSet

rbq_AddCustomAtomType

descrip

Adds a new atom type to the list of atom types used in the forcefield.

params

number iElement = element
number fVdwRadius = van der waals radius
number fCharge = electrical charge on atom
string sName = name of the new atom type

returns

number iNewAtomType = number of new atom type
or
nil if error

notes

Use rbq_SetForceObjProperty() to set the atom type of an atom to the newly-defined type.

seealso

rbq_SetForceObjProperty()

rbq_AddForceObjectToGroup

descrip

Adds a force object to a force group.

params

number iForceGroup = index of force group in custom force container
number iPdb = index of pdb in document
number iDynSeg = index of dynamic segment in pdb
number iRes = index of force object in dyn seg

returns

number bRet = 1
or
nil if error

notes

seealso

rbq_CreateForceGroup(), rbq_EnableCustomForceContainer()

rbq_AddMenuItem

descrip

Adds a menu item to the main window menu. Typically used in building submenus and commands in the Script menu.

params

QPopupMenu *pMenu ptr to the menu which will add the param item
string sMenuItemName name of item, as shown in menu
string sDescrip description of item, as shown in tooltip
string sCmd command to be executed when item is clicked

returns

number bRet = 1 or nil

notes

seealso

rbq_GetTopMenu(), rbq_AddSubmenu(), rbq_ClearScriptMenu()

rbq_AddNodeForce

descrip

Applies param force to param node of param force object at param position.

params

number iPdb = index of pdb in document
number iDynSeg = index of dynamic segment in pdb
number iRes = index of force object in dyn seg
number iNode = index of node in force object
numbers x, y, z = position of force application
nubers fx, fy, fz = components of force

returns

1 if success, else nil if error

notes

This function is used by scripts that apply 'driving forces' to influence a simulation. The script object should call this function from within the 'fiTick.lua' event script, so that the force will be properly applied during the forcefield timestep.

If the position of application of force on the node is displaced from the node center-of-mass, the applied force will also produce a torque on the node.

seealso

rbq_AddNodeTorque()

rbq_AddNodeTorque

descrip

Applies param toraue to param node of param force object at param position.

params

number iPdb = index of pdb in document
number iDynSeg = index of dynamic segment in pdb
number iRes = index of force object in dyn seg
number iNode = index of node in force object
nubers tx, ty, tz = components of torque

returns

1 if success, else nil if error

notes

This function is used by scripts that apply 'driving forces' to influence a simulation. The script object should call this function from within the 'fiTick.lua' event script, so that the torque will be properly applied during the forcefield timestep.

seealso

rbq_AddNodeForce()

rbq_AddPrevResBond

descrip

Adds an inter-residue bond between a static residue and previous residue in chain.

params

number iPdb = index of pdb in document
number iChain = index of chain in pdb
number iRes = index of residue in chain
number iAtom = index of atom in residue
number jAtom = index of atom in previous residue

returns

number bRet = 1 if success, else nil if error

notes

The current implementation only creates inter-residue betweens between residues that are in a standard sequence direction. For nucleic acids, this means that the PDB sequence of residues corresponds to a 5' to 3' sequence. For proteins, this means the PDB sequence corresponds to an amino to carboxyl sequence of residues.

This function can be used to create bonds between residues which are in a reversed sequence.

seealso


rbq_AddScriptObjectVar

descrip

Adds a variable to the context of an executing script. The variable is persistent between intervals of execution of script code, such as the tick() function, which is called every idle cycle. The variable is accessed within script code through the lua functions setglobal() and getglobal().

params

string sScriptObjectName name of script object
string sVarName name of variable to be added
string sVal initial value of variable

returns

number bRet = 1 or nil

notes

If the script object is in a fail state, the variable will not be added and nil will always be returned. Currently, the name and value parameters must be non-zero in length.

seealso

rbq_CreateScriptObject(), rbq_SetScriptObjectVar(), rbq_GetScriptObjectVar(), rbq_IsScriptObjectFailStateSet(), lua functions setglobal(), getglobal()

rbq_AddSeparator

descrip

Adds a line separator to a menu. This is used to separate groups of menu items.

params

QPopupMenu *pMenu

returns

number bRet = 1 or nil

notes

seealso

rbq_AddMenuItem(), rbq_AddSubmenu(), rbq_GetTopMenu(), rbq_ClearScriptMenu()

rbq_AddSubmenu

descrip

Creates a submenu in the param parent menu.

params

QPopupMenu *pParentMenu ptr to menu which adds the submenu
const char *szSubmenuName name of submenu, as shown in the parent menu

returns

userdata QPopupMenu *pSubmenu

notes

seealso

rbq_GetTopMenu()

rbq_AppendAtomRecord

descrip

Appends a PDB ATOM record to param file with param atom data.

params

string sFilename
number bHetAtom
number iAtomSerial
string sAtomName
string sResidueName
string sChainId
number iResidueSequenceNum
numbers x, y, z = atom position coordinates

returns

number bRet = 1
or
nil if error

notes

seealso

rbq_IsHetAtom(), rbq_GetAtomSerial(), rbq_GetAtomPdbName(), rbq_GetResidueName(), rbq_GetAtomPos()

rbq_CalcChainRms

descrip

Calculates the RMS difference between the backbone atoms of 2 pdb chains.

params

string sPdbChainI
string sPdbChainJ

returns

number fRet = RMS value
string sStatus
or
number fRet = -1
string sStatus if error

notes

The chains must belong to currently-loaded PDB models.

The calculation can only be done if there is a sequence map file for the two chains, where the sequence file is located in the 'seq' subdirectory and named '<sPdbChainI>-<sPdbChainJ>.smap'.

The RMS difference is calculated as sqrt( sum( i = 1, i = N, (dist_iA_iB)^2 ) / N ) where N is the number of common backbone atoms in chains A and B and dist_ia_ib is the distance between the backbone atom i in chain A and backbone atom i in chain B.

seealso


rbq_ClearFfCumInteractionCounts

descrip

Resets cumulative interaction counts in forcefield.

params

returns

notes

seealso

rbq_GetFfCumInteractionCount()

rbq_ClearScriptMenu

descrip

Deletes all dynamic menu items which have been added to the top-level script menu. This method is typically called prior to recreating the script submenu structure

params

returns

notes

seealso

CreateScriptMenu.lua

rbq_CloseFfReportStream

descrip

Closes a stream for detailed reporting of forcefield interactions.

params

returns

number bRet = 1 or 0

notes

seealso

rbq_OpenFfReportStream(), rbq_SetFfReportCondition()

rbq_CmdStatusOff

descrip

Disables reporting of status by the command processor after execution of commands. The previous enable state is pushed onto a stack, allowing for nested calls of rbq_CmdStatusOff() and rbq_CmdStatusRestore().

params

returns

notes

If an error occurs at some point in script processing, command status is automatically reenabled.

seealso

rbq_CmdStatusRestore(), rbq_EnableCommandStatus(), rbq_IsCmdStatusEnabled()

rbq_CmdStatusRestore

descrip

Restores previous enable state of command status reporting by the command processor.

params

returns

notes

seealso

rbq_CmdStatusOff(), rbq_IsCmdStatusEnabled()

rbq_CreateForceGroup

descrip

Adds a new force group to a custom force container.

params

number bMoveGroup = enables movement of the objects as a group
number bIntraGroupForceCalc = enables force calculations between objects in group

returns

number iForceGroup = index of created force group
or
nil if error

notes

The created group is empty. To add force objects to the group, call rbq_AddForceObjectToGroup(). If bIntraGroupForceCalc is true, then individual movement of the objects in the group will also be enabled.

seealso

rbq_AddForceObjectToGroup(), rbq_EnableCustomForceContainer()

rbq_CreateScriptObject

descrip

Creates a persistent object which can execute user-defined code. The object is created and stored in a list of objects referred to as annotations. The object can execute drawing, idle processing and keyboard handling code as defined in lua script files located in a subdirectory associated with the object.

params

string sObjectName
number bTimeUser
[number bKeyboardUser]

returns

number bCreated = 1 or nil

notes

seealso

rbq_GetFreeGraphicObjectName(), rbq_AddScriptObjectVar(), CRbqScriptObject.

rbq_CurTimeInSeconds

descrip

Returns number of seconds since the Epoch (1/1/1970).

params

returns

number iTimeInSeconds

notes

seealso


rbq_DeletePdbObject

descrip

Deletes the named pdb object.

params

string sPdbName

returns

number bRet = 1 if success, else nil if error
string sStatus

notes

seealso

rbq_InsPdbFile()

rbq_DrawBackbone

descrip

Sets draw state of the backbone segments between residues for the current selection.

params

number iShow = 1 or 0
[number iEchoCmd = 1 or 0]

returns

number bRet = 1 or nil

notes

Probably should be renamed to 'rbq_SetDrawBackbone()' to avoid confusion with rbq_DrawXXX() functions.

seealso

rbq_DrawCovalent(), rbq_DrawSpacefill()

rbq_DrawBitmapText

descrip

Draws param text as a bitmap at param position and color.

params

string sText
numbers x, y, z = starting position of text
numbers r, g, b = (red, green, blue) color vector (scalar range: [0 - 1])

returns

number bRet = 1
or
nil if error

notes

The text is drawn in a predefined font style and size. The font is mono-spaced. The text is drawn at a fixed orientation at the param location in 3D space, and its visibility is affected by the location of the current viewpoint.

For the proper persistent display of the text, this function should be called from the draw event script of a script object.

seealso

rbq_DrawOrthoText()

rbq_DrawBlockArrow

descrip

Draws a block arrow.

params

numbers x0, y0, z0 = start point
numbers x1, y1, z1 = end point
numbers r, g, b = color
number t = thickness (-1 for auto-calc)

returns

number bRet = 1 or nil

notes

seealso


rbq_DrawBox

descrip

Draws a box with param size.

params

numbers w, h, d = size of box

returns

number bRet = 1 or nil

notes

The location used to draw the box must be previously defined using the functions rbq_SetDrawMatrix() or rbq_TranslateDrawMatrix(). The color to draw the box must be previously defined with rbq_SetDrawColor().

seealso

rbq_DrawBoxLc(), rbq_DrawCylinder(), rbq_DrawSphere(), rbq_DrawLine(), rbq_SetDrawMatrix(), rbq_SetDrawColor(), rbq_PushDrawMatrix(), rbq_PopDrawMatrix(), rbq_TranslateDrawMatrix(), rbq_RotateDrawMatrix()

rbq_DrawBoxLc

descrip

Draws a box with param location, size and color.

params

numbers m00, ..., m015 = transform matrix of box location
numbers w, h, d = size of box
numbers r, g, b = color of box

returns

number bRet = 1 or nil

notes

seealso

rbq_DrawBox()

rbq_DrawCovalent

descrip

Sets draw state of the covalent bonds between atoms for the current selection.

params

int iShow = 1 or 0,
[int iEchoCmd = 1 or 0]

returns

number bRet = 1 or nil

notes

Probably should be renamed to 'rbq_SetDrawCovalent()' to avoid confusion with rbq_DrawXXX() functions.

seealso

rbq_DrawSpacefill(), rbq_DrawBackbone()

rbq_DrawCovalentBondImage

descrip

Draws the appearance of a covalent bond.

params

numbers xi, yi, zi = position of atom i
number iEl = element of atom i
numbers xj, yj, zj = position of atom j
number jEl = element of atom j
number fSize = radius of covalent bond
[numbers r, g, b = color of bond]

returns

number bRet = 1 or nil

notes

This function is typically used in annotations and schematic simulations that represent the making or breaking of covalent bonds. If the color parameters are not given, the bond halves will be drawn using the CPK of the atoms.

seealso


rbq_DrawCylinder

descrip

Draws a cylinder with param size.

params

number radius = radius
number height = height

returns

number bRet = 1 or nil

notes

The location and color used to draw the cylinder must be previously defined using the functions rbq_SetDrawMatrix() and rbq_SetDrawColor().

seealso

rbq_DrawCylinderLc(), rbq_DrawBox(), rbq_DrawSphere(), rbq_DrawLine(), rbq_SetDrawMatrix(), rbq_SetDrawColor(), rbq_PushDrawMatrix(), rbq_PopDrawMatrix(), rbq_TranslateDrawMatrix(), rbq_RotateDrawMatrix(),

rbq_DrawCylinderLc

descrip

Draws a cylinder with param location, size and color.

params

numbers m00, ..., m015 = transform matrix defining location
number radius = radius
number height = height
numbers r, g, b = color

returns

number bRet = 1 or nil

notes

The orientation of the cylinder when the transform is the identity matrix is with the base at the origin and the apex pointing down the +z axis.

seealso


rbq_DrawLine

descrip

Draws a line with param endpoints and color.

params

numbers x0, y0, z0 = starting point of line
numbers x1, y1, z1 = ending point of line
numbers r, g, b = color of line

returns

notes

seealso

rbq_DrawBoxLc(), rbq_DrawCylinderLc(), rbq_DrawSphereLc()

rbq_DrawOrthoQuad

descrip

Draws a quadrilateral polygon in orthographic projection.

params

numbers v0x, v0y, v0z = upper-left corner
numbers v1x, v1y, v1z = lower-left corner
numbers v2x, v2y, v2z = lower-right corner
numbers v3x, v3y, v3z = upper-right corner
numbers r, g, b = color
number fTrans = transparency

returns

number bRet = 1 or nil

notes

This function can be used to draw a semi-transparent background that can serve as a 'billboard' for orthographic text.

The coordinates { x, y, z } that define the boundaries of the quadrilateral are window pixel coordinates, where the upper-left corner begins at (0, 0). The positive x and y directions increase to the right and down. The z coordinate must be in the range (-2, -1].

If fTrans = 0, the quad is completely opaque. If fTrans = 1, the quad is completely transparent.

seealso

rbq_DrawOrthoText()

rbq_DrawOrthoText

descrip

Draws param text as a bitmap text at param screen position and color.

params

string sText
numbers col, row = starting position of text
numbers r, g, b = (red, green, blue) color vector (scalar range: [0 - 1])

returns

number bRet = 1
or
nil if error

notes

Orthographic text is overlaid on the graphics window independently from the current view location and orientation. Col 0, Row 0 start in the upper-left corner of the screen.

For the proper persistent display of the text, this function should be called from the draw event script of a script object.

seealso

rbq_DrawBitmapText(), rbq_DrawOrthoQuad()

rbq_DrawQuad

descrip

Draws a quad polygon with param vertices.

params

numbers x, y, z = pt0
numbers x, y, z = pt1
numbers x, y, z = pt2
numbers x, y, z = pt3

returns

number bRet = 1 or nil

notes

The normal of the polygon should have been set with a prior call to rbq_SetGlNormal(). The vertices should have a positive winding order. The color of the polygon is determined by the most recent 'rbq_SetDrawColor()' call.

seealso

rbq_SetDrawColor(), rbq_SetGlNormal()

rbq_DrawSpacefill

descrip

Sets draw state of the vdw boundary spheres for atoms for the current selection.

params

int iShow = 1 or 0
[int iEchoCmd = 1 or 0]

returns

number bRet = 1 or nil

notes

Probably should be renamed to 'rbq_SetDrawSpacefill()' to avoid confusion with rbq_DrawXXX() functions.

seealso

rbq_DrawCovalent(), rbq_DrawBackbone()

rbq_DrawSphere

descrip

Draws a sphere at param position with param radius and param color.

params

number radius = radius

returns

number bRet = 1 or nil

notes

seealso

rbq_DrawSphereLc(), rbq_DrawCylinder(), rbq_DrawBox(), rbq_DrawLine(), rbq_SetDrawMatrix(), rbq_SetDrawColor(), rbq_PushDrawMatrix(), rbq_PopDrawMatrix(), rbq_TranslateDrawMatrix(), rbq_RotateDrawMatrix()

rbq_DrawSphereLc

descrip

Draws a sphere at param position with param radius and param color.

params

numbers x, y, z = origin
number radius = radius
numbers r, g, b = color

returns

number bRet = 1 or nil

notes

seealso

rbq_DrawSphere(), rbq_DrawCylinder(), rbq_DrawBox(), rbq_DrawLine(), rbq_SetDrawMatrix(), rbq_SetDrawColor(), rbq_PushDrawMatrix(), rbq_PopDrawMatrix(), rbq_TranslateDrawMatrix(), rbq_RotateDrawMatrix()

rbq_DrawWireArc

descrip

Draws a wireframe arc with param endpoints and radius.

params

number fBegAngle = beginning angle of arc, in degrees
number fEndAngle = beginning angle of arc, in degrees
number fRadius = radius of arc
numbers xC, yC, zC = center point of arc
numbers vXx, vXy, vXz = +x axis in plane of arc
numbers vYx, vYy, vYz = +y axis in plane of arc

returns

number bRet = 1 or nil

notes

By default, the arc is drawn with normal pointing down the +z axis, located at the origin. fBegAngle should be positive and less than fEndAngle. To draw an arc in the opposite direction, reverse the look direction vector.

seealso

rbq_DrawCylinderLc(), rbq_DrawBox(), rbq_DrawSphere(), rbq_DrawLine(), rbq_SetDrawMatrix(), rbq_SetDrawColor(), rbq_PushDrawMatrix(), rbq_PopDrawMatrix(), rbq_TranslateDrawMatrix(), rbq_RotateDrawMatrix(),

rbq_EnableCommandStatus

descrip

Enables reporting of status by the command processor after execution of commands. This does not affect the stack of saved states used by rbq_CmdStatusOff() and rbq_CmdStatusRestore()

params

number iEnable

returns

notes

seealso

rbq_EnableCommandEcho()

rbq_EnableCustomForceContainer

descrip

Enables interactions of force objects in a custom force container.

params

number iEnable = 1 or 0

returns

notes

seealso

rbq_AddForceObjectToGroup(), rbq_CreateForceGroup()

rbq_EnableDrawing

descrip

Flag used to enable/disable drawing in the graphics window.

params

number iEnable = 1 or 0

returns

notes

seealso


rbq_EnableLuaError

descrip

Enables call of lua_error() on error in rbq lua api functions, terminating subsequent execution of lua code.

params

number iEnable = 1 or 0

returns

notes

seealso

rbq_IsLuaErrorEnabled()

rbq_EnableSaveDocQuery

descrip

Enables display of 'save current document' dialog on document closing. This flag is typically used in script automation to bypass the display of this dialog.

params

number iEnable = 1 or 0

returns

notes

seealso

rbq_IsSaveDocQueryEnabled()

rbq_ErrOut

descrip

Outputs the param text message to the application stderr (typically, a text widget).

params

string sMsg

returns

notes

seealso

rbq_StdOut()

rbq_ExistAnnotation

descrip

Returns true if an annotation with the param name exists.

params

string sAnnName

returns

number iRet = 1 or nil

notes

seealso


rbq_GetAppDir

descrip

Returns the full path to the base directory of the rbq application.

params

returns

string sDir

notes

The path uses unix separators ('/') and does not have a terminating separator.

seealso


rbq_GetAtomElement

descrip

Returns the element number for the param static atom, as specified by the param indices.

params

number iPdb
number iChain
number iRes
number iAtom

returns

number iEl
or
nil

notes

The return value is the atomic number of the element (H = 1, He = 2, etc.). If the element type for the atom is invalid, the value 0 (zero) will be returned.

For dynamic atoms, use rbq_GetForceObjProperty().

seealso

rbq_GetAtomPos(), rbq_GetElementColor(), rbq_GetElementVdwRadius(), rbq_GetForceObjProperty()

rbq_GetAtomIndex

descrip

Returns the full index from the param full atom name.

params

string sName = 'pdbName.chainId.resName.atomName'

returns

number iPdb
number iChain
number iRes
number iAtom
or
nil

notes

Dynamic atoms are also supported by this function.

seealso

rbq_GetAtomName(), rbq_GetPdbIndexFromName(), rbq_GetChainIndex(), rbq_GetResidueIndex(), rbq_GetObjectIndexFromName()

rbq_GetAtomName

descrip

Returns the full dotted name of the static atom specified by the param indices.

params

number iPdb
number iChain
number iRes
number iAtom

returns

string sName
or
nil

notes

Example: if 1tra pdb is the first loaded static model then rbq_GetAtomName( 0, 0, 0, 0 ) should return '1tra.a.G1.OXT'.

For dynamic atoms, use rbq_GetForceObjProperty().

seealso

rbq_GetAtomPdbName(), rbq_GetAtomIndex(), rbq_GetForceObjProperty()

rbq_GetAtomPdbName

descrip

Returns the string from the atom name field of the PDB ATOM record of the static atom specified by the param indices.

params

number iPdb
number iChain
number iRes
number iAtom

returns

string sName
or
nil

notes

This will be the full string from the PDB atom name field, including any spaces.

Example: if 1tra pdb is the first loaded static model then rbq_GetAtomPdbName( 0, 0, 0, 0 ) should return ' OXT'.

seealso

rbq_GetAtomName(), rbq_GetAtomSerial()

rbq_GetAtomPos

descrip

Returns the position for the param static atom, as specified by the param indices.

params

number iPdb
number iChain
number iRes
number iAtom

returns

numbers x, y, z
or
nil

notes

For dynamic atoms, use rbq_GetForceObjProperty().

seealso

rbq_GetBackboneAtomPos(), rbq_GetAtomElement(), rbq_GetForceObjProperty()

rbq_GetAtomSerial

descrip

Returns the PDB atom serial number for the param static atom, as specified by the param indices.

params

number iPdb
number iChain
number iRes
number iAtom

returns

number iAtomSerial
or
nil if invalid index

notes

The serial number is for an atom as originally read from an ATOM or HETATOM record in a PDB file.

seealso

rbq_GetAtomPdbName()

rbq_GetAtomType

descrip

Returns a number that identifies the 'AtomType' of the static atom with param indices. This 'AtomType' value is used as a handle to associate certain chemical and forcefield properties with the atom. If an extended atom type has not been associated with this atom, its atom type number will be the same as its element atomic number.

params

number iPdb
number iChain
number iRes
number iAtom

returns

number iAtomType
or
nil if invalid index

notes

By default, the initial atom type of an atom is the atomic number of its element. Subsequently, the atom may be set to a more specific type of atom by assigning an atom type number to it. The atom type numbers begin after the atomic number of the final element that is defined in the program.

For dynamic atoms, the atom type can be obtained with rbq_GetForceObjProperty().

seealso

rbq_SetAtomType(), rbq_GetAtomElement(), rbq_GetFirstAtomTypeId(), rbq_GetTotalAtomTypes(), rbq_GetAtomTypeVdwRadius(), rbq_GetForceObjProperty()

rbq_GetAtomTypeFromName

descrip

Returns the id of the atom type that is identified by the param name.

params

string sAtomTypeName

returns

int iAtomType = numerical id of atom type (first atom type id + ordinal position of atom type)
or
nil if error

notes

Atom types are used to define chemical properties of particular types of atoms. These are types that are more specific than just the element of the atom.

For example, an atom type can refer to the valence-bond structure of an atom, such as 'Carbon_Sp3'.

Or, the atom type may be even more specific and refer to the properties of a particular atom within a particular biomolecular residue, such as 'Nitrogen_Arg_NH1'.

This function does not return the atom type id of an actual atom. Use rbq_GetAtomType() for that.

seealso

rbq_GetAtomTypeName(), rbq_GetFirstAtomTypeId(), rbq_GetTotalAtomTypes(), rbq_GetAtomType()

rbq_GetAtomTypeName

descrip

Returns the name for the param atom type.

params

int iAtomType = numerical id of atom type (first atom type id + ordinal position of atom type)

returns

string sName
or
nil if error (atom type value is not valid).

notes

The atom type names can be retrieved by calling rbq_GetAtomTypeName().

If the param type number is a numeric value corresponding to an element, nil will be returned.

seealso

rbq_SetAtomTypeVdwRadius(), rbq_GetElementVdwRadius(), rbq_GetAtomTypeName(), rbq_GetFirstAtomTypeId(), rbq_GetTotalAtomTypes()

rbq_GetAtomTypeVdwRadius

descrip

Returns vdw radius for param atom type.

params

string sAtomTypeName

returns

number fRadius
or
nil if error

notes

The atom type names can be retrieved by calling rbq_GetAtomTypeName().

seealso

rbq_GetAtomTypeName(), rbq_SetAtomTypeVdwRadius(), rbq_GetElementVdwRadius(), rbq_GetTotalAtomTypes(), rbq_GetFirstAtomTypeId()

rbq_GetBackboneAtomPos

descrip

Returns the coordinate of the backbone atom of a residue. For an amino acid residue, this is the alpha-carbon atom. For a nucleic acid residue, it is the phosphate atom.

params

number iPdb
number iChain
nubmer iRes

returns

numbers x, y, z
or
nil if invalid param index

notes

seealso

rbq_GetAtomPos()

rbq_GetBitmapTextMetric

descrip

Returns the width and height, in pixels, of characters in the fixed-font bitmap text.

params

returns

number iWidth
number iHeight

notes

The height value includes the pixels for the full line-height of the row of characters.

seealso

rbq_DrawBitmapText(), rbq_DrawOrthoText()

rbq_GetChainBoxCenter

descrip

Returns the 3D coordinates which represent the geometrical center of the param chain object. This is the center of the axial-aligned bounding box around the vdw radii of all the atoms in the pdb object.

params

number iPdb
number iChain

returns

numbers x, y, z
or
nil if invalid index

notes

seealso

rbq_GetPdbBoxCenter(), rbq_GetResidueBoxCenter(), rbq_GetObjectBoxCenter(), rbq_GetSelectionCenter()

rbq_GetChainDescrip

descrip

Returns the PDB file COMPOUND description for the param chain.

params

number iPdb
number iChain

returns

string sChainDescrip
or
nil if error or not found

notes

seealso

rbq_GetChainName()

rbq_GetChainIndex

descrip

Returns the pdb and chain index of the named chain.

params

string sChainName (format: 'PdbName.ChainId')

returns

number iPdb
number iChain
or
nil if invalid name

notes

seealso

rbq_GetChainName(), rbq_GetPdbIndexFromName(), rbq_GetResidueIndex(), rbq_GetAtomIndex(), rbq_GetObjectIndexFromName()

rbq_GetChainMassCenter

descrip

Returns the 3D coordinates which represent the mass center of the param chain object. This is calculated from all the atoms in the chain.

params

number iPdb
number iChain

returns

numbers x, y, z
or
nil if invalid index.

notes

seealso

rbq_GetChainBoxCenter(), rbq_GetPdbMassCenter(), rbq_GetResidueMassCenter()

rbq_GetChainName

descrip

Returns the dotted name (PdbName.ChainId) for the chain specified by the param index.

params

number iPdb
number iChain

returns

string sName
or
nil if invalid index

notes

The param indices are 0-based.

seealso

rbq_GetChainIndexFromName(), rbq_GetChainDescrip(), rbq_GetPdbName(), rbq_GetResidueName()

rbq_GetElementColor

descrip

Returns the cpk color for the param element.

params

number iElement

returns

numbers r, g, b
or
nil if invalid element

notes

seealso

rbq_GetAtomElement(), rbq_GetElementVdwRadius()

rbq_GetElementFromName

descrip

Returns the number of an element from param full element name.

params

string sName

returns

number iElement

notes

If a valid name is not specified, the number 0 is returned (invalid element). Example: when called with the name 'Hydrogen', the value '1' would be returned.

seealso


rbq_GetElementMass

descrip

Returns the cpk color for the param element.

params

number iElement

returns

numbers fMass
or
nil if invalid element

notes

seealso

rbq_GetAtomElement(), rbq_GetElementVdwRadius()

rbq_GetElementVdwRadius

descrip

Returns the vanderwaals radius for the param element.

params

number iElement

returns

numbers r, g, b
or
nil if invalid element

notes

seealso

rbq_GetAtomTypeVdwRadius(), rbq_GetAtomElement(), rbq_GetElementMass()

rbq_GetEnergyName

descrip

Returns name of param energy type, as used in reporting of energy totals.

params

number iType = { 0, ..., (iTotalTypes - 1) }

returns

string sType = { "steric", "torsion", "covalent", "electro", "hbond", "ringStack" }
or
number bRet = nil if invalid iType

notes

seealso

rbq_GetTotalEnergy(), rbq_GetTotalEnergyTypes()

rbq_GetFfCumInteractionCount

descrip

Returns total number of interactions of param energy type that occurred since the cumulative counts were reset.

params

int iType = { 0, ..., iTotalEnergyTypes - 1 }

returns

number fCount
or
nil if error

notes

seealso

rbq_GetTotalEnergyTypes(), rbq_GetEnergyName(), rbq_GetTimestepInteractionCount(), rbq_ClearFfCumInteractionCounts()

rbq_GetFfRunState

descrip

Returns true if forcefield run state is enabled.

params

returns

number bRet = 1 or nil

notes

rbq_IsForcefieldRunning() is a duplicate of this function.

seealso

rbq_IsForcefieldRunning()

rbq_GetFfParams

descrip

Returns a text string which describes the names and values of all forcefield parameters. Format is: ' \n' ...

params

returns

string sRet = concatenated lines of forcefield param name and value.

notes

Some forcefield context variables associated with statistical recording are not included.

seealso


rbq_GetFile

descrip

Returns ith filename specified by a filespec.

params

string sFileSpec
number iFile
[number bExcludeDirs = 1]

returns

string sFileName
or
nil

notes

iFile index is 0-based. If bExcludeDirs is set, files that are directories will not be returned.

seealso

rbq_GetTotalFiles()

rbq_GetFirstAtomTypeId

descrip

Returns the numerical id of the first atom type.

params

returns

number iFirstAtomType

notes

This can be used to enumerate the atom type names. The value of the first atom type is 1 greater than the atomic number of the final defined element.

seealso

rbq_GetTotalAtomTypes(), rbq_GetAtomTypeName(), rbq_GetTotalElements()

rbq_GetForceObjectRecordedNodeRotation

descrip

Returns the most recent rotation of param node of param force object.

params

number iPdb Index of pdb in document
number iDynSeg Index of dynamic segment in pdb
number iRes Index of force object in dyn seg
number iNode Index of node in force object

returns

numbers hmf[0] ... hmf[15]
or
number bRet = nil if error

notes

Recording of the node rotation must first be enabled by a call to rbq_SetForceObjProperty( "enableRecordNodeMove" ). If no rotation of the node has been recorded, the identity matrix is returned.

seealso

rbq_SetForceObjProperty(), rbq_GetForceObjectRecordedNodeTranslation()

rbq_GetForceObjectRecordedNodeTranslation

descrip

Returns the most recent translation of param node of param force object.

params

number iPdb Index of pdb in document
number iDynSeg Index of dynamic segment in pdb
number iRes Index of force object in dyn seg
number iNode Index of node in force object

returns

numbers hmf[0] ... hmf[15]
or
number bRet = nil if error

notes

Recording of the node translation must first be enabled by a call to rbq_SetForceObjProperty( "enableRecordNodeMove" ). If no translation of the node has been recorded, the identity matrix is returned.

seealso

rbq_GetForceObjectRecordedNodeRotation(), rbq_SetForceObjProperty()

rbq_GetForceObjProperty

descrip

Returns the value of the param property of the param force object.

params

number iPdb = index of pdb in document
number iDynSeg = index of dynamic segment in pdb
number iRes = index of force object in dyn seg
string sProperty = property name and additional args if any

returns

string sPropertyValue
or
nil if error

notes

Currently, the large number of distinct properties of force objects are all accessed through a single pair of rbq-lua interface functions. To retrieve a particular property value, the following property names and arguments are used.

Property name and arguments Format of returned string Description of returned property value
'atomElement <iAtomInRes>' iEl element of atom
'atomName <iAtomInRes>' sAtomName name of atom
'atomPos <iAtomInRes>' x y z position of atom
'atomOwnerNode <iAtomInRes>' iNode index of owner node of atom
'atomType <iAtomInRes>' iType 'atom type' of atom
'boxCenter' x y z box center of force object
'hbAcceptAtomName <iAccept>' sHbaAtomName name of atom in hydrogen bond acceptor <iAccept>
'hbAcceptAtomPos <iAccept>' x y z position of atom in hydrogen bond acceptor <iAccept>
'hbAcceptElectronPos <iAccept>' x y z position of electron in hydrogen bond acceptor <iAccept>
'hbAcceptMaxDonorPtr <iAccept>' iPtr memory ptr address of a hydrogen bond donor that most strongly interacts with hydrogen bond acceptor <iAccept>
'hbAcceptMaxPotential <iAccept>' fPot potential energy of interaction wth hydrogen bond donor that most strongly interacts with hydrogen bond acceptor <iAccept>
'hbAcceptPtr <iAccept>' iPtr memory ptr address of hydrogen bond acceptor <iAccept>
'hbDonorAtomName <iDonor>' sHbdAtomName name of atom in hydrogen bond donor <iDonor>
'hbDonorAtomPos <iDonor>' x y z position of atom in hydrogen bond donor <iDonor>
'hbDonorHydroPos <iDonor>' x y z position of hydrogen in hydrogen bond donor <iDonor>
'hbDonorPtr <iDonor>' iPtr memory ptr address of hydrogen bond donor <iDonor>
'intraResBonds' sAtomIdxs pairs of atom indices for all intra-residue bonds within the force object
'name' sName name of force object
'nodeAngVelocity <iNode>' x y z angular velocity of node <iNode>
'nodeChildren <iNode>' sChildNodeIdxs space-delimited string of indices of nodes that are direct children of node <iNode>
'nodeCom <iNode>' x y z center of mass of node <iNode>
'nodeForce <iNode>' x y z total force on node <iNode>
'nodeFrame <iNode>' hm00 ... hm15 homogeneous transform matrix for node <iNode>
'nodeParent <iNode>' sParentNodeIdx index of parent of node <iNode> if any, else -1
'nodeTorque <iNode>' x y z total torque of node <iNode>
'nodeVelocity <iNode>' x y z velocity of node <iNode>
'prevResBond' sAtomIdxs space-delimited string of indices of atom in this force object bonded to atom in previous force object, if any
'selectedState' bSel selected state of force object (1 or 0)
'nodeSelectedState <iNode>' bNodeSel selected state of node <iNode> (1 or 0)
'totalAtoms' iTotalAtoms total atoms in force object
'totalAtomsInNode <iNode>' iTotalAtoms total atoms in node <iNode>
'totalHbAccepts' iTotalAccepts total hydrogen bond acceptors in force object
'totalHbDonors' iTotalDonors total hydrogen bond donors in force object
'totalNodes' iTotalDonors total nodes in force object

seealso

rbq_SetForceObjProperty()

rbq_GetFreeGraphicObjectName

descrip

Returns a name which is not currently being used by any other graphic object. Typically, this is used for creating new script objects, which use a unique name as a handle for various operations.

params

[string sHint]

returns

string sName

notes

If a starting name is given as a hint, numerical prefixes are added to the starting name until a unused name is specified.

seealso

rbq_CreateScriptObject()

rbq_GetGrtRotation

descrip

Returns a homogeneous transform matrix with a rotation created by the CGrTransformMatrix class.

params

number fDeg
numbers vx, vy, vz
numbers cx, cy, cz

returns

numbers hm00 ... hm15

notes

seealso


rbq_GetGraphicWinSize

descrip

Returns width and height of graphics win, in pixels.

params

returns

number fWidth
number fHeight

notes

seealso

rbq_GetMainWinSize()

rbq_GetInputString

descrip

Creates a dialog box to receive a text string entered by the user.

params

string sPrompt = text in dialog window describing what input is desired
string sCaption = caption of dialog window
[string sDefaultInput = default value to appear in text box of dialog]

returns

string sRet
or
nil if user cancelled

notes

seealso


rbq_GetInputVector

descrip

Creates a dialog box to receive a text string entered by the user, which specifies a 3 coordinate vector.

params

[string sPrompt]

returns

numbers x, y, z
or
nil if user cancelled or an error in conversion occurred.

notes

If conversion failed, an error message is output to app stderr.

seealso


rbq_GetInterResidueBond

descrip

Returns the ith inter-residue bond for the param residues.

params

number iPdb
number iChain
number iRes = index of a residue in iChain
number jRes = index of an adjacent residue in iChain
number iBond

returns

number iAtom = index of atom in iRes
number jAtom = index of atom in jRes
or
nil if invalid index or if iRes and jRes are not adjacent residues

notes

The bond is specified as a pair of indices to the atoms within the residues.

seealso

rbq_GetTotalInterResidueBonds(), rbq_GetIntraResidueBond()

rbq_GetIntraResidueBond

descrip

Returns the ith intra-residue bond for the param residue.

params

number iPdb
number iChain
number iRes
number iBond = ith bond in iRes

returns

number iAtom = index of first atom in iBond
number jAtom = index of second atom in iBond
or
nil if invalid index

notes

The bond is specified as a pair of indices to the atoms within the residue.

seealso

rbq_GetTotalIntraResidueBonds(), rbq_GetInterResidueBond()

rbq_GetLuaStackSpace

descrip

Returns the amount of free stack space in the lua scripting context.

params

returns

number iStackSpace

notes

A function call with an excessive number of parameters can cause the Lua stack to overflow.

seealso


rbq_GetMainWinSize

descrip

Returns width and height of main window, in pixels.

params

returns

number iWidth
number iHeight

notes

This is the size of the entire window including the frame (non-client area). The actual enclosed client area will be a smaller size.

seealso

rbq_GetGraphicsWinSize()

rbq_GetMovieFrame

descrip

Returns the current frame number of the movie.

params

returns

number iFrame

notes

seealso


rbq_GetMoviePlaybackDir

descrip

Returns the current playback direction of the movie.

params

returns

number iPlaybackDir = 1 or -1

notes

seealso


rbq_GetObjectBoxCenter

descrip

Returns the bounding box center of the param object.

params

string sObjName

returns

numbers x, y, z
or
nil if invalid name

notes

Force objects not currently supported by this method, use rbq_GetForceObjProperty() instead.

seealso

rbq_GetObjectMassCenter(), rbq_GetObjectExtent()

rbq_GetObjectIndexFromName

descrip

Returns the index of the static or dynamic object from the param name.

params

string sObjName

returns

number bDynObj = 1 or 0
number iPdb
[number iChain or (iTotalStaticChains + iSeg)]
[number iRes or iDynRes]
[number iAtom or iDynAtom]
or
nil if object not found from name

notes

The number of arguments returned depends upon the type of object specified by the param name.

Currently, the corollary of this function, to get the object name from index, is not defined. One of the more explict functions listed in the seealso section below must be used instead.

seealso

rbq_GetPdbIndex(), rbq_GetChainIndex(), rbq_GetResidueIndex(), rbq_GetAtomIndex() rbq_GetPdbName(), rbq_GetChainName(), rbq_GetResidueName(), rbq_GetForceObjProperty()

rbq_GetObjectMassCenter

descrip

Returns the mass center of the param object.

params

string sObjName

returns

numbers x, y, z
or
nil if invalid name

notes

This function supports both static and dynamic objects.

seealso

rbq_GetObjectBoxCenter(), rbq_GetObjectExtent()

rbq_GetObjectExtent

descrip

Returns the geometrical boundaries of the param object. These are the bounds of the axial-aligned bounding box around the vdw radii of all atoms in the object.

params

string sObjName

returns

numbers xMin, yMin, zMin, xMax, yMax, zMax
or
nil if invalid name

notes

seealso

rbq_GetObjectBoxCenter(), rbq_GetObjectMassCenter()

rbq_GetPdbBoxCenter

descrip

Returns the 3D coordinates which represent the geometrical center of the param pdb object. This is the center of the axial-aligned bounding box around the vdw radii of all the atoms in the pdb object.

params

number iPdb

returns

numbers x, y, z
or
nil if invalid index

notes

seealso

rbq_GetChainBoxCenter(), rbq_GetResidueBoxCenter(), rbq_GetSelectionCenter()

rbq_GetPdbFileName

descrip

Returns the name of the file used to load the pdb object with the param index. The index refers to the position of the pdb object in the list of pdb objects loaded into the current document (0-based index).

params

number iPdb

returns

string sFileName
or
nil if invalid index.

notes

seealso

rbq_GetPdbName()

rbq_GetPdbMassCenter

descrip

Returns the 3D coordinates which represent the center of mass of the param pdb object. This is calculated from all the atoms in the pdb object.

params

number iPdb

returns

numbers x, y, z
or
nil if invalid index

notes

seealso

rbq_GetPdbBoxCenter(), rbq_GetChainMassCenter(), rbq_GetResidueMassCenter(), rbq_GetSelectionMassCenter()

rbq_GetPdbName

descrip

Returns the name of the pdb object with the param index. The index refers to the position of the pdb object in the list of pdb objects loaded into the current document (0-based index).

params

number iPdb

returns

string sName
or
nil if invalid index.

notes

seealso

rbq_SetPdbName(), rbq_GetPdbIndexFromName(), rbq_GetChainName(), rbq_GetResidueName(), rbq_GetPdbFileName()

rbq_GetPdbIndexFromName

descrip

Returns the 0-based index of the pdb object with the param name. The index refers to the position of the pdb object in the list of pdb objects loaded into the current document (0-based index).

params

string sName

returns

number iPdb or nil

notes

seealso

rbq_GetPdbName(), rbq_GetChainIndex(), rbq_GetResidueIndex(), rbq_GetAtomIndex(), rbq_GetObjectIndexFromName()

rbq_GetPdbTransformMatrix

descrip

Returns the homogeneous transform matrix which represents the position of the param pdb object. The transform represents all accumulated translations and rotations which have been applied to the pdb object from its initial state as loaded from a PDB file.

params

number iPdb 0-based index of pdb object loaded into the current document

returns

number m0, m1, ... , m15
or
nil if invalid pdb index

notes

seealso

rbq_SetPdbTransformMatrix()

rbq_GetResidueBoxCenter

descrip

Returns the geometrical center of the residue specified by the param indices. The geometrical center is the center of the axial-aligned bounding box which contains vdw bounds of the residue atoms.

params

numbers iPdb, iChain, iRes

returns

numbers x, y, z
or
nil if invalid index

notes

seealso

rbq_GetResidueMassCenter()

rbq_GetResidueMassCenter

descrip

Returns the center of mass of the residue specified by the param indices.

params

numbers iPdb, iChain, iRes

returns

numbers x, y, z
or
nil if invalid index.

notes

seealso

rbq_GetResidueBoxCenter(), rbq_GetPdbMassCenter(), rbq_GetChainMassCenter()

rbq_GetResidueColor

descrip

returns the color of the param residue.

params

number iPdb
number iChain
number iRes

returns

number r
number g
number b

notes

seealso


rbq_GetResidueIndex

descrip

Returns the 0-based index of the residue with the param name.

params

string sFullResName (Pdb.Chain.Res)

returns

numbers iPdb, iChain, iRes
or
nil if invalid index.

notes

seealso

rbq_GetResidueName(), rbq_GetPdbIndexFromName(), rbq_GetChainIndex(), rbq_GetAtomIndex(), rbq_GetObjectIndexFromName()

rbq_GetResidueBoxIntersect

descrip

Returns a list of residue names belonging to the param chain J which intersect the param residue I. The intersection is between the axial-aligned bounding boxes of the residues.

params

string sPdbChainResI : name of source pdb and chain (ex: '1ffk.0.A2602')
string sPdbChainJ : name of target pdb and chain (ex: '1tra.a')
number fResExtBound : distance beyond residue bounding boxes to check for intersection

returns

number bRet : 1 on success, else 0
string sResJList : " ..." (ex: "C69 G71 C72 C73 G74" )
string sStatus : error message on fail

notes

seealso


rbq_GetResidueName

descrip

Returns the full name of the residue with the param index. The returned name consists of 3 components: the pdb object name, chain id and residue sequence name, separated by '.'. Example: (0, 0, 0) will return '1tra.a.G1' for 1tra.pdb loaded as the first pdb object in the document.

params

numbers iPdb, iChain, iRes

returns

string sName
or
nil if invalid index

notes

seealso

rbq_GetResidueIndex(), rbq_GetPdbName(), rbq_GetChainName(), rbq_GetAtomName()

rbq_GetScriptObjectName

descrip

Returns name of param script object.

params

number iScriptObject index of script object in document

returns

string sSoName name of script object

notes

seealso

rbq_GetTotalScriptObjects()

rbq_GetScriptObjectVar

descrip

Returns the value of the param var of the param script object.

params

string sScriptObjName
string sVarName

returns

string sVal
or
number nil if invalid var name

notes

If the script object is in a fail state, nil will always be returned.

seealso

rbq_CreateScriptObject(), rbq_AddScriptObjectVar(), rbq_SetScriptObjectVar(), rbq_IsScriptObjectFailStateSet()

rbq_GetScriptObjectVarName

descrip

Returns the name of the script object var with param index.

params

string sScriptObjName
int iVarIndex

returns

string sName
or
number nil if invalid var index or script object name

notes

seealso

rbq_GetTotalScriptObjectVars()

rbq_GetSelectedPdbs

descrip

Returns the 0-based indices of all fully selected pdb objects. The definition of a fully selected pdb is one that has all static chains selected, with all residues in each chain selected.

params

returns

[number iPdb0 [, iPdb1...]]
or
nil if no pdbs are selected

notes

seealso

rbq_GetSelectedChainIndex(), rbq_GetSelectedResidueIndex()

rbq_GetSelectedChainIndex

descrip

Returns the (iPdb, iChain) index of the ith selected chain. The ith selected chain is determined by iterating all selected static chains in all pdb objects.

params

number iSelChain

returns

number iPdb, iChain
or
nil if iSelChain not found

notes

A chain is considered selected only if all residues in the chain are fully-selected. Param and return indices are 0-based.

seealso

rbq_GetTotalSelectedChains(), rbq_GetSelectedPdbs(), rbq_GetSelectedResidueIndex()

rbq_GetSelectedResidueIndex

descrip

Returns the (iPdb, iChain, iRes) index of the ith selected static residue. The ith selected residue is determined by iterating all selected residues in all pdb objects.

params

number iSelRes (0-based)

returns

numbers iPdb, iChain, iRes
or
number nil if iSelRes not found

notes

For dynamic residues, use rbq_GetForceObjProperty().

seealso

rbq_GetTotalSelectedResidues(), rbq_GetSelectedPdbs(), rbq_GetSelectedChainIndex(), rbq_GetSelectedResidueIndexes(),

rbq_GetSelectedResidueIndexes

descrip

Returns a set of residue indices for all selected static residues, up to the param total.

params

number iMaxResToReturn

returns

[number iPdb0, iChain0, iRes0 [, iPdb1, iChain1, iRes1, ...]]

notes

Because the lua stack is limited in size, returning indicies for a large selection could easily blow it out.

seealso

rbq_GetSelectedPdbs(), rbq_GetSelectedChainIndex(), rbq_GetSelectedResidueIndex()

rbq_GetSelectionCenter

descrip

Returns the geometrical center of the current selection. This is the center of the bounding box around the union of all selected objects.

params

returns

numbers x, y, z

notes

If there is no current selection, the origin point should be returned. The center of selection is the center-of-mass of all selected objects.

seealso

rbq_GetSelectionExtent(), rbq_GetObjectMassCenter()

rbq_GetSelectionColor

descrip

Returns the color used for selected objects, if selection coloring is enabled.

params

returns

numbers r, g, b

notes

seealso


rbq_GetSelectionExtent

descrip

Returns the geometrical extent of the current selection. This is the extent of the bounding box around the union of all selected objects.

params

returns

numbers xMin, yMin, zMin, xMax, yMax, zMax

notes

If there is no current selection, a zero-extent will be returned.

seealso

rbq_GetSelectionCenter(), rbq_GetObjectExtent()

rbq_GetTimestepCount

descrip

Returns value of current forcefield timestep

params

returns

number iCurTimestep

notes

This count is incremented each time a forcefield timestep is done. It is reset to 0 when a new document is opened.

seealso


rbq_GetTimestepInteractionCount

descrip

Returns total number of interactions of param energy type that occurred in most recent timestep.

params

int iType = { 0, ..., iTotalEnergyTypes - 1 }

returns

number iCount
or
nil if error

notes

seealso

rbq_GetTotalEnergyTypes(), rbq_GetEnergyName(), rbq_GetFfCumInteractionCount()

rbq_GetTopMenu

descrip

Returns a ptr to the top-level menu in the application main window.

params

string sMenuName

returns

userdata QPopupMenu*

notes

seealso

rbq_AddSubmenu(), rbq_AddMenuItem()

rbq_GetTotalAtomsInResidue

descrip

Returns the total number of atoms in the param residue.

params

number iPdb
number iChain
number iRes

returns

number iTotalAtomsInResidue
or
nil if invalid param

notes

seealso

rbq_GetTotalResiduesInChain()

rbq_GetTotalAtomTypes

descrip

Returns the total number of atom types.

params

returns

number iTotalAtomTypes

notes

Atom types are used to extend the default properties of atoms as defined by their element type. If a PDB atom is present in a list of nucleic, metal or amino-acid atom types, it will be assigned user-customizable chemical parameters such as vdw radius and charge.

seealso

rbq_GetFirstAtomTypeId(), rbq_GetAtomTypeName(), rbq_GetTotalElements()

rbq_GetTotalChainsInPdb

descrip

Returns total number of chains in param pdb object.

params

number iPdb

returns

number iTotalChains
or
nil if invalid param

notes

Param index is 0-based.

seealso

rbq_GetTotalPdbs(), rbq_GetTotalResiduesInChain()

rbq_GetTotalDynamicSegmentsInPdb

descrip

Returns total number of dynamic segments in param pdb object.

params

number iPdb

returns

number iTotalDynamicSegments
or
nil if invalid param

notes

seealso

rbq_GetTotalForceObjectsInDynamicSegment()

rbq_GetTotalElements

descrip

Returns total number of defined elements.

params

returns

number iTotalElements

notes

This function is typically used for iterating elements in element property functions. The value of the first valid element is 1 (Hydrogen). Because the value 0 is reserved as representing an invalid element, the total number of elements is defined as 1 greater than the value of the final element. Therefore, the total number of elements can be thought of as the total number of actual defined element, plus 1, where the 'extra' element is the invalid element at the beginning of the enumeration.

The enumeration of atom types begins after the value of the final element, so the value of the first atom type is also equal to the total number of defined elements.

seealso

rbq_GetElementMass(), rbq_GetElementVdwRadius(), rbq_GetFirstAtomTypeId(), rbq_GetTotalAtomTypes()

rbq_GetTotalEnergy

descrip

Returns total energy [of param type] from most recent timestep.

params

[string sType = { "steric", "torsion", "covalent", "electro", "hbond", "ringStack" }]

returns

number fTotal
or
nil

notes

If no type is specified, the total of all types is returned.

seealso

rbq_GetEnergyName()

rbq_GetTotalEnergyTypes

descrip

Returns total number of energy types, as used in energy reporting.

params

returns

number iTotalTypes

notes

seealso

rbq_GetEnergyName(), rbq_GetTotalEnergy()

rbq_GetTotalFiles

descrip

Returns total filenames specified by a filespec.

params

string sFileSpec
[number bExcludeDirs = 1]

returns

number iTotal

notes

If bExcludeDirs is set, files that are directories will not be counted.

seealso

rbq_GetFile()

rbq_GetTotalForceObjectsInDynamicSegment

descrip

Returns total number of force objects in param dynamic segment.

params

number iPdb
number iDynSeg

returns

number iTotalForceObjects
or
nil if invalid param

notes

seealso

rbq_GetTotalDynamicSegmentsInPdb()

rbq_GetTotalInterResidueBonds

descrip

Returns the total number of inter-residue bonds between the param residues. These are the covalent bonds between the atoms that link the adjacent residues.

params

number iPdb
number iChain
number iRes = index of a residue in iChain
number jRes = index of an adjacent residue in iChain

returns

number iTotalInterResBonds
or
nil if invalid index or if residues are not adjacent

notes

Indices are 0-based. Either the previous or the next residue index may be given first in the param list, the order does not matter.

seealso

rbq_GetTotalIntraResidueBonds(), rbq_GetInterResidueBond()

rbq_GetTotalIntraResidueBonds

descrip

Returns the total number of intra-residue bonds within the param residue. These are the covalent bonds between the atoms within a single residue.

params

number iPdb
number iChain
number iRes

returns

number iTotalIntraResBonds
or
nil if invalid index

notes

The indices are 0-based.

seealso

rbq_GetTotalInterResidueBonds(), rbq_GetIntraResidueBond()

rbq_GetTotalMovieFrames

descrip

Returns total number of frames in the currently loaded movie.

params

returns

number iTotalFrames

notes

seealso


rbq_GetTotalPdbs

descrip

Returns total number of pdb objects loaded in current document.

params

returns

number iTotalPdbsInDocument

notes

seealso

rbq_GetTotalChainsInPdb(), rbq_GetTotalResiduesInChain()

rbq_GetTotalResiduesInChain

descrip

Returns total number of residues in param chain of param pdb object.

params

numbers iPdb, iChain

returns

number iTotalResidues
or
nil if invalid param index

notes

Param indices are 0-based.

seealso

rbq_GetTotalPdbs(), rbq_GetTotalChainsInPdb(), rbq_GetTotalAtomsInResidue()

rbq_GetTotalScriptObjects

descrip

Returns the total number of script objects that currently exist.

params

returns

number iTotal

notes

seealso

rbq_GetScriptObjectName()

rbq_GetTotalScriptObjectVars

descrip

Returns the total number of variables for the script object with param name.

params

string sSoName = name of script object

returns

number iTotalVars
or
nil if script object not found

notes

This function can be used for iterating script object variables.

seealso

rbq_GetScriptObjectVarName()

rbq_GetTotalSelectedChains

descrip

Returns the total number of selected chains in the current document.

params

returns

number iTotalSelChains

notes

seealso

rbq_GetSelectedChainIndex(), rbq_GetTotalSelectedResidues()

rbq_GetTotalSelectedResidues

descrip

Returns the total number of selected residue in the current document.

params

returns

number iTotalSelRes

notes

seealso

rbq_GetSelectedResidueIndex(), rbq_GetTotalSelectedChains()

rbq_GetViewCenter

descrip

Returns the coordinates of the center point of the current view, in world frame coordinates.

params

returns

numbers x, y, z

notes

seealso

rbq_GetViewUpDir(), rbq_GetViewLookDir(), rbq_GetViewRotCenter(), rbq_GetViewMatrix()

rbq_GetViewLookDir

descrip

Returns the vector of the current view look direction, in world frame coordinates.

params

returns

numbers x, y, z

notes

seealso

rbq_GetViewUpDir(), rbq_GetViewCenter(), rbq_GetViewMatrix(), rbq_GetViewRotCenter()

rbq_GetViewMatrix

descrip

Returns the homogeneous matrix of the current view.

params

returns

numbers m00, ..., m15

notes

seealso

rbq_GetViewCenter(), rbq_GetViewLookDir(), rbq_GetViewRotCenter(), rbq_GetViewUpDir()

rbq_GetViewRotCenter

descrip

Returns the coordinates of the current view rotation center, in world frame coordinates.

params

returns

numbers x, y, z

notes

This is the center point around which the view rotates.

seealso

rbq_GetViewCenter(), rbq_GetViewLookDir(), rbq_GetViewUpDir(), rbq_GetViewMatrix()

rbq_GetViewUpDir

descrip

Returns the vector of the current view up direction, in world frame coordinates.

params

returns

numbers x, y, z

notes

seealso

rbq_GetViewLookDir(), rbq_GetViewCenter(), rbq_GetViewMatrix(), rbq_GetViewRotCenter()

rbq_HaveSelection

descrip

Returns true if there is at least one currently selected object.

params

returns

number bHaveSel = 1 if selected
or
nil if no seleciton

notes

seealso


rbq_InputCommand

descrip

Submits the param command to the application command processor.

params

string sCommand

returns

number bProcessedOk: true or nil

notes

This is the script input equivalent to command input done by the user interactively through the command input dialog box. This function allows scripts to input all defined internal commands. The status after processing the command is output to the status window, unless it has been disabled by rbq_CmdStatusOff().

seealso

rbq_EnableCommandStatus(), rbq_EnableCommandEcho(), rbq_CmdStatusOff(), rbq_CmdStatusRestore(),

rbq_InsPdbFile

descrip

Inserts the param pdb file into the current document.

params

string sFile
[number iEchoCmd = 1]

returns

number bLoaded: true or nil

notes

seealso

rbq_OpenPdbFile(), rbq_DeletePdbObject()

rbq_IsAddToSelectionSet

descrip

Returns true if 'add-to-selection' mode is on. When this is on, the current selection is maintained as subsequent selection commands cause objects to be added to or removed from the current selection. When this mode is off, the current selection is cleared just prior to the execution of a new selection command.

params

returns

number bRet = 1 or nil

notes

seealso


rbq_IsCenterViewOnInsertedObjectSet

descrip

Returns true if option to center view on newly-inserted object is set.

params

returns

number bRet = 1 or nil

notes

seealso


rbq_IsChainVisible

descrip

Returns true if the param chain has at least one element being drawn.

params

number iPdb, iChain

returns

number bVisible: true or nil

notes

seealso


rbq_IsCmdStatusEnabled

descrip

Returns true if command processing status is being output to the status window.

params

returns

number bEnabled: 1 or nil

notes

seealso


rbq_IsCreateSingleAtomNodeSet

descrip

Returns true if 'ff fo creatSingleAtomNodes' option is on.

params

returns

number bSet: 1 or nil

notes

seealso


rbq_IsFileHere

descrip

Returns true if param file exists.

params

string sPath

returns

number bExists: true or nil

notes

File is considered to exist if file information for the param name was obtained in a call to the C runtime function _stat().

seealso


rbq_IsForceDisplayLogScaleSet

descrip

Returns true if log scaling of force display arrows is set.

params

returns

number bSet = 1 or nil

notes

seealso


rbq_IsForcefieldMovementEnabled

descrip

Returns true if timestep movement in the forcefield is enabled.

params

returns

number bEnabled = 1 or nil

notes

seealso


rbq_IsForcefieldRunning

descrip

Returns true if the forcefield is running.

params

returns

number bRunning = 1 or nil

notes

rbq_GetFfRunState() is a duplicate of this function.

seealso

rbq_GetFfRunState()

rbq_IsForceObjectDrawCovalentSet

descrip

Returns true if the param force object has covalent bonds being drawn.

params

numbers iPdb, iSeg, iRes

returns

number bVisible: 1 or nil

notes

seealso


rbq_IsHetAtom

descrip

Returns true if param static PDB atom is from a HETATM record.

params

numbers iPdb, iChain, iRes, iAtom

returns

number 1 if het atom, else 0
or
nil if invalid index

notes

seealso


rbq_IsLuaErrorEnabled

descrip

Returns true if call of lua_error() on error in rbq lua api functions is enabled.

params

returns

number bRet = 1 or nil

notes

seealso

rbq_EnableLuaError()

rbq_IsMoviePaused

descrip

Returns true if movie is paused.

params

returns

number 1 or nil

notes

seealso

rbq_PauseMovie()

rbq_IsMovieStopped

descrip

Returns true if movie is stopped.

params

returns

number 1 or nil

notes

seealso


rbq_IsNucleicResidue

descrip

Returns true if param residue is a nucleic acid residue.

params

numbers iPdb, iChain, iRes

returns

number 1 if nucleic, else 0
or
nil if invalid index

notes

Currently, only static model residues are supported. Currently, the criterion for being a nucleic residue is the existence of an atom in the residue with PDB name ' P ' or containing a '*' character in the name.

seealso


rbq_IsResidueSelected

descrip

Returns true if param static residue is selected.

params

numbers iPdb, iChain, iRes

returns

number bRet = 1
or
number bRet = nil if error

notes

This function applies to static residues only. For dynamic residues, use rbq_GetForceObjProperty().

seealso


rbq_IsSaveDocQueryEnabled

descrip

Returns true if display of 'save current document' dialog on document closing is enabled.

params

returns

number bRet = 1 or nil

notes

seealso

rbq_EnableSaveDocQuery()

rbq_IsScriptObjectFailStateSet

descrip

Returns true if the fail state of the param script object is set.

params

string sScriptObjectName

returns

number bFail = 1
or
nil if fail state is not set or the script object is not found from param name.

notes

The fail state is set for a script object if an error occurs while running one of its event scripts, or if an error occurred in setting or getting its global variables. An error in running an event script is defined by a non-zero return value from the lua_dofile() function. See the Lua reference manual, section 5.8 for details. The user can also force such a non-zero return result by doing an explict call to error() in the script code.

seealso


rbq_IsScriptObjectTickEnabled

descrip

Returns true if script object tick events are enabled.

params

returns

number bEnabled = 1 if enabled, else nil

notes

seealso


rbq_MsgBox

descrip

Display a message box dialog to the user.

params

string sMsg
string sCaption = "Message"
number iShowCancel

returns

number bRet = 1 if user hit Ok, else 0

notes

seealso


rbq_OpenFfReportStream

descrip

Opens a stream for detailed reporting of forcefield interactions.

params

returns

number bRet = 1 or 0

notes

seealso

rbq_SetFfReportCondition(), rbq_CloseFfReportStream()

rbq_OpenPdbFile

descrip

Creates a new document and new pdb object from the param file.

params

string sFile

returns

number bLoaded: true or nil

notes

The current document will be closed prior to creating the new document. If changes have been made in the current document, a save dialog will appear prompting for user input.

seealso

rbq_InsPdbFile()

rbq_PauseMovie

descrip

Sets pause state of movie.

params

number iPause = 1 or 0

returns

number bRet = 1 or nil

notes

seealso

rbq_IsMoviePaused()

rbq_PopDrawMatrix

descrip

Restores current model matrix from stack.

params

returns

notes

Used to restore the graphics state saved by an earlier call to rbq_PushDrawMatrix(). This function is typically called after various drawing functions such as rbq_TranslateDrawMatrix() have changed the graphics state. This function is just a wrapper for the OpenGL function glPopMatrix().

seealso

rbq_PushDrawMatrix(), rbq_TranslateDrawMatrix(), rbq_RotateDrawMatrix(), rbq_DrawBox(), rbq_DrawCylinder(), rbq_DrawSphere(), rbq_DrawLine()

rbq_PushDrawMatrix

descrip

Saves current model matrix on stack.

params

returns

notes

Used to save state for various drawing functions such as rbq_DrawBox(). This function is just a wrapper for the OpenGL function glPushMatrix().

seealso

rbq_PopDrawMatrix(), rbq_TranslateDrawMatrix(), rbq_RotateDrawMatrix(), rbq_DrawBox(), rbq_DrawCylinder(), rbq_DrawSphere(), rbq_DrawLine()

rbq_ProgressBar_IncPercentDone

descrip

Increments the progress of a progress dialog by param percent.

params

number iInc

returns

notes

seealso

rbq_ProgressBar_Init(), rbq_ProgressBar_SetDone(), rbq_ProgressBar_WasCancelled()

rbq_ProgressBar_Init

descrip

Displays a progress dialog with param description. The initial progress is set to zero.

params

string sProgressDescrip

returns

notes

seealso

rbq_ProgressBar_IncPercentDone(), rbq_ProgressBar_SetDone(), rbq_ProgressBar_WasCancelled()

rbq_ProgressBar_SetDone

descrip

Completes and closes the currently displayed progress dialog.

params

returns

notes

seealso

rbq_ProgressBar_Init(), rbq_ProgressBar_IncPercentDone(), rbq_ProgressBar_WasCancelled()

rbq_ProgressBar_WasCancelled

descrip

Returns true if the user pressed the cancel button during display of the progress dialog.

params

returns

number 1 or nil

notes

seealso

rbq_ProgressBar_Init(), rbq_ProgressBar_IncPercentDone(), rbq_ProgressBar_SetDone()

rbq_TickRecordMovie

descrip

Calls the tick event for the forcefield movie recorder.

params

returns

number bRet = 1 if a frame was recorded, else nil

notes

This is a way for recording movies independently of the forcefield timestep. The movie must currently be in the recording state for this function to have an effect. The condition that determines whether a frame will be played back as a result of this call depends on the current movie playback rate.

seealso

rbq_TickPlaybackMovie()

rbq_Redraw

descrip

Sets redraw flag, indicating that redrawing in the graphics window is needed.

params

returns

notes

The redraw flag is checked every idle tick.

seealso


rbq_RotateDrawMatrix

descrip

Rotates current drawing model matrix by param degrees about param vector.

params

number fDeg
numbers x, y, z

returns

number bRet = 1 or nil

notes

Used to set state for various drawing functions such as rbq_DrawBox(). This function is just a wrapper for the OpenGL function glRotatef().

seealso

rbq_TranslateDrawMatrix(), rbq_PushDrawMatrix(), rbq_PopDrawMatrix()

rbq_RotateForceObject

descrip

Rotates param force object about param vector around param point by param degrees.

params

numbers iPdb, iSeg, iRes = index of force object
number deg = degrees to rotate
numbers rx, ry, rz = vector about which rotation will be done (world frame).
numbers cx, cy, cz = center point around which rotation will be done (world frame).

returns

number bRet = 1 or nil if error

notes

seealso

rbq_TranslateForceObject(), rbq_RotateForceObjectNode(), rbq_TransformForceObject(), rbq_TransformForceObjectNode(), rbq_RotatePdb()

rbq_RotateForceObjectNode

descrip

Rotates atoms of param force object around bond of param node by param degrees.

params

number iPdb = index of pdb in document
number iDynSeg = index of dynamic segment in pdb
number iRes = index of force object in dyn seg
number iNode = index of node in force object
number fDeg = degrees to rotate
number bFwdNodes = flag to indicate which side of node to rotate.

returns

number bRet = 1 or nil

notes

The direction flag determines whether upstream or downstream nodes are rotated in conjunction with the param node. The nodes of a force object are organized in a tree where each node may have a parent node and one or more child nodes. Upstream refers to ancestor nodes, downstream refers to descendant nodes.

If the node is the very first node in the segment, then there is no parent node and no defined axis of rotation, therefore no rotation will be done for this root node.

The axis of rotation is the vector defined from the center-of-mass point of the param node to the center-of-mass point of the parent node. The center point of rotation is around the node center-of-mass point.

seealso

rbq_RotateForceObject(), rbq_TranslateForceObject(), rbq_TransformForceObject(), rbq_TransformForceObjectNode()

rbq_RotatePdb

descrip

Rotates the param pdb by param degrees about the param vector around the param point.

params

number iPdb = index of pdb to rotate
number fDeg = degrees to rotate
numbers vx, vy, vz = vector about which rotation will be done (world frame).
numbers cx, cy, cz = center point around which rotation will be done (world frame).

returns

number bRet = 1
or
nil if invalid index

notes

seealso

rbq_TranslatePdb(), rbq_SetPdbTransformMatrix(), rbq_RotateForceObject()

rbq_RotateSelection

descrip

params

number deg = degrees to rotate selection
numbers x, y, z = vector about which to rotate (world frame)

returns

number bRet = 1
or
number bRet = nil
string sStatus if error

notes

The center point of the rotation will be the center of the current selection. If there is a dynamic segment selection, it will be rotated. Else, the pdb model selection will be rotated, if fully selected. If there is no current selection, or only a partial static selection, no rotation will be done and nil will be returned.

seealso

rbq_RotateSelectionCen(), rbq_TranslateSelection()

rbq_RotateSelectionCen

descrip

params

number deg = degrees to rotate selection
numbers x, y, z = vector about which to rotate (world frame)
numbers xc, yc, zc = point around which to rotate (world frame)

returns

number bRet = 1
or
number bRet = nil
string sStatus if error

notes

If there is a dynamic segment selection, it will be rotated. Else, the pdb model selection will be rotated, if fully selected. If there is no current selection, or only a partial static selection, no rotation will be done and nil will be returned.

seealso

rbq_RotateSelection(), rbq_TranslateSelection()

rbq_SelectPdb

descrip

Selects the param pdb object.

params

int iPdb

returns

number bSelected: true or nil

notes

seealso


rbq_SetAtomTypeVdwRadius

descrip

Sets a vdw radius for param atom type.

params

string sAtomTypeName
number fRadius

returns

number bSet = 1
or
nil if error

notes

The atom type names can be retrieved by calling rbq_GetAtomTypeName().

seealso

rbq_GetAtomTypeVdwRadius(), rbq_GetElementVdwRadius(), rbq_GetAtomTypeName(), rbq_GetTotalAtomTypes()

rbq_SetCommandEchoLimit

descrip

Enables echoing of input command string to status window.

params

number iEnable = iEchoLevel = { 0 = none, 1 = console, 2 = menu, 3 = script, 4 = mouse, 5 = all }

returns

number bRet 1 or nil

notes

seealso

rbq_EnableCommandStatus()

rbq_SetCsoVar

descrip

Sets the value of the param var of the currently-executing script object, if any.

params

string sVarName
string sVarValue

returns

number bRet = 1 or nil

notes

This function provides support in script object event scripts to address the changed design of script object data access. This change involved the removal of 'implicit' saving of global data in the script object environment. This function makes it easier to explicitly save script object data, without needing to know the name of the currently-executing script object. If no current script object event script is running, nil will be returned. If the param var does not exist for the current script object, nil will be returned. If the script object is in a fail state, no value will be set and nil will always be returned. Currently, the name and value parameters must be non-zero in length.

seealso

rbq_SetScriptObjectVar(),

rbq_SetDrawColor

descrip

Sets param color as current drawing color.

params

numbers r, g, b

returns

number bRet = 1
or
nil if invalid param count

notes

Used to set graphics state for various drawing functions such as rbq_DrawBox(). This function is just a wrapper for the OpenGL function glColor3fv().

seealso

rbq_DrawBox(), rbq_DrawCylinder(), rbq_DrawSphere(), rbq_SetDrawMatrix()

rbq_SetDrawMatrix

descrip

Sets param matrix as current drawing model matrix.

params

numbers m00, ..., m15 = coordinates of homogeneous model matrix

returns

number bRet = 1 or nil if invalid param count

notes

Used to set state for various drawing functions such as rbq_DrawBox(). This function is just a wrapper for the OpenGL function glMultMatrixf().

seealso

rbq_SetDrawColor(), rbq_PushDrawMatrix(), rbq_PopDrawMatrix(), rbq_TranslateDrawMatrix(), rbq_RotateDrawMatrix()

rbq_SetGlNormal

descrip

Sets the current normal direction used for drawing polygons.

params

numbers x, y, z

returns

number bRet = 1 or nil if invalid param count

notes

Used to set graphics state for various drawing functions such as rbq_DrawQuad(). This function is just a wrapper for the OpenGL function glNormal3fv().

seealso

rbq_DrawQuad(), rbq_SetDrawColor()

rbq_SetMovieFrame

descrip

Sets the param frame number as the current frame of the currently loaded movie.

params

number iFrame

returns

number bRet = 1 or nil

notes

seealso

rbq_GetMovieFrame()

rbq_SetFfReportCondition

descrip

Closes a stream for detailed reporting of forcefield interactions.

params

string sForceType = { "steric" }
numbers iPdb, iSeg, iRes index of 1st force object
numbers jPdb, jSeg, jRes index of 2nd force object

returns

number bRet = 1
or
nil if error

notes

seealso

rbq_OpenFfReportStream(), rbq_CloseFfReportStream()

rbq_SetForceObjProperty

descrip

Sets the value of the param property of the param force object.

params

number iPdb = index of pdb in document
number iDynSeg = index of dynamic segment in pdb
number iRes = index of force object in dyn seg
string sPropertyAndVal = property name and additional args if any

returns

number bRet = 1 or nil if error

notes

Currently, the large number of distinct properties of force objects are all accessed through a single pair of rbq-lua interface functions. To set a particular property value, the following property names and arguments are used.

Property name and arguments Description of set property value
'enableExternalForceCalc <iEnable>' enables interaction with other force objects
'enableInternalForceCalc <iEnable>' enables internal force interactions betwen atoms of this force object
'enableNodeMove <iNode> <iEnable>' enables timestep movement of node <iNode>
'enableRecordNodeMove <iNode> <iEnable>' enables recording of movement of <iNode>
'setAtomType <iAtom> <iAtomType>' sets the atom type number of <iAtom>
'setNodeVelocity <iNode> <vx vy vz>' sets velocity of <iNode>
'setNodeAngVelocity <iNode> <vx vy vz>' sets angular velocity of <iNode>

seealso

rbq_GetForceObjProperty()

rbq_SetMoviePlaybackDir

descrip

params

number iDir = 1 or -1

returns

nubmer bRet = 1 or nil

notes

seealso

rbq_GetMoviePlaybackDir()

rbq_SetPdbName

descrip

Sets the name of the pdb object with the param index. The index refers to the position of the pdb object in the list of pdb objects loaded into the current document (0-based index).

params

number iPdb
string sName

returns

number bRet = 1
or
nil if error

notes

The name cannot contain the characters {' ', '.', '-' }

seealso

rbq_GetPdbName()

rbq_SetPdbTransformMatrix

descrip

Sets the 4x4 homogeneous transform matrix of the param pdb object. This is used to adjust the position and orientation of a pdb object relative to its initial one as loaded from the PDB file.

params

number iPdb
numbers m0, ... , m15

returns

nubmer bRet = 1 or nil

notes

seealso

rbq_GetPdbTransformMatrix(), rbq_RotatePdb(), rbq_TranslatePdb()

rbq_SetResidueColor

descrip

Sets the color of the param residue.

params

numbers iPdb, iChain, iRes
numbers fRed, fGreen, fBlue

returns

number bRet = 1 or nil

notes

seealso


rbq_SetScriptObjectVar

descrip

Sets the value of the param var of the param script object.

params

string sScriptObjName
string sVarName
string sVarValue

returns

number bRet = 1 or nil

notes

If the script object is in a fail state, no value will be set and nil will always be returned. Currently, the name and value parameters must be non-zero in length.

seealso

rbq_CreateScriptObject(), rbq_AddScriptObjectVar(), rbq_GetScriptObjectVar(), rbq_IsScriptObjectFailStateSet()

rbq_ShowAnnotation

descrip

Sets the draw state of the annotation with the param name.

params

string sAnnotationName
number iShow (0 = hide, 1 = show, 2 = toggle)

returns

number bRet = 1 on success
or
number nil
string sStatus

notes

seealso


rbq_ShowWaitCursor

descrip

Sets the cursor to a wait indicator (hourglass) or a normal indicator.

params

number iShow (0 = show normal, 1 = show wait)

returns

notes

seealso


rbq_SpawnProcess

descrip

Spawns an external process as specified by a cmd line string.

params

string sCmdLine (args separated by whitespace)
string sWorkingDir
number bWait = 1 or 0

returns

number iRet = exit status (if wait ) or process handle (if no wait)
or
number nil, string sStatus if error

notes

spawnvp() is used, so the PATH environmental variable will be used to search for the command to execute.

seealso

rbq_TerminateProcess()

rbq_StdOut

descrip

Outputs param string to the application status window.

params

string sMsg

returns

notes

seealso

rbq_ErrOut()

rbq_StepForcefield

descrip

Does immediate timestep of the forcefield (independently of the event-driven stepping).

params

returns

number bRet = 1
or
number bRet = nil if an error occurred during the forcefield timestep.

notes

seealso


rbq_TerminateProcess

descrip

Terminates the param process

params

number iProcessHandle

returns

number bRet = 1
or
number nil

notes

seealso

rbq_SpawnProcess()

rbq_TransformForceObject

descrip

Pre-multiplies the param homogeneous transform matrix to the param force object.

params

numbers iPdb, iSeg, iRes = index of force object
numbers hmf00, ..., hmf15 = homogeneous transform matrix.

returns

number bRet = 1 or nil if error

notes

The positions of the atoms in the force object are automatically updated in this function after the param transform is applied.

This function is equivalent to calling rbq_TransformForceObjectNode() for all nodes and then calling rbq_UpdateAtomPositions().

seealso

rbq_TransformForceObjectNode(), rbq_RotateForceObject(), rbq_TranslateForceObject(), rbq_RotateForceObjectNode()

rbq_TransformForceObjectNode

descrip

Pre-multiplies the param homogeneous transform matrix to the param node of the param force object.

params

numbers iPdb, iSeg, iRes, iNode = index of force object node
numbers hmf00, ..., hmf15 = homogeneous transform matrix.

returns

number bRet = 1 or nil

notes

The caller must subsequently call rbq_UpdateForceObjectAtomPositions() to update the node atoms with the new transform.

seealso

rbq_UpdateForceObjectAtomPositions(), rbq_RotateForceObjectNode(), rbq_TransformForceObject(), rbq_RotateForceObject(), rbq_TranslateForceObject()

rbq_TranslateDrawMatrix

descrip

Translates current drawing model matrix by param vector.

params

numbers x, y, z

returns

number bRet = 1 or nil

notes

Used to set state for various drawing functions such as rbq_DrawBox(). This function is just a wrapper for the OpenGL function glTranslatef().

seealso

rbq_RotateDrawMatrix(), rbq_PushDrawMatrix(), rbq_PopDrawMatrix()

rbq_TranslateForceObject

descrip

Translates param force object by param vector.

params

numbers iPdb, iSeg, iRes = index of force object
numbers tx, ty, tz = vector by which force object is translated (world frame).

returns

number bRet = 1 or nil if error

notes

seealso

rbq_RotateForceObject(), rbq_TransformForceObject(), rbq_TranslatePdb()

rbq_TranslatePdb

descrip

Translates the param pdb by the param vector.

params

number iPdb
numbers x, y, z

returns

number bRet = 1
or
nil if invalid index

notes

seealso

rbq_RotatePdb(), rbq_SetPdbTransformMatrix(), rbq_TranslateForceObject()

rbq_TranslateSelection

descrip

Translates the current selection by the param vector.

params

numbers x, y, z

returns

number bRet = 1 on success
or
number nil
string sStatus if error

notes

If there is a dynamic segment selection, it will be translated. Else, the pdb model selection will be translated, if fully selected. If there is no current selection, or only a partial static selection, no rotation will be done and nil will be returned.

seealso

rbq_RotateSelection(), rbq_RotateSelectionCen()

rbq_UpdateForceObjectAtomPositions

descrip

Updates all atoms in param force object with positions defined by the force object node frames.

params

numbers iPdb, iSeg, iRes = index of force object

returns

number bRet = 1
or
nil if invalid index

notes

After calling rbq_TransformForceObjectNode(), the caller must subsequently call rbq_UpdateForceObjectAtomPositions() to update the positions of the node atoms with the new transform.

seealso

rbq_TransformForceObjectNode()

rbq_WinExec

descrip

Spawns a MS Windows process as specified by cmd line and show state.

params

string sCmdLine (args separated by whitespace)
number iShow (0 = minimized, 1 = normal, 2 = maximized)

returns

number bRet = 1 on success
or
nil

notes

Hack for demo! (couldn't set show state with rbq_SpawnProcess).

seealso