Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

py_atomselection.C File Reference

#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.

Functions

PyObject * create (PyObject *self, PyObject *args)
PyObject * get (PyObject *self, PyObject *args)
PyObject * set (PyObject *self, PyObject *args)
PyObject * getbonds (PyObject *self, PyObject *args)
PyObject * setbonds (PyObject *self, PyObject *args)
PyObject * macro (PyObject *self, PyObject *args, PyObject *keywds)
PyObject * delmacro (PyObject *self, PyObject *args)
AtomSelsel_from_py (int molid, int frame, PyObject *selected, VMDApp *app)
float * parse_weight (AtomSel *sel, PyObject *wtobj)
PyObject * minmax (PyObject *self, PyObject *args)
PyObject * center (PyObject *self, PyObject *args)
PyObject * py_align (PyObject *self, PyObject *args)
PyObject * py_rmsd (PyObject *self, PyObject *args)
PyObject * contacts (PyObject *self, PyObject *args)
PyObject * sasa (PyObject *self, PyObject *args, PyObject *keywds)
void initatomselection ()

Variables

char create_doc [] = "create(molid, frame, selection) -> tuple\nFind atoms in atom selection."
char get_doc [] = "get(molid, frame, tuple, attribute) -> value list\nGet selected atom values for the given attribute."
char set_doc [] = "set(molid, frame, tuple, attribute, values) -> None\nSe attributes for selected atoms using values."
char getbonds_doc [] = "getbonds(molid, tuple) -> bondlists\nReturn list of bonds for each atom id in tuple."
char setbonds_doc [] = "setbonds(molid, tuple, bondlist) -> None\nSet bonds for each atom in tuple using bondlist."
char macro_doc [] = "macro(name=None, selection=None) -> macro information\nIf both name and selection are None, return list of macro names.\nIf selection is None, return definition for name.\nIf both name and selection are given, define new macro.\n"
char delmacro_doc [] = "delmacro(name) -> None\nDelete macro with given name."
char minmax_doc [] = "minmax(molid, frame, tuple) -> (min, max)\nReturn minimum and maximum coordinates for selected atoms."
char center_doc [] = "center(molid, frame, tuple, weight) -> (x, y, z)\nReturn a tuple corresponding to the center of the selection,\npossibly weighted by weight."
char rmsd_doc [] = "rmsd(mol1, frame1, tuple1, mol2, frame2, tuple2, weights) -> rms distance.\nWeight must be None or list of same size as tuples."
char contacts_doc [] = "contacts(mol1, frame1, tuple1, mol2, frame2, tuple2, cutoff) -> contact pairs\nReturn pairs of atoms, one from each selection, within cutoff of each other."
char sasa_doc [] = "sasa(srad, sel, samples=500, points=None, restrict=None)\npoints must be a list; surface points will be appended to the list\nin the order xyzxyzxyz (i.e. a flat list)"
PyMethodDef AtomselectionMethods []


Function Documentation

PyObject* center PyObject *    self,
PyObject *    args
[static]
 

Definition at line 584 of file py_atomselection.C.

References AtomSel::coordinates, get_vmdapp, measure_center, measure_error, VMDApp::moleculeList, NULL, parse_weight, and sel_from_py.

PyObject* contacts PyObject *    self,
PyObject *    args
[static]
 

Definition at line 732 of file py_atomselection.C.

References BaseMolecule::atom, MolAtom::bonded, AtomSel::coordinates, get_vmdapp, GridSearchPair::ind1, GridSearchPair::ind2, MoleculeList::mol_from_id, VMDApp::moleculeList, GridSearchPair::next, NULL, AtomSel::num_atoms, AtomSel::on, sel_from_py, and vmd_gridsearch3.

PyObject* create PyObject *    self,
PyObject *    args
[static]
 

Definition at line 30 of file py_atomselection.C.

References VMDApp::atomSelParser, AtomSel::change, get_vmdapp, BaseMolecule::id, MoleculeList::mol_from_id, VMDApp::moleculeList, AtomSel::NO_PARSE, NULL, AtomSel::num_atoms, AtomSel::on, AtomSel::selected, and AtomSel::which_frame.

PyObject* delmacro PyObject *    self,
PyObject *    args
[static]
 

Definition at line 467 of file py_atomselection.C.

References VMDApp::atomSelParser, get_vmdapp, NULL, and SymbolTable::remove_custom_singleword.

PyObject* get PyObject *    self,
PyObject *    args
[static]
 

Definition at line 67 of file py_atomselection.C.

References VMDApp::atomSelParser, NameList< SymbolTableElement * >::data, SymbolTable::fctns, SymbolTable::find_attribute, get_vmdapp, SymbolTableElement::is_a, SymbolTableElement::KEYWORD, SymbolTableElement::keyword_double, SymbolTableElement::keyword_int, SymbolTableElement::keyword_single, SymbolTableElement::keyword_string, MoleculeList::mol_from_id, VMDApp::moleculeList, BaseMolecule::nAtoms, NULL, SymbolTableElement::returns_a, and SymbolTableElement::SINGLEWORD.

PyObject* getbonds PyObject *    self,
PyObject *    args
[static]
 

Definition at line 324 of file py_atomselection.C.

References BaseMolecule::atom, MolAtom::bonds, MolAtom::bondTo, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, BaseMolecule::nAtoms, and NULL.

void initatomselection  
 

Definition at line 877 of file py_atomselection.C.

References AtomselectionMethods.

Referenced by PythonTextInterp::PythonTextInterp.

PyObject* macro PyObject *    self,
PyObject *    args,
PyObject *    keywds
[static]
 

Definition at line 424 of file py_atomselection.C.

References SymbolTable::add_custom_singleword, VMDApp::atomSelParser, SymbolTable::custom_singleword_name, SymbolTable::get_custom_singleword, get_vmdapp, NULL, and SymbolTable::num_custom_singleword.

PyObject* minmax PyObject *    self,
PyObject *    args
[static]
 

Definition at line 546 of file py_atomselection.C.

References DrawMolecule::get_frame, get_vmdapp, measure_error, measure_minmax, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, AtomSel::num_atoms, AtomSel::on, Timestep::pos, and sel_from_py.

Referenced by GraphicsFltkRepOrbital::dataset_append, and GraphicsFltkRepVolumetric::dataset_append.

float* parse_weight AtomSel   sel,
PyObject *    wtobj
[static]
 

Definition at line 516 of file py_atomselection.C.

References NULL, and AtomSel::selected.

Referenced by center, parse_two_selections_return_weight, py_align, and py_rmsd.

PyObject* py_align PyObject *    self,
PyObject *    args
[static]
 

Definition at line 617 of file py_atomselection.C.

References AtomSel::coordinates, DrawMolecule::force_recalc, get_vmdapp, mat, measure_error, measure_fit, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, AtomSel::molid, Matrix4::multpoint3d, NULL, AtomSel::num_atoms, AtomSel::on, parse_weight, and sel_from_py.

PyObject* py_rmsd PyObject *    self,
PyObject *    args
[static]
 

Definition at line 687 of file py_atomselection.C.

References DrawMolecule::get_frame, get_vmdapp, measure_error, measure_rmsd, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, parse_weight, Timestep::pos, sel_from_py, and AtomSel::selected.

PyObject* sasa PyObject *    self,
PyObject *    args,
PyObject *    keywds
[static]
 

Definition at line 788 of file py_atomselection.C.

References AtomSel::coordinates, NameList< float * >::data, BaseMolecule::extraflt, get_vmdapp, measure_error, measure_sasa, MoleculeList::mol_from_id, VMDApp::moleculeList, AtomSel::molid, NULL, ResizeArray::num, sasa, and sel_from_py.

Referenced by sasa.

AtomSel* sel_from_py int    molid,
int    frame,
PyObject *    selected,
VMDApp   app
[static]
 

Definition at line 479 of file py_atomselection.C.

References VMDApp::atomSelParser, BaseMolecule::id, MoleculeList::mol_from_id, VMDApp::moleculeList, BaseMolecule::nAtoms, NULL, AtomSel::num_atoms, AtomSel::on, AtomSel::selected, and AtomSel::which_frame.

Referenced by center, contacts, minmax, py_align, py_rmsd, and sasa.

PyObject* set PyObject *    self,
PyObject *    args
[static]
 

Definition at line 183 of file py_atomselection.C.

References MoleculeList::add_color_names, VMDApp::atomSelParser, DrawMolItem::COL_REGEN, NameList< SymbolTableElement * >::data, SymbolTable::fctns, SymbolTable::find_attribute, DrawMolecule::force_recalc, get_vmdapp, SymbolTableElement::is_a, SymbolTable::is_changeable, SymbolTableElement::IS_FLOAT, SymbolTableElement::IS_INT, SymbolTableElement::IS_STRING, SymbolTableElement::KEYWORD, MoleculeList::mol_from_id, VMDApp::moleculeList, BaseMolecule::nAtoms, NULL, SymbolTableElement::returns_a, DrawMolItem::SEL_REGEN, SymbolTableElement::set_keyword_double, SymbolTableElement::set_keyword_int, SymbolTableElement::set_keyword_string, and SymbolTableElement::SINGLEWORD.

PyObject* setbonds PyObject *    self,
PyObject *    args
[static]
 

Definition at line 363 of file py_atomselection.C.

References BaseMolecule::atom, MolAtom::bonds, MolAtom::bondTo, DrawMolecule::force_recalc, get_vmdapp, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, BaseMolecule::nAtoms, and NULL.


Variable Documentation

PyMethodDef AtomselectionMethods[] [static]
 

Initial value:

 {
  {(char *)"create", (vmdPyMethod)create, METH_VARARGS, create_doc },
  {(char *)"get", (vmdPyMethod)get, METH_VARARGS, get_doc },
  {(char *)"set", (vmdPyMethod)set, METH_VARARGS, set_doc },
  {(char *)"getbonds", (vmdPyMethod)getbonds, METH_VARARGS, getbonds_doc },
  {(char *)"setbonds", (vmdPyMethod)setbonds, METH_VARARGS, setbonds_doc },
  {(char *)"macro", (PyCFunction)macro, METH_VARARGS | METH_KEYWORDS, macro_doc},
  {(char *)"delmacro", (vmdPyMethod)delmacro, METH_VARARGS, delmacro_doc },
  {(char *)"minmax", (vmdPyMethod)minmax, METH_VARARGS, minmax_doc },
  {(char *)"center", (vmdPyMethod)center, METH_VARARGS, center_doc },
  {(char *)"rmsd", (vmdPyMethod)py_rmsd, METH_VARARGS, rmsd_doc },
  {(char *)"align", (vmdPyMethod)py_align, METH_VARARGS},
  {(char *)"contacts", (vmdPyMethod)contacts, METH_VARARGS, contacts_doc },
  {(char *)"sasa", (vmdPyMethod)sasa, METH_VARARGS | METH_KEYWORDS, sasa_doc },
  {NULL, NULL}
}

Definition at line 860 of file py_atomselection.C.

Referenced by initatomselection.

char center_doc[] = "center(molid, frame, tuple, weight) -> (x, y, z)\nReturn a tuple corresponding to the center of the selection,\npossibly weighted by weight." [static]
 

Definition at line 583 of file py_atomselection.C.

char contacts_doc[] = "contacts(mol1, frame1, tuple1, mol2, frame2, tuple2, cutoff) -> contact pairs\nReturn pairs of atoms, one from each selection, within cutoff of each other." [static]
 

Definition at line 731 of file py_atomselection.C.

char create_doc[] = "create(molid, frame, selection) -> tuple\nFind atoms in atom selection." [static]
 

Definition at line 29 of file py_atomselection.C.

char delmacro_doc[] = "delmacro(name) -> None\nDelete macro with given name." [static]
 

Definition at line 466 of file py_atomselection.C.

char get_doc[] = "get(molid, frame, tuple, attribute) -> value list\nGet selected atom values for the given attribute." [static]
 

Definition at line 66 of file py_atomselection.C.

char getbonds_doc[] = "getbonds(molid, tuple) -> bondlists\nReturn list of bonds for each atom id in tuple." [static]
 

Definition at line 323 of file py_atomselection.C.

char macro_doc[] = "macro(name=None, selection=None) -> macro information\nIf both name and selection are None, return list of macro names.\nIf selection is None, return definition for name.\nIf both name and selection are given, define new macro.\n" [static]
 

Definition at line 423 of file py_atomselection.C.

char minmax_doc[] = "minmax(molid, frame, tuple) -> (min, max)\nReturn minimum and maximum coordinates for selected atoms." [static]
 

Definition at line 545 of file py_atomselection.C.

char rmsd_doc[] = "rmsd(mol1, frame1, tuple1, mol2, frame2, tuple2, weights) -> rms distance.\nWeight must be None or list of same size as tuples." [static]
 

Definition at line 686 of file py_atomselection.C.

char sasa_doc[] = "sasa(srad, sel, samples=500, points=None, restrict=None)\npoints must be a list; surface points will be appended to the list\nin the order xyzxyzxyz (i.e. a flat list)" [static]
 

Definition at line 786 of file py_atomselection.C.

char set_doc[] = "set(molid, frame, tuple, attribute, values) -> None\nSe attributes for selected atoms using values." [static]
 

Definition at line 182 of file py_atomselection.C.

char setbonds_doc[] = "setbonds(molid, tuple, bondlist) -> None\nSet bonds for each atom in tuple using bondlist." [static]
 

Definition at line 362 of file py_atomselection.C.


Generated on Sun May 27 01:59:28 2012 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002