#include "py_commands.h"#include "AtomSel.h"#include "VMDApp.h"#include "MoleculeList.h"#include "SymbolTable.h"#include "Measure.h"#include "SpatialSearch.h"Go to the source code of this file.
Value:
static PyObject *funcname(PyObject *self) { \
VMDApp *app = get_vmdapp(); \
if (!app) return NULL; \
PyObject *result = PyList_New(0); \
if (!result) return NULL; \
SymbolTable *table = app->atomSelParser; \
int i, n = table->fctns.num(); \
for (i=0; i<n; i++) \
if (table->fctns.data(i)->is_a == elemtype && \
strlen(table->fctns.name(i))) { \
PyObject *tmp = as_pystring(table->fctns.name(i)); \
PyList_Append(result, tmp); \
Py_XDECREF(tmp); \
} \
return result; \
}Definition at line 153 of file py_selection.C.
[static]
Definition at line 105 of file py_selection.C.
References SymbolTable::add_custom_singleword, VMDApp::atomSelParser, get_vmdapp, and NULL.
[static]
Definition at line 60 of file py_selection.C.
References as_pystring, VMDApp::atomSelParser, SymbolTable::custom_singleword_name, get_vmdapp, NULL, SymbolTable::num_custom_singleword, and result.
[static]
Definition at line 131 of file py_selection.C.
References VMDApp::atomSelParser, get_vmdapp, NULL, and SymbolTable::remove_custom_singleword.
[static]
Definition at line 34 of file py_selection.C.
References as_pystring, VMDApp::atomSelParser, SymbolTable::get_custom_singleword, get_vmdapp, and NULL.
[static]
Initial value:
"Create a new atom selection macro. A macro is a word or words that expand\n" "to be a much larger selection string, for example 'noh' is a built-in macro\n" "that expands to 'not hydrogen'\n\n" "Args:\n" " name (str): Macro name\n" " selection (str): Atom selection that macro will expand to"
Definition at line 98 of file py_selection.C.
[static]
Initial value:
"Get all defined macros\n\n" "Returns:\n" " (list of str): All defined macro names"
Definition at line 56 of file py_selection.C.
[static]
Initial value:
"Delete an atom selection macro, by name\n\n" "Args:\n" " name (str): Macro name to delete"
Definition at line 127 of file py_selection.C.
[static]
Initial value:
"Gets the atom selection string corresponding to a macro\n\n" "Args:\n" " name (str): Macro name\n" "Returns:\n" " (str): Atom selection string that macro expands to"
Definition at line 28 of file py_selection.C.
[static]
Initial value:
"Methods for creating, modifying, or deleting macros for atom selections."
Definition at line 197 of file py_selection.C.
Referenced by initselection.
[static]
Initial value:
{
{"add_macro", (PyCFunction)py_addmacro, METH_VARARGS | METH_KEYWORDS, addmacro_doc},
{"get_macro", (PyCFunction)py_getmacro, METH_VARARGS | METH_KEYWORDS, getmacro_doc},
{"all_macros", (PyCFunction)py_allmacros, METH_NOARGS, allmacro_doc},
{"del_macro", (PyCFunction)py_delmacro, METH_VARARGS | METH_KEYWORDS, delmacro_doc},
{"keywords", (PyCFunction)keywords, METH_NOARGS,
"keywords() -> List of available atom selection keywords."},
{"booleans", (PyCFunction)booleans, METH_NOARGS,
"booleans() -> List of available atom selection boolean tokens."},
{"functions", (PyCFunction)functions, METH_NOARGS,
"functions() -> List of available atom selection functions."},
{"stringfunctions", (PyCFunction)stringfunctions, METH_NOARGS,
"stringfunctions() -> List of available atom selection string functions."},
{ NULL, NULL }
}Definition at line 180 of file py_selection.C.
Referenced by initselection.