Object Functions

The functions detailed in this section provide a mechanism to add, delete, modify, and organize the many types of objects (e.g. molecules, grids, and surfaces) available in VIDA.

Add

unsigned int Add(OESystem::OEBase &, unsigned int listID = 0)

Adds the specified object to the application and returns a unique ID associated with that object. If the optional listID argument is provided, then the object is added to the specified list. Otherwise, a new list is created and the object is added to it.

AddCSVSmiles

unsigned int AddCSVSmiles( const std::string &smiles,
                           const std::vector<std::string> &headers,
                           const std::vector<std::string> &values,
                           const std::string &filename = "",
                           unsigned int       listid   = 0)

Adds a new molecule from SMILES with the optional associated data. smiles species the SMILES string to parse, headers is a list of column names corresponding to the data specified in values, filename is an optional filename to attribute this molecule to, and listid is the ID of the list to which this molecule will be added. If listid is zero, a new list will be created.

Returns the ID of the list to which the molecule was added.

AddURLMol

unsigned int AddURLMol( const std::string              &url,
                        const std::string              &urlFunc,
                        const std::vector<std::string> &headers,
                        const std::vector<std::string> &values,
                        const std::string              &filename,
                        unsigned int                    listid)

Reserved for future implementation.

AtomDataGet

AtomData AtomDataGet(const OEPropDB::OEKey &key )

Returns an AtomData object populated with information about the atom specified by the parameter key.

CheckIn

bool CheckIn(OESystem::OEBase &)

Checks the specified Python accessible object back into the main VIDA application which will synchronize any changes made to the object in Python with the object in VIDA. The object in question must have been checked out of VIDA prior to being checked back in.

See , , and .

ChildrenGet

std::vector<OEPropDB::OEKey> ChildrenGet(unsigned int id)
std::vector<OEPropDB::OEKey> ChildrenGet(const OEPropDB::OEKey &)

Returns a list of keys corresponding to any child objects associated with the specified object.

ContourCloudJitterDefaultGet

float ContourCloudJitterDefaultGet()

Returns the value (between 0.0 and 1.0) indicated by the Jitter slider on the Contours panel.

ContourCloudJitterGet

float ContourCloudJitterGet(unsigned int id)

Returns the jitter value assigned to grid id. The jitter value is used when the contour is displayed with the “cloud” style, and represents the degree to which the grid vertex positions are to be randomized. Jitter values range from 0.0 (no jitter) to 1.0 (jitter equal to the grid spacing).

ContourCloudJitterSet

float ContourCloudJitterSet(unsigned int id, float jitter)

Sets the jitter value to be used when grid id is displayed with the “cloud” style. Jitter values range from 0.0 (no jitter) to 1.0 (jitter equal to the grid spacing).

ContourCountScoped

int ContourCountScoped(unsigned int scope = BestScope)

Returns the number of contours for all grids in scope.

This returns the number of contours for the focused grid or the first grid found in the given scope.

ContourCreate

void ContourCreate(unsigned int id=0)
void ContourCreate(unsigned int id, float threshold)
void ContourCreate(unsigned int id, float threshold,
                   const OESystem::OEColor &color)

Create a new contour for grid id.

ContourCreateSurface

unsigned int ContourCreateSurface(unsigned int id, unsigned int contourIndex)

Create a contour surface for the surface defined by the repository id id for the contour referenced by contourIndex.

ContourDeleteAll

void ContourDeleteAll(unsigned int id)

Delete all contours for grid id.

ContourDeleteByIndex

void ContourDeleteByIndex(unsigned int id, unsigned int index)

Delete contour index for grid id. All contours with indices greater than index will now be at their current index - 1.

ContourDeleteByThreshold

void ContourDeleteByThreshold(unsigned int id, float threshold)

Delete all contours above threshold for grid id. Contour indices will be reassigned.

ContourExtractIsoSurface

unsigned int ContourExtractIsoSurface(unsigned int id, unsigned int vertex,
                                      bool maskVis=true)

Reserved for internal use.

ContourFixAsSurfaceScoped

std::vector<unsigned int>
  ContourFixAsSurfaceScoped(unsigned int scope = BestScope)

Creates an actual surface object for each contour in the specified scope. Returns a list of IDs corresponding to the generated surfaces.

ContourGetAll

std::vector<float> ContourGetAll(unsigned int id=0)

Get all contour levels from each contour drawn for grid id.

ContourLevelForIndexGet

float ContourLevelForIndexGet(unsigned int id, unsigned int index)

Returns the contour level for grid id at index id.

ContourLevelForIndexGetScoped

float ContourLevelForIndexGetScoped(int index,
                                    unsigned int scope = BestScope)

Returns the contour level for index id for the first grid in scope.

ContourLevelForIndexSet

float ContourLevelForIndexSet(unsigned int id, unsigned int index, float thresh)

Set the level for the contour at index index to thresh for grid id.

ContourLevelForIndexSetScoped

void ContourLevelForIndexSetScoped(unsigned int index, float thresh,
                                   unsigned int gridType=UINT_MAX,
                                   unsigned int scope = BestScope)

Set the level for the contour at index index to thresh for all grids in scope.

ContourLevelNudgeScoped

void ContourLevelNudgeScoped(bool increase,
                             unsigned int scope = BestScope)

This function increases or decreases the contour value for the contours in the specified scope by 0.1 depending on whether the increase parameter is set to true or false.

ContourLevelSetScoped

void ContourLevelSetScoped(float level,
                           unsigned int scope = BestScope)

This function sets the contour level of all the contours in the specified scope to the value specified by the parameter level.

ContourMax

float ContourMax(unsigned int oerid)

Returns the maximum allowable contour threshold for grid id.

ContourMaxScoped

float ContourMaxScoped(unsigned int scope = BestScope)

Returns the maximum allowable contour threshold for the first grid found in scope.

ContourMin

float ContourMin(unsigned int oerid)

Returns the minimum allowable contour threshold for grid id.

ContourMinScoped

float ContourMinScoped(unsigned int scope = BestScope)

Returns the minimum allowable contour threshold for the first grid found in scope.

ContourRadiusGet

float ContourRadiusGet(unsigned int id=0)

Returns the radius used when generating contours for crystallographic grids.

ContourRadiusSet

float ContourRadiusSet(unsigned int id, float rad)

Sets the radius used when generating contours for crystallographic grids.

ContourResolutionGet

float ContourResolutionGet(unsigned int id=0)

Return the contouring resolution for drawing the contours in Angstroms. A lower resolution samples more grid points, but requires more memory.

ContourResolutionSet

float ContourResolutionSet(unsigned int id, float rad)

Set the contouring resolution in Angstroms. Lower values sample more grid points and generate finer visualizations but require more memory.

ContourTypedAddScoped

void ContourTypedAddScoped(unsigned int scope = BestScope)

Add a single contour to all grids of type type in scope.

ContourTypedCountScoped

int ContourTypedCountScoped(unsigned int scope = BestScope)

Return the number of contours of all grids of type type in scope. This essentially returns the number of contours of the first grid found.

ContourTypedMaxScoped

float ContourTypedMaxScoped(unsigned int scope = BestScope)

Returns the maximum allowable threshold for the first grid found of type type in scope.

ContourTypedMinScoped

float ContourTypedMinScoped(unsigned int scope = BestScope)

Returns the minimum allowable threshold for the first grid found of type type in scope.

ContourTypedRemoveScoped

void ContourTypedRemoveScoped(unsigned int scope = BestScope)

Remove the last contour from all grids of type type in scope.

ContourTypedSetLevelForIndexScoped

void ContourTypedSetLevelForIndexScoped(unsigned int index, float thresh,
                                        unsigned int scope = BestScope)

Set the contour level for the contour at index for all grids of type type in scope.

ContourVolume

float ContourVolume(unsigned int id, unsigned int contourIndex)

Return the enclosed volume of Grid id‘s contour at index contourIndex.

Delete

void Delete(unsigned int id)
void Delete(const std::vector<unsigned int> &)
void Delete(const std::vector<OEPropDB::OEKey> &)
void Delete(const OEPropDB::OEKey &, bool all=false)

Deletes the specified object(s) from the current session. It is important to note that this does NOT delete the actual files (or entries within files) associated with the specified objects.

DeleteAll

void DeleteAll(bool force=false)

Clears the application back to a clean state with nothing loaded.

DeleteScoped

void DeleteScoped(unsigned int scope, bool inScope)

Scoped version of but with the additional option to specify whether to delete everything within the scope or everything not within the scope using the inScope parameter.

FindByDataScoped

std::vector<OEPropDB::OEKey> FindByDataScoped(const std::string &query,
                                              unsigned int scope = AllScope)

Reserved for future implementation.

FindByQueryScoped

std::vector<OEPropDB::OEKey> FindByQueryScoped(const OEPropDB::OEKey &query,
                                               unsigned int scope = AllScope)
std::vector<OEPropDB::OEKey> FindByQueryScoped(const OEPropDB::OEKey &query,
                                               unsigned int atoms,
                                               unsigned int bonds,
                                               unsigned int scope = AllScope)

Uses the specified molecule as a query to search the specified scope. Returns a list of keys corresponding to molecules that match the specified query.

FindBySMARTSScoped

std::vector<OEPropDB::OEKey> FindBySMARTSScoped(const std::string &smarts,
                                                unsigned int scope = AllScope)

Uses the specified SMARTS pattern as a query to search the specified scope. Returns a list of keys corresponding to molecules that match the specified SMARTS pattern.

FindBySimilarityScoped

std::vector<OEPropDB::OEKey> FindBySimilarityScoped(const OEPropDB::OEKey &query,
                                                    float similarity,
                                                    unsigned int scope = AllScope)

Searches the specified scope for molecules with a Lingo similarity greater than the specified similarity cutoff with the specified molecule query.

FindByTitleScoped

std::vector<OEPropDB::OEKey> FindByTitleScoped(const std::string &expr,
                                               unsigned int scope = AllScope)

Uses the specified title query as a regular expression to search the specified scope for molecules whose title match the expression.

FindInRepository

void FindInRepository()

This function prompts the user to specify a query to search the contents of the application repository. The user then has the option to select some, none, or all of the hits to be placed in a new list.

FindOnDisk

void FindOnDisk()

This function prompts the user to specify a query to search a specific region of the user’s hard drive for molecules matching the query. The user then has the option to load some, none, or all of the files containing the hits. This function will load the entire file where a hit was discovered as opposed to just the hits in that file.

GridAdd

unsigned int GridAdd(OESystem::OESkewGrid &grd, unsigned int listID = 0)
unsigned int GridAdd(OESystem::OEScalarGrid &grd, unsigned int listID = 0)

Adds the specified Python grid object to VIDA. If the optional listID argument is provided, then the grid is added to the specified list. Otherwise, a new list is created and the grid is added to it.

GridCheckIn

bool GridCheckIn(OESystem::OESkewGrid &grd,
                 unsigned int checkInType = OECheckInType_UnknownChange)
bool GridCheckIn(OESystem::OEScalarGrid &grd,
                 unsigned int checkInType = OECheckInType_UnknownChange)

Checks the specified Python accessible grid back into the main VIDA application which will synchronize any changes made to the grid in Python with the grid in VIDA. The grid in question must have been checked out of VIDA prior to being checked back in.

The checkInType parameter tells VIDA what type of changes were made to the grid in order to optimize the check in process. There are multiple allowable values for this parameter which can be OR’d together if necessary:

  • OECheckInType_ConformerChange
  • OECheckInType_CoordinateChange
  • OECheckInType_DataChange
  • OECheckInType_GraphChange
  • OECheckInType_NoChange
  • OECheckInType_RenderChange
  • OECheckInType_AnnotationChange
  • OECheckInType_UnknownChange

GridCheckOut

bool GridCheckOut(OESystem::OESkewGrid &grd, unsigned int id)
bool GridCheckOut(OESystem::OEScalarGrid &grd, unsigned int id)

Checks out a copy of the grid specified by id into the specified Python grid object (grd). Returns whether or not the check out process succeeded.

The checked out grid can be modified in Python, but those changes will not be applied to the original grid in VIDA until the modified grid is checked back in using the command.

GridClear

void GridClear(unsigned int id)

Clears the data on the specified grid.

GridCopy

unsigned int GridCopy(unsigned int id)

Creates a copy of the specified grid and returns the ID of the newly created copy.

GridCreateElectrostaticsGrid

unsigned int GridCreateElectrostaticsGrid(OEPropDB::OEKey k,
                                          bool property=false)

Create an electrostatics grid for molecule id.

If property is true, then this grid is attached to id and does not show up in the list window. These grids cannot be saved to disk.

If property is false, then this grid is created as a separate entity from id.

GridCreateGaussian

unsigned int GridCreateGaussian(const OEPropDB::OEKey &k, float res)

Creates a gaussian grid representation for the molecule associated with the specified key at the specified resolution.

GridCreateGaussianProduct

unsigned int GridCreateGaussianProduct(const OEPropDB::OEKey &k, float res)

Creates a gaussian product grid representation for the molecule associated with the specified key at the specified resolution.

GridDefaultContourLevelByIndexGet

float GridDefaultContourLevelByIndexGet(unsigned int gridType,
                                        unsigned int index)

Returns the default contour level for contour index for grids of type gridType.

GridDefaultContourLevelByIndexSet

void GridDefaultContourLevelByIndexSet(unsigned int gridType,
                                       unsigned int index, float thresh)

Set the default contour level thresh for contour index for grids of type gridType.

GridDefaultNumContoursGet

unsigned int GridDefaultNumContoursGet(unsigned int gridType)

Returns the default number of contours for grids of type gridType.

GridDefaultNumContoursSet

void GridDefaultNumContoursSet(unsigned int gridType, unsigned int count)

Set the default number of contours for grids of type gridType to count.

GridInitializeContours

void GridInitializeContours(unsigned int id, bool update=true)

Initialize a grid to its default contours, colors and levels.

GridNormalize

bool GridNormalize(unsigned int id)

Normalizes a grid. This finds the sigma for the grid and divides all grid points by that value.

GridRegularize

unsigned int GridRegularize(unsigned int id)

Regularizes the specified skew grid. Returns the ID of the newly created regular scalar grid.

GridToGaussianGrid

unsigned int GridToGaussianGrid(unsigned int id)

Creates a gaussian grid representation for the specified grid.

GridTypeGet

unsigned int GridTypeGet(unsigned int oerid)

Returns the type of grid for grid id.

GridTypeGetScoped

unsigned int GridTypeGetScoped(unsigned int scope = BestScope)

Returns the type of grid for the first grid found in scope.

GridTypeSet

void GridTypeSet(unsigned int id, unsigned int gridType)

Set the grid type of grid id to gridType.

GridTypeSetScoped

void GridTypeSetScoped(unsigned int gridType,
                       unsigned int scope = BestScope)

Scoped version of GridTypeSet.

GridWorkingGetScoped

unsigned int GridWorkingGetScoped(unsigned int scope = BestScope)

Returns the ID for the “working grid” which is determined in the following order: grid associated with selected contour, grid which is currently focused, grid which is a child object of the currently focused object, or lastly the first grid found in the current default scope.

HasGridChildrenScoped

int HasGridChildrenScoped(unsigned int scope = BestScope)

Returns whether or not any of the molecules in the specified scope have visible grids attached to them. Returns 0 for none of the molecules have visible grids, 1 for all molecules have visible grid, and 2 for at least one has a visible grid.

HasSurfaceChildrenScoped

int HasSurfaceChildrenScoped(const std::string &type,
                             unsigned int scope = BestScope)

Returns whether or not any of the molecules in the specified scope have visible surfaces attached to them. Returns 0 for none of the molecules have visible surfaces, 1 for all molecules have visible surface, and 2 for at least one has a visible surface.

Initialize

void Initialize(unsigned int id)
void Initialize(const OEPropDB::OEKey &)

Initializes the specified object for display. This function is automatically called on objects that are loaded into VIDA and ordinarily should not need to be called by the user.

IsAGrid

bool IsAGrid(unsigned int id)
bool IsAGrid(const OEPropDB::OEKey &k)

Returns whether or not the specified object is a grid.

IsAList

bool IsAList(unsigned int id)

Returns whether or not the specified object is a list.

IsAMolecule

bool IsAMolecule(unsigned int id)
bool IsAMolecule(const OEPropDB::OEKey &k)

Returns whether or not the specified object is a molecule.

IsAReflection

bool IsAReflection(unsigned int id)
bool IsAReflection(const OEPropDB::OEKey &k)

Returns whether or not the specified object is a reflection.

IsASmallMolecule

bool IsASmallMolecule(unsigned int id)
bool IsASmallMolecule(const OEPropDB::OEKey &k)

Returns whether or not the specified object is a small molecule.

IsASurface

bool IsASurface(unsigned int id)
bool IsASurface(const OEPropDB::OEKey &k)

Returns whether or not the specified object is a surface.

KeyGet

OEPropDB::OEKey KeyGet(const OESystem::OEBase &)
OEPropDB::OEKey KeyGet(const OESystem::OEBase &, const OEPropDB::OEKey &pkey)

Returns the key associated with the specified OEBase object. If the object’s parent key is known, that can be passed as a parameter as well to aid the key determination process.

KeyIDGet

unsigned int KeyIDGet(const OEPropDB::OEKey &)

Returns the ID associated with the specified key.

KeyParentIDGet

unsigned int KeyParentIDGet(const OEPropDB::OEKey &)

Returns the ID of the parent object associated with the specified key. This function should be used for child object types such as atoms, bonds, triangles, and vertices.

KeySourceIDGet

unsigned int KeySourceIDGet(const OEPropDB::OEKey &)

Returns the ID of the parent object associated with a specified key. This function should be used for top-level object types such as molecules, grids, and surfaces in situations where these objects have been added as children to another object.

KeyTypeGet

std::string KeyTypeGet(const OEPropDB::OEKey &)

Returns a string representation of the object type associated with the specified key. Return values include:

  • “Atom”
  • “Bond”
  • “Grid”
  • “Mol”
  • “Surface”
  • “Triangle”
  • “Vertex”

KeysGet

std::vector<OEPropDB::OEKey> KeysGet(unsigned int id)

Returns a list of all the keys for the specified ID. For most objects, the list returned will contain a single entry; however, for multi-conformer molecules, the list will include a key for each individual conformer.

ListAddObject

bool ListAddObject(unsigned int listid, unsigned int objectid)

Adds the object specified by objectid to the list specified by listid.

ListAddObjects

bool ListAddObjects(unsigned int listid,
                    const std::vector<unsigned int> &ids)

Adds the objects specified by the list of IDs (ids) to the list specified by listid.

ListGetNames

std::vector<std::string> ListGetNames()

Returns a list of the names of all the current lists.

ListGetObjectLists

std::vector<unsigned int> ListGetObjectLists(unsigned int objectid)

Returns a list of all the lists to which the object specified by objectid belongs.

ListGetObjects

std::vector<unsigned int> ListGetObjects(unsigned int listid)

Returns a list of IDs of all the objects contained within the list specified by listid.

ListMoveObject

bool ListMoveObject(unsigned int srclist, unsigned int dstlist,
                    unsigned int objectid)

Moves the object specified by objectid from the list specified by srclist to the list specified by dstlist.

ListMoveObjects

bool ListMoveObjects(unsigned int srclist, unsigned int dstlist,
                     const std::vector<unsigned int> &ids)

Moves the objects specified by list of IDs (ids) from the list specified by srclist to the list specified by dstlist.

ListNew

unsigned int ListNew(const std::string &name)
unsigned int ListNew(const std::string &name,
                     const std::vector<unsigned int> &ids)
unsigned int ListNew(const std::string &name,
                     const std::vector<OEPropDB::OEKey> &keys)

Creates a new list with the specified name. If a list of IDs or keys is specified with this call, all of the objects corresponding to those IDs or keys will be added to the list.

Returns the ID of the created list.

ListNewAnd

unsigned int ListNewAnd(const std::vector<unsigned int> &ids)

Creates a new list containing all of the objects that each appear in every list specified by the list of IDs (ids).

Returns the ID of the created list.

ListNewMarked

unsigned int ListNewMarked(const std::string &name="")

Creates a new list containing all the currently marked objects. Objects will not be removed from this list if they are subsequently unmarked.

Returns the ID of the created list.

ListNewOr

unsigned int ListNewOr(const std::vector<unsigned int> &ids)

Creates a new list containing all of the objects in all of the lists specified by the list of IDs (ids).

Returns the ID of the created list.

ListNewXor

unsigned int ListNewXor(const std::vector<unsigned int> &ids)

Creates a new list containing all of the objects that each appear only once among all the lists specified by the list of IDs (ids).

Returns the ID of the created list.

ListRemoveObject

bool ListRemoveObject(unsigned int listid, unsigned int objectid)

Removes the object specified by objectid from the list specified by listid.

ListRemoveObjects

bool ListRemoveObjects( unsigned int listid,
                        const std::vector<unsigned int> &ids )

Removes the object(s) specified by the list of IDs (ids) from the list specified by listid.

ListRootList

unsigned int ListRootList()

Returns the ID of the root list.

ListSubsetMarked

unsigned int ListSubsetMarked(unsigned int id, bool match)

Creates a new list containing a subset of the objects contained within the list specified by id. If the match parameter is True, the subset will contain all of the marked objects in the source list, if match is False, the subset will contain all of the non-marked objects in the source list.

Returns the ID of the created list.

ListSubsetQuery

unsigned int ListSubsetQuery(unsigned int id, const std::string &, bool match)

Creates a new list containing a subset of the objects contained within the list specified by id. If the match parameter is True, the subset will contain all of the objects that match the specified query in the source list, if match is Fale, the subset will contain all of the objects which fail to match the specified query in the source list. The query parameter can be specified as a SMARTS, a SMILES, or an IUPAC name.

Returns the ID of the created list.

MoleculeAdd

unsigned int MoleculeAdd(const std::string &, unsigned int listID = 0)
unsigned int MoleculeAdd(OEChem::OEMCMolBase &, unsigned int listID  = 0)

Adds a new molecule to VIDA. There are two implementations of this function. The first implementation expects a hexadecimal encoded OEB string specifying a molecule. The second implementation expects a Python molecule object.

If the optional listID argument is provided, then the molecule is added to the specified list. Otherwise, a new list is created and the molecule is added to it.

Returns the ID assigned to the newly added molecule or zero if the add failed for any reason.

MoleculeCheckIn

bool MoleculeCheckIn(OEChem::OEMCMolBase &mol,
                     unsigned int checkInType = OECheckInType_UnknownChange )

Checks the specified Python accessible molecule back into the main VIDA application which will synchronize any changes made to the molecule in Python with the molecule in VIDA. The molecule in question must have been checked out of VIDA prior to being checked back in.

The checkInType parameter tells VIDA what type of changes were made to the molecule in order to optimize the check in process. There are multiple allowable values for this parameter which can be OR’d together if necessary:

  • OECheckInType_ConformerChange
  • OECheckInType_CoordinateChange
  • OECheckInType_DataChange
  • OECheckInType_GraphChange
  • OECheckInType_NoChange
  • OECheckInType_RenderChange
  • OECheckInType_AnnotationChange
  • OECheckInType_UnknownChange

MoleculeCheckOut

bool MoleculeCheckOut(OEChem::OEMCMolBase &mol, unsigned int id)

Checks out a copy of the molecule specified by id into the specified Python molecule object (mol). Returns whether or not the check out process succeeded.

The checked out molecule can be modified in Python, but those changes will not be applied to the original molecule in VIDA until the modified molecule is checked back in using the command.

MoleculeComponentNamesGet

std::vector<std::string> MoleculeComponentNamesGet(unsigned int id)

Returns a list of names of the individual components of the molecule specified by id based on PDB related subsets.

MoleculeExamine

bool MoleculeExamine(OEChem::OEMCMolBase &, unsigned int id)
bool MoleculeExamine(OEChem::OEMCMolBase &, const OEPropDB::OEKey &key)

Copies the molecule associated with the specified ID or key into the specified Python molecule object. Returns True if the copy happened successfully. In cases where a script needs read-only access to a molecule, MoleculeExamine provides a much faster way to retrieve molecules than MoleculeCheckOut or MoleculeGet. Molecules retrieved using MoleculeExamine cannot be checked back in using MoleculeCheckIn.

MoleculeGet

bool MoleculeGet(OEChem::OEMCMolBase &, unsigned int id)
bool MoleculeGet(OEChem::OEMCMolBase &, const OEPropDB::OEKey &key)
OEChem::OEMol MoleculeGet(unsigned int id)
OEChem::OEMol MoleculeGet(const OEPropDB::OEKey &key)

Copies the molecule associated with the specified ID or key into the specified Python molecule object. Returns whether or not the copy happened successfully.

MoleculeHasComponents

bool MoleculeHasComponents(unsigned int id)

Returns whether or not the molecule specified by id contains multiple distinct components.

MoleculeMaxResidueGet

int MoleculeMaxResidueGet(unsigned int id)

Returns the largest residue index of all the residues contained within the specified molecule.

MoleculeMergeScoped

unsigned int MoleculeMergeScoped(unsigned int scope = BestScope,
                                 const std::string &name="Merged",
                                 unsigned int listid=0)

Merges all of the molecules in the specified scope into a single new molecule. The name parameter specifies the new molecule’s name and the listid parameter specifies in which list to place this new molecule. If listid is 0, a new list will be created to contain the created molecule.

MoleculeNewSubset

std::vector<unsigned int> MoleculeNewSubset(unsigned int listid,
                                            unsigned int id, bool pdb)
std::vector<unsigned int> MoleculeNewSubset(unsigned int listid,
                                            unsigned int id, unsigned int scope,
                                            bool unmatched)
std::vector<unsigned int> MoleculeNewSubset(unsigned int listid,
                                            unsigned int id,
                                            const std::vector<std::vector<unsigned int> > &parts)

This function creates a series of new molecules from the given molecule based on its internal components determined by OEChem using the OEDetermineComponents function.

MoleculeNewSubsetScoped

std::vector<unsigned int> MoleculeNewSubsetScoped(unsigned int listid,
                                                  unsigned int scope, bool pdb)
std::vector<unsigned int> MoleculeNewSubsetScoped(unsigned int listid,
                                                  unsigned int mscope,
                                                  unsigned int scope,
                                                  bool unmatched)

This function creates a series of new molecules from the given scope based on its internal components determined by OEChem using the OEDetermineComponents function.

MoleculeResidueNameSetScoped

void MoleculeResidueNameSetScoped(const std::string &name,
                                  unsigned int scope = BestScope)

Renames all the residues in the specified scope.

MoleculeResidueSet

int MoleculeResidueSet(unsigned int id, int residueNum,
                       bool incrementPerRes=false)

Sets the residue number of every residue in the specified molecule to the specified value (residueNum). The incrementPerRes parameter is currently reserved for future expansion.

MoleculeSetProperty

void MoleculeSetProperty(const std::vector<OEPropDB::OEKey> &keys,
                         unsigned char action, std::string prop, bool state)

Reserved for internal use.

MoleculeSizeCutoffGet

unsigned int MoleculeSizeCutoffGet()

Returns the atom number cutoff at which point a molecule is considered to be a “large” molecule. The default is 255.

MoleculeSizeCutoffSet

void MoleculeSizeCutoffSet(unsigned int size)

Sets the atom number cutoff at which point a molecule is considered to be a “large” molecule. The default is 255.

MoleculeUpdate

bool MoleculeUpdate(OEChem::OEMCMolBase &)

Updates the original molecule stored in VIDA with any changes that may have been made to the specified Python molecule.

NameGet

std::string NameGet(unsigned int)
std::string NameGet(const OEPropDB::OEKey &)

Returns the name of the object specified by either its ID or key.

NameSet

void NameSet(unsigned int, const std::string &)
void NameSet(const OEPropDB::OEKey &, const std::string &)

Sets the name of the object specified by either its ID or key.

OEFuseKeyGroups

OEKeyGroup OEFuseKeyGroups(const std::vector<OEKeyGroup> &k1,
                           unsigned char type)

Fuses the specified keys groups into a single key group.

OEKeyIterToVector

std::vector<OEPropDB::OEKey>
  OEKeyIterToVector(OESystem::OEIterBase<const OEPropDB::OEKey> *iterbase)

Converts a key iterator into a list of keys.

PropertyTypeGet

unsigned int PropertyTypeGet(const std::string &type)

Returns the integer property type for the string type. See for a list of types.

SDDataGet

std::string SDDataGet(unsigned int id, const std::string &tag)
std::string SDDataGet(const OEPropDB::OEKey &key, const std::string &tag)

Returns the SD data associated with the specified tag on the specified object.

SDDataHas

bool SDDataHas(unsigned int id, const std::string &tag)
bool SDDataHas(const OEPropDB::OEKey &key, const std::string &tag)

Returns whether or not the specified object contains SD data with the specified tag.

SDDataSet

void SDDataSet(unsigned int id, const std::string &tag, const std::string &data)
void SDDataSet(const OEPropDB::OEKey &key, const std::string &tag,
               const std::string &data)

Sets the value of the SD data associated with the specified tag on the specified object.

SurfaceAdd

unsigned int SurfaceAdd(OESpicoli::OESurface &surf, unsigned int listID = 0)

Adds a new Python surface object to VIDA. Returns the ID assigned to the newly added surface or zero if the add failed for any reason. If the optional listID argument is provided, then the surface is added to the specified list. Otherwise, a new list is created and the surface is added to it.

SurfaceBestFloodScoped

int SurfaceBestFloodScoped(unsigned int scope = BestScope)

Return the largest flood value for all surfaces in the given scope. A flood value defines the surface being scribed.

SurfaceCheckIn

bool SurfaceCheckIn(OESpicoli::OESurface &surf,
                    unsigned int checkInType = OECheckInType_UnknownChange)

Checks the specified Python accessible surface back into the main VIDA application which will synchronize any changes made to the surface in Python with the surface in VIDA. The surface in question must have been checked out of VIDA prior to being checked back in.

The checkInType parameter tells VIDA what type of changes were made to the surface in order to optimize the check in process. There are multiple allowable values for this parameter which can be OR’d together if necessary:

  • OECheckInType_ConformerChange
  • OECheckInType_CoordinateChange
  • OECheckInType_DataChange
  • OECheckInType_GraphChange
  • OECheckInType_NoChange
  • OECheckInType_RenderChange
  • OECheckInType_AnnotationChange
  • OECheckInType_UnknownChange

SurfaceCheckOut

bool SurfaceCheckOut(OESpicoli::OESurface &surf, unsigned int id)

Checks out a copy of the surface specified by id into the specified Python surface object (surf). Returns whether or not the check out process succeeded.

The checked out surface can be modified in Python, but those changes will not be applied to the original surface in VIDA until the modified surface is checked back in using the command.

SurfaceCreate

unsigned int SurfaceCreate(const std::string &, const OEPropDB::OEKey &key,
                           bool property=false)

Create a surface of type type based on the molecule represented by key.

If property is true, then make the surface a property surface that is bound to the molecule.

SurfaceCreateScoped

bool SurfaceCreateScoped(const std::string &, bool single_surface=false,
                         unsigned int scope = BestScope)

Create a surface of type type for each molecule in scope.

If property is true, then make the surface a property surface that is bound to the molecule.

SurfaceCropDistance

void SurfaceCropDistance(unsigned int id, float distance)

Retains the section of the surface specified by oerid to a distance dist from the selected set of atoms.

SurfaceCropDistanceFrom

void SurfaceCropDistanceFrom(const OEPropDB::OEKey &s, const OEPropDB::OEKey &,
                             float distance)

Retains the section of the surface specified by s based on its distance to another object. The reference object can be a molecule or another surface. The distance cutoff is measured in Angstroms.

SurfaceCropScribedScoped

void SurfaceCropScribedScoped(unsigned int scope = BestScope)

Retains the section of all surfaces in scope to a distance dist from the selected set of atoms.

SurfaceCropUnscribedScoped

void SurfaceCropUnscribedScoped(unsigned int scope = BestScope)

Remove the scribed sections of all scribed surfaces in scope.

SurfaceDelete

void SurfaceDelete(unsigned int id)

Delete the surface specified by id.

SurfaceGenerateBox

unsigned int SurfaceGenerateBox(float x, float y, float z, float width,
                                float height, float depth)

Creates and returns the id of a surface representing a box as determined by the parameters x, y, z, width, height, and depth.

SurfaceGenerateSphere

unsigned int SurfaceGenerateSphere(float x, float y, float z, float radius,
                                   int level=10)

Creates and returns the id of a surface representing a sphere as determined by the parameters x, y, z, and radius. The level parameter specifies how many iterations should be used in determining the quality of the surface.

SurfaceGenerateSpline

unsigned int SurfaceGenerateSpline(const std::vector<float> &coords,
                                   int splineResolution, int seq_res,
                                   int cross_res, float width, float thick,
                                   int splineType, int style)

Creates and returns the id of a surface representing a spline as determined by the parameters coords, splineResolution, seq_res, cross_res, width, thick, splineType, and style.

SurfacePickTriangle

void SurfacePickTriangle(unsigned int oerid, const OEPropDB::OEKey &trikey,
                         bool addtriangle=false)

Pick a surface triangle specified by trikey. Ordinarily, this function does not need to be called.

SurfaceProbeRadiusGet

float SurfaceProbeRadiusGet()

Get the probe radius used when creating surfaces.

SurfaceProbeRadiusSet

float SurfaceProbeRadiusSet(float radius)

Set the probe radius to radius that is used when creating surfaces.

SurfaceResolutionGet

float SurfaceResolutionGet()

Get the resolution used when creating surfaces.

SurfaceResolutionSet

float SurfaceResolutionSet(float res)

Set the resolution used when creating surfaces. The resolution is set to resolution.

SurfaceRestoreScoped

void SurfaceRestoreScoped(unsigned int scope = BestScope)

Restore all surfaces in scope to their original states.

SurfaceScribeScoped

void SurfaceScribeScoped(int flood,
                         unsigned int scope = BestScope)

Scribe all scribed surfaces in scope to include all portions of the surface that fall within flood. Ordinarily, this function does not need to be called.

SurfaceSetPotentialFromGrid

void SurfaceSetPotentialFromGrid(unsigned int id, unsigned int gridid)

Sets the surface potential for the specified surface using the values in the specified grid.

SurfaceSetPotentialFromGridScoped

void SurfaceSetPotentialFromGridScoped(unsigned int gridid,
                                       unsigned int scope = BestScope)

Sets the surface potential for all the surfaces in the specified scope using the values in the specified grid.

SurfaceVolume

float SurfaceVolume(unsigned int id)

Returns the enclosed volume of surface id.

SymmetryNumOperators

unsigned int SymmetryNumOperators(unsigned int id)

This function returns the number of symmetry operators for the specified id.

SymmetryOperatorEnabledGet

bool SymmetryOperatorEnabledGet(unsigned int id, unsigned int operatorNumber)

SymmetryOperatorEnabledSet

bool SymmetryOperatorEnabledSet(unsigned int id, unsigned int operatorNumber,
                                bool enable)

SymmetryRadiusGet

float SymmetryRadiusGet()

SymmetryRadiusSet

float SymmetryRadiusSet(float r)

SymmetryRealize

unsigned int SymmetryRealize(unsigned int id, bool make_new_mol,
                             std::vector<float> center=std::vector<float>(),
                             float radius=0.0f)

XRayAutoMapCalculationPrefsSet

void XRayAutoMapCalculationPrefsSet()
void XRayAutoMapCalculationPrefsSet(const std::string &map1,
                                                  const std::string &map2="")

Set the map types for maps which should be calculated automatically after reading a reflection file.

XRayCalculateMap

unsigned int XRayCalculateMap(unsigned int map_id,
                              unsigned int refln_id,
                              std::string map_type)
unsigned int XRayCalculateMap(unsigned int map_id,
                              unsigned int refln_id,
                              unsigned int map_type)

This set of overloaded functions calculates a map for the set of reflection data specified by ‘refln_id’. If ‘map_id’ is non-zero, then the map replaces the grid with that ID. Otherwise, an entirely new map is created. The string ‘map_type’ parameter may be one of: Fo, Fc, 2Fo-Fc, Fo-Fc, 3Fo-2Fc, 5Fo-3Fc, Fo*Fo, or Fo*FOM, while the integer version may be one of: 0 Fo, 1 Fc, 2 TwoFoFc, 3 FoFc, 4 ThreeFoTwoFc, 5 FiveFoThreeFc, 8 FoSquared, 9 FoFom.

XRayCalculatePhases

bool XRayCalculatePhases(unsigned int refln_id,
                         unsigned int model_id)

This is experimental, and should not be called by the user.

XRayGetCell

std::vector<float> XRayGetCell(unsigned int id)

Returns the cell constants for the given object in a list, in the order a, b, c, Alpha, Beta, Gamma.

XRayGetSpaceGroup

std::string XRayGetSpaceGroup(unsigned int id)

Returns the spacegroup name for the given object.

XRayMTZColumnNamesCurrentDefaultsGet

std::vector<std::string> XRayMTZColumnNamesCurrentDefaultsGet()

XRayMTZColumnNamesGet

std::vector<std::string> XRayMTZColumnNamesGet()
bool XRayMTZColumnNamesGet(std::vector<std::string> &names)

Fills up the input list/vector with the MTZ file column names as specified by XRayMTZColumnNamesSet. Unless XRayMTZColumnNamesSet was called with the permanent flag, this function will only work once per call to XRayMTZColumnNamesSet.

This function returns True if it successfully filled out the list/vector, or False otherwise.

XRayMTZColumnNamesSet

void XRayMTZColumnNamesSet(const std::vector<std::string> &names,
                           bool permanent=false)

Stores a list of column names for mtz files. The next time an MTZ file is read, instead of prompting the user, the column names are taken from the list/vector passed to this function. The column names are in the order Fo, Phi, Fc, PhiC, Sigma, FOM, RFree. If the permanent flag is set to True, then these values are used instead of prompting until the program exits. If permanent is false, then the values are only used once.

In a script, there’s no reason to call this command instead of pre-specifying the prompt results with PromptResponseVectMulti, as shows up in the journal file. However, if creating a function which will read an MTZ file directly then this command is needed since the PromptResponse commands don’t work in interactive commands.

XRayMTZColumnNamesStandardDefaultsGet

std::vector<std::string> XRayMTZColumnNamesStandardDefaultsGet()

XRaySetCrystalParams

bool XRaySetCrystalParams(unsigned int id,
                          unsigned int from_object_id)
bool XRaySetCrystalParams(unsigned int id,
                          std::vector<float> cell,
                          unsigned int sg)
bool XRaySetCrystalParams(unsigned int id,
                          std::vector<float> cell,
                          const std::string &sgname)
bool XRaySetCrystalParams(unsigned int id, float a, float b,
                          float c, float alpha, float beta,
                          float gamma, unsigned int sg)
bool XRaySetCrystalParams(unsigned int id, float a, float b,
                          float c, float alpha, float beta,
                          float gamma, const std::string &sgname)

Set the crystal parameters for the given reflection. The parameters may be specified in multiple ways, which are obvious from the names of the arguments.

XRayValidMaptypes

std::string XRayValidMaptypes(unsigned int refln_id)

Not all map types are available for every reflection data set, since not all files have all required data for every possible map calculation. For example, a reflection data set without Fc data will not be able to calculate any map types which require Fc. This function returns (as a string), the valid map types for the given reflection data set. The string is a concatenation of all available map types, with each type separated by the ‘|’ character.

Table Of Contents

Previous topic

Display Functions

Next topic

Molecule Builder Functions