#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.
Compounds | |
| struct | iterobject |
| struct | PyAtomSelObject |
Defines | |
| #define | SYMBOL_TABLE_FUNC(funcname, elemtype) |
Typedefs | |
| typedef int | Py_ssize_t |
Functions | |
| int | atomsel_Check (PyObject *obj) |
| DrawMolecule * | get_molecule (PyAtomSelObject *a) |
| void | atomsel_dealloc (PyAtomSelObject *obj) |
| PyObject * | atomsel_repr (PyAtomSelObject *obj) |
| PyObject * | atomsel_str (PyAtomSelObject *obj) |
| PyObject * | atomsel_new (PyTypeObject *type, PyObject *args, PyObject *kwds) |
| PyObject * | atomsel_get (PyAtomSelObject *a, PyObject *keyobj) |
| PyObject * | atomsel_set (PyAtomSelObject *a, PyObject *args) |
| PyObject * | getframe (PyAtomSelObject *a, void *) |
| int | setframe (PyAtomSelObject *a, PyObject *frameobj, void *) |
| PyObject * | py_update (PyAtomSelObject *a) |
| PyObject * | py_write (PyAtomSelObject *a, PyObject *args, PyObject *kwds) |
| PyObject * | getbonds (PyAtomSelObject *a, void *) |
| int | setbonds (PyAtomSelObject *a, PyObject *obj, void *) |
| PyObject * | getmolid (PyAtomSelObject *a, void *) |
| PyObject * | macro (PyObject *self, PyObject *args, PyObject *keywds) |
| PyObject * | delmacro (PyObject *self, PyObject *args) |
| int | py_get_vector (PyObject *matobj, int n, float *vec) |
| PyObject * | inverse (PyObject *self, PyObject *matobj) |
| float * | parse_weight (AtomSel *sel, PyObject *wtobj) |
| PyObject * | minmax (PyAtomSelObject *a, PyObject *withradii) |
| PyObject * | center (PyAtomSelObject *a, PyObject *args, PyObject *kwds) |
| float * | parse_two_selections_return_weight (PyAtomSelObject *a, PyObject *args, AtomSel **othersel) |
| PyObject * | py_rmsd (PyAtomSelObject *a, PyObject *args) |
| PyObject * | py_fit (PyAtomSelObject *a, PyObject *args) |
| PyObject * | py_moveby (PyAtomSelObject *a, PyObject *vecobj) |
| PyObject * | py_move (PyAtomSelObject *a, PyObject *matobj) |
| PyObject * | contacts (PyAtomSelObject *a, PyObject *args) |
| PyObject * | sasa (PyAtomSelObject *a, PyObject *args, PyObject *keywds) |
| Py_ssize_t | atomselection_length (PyObject *a) |
| PyObject * | atomselection_subscript (PyAtomSelObject *a, PyObject *keyobj) |
| PyObject * | atomsel_iter (PyObject *) |
| PyObject * | iter_next (iterobject *it) |
| void | iter_dealloc (iterobject *it) |
| PyObject * | iter_len (iterobject *it) |
| PyObject * | atomsel_iter (PyObject *self) |
| AtomSel * | atomsel_AsAtomSel (PyObject *obj) |
| void | initatomsel (void) |
Variables | |
| char * | atomsel_doc |
| char * | get_doc |
| char * | set_doc |
| char * | frame_doc |
| char * | update_doc |
| char * | write_doc |
| char * | bonds_doc |
| char * | molid_doc |
| PyGetSetDef | atomsel_getset [] |
| char * | minmax_doc |
| char * | center_doc |
| char * | rmsd_doc |
| char * | fit_doc |
| char * | moveby_doc |
| char * | move_doc |
| char * | contacts_doc |
| char * | sasa_doc |
| PyMappingMethods | atomsel_mapping |
| PyMethodDef | atomselection_methods [] |
| PyMethodDef | iter_methods [] |
| PyTypeObject | itertype |
| PyTypeObject | atomsel_type |
| PyMethodDef | atomsel_methods [] |
| char * | module_doc |
|
|
Value: static PyObject *funcname(PyObject *self) { \
VMDApp *app = get_vmdapp(); \
PyObject *result = PyList_New(0); \
SymbolTable *table = app->atomSelParser; \
int i, n = table->fctns.num(); \
for (i=0; i<n; i++) \
if (table->fctns.data(i)->is_a == elemtype) \
PyList_Append(result, PyString_FromString(table->fctns.name(i))); \
return result; \
}Definition at line 627 of file py_atomsel.C. |
|
|
Definition at line 30 of file py_atomsel.C. |
|
|
Definition at line 1160 of file py_atomsel.C. References atomsel_Check, and NULL. |
|
|
Definition at line 1154 of file py_atomsel.C. References atomsel_type. Referenced by atomsel_AsAtomSel, contacts, parse_two_selections_return_weight, and sasa. |
|
|
Definition at line 57 of file py_atomsel.C. References PyAtomSelObject::atomSel. |
|
||||||||||||
|
|
Definition at line 1100 of file py_atomsel.C. References iterobject::a, iterobject::index, itertype, and NULL. |
|
|
Definition at line 1100 of file py_atomsel.C. |
|
||||||||||||||||
|
Definition at line 80 of file py_atomsel.C. References VMDApp::atomSelParser, AtomSel::change, get_vmdapp, BaseMolecule::id, MoleculeList::mol_from_id, VMDApp::molecule_top, VMDApp::moleculeList, AtomSel::NO_PARSE, NULL, and AtomSel::which_frame. |
|
|
Definition at line 63 of file py_atomsel.C. References PyAtomSelObject::atomSel, AtomSel::cmdStr, AtomSel::molid, and AtomSel::which_frame. |
|
||||||||||||
|
|
Definition at line 74 of file py_atomsel.C. References PyAtomSelObject::atomSel, and AtomSel::cmdStr. |
|
|
Definition at line 994 of file py_atomsel.C. |
|
||||||||||||
|
Definition at line 1000 of file py_atomsel.C. References PyAtomSelObject::atomSel, NULL, AtomSel::num_atoms, and AtomSel::on. |
|
||||||||||||||||
|
Definition at line 707 of file py_atomsel.C. References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, get_molecule, measure_center, measure_error, VMDApp::moleculeList, NULL, and parse_weight. |
|
||||||||||||
|
Definition at line 870 of file py_atomsel.C. References PyAtomSelObject::app, BaseMolecule::atom, PyAtomSelObject::atomSel, atomsel_Check, MolAtom::bonded, AtomSel::coordinates, get_molecule, GridSearchPair::ind1, GridSearchPair::ind2, VMDApp::moleculeList, AtomSel::molid, GridSearchPair::next, NULL, AtomSel::num_atoms, AtomSel::on, and vmd_gridsearch3. |
|
||||||||||||
|
Definition at line 580 of file py_atomsel.C. References VMDApp::atomSelParser, get_vmdapp, NULL, and SymbolTable::remove_custom_singleword. |
|
|
Definition at line 43 of file py_atomsel.C. References PyAtomSelObject::app, PyAtomSelObject::atomSel, MoleculeList::mol_from_id, VMDApp::moleculeList, and AtomSel::molid. Referenced by atomsel_get, atomsel_set, center, contacts, getbonds, getframe, minmax, parse_two_selections_return_weight, py_move, py_moveby, py_update, py_write, sasa, setbonds, and setframe. |
|
||||||||||||
|
Definition at line 459 of file py_atomsel.C. References BaseMolecule::atom, PyAtomSelObject::atomSel, MolAtom::bonds, MolAtom::bondTo, get_molecule, NULL, AtomSel::num_atoms, AtomSel::on, and AtomSel::selected. |
|
||||||||||||
|
Definition at line 363 of file py_atomsel.C. References PyAtomSelObject::atomSel, get_molecule, NULL, and AtomSel::which_frame. |
|
||||||||||||
|
Definition at line 520 of file py_atomsel.C. References PyAtomSelObject::atomSel, and AtomSel::molid. |
|
|
Definition at line 1205 of file py_atomsel.C. References atomsel_methods, atomsel_type, and module_doc. Referenced by initvmd, and PythonTextInterp::PythonTextInterp. |
|
||||||||||||
|
Definition at line 613 of file py_atomsel.C. References Matrix4::inverse, Matrix4::mat, mat, NULL, and py_get_vector. |
|
|
Definition at line 1054 of file py_atomsel.C. References iterobject::a. |
|
|
Definition at line 1057 of file py_atomsel.C. References iterobject::a, PyAtomSelObject::atomSel, and AtomSel::selected. |
|
|
Definition at line 1046 of file py_atomsel.C. References iterobject::a, PyAtomSelObject::atomSel, iterobject::index, NULL, AtomSel::num_atoms, and AtomSel::on. |
|
||||||||||||||||
|
Definition at line 538 of file py_atomsel.C. References SymbolTable::add_custom_singleword, VMDApp::atomSelParser, SymbolTable::custom_singleword_name, SymbolTable::get_custom_singleword, get_vmdapp, NULL, and SymbolTable::num_custom_singleword. |
|
||||||||||||
|
Definition at line 681 of file py_atomsel.C. References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, NameList< float * >::data, BaseMolecule::extra, get_molecule, measure_error, measure_minmax, VMDApp::moleculeList, NULL, AtomSel::num_atoms, and AtomSel::on. |
|
||||||||||||||||
|
Definition at line 733 of file py_atomsel.C. References PyAtomSelObject::atomSel, atomsel_Check, get_molecule, NULL, parse_weight, and AtomSel::selected. |
|
||||||||||||
|
Definition at line 648 of file py_atomsel.C. References NULL, and AtomSel::selected. |
|
||||||||||||
|
Definition at line 788 of file py_atomsel.C. References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, Matrix4::mat, mat, measure_error, measure_fit, VMDApp::moleculeList, NULL, and parse_two_selections_return_weight. |
|
||||||||||||||||
|
Definition at line 593 of file py_atomsel.C. |
|
||||||||||||
|
Definition at line 842 of file py_atomsel.C. References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, DrawMolecule::force_recalc, get_molecule, Matrix4::mat, mat, measure_error, measure_move, MEASURE_NOERR, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, NULL, and py_get_vector. |
|
||||||||||||
|
Definition at line 814 of file py_atomsel.C. References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, DrawMolecule::force_recalc, get_molecule, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, NULL, AtomSel::num_atoms, AtomSel::on, py_get_vector, and vec_add. |
|
||||||||||||
|
Definition at line 762 of file py_atomsel.C. References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, measure_error, measure_rmsd, VMDApp::moleculeList, NULL, parse_two_selections_return_weight, and AtomSel::selected. |
|
|
Definition at line 401 of file py_atomsel.C. References PyAtomSelObject::atomSel, AtomSel::change, get_molecule, and NULL. |
|
||||||||||||||||
|
Definition at line 419 of file py_atomsel.C. References PyAtomSelObject::atomSel, FileSpec::first, DrawMolecule::frame, get_molecule, get_vmdapp, BaseMolecule::id, FileSpec::last, VMDApp::molecule_savetrajectory, NULL, DrawMolecule::numframes, AtomSel::on, FileSpec::selection, FileSpec::stride, AtomSel::TS_LAST, AtomSel::TS_NOW, FileSpec::waitfor, and AtomSel::which_frame. |
|
||||||||||||||||
|
Definition at line 925 of file py_atomsel.C. References PyAtomSelObject::app, PyAtomSelObject::atomSel, atomsel_Check, AtomSel::coordinates, NameList< float * >::data, BaseMolecule::extra, get_molecule, measure_error, measure_sasa, VMDApp::moleculeList, NULL, ResizeArray::num, and sasa. Referenced by sasa. |
|
||||||||||||||||
|
Definition at line 480 of file py_atomsel.C. References BaseMolecule::atom, PyAtomSelObject::atomSel, MolAtom::bonds, MolAtom::bondTo, DrawMolecule::force_recalc, get_molecule, DrawMolItem::MOL_REGEN, BaseMolecule::nAtoms, AtomSel::num_atoms, AtomSel::on, and AtomSel::selected. |
|
||||||||||||||||
|
Definition at line 372 of file py_atomsel.C. References PyAtomSelObject::atomSel, get_molecule, DrawMolecule::numframes, AtomSel::TS_LAST, AtomSel::TS_NOW, and AtomSel::which_frame. |
|
|
Initial value: (char *)
"atomsel( selection, molid = top, frame = now) -> new selection object\n"Definition at line 52 of file py_atomsel.C. |
|
|
Initial value: {
{ (char *)"frame", (getter)getframe, (setter)setframe, frame_doc, NULL },
{ (char *)"bonds", (getter)getbonds, (setter)setbonds, bonds_doc, NULL },
{ (char *)"molid", (getter)getmolid, (setter)NULL, molid_doc, NULL },
{ NULL },
}Definition at line 529 of file py_atomsel.C. |
|
|
Initial value: {
atomselection_length,
(binaryfunc)atomselection_subscript,
0
}Definition at line 1012 of file py_atomsel.C. |
|
|
Initial value: {
{"macro", (PyCFunction)macro, METH_VARARGS | METH_KEYWORDS,
"macro(name=None, selection=None) -- create and query selection macros.\n"
"If both name and selection are None, return list of macro names.\n"
"If selection is None, return definition for name.\n"
"If both name and selection are given, define new macro.\n" },
{"delmacro", (vmdPyMethod)delmacro, METH_VARARGS,
"delmacro(name) -> Delete atom selection macro with given name." },
{"inverse", (PyCFunction)inverse, METH_O,
"inverse(matrix) -> Inverse of matrix returned by atomsel.fit(...)"},
{"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 1166 of file py_atomsel.C. Referenced by initatomsel. |
|
|
Definition at line 1111 of file py_atomsel.C. Referenced by atomsel_Check, and initatomsel. |
|
|
Initial value: {
{ "get", (PyCFunction)atomsel_get, METH_O, get_doc },
{ "set", (PyCFunction)atomsel_set, METH_VARARGS, set_doc },
{ "update", (PyCFunction)py_update, METH_NOARGS, update_doc },
{ "write", (PyCFunction)py_write, METH_VARARGS|METH_KEYWORDS, write_doc },
{ "minmax", (PyCFunction)minmax, METH_VARARGS, minmax_doc },
{ "center", (PyCFunction)center, METH_VARARGS|METH_KEYWORDS, center_doc },
{ "rmsd", (PyCFunction)py_rmsd, METH_VARARGS, rmsd_doc, },
{ "fit", (PyCFunction)py_fit, METH_VARARGS, fit_doc, },
{ "move", (PyCFunction)py_move, METH_O, move_doc },
{ "moveby", (PyCFunction)py_moveby, METH_O, moveby_doc },
{ "contacts", (PyCFunction)contacts, METH_VARARGS, contacts_doc },
{ "sasa", (PyCFunction)sasa, METH_VARARGS | METH_KEYWORDS, sasa_doc },
{ NULL, NULL }
}Definition at line 1019 of file py_atomsel.C. |
|
|
Initial value: (char *)
"bonds - for each atom in selection, a list of the indices\n"
" of the bonded atoms.\n"Definition at line 516 of file py_atomsel.C. |
|
|
Initial value: (char *) "center(weight=None) -> (x, y, z)\n" "Return a tuple corresponding to the center of the selection,\n" "optionally weighted by weight." Definition at line 702 of file py_atomsel.C. |
|
|
Initial value: (char *) "contacts(sel, cutoff) -> contact pairs\n" "Return two lists, whose corresponding elements contain atom indices\n" "in selection that are within cutoff of sel, but not directly bonded.\n" Definition at line 864 of file py_atomsel.C. |
|
|
Initial value: (char *)
"fit(sel, weight=None) -> transformation matrix\n"
" Compute and return the transformation matrix for the RMS alignment\n"
" of the selection to sel. The format of the matrix is a 16-element\n"
" tuple suitable for passing to the move() method.\n"
" Weight must be None or list of same size as selections."Definition at line 781 of file py_atomsel.C. |
|
|
Initial value: (char *)
"frame -- the animation frame referenced by the selection.\n"
" Special values: -1 = current frame, -2 = last frame.\n"
"NOTE: changing the frame does not update the selection;\n"
" use update() to do that.\n"Definition at line 389 of file py_atomsel.C. |
|
|
Initial value: (char *)
"get( attrib ) -> corresponding attrib values for selected atoms."Definition at line 125 of file py_atomsel.C. |
|
|
Initial value: Definition at line 1061 of file py_atomsel.C. |
|
|
Definition at line 1066 of file py_atomsel.C. Referenced by atomsel_iter. |
|
|
Initial value: (char *) "minmax() -> (min, max)\n" "Return minimum and maximum coordinates for selected atoms." Definition at line 677 of file py_atomsel.C. |
|
|
Initial value: (char *)
"Methods for creating, updating, querying, and modifying\n"
"selections of atoms.\n"
"\n"
"Example of usage:\n"
">>> from atomsel import *\n"
">>> s1 = atomsel('residue 1 to 10 and backbone')\n"
">>> s1.get('resid')\n"
" <snip> \n"
">>> s1.set('beta', 5') # set B value to 5 for atoms in s1\n"
">>> # Mass-weighted RMS alignment:\n"
">>> mass = s1.get('mass')\n"
">>> s2 = atomsel('residue 21 to 30 and backbone')\n"
">>> mat = s1.fit(s2, mass)\n"
">>> s1.move(mat)\n"
">>> print s1.rmsd(s2)\n"Definition at line 1187 of file py_atomsel.C. Referenced by initatomsel. |
|
|
Initial value: (char *)
"molid - The id of the molecule this selection is associated with.\n"Definition at line 525 of file py_atomsel.C. |
|
|
Initial value: (char *)
"move( matrix ) -> apply coordinate transformation to selection.\n"
" matrix should be of the form returned by fit()."Definition at line 838 of file py_atomsel.C. |
|
|
Initial value: (char *)
"moveby( vec ) -> shift the selection by the three-element vector vec."Definition at line 811 of file py_atomsel.C. |
|
|
Initial value: (char *) "rmsd(sel, weight=None) -> rms distance between selections.\n" " Selections must have the same number of atoms.\n" " Weight must be None or list of same size as selections." Definition at line 757 of file py_atomsel.C. |
|
|
Initial value: (char *)
"sasa(srad, sel, ... ) -> solvent accessible surface area.\n"
"srad gives solvent radius.\n"
"Optional keyword arguments:\n"
" samples=500 -- specifies number of sample points used per atom.\n"
" points=None -- If points is a list, coordinates of surface points\n"
" will be appended to the list.\n"
" restrict=None -- Pass an atom selection as argument to restrict\n"
" to find contributions coming from just atoms in restrict.\n"Definition at line 915 of file py_atomsel.C. |
|
|
Initial value: (char *)
"set( attrib, val ) -> set attrib values for selected atoms.\n"
" val must be either a single value, or a sequence of values, one for\n"
" each atom in selection.\n"Definition at line 224 of file py_atomsel.C. |
|
|
Initial value: (char *)
"update() -> Recompute atoms in selection; if the selection is\n"
"distance-based (e.g., if it uses 'within'), changes to the frame\n"
"will not be reflected in the selected atoms until this method\n"
"is called.\n"Definition at line 395 of file py_atomsel.C. |
|
|
Initial value: (char *) "write(filetype, filename) -> None\n" "Write the atoms in the selection to a file of the given type." Definition at line 415 of file py_atomsel.C. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002