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

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

Compounds

struct  atomsel_iterobject
struct  PyAtomSelObject

Typedefs

typedef int Py_ssize_t

Functions

int atomsel_Check (PyObject *obj)
AtomSelatomsel_AsAtomSel (PyObject *obj)
DrawMoleculeget_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 *kwargs)
PyObject * atomsel_get (PyAtomSelObject *a, PyObject *keyobj)
PyObject * py_list_attrs (PyAtomSelObject *obj, PyObject *args, PyObject *kwargs)
PyObject * legacy_atomsel_get (PyObject *o, PyObject *args, PyObject *kwargs)
PyObject * atomsel_getattro (PyObject *o, PyObject *attr_name)
void help_int (void *p, PyObject *obj)
void help_double (void *p, PyObject *obj)
void help_constcharptr (void *p, PyObject *obj)
int build_set_values (const void *list, const AtomSel *atomSel, PyObject *val, int dtype_size, void(*converter)(void *, PyObject *))
int atomsel_set (PyAtomSelObject *a, const char *name, PyObject *val)
PyObject * legacy_atomsel_set (PyObject *o, PyObject *args, PyObject *kwargs)
int atomsel_setattro (PyObject *o, PyObject *name, PyObject *value)
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 *kwargs)
PyObject * getbonds (PyAtomSelObject *a, void *)
int setbonds (PyAtomSelObject *a, PyObject *obj, void *)
PyObject * getmolid (PyAtomSelObject *a, void *)
float * parse_weight (AtomSel *sel, PyObject *wtobj)
PyObject * minmax (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * centerperresidue (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * py_rmsfperresidue (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * center (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
float * parse_two_selections_return_weight (PyAtomSelObject *a, PyObject *args, PyObject *kwargs, AtomSel **othersel)
PyObject * py_rmsdperresidue (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * py_rmsd (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * py_rmsd_q (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * py_rmsdmat_q (PyAtomSelObject *a, PyObject *args, PyObject *kwds)
PyObject * py_rmsf (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * py_rgyr (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * py_fit (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * py_moveby (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * py_move (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * contacts (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * py_hbonds (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
PyObject * sasa (PyAtomSelObject *a, PyObject *args, PyObject *kwargs)
Py_ssize_t atomselection_length (PyObject *a)
PyObject * atomselection_subscript (PyAtomSelObject *a, PyObject *keyobj)
PyObject * atomsel_iter (PyObject *)
PyObject * iter_next (atomsel_iterobject *it)
void iter_dealloc (atomsel_iterobject *it)
PyObject * iter_len (atomsel_iterobject *it)
PyObject * initatomsel (void)

Variables

const char atomsel_doc []
const char get_doc []
const char listattrs_doc []
const char set_doc []
const char frame_doc []
const char update_doc []
const char write_doc []
const char bonds_doc []
const char molid_doc []
PyGetSetDef atomsel_getset []
const char minmax_doc []
const char centerperres_doc []
const char rmsfperres_doc []
const char center_doc []
const char rmsdperres_doc []
const char rmsd_doc []
const char rmsd_q_doc []
char * rmsdmat_q_doc
const char rmsf_doc []
const char rgyr_doc []
const char fit_doc []
const char moveby_doc []
const char move_doc []
const char contacts_doc []
const char py_hbonds_doc []
const char sasa_doc []
PyMappingMethods atomsel_mapping
PyMethodDef atomselection_methods []
PyMethodDef iter_methods []
PyTypeObject itertype
PyTypeObject Atomsel_Type


Typedef Documentation

typedef int Py_ssize_t
 

Definition at line 29 of file py_atomsel.C.


Function Documentation

AtomSel* atomsel_AsAtomSel PyObject *    obj
 

Definition at line 46 of file py_atomsel.C.

References atomsel_Check, and NULL.

int atomsel_Check PyObject *    obj [static]
 

Definition at line 39 of file py_atomsel.C.

References Atomsel_Type.

Referenced by atomsel_AsAtomSel, and py_hbonds.

void atomsel_dealloc PyAtomSelObject   obj [static]
 

Definition at line 84 of file py_atomsel.C.

References PyAtomSelObject::atomSel.

PyObject* atomsel_get PyAtomSelObject   a,
PyObject *    keyobj
[static]
 

Definition at line 174 of file py_atomsel.C.

References PyAtomSelObject::app, as_constcharptr, as_pyint, as_pystring, PyAtomSelObject::atomSel, VMDApp::atomSelParser, NameList< SymbolTableElement * >::data, SymbolTable::fctns, SymbolTable::find_attribute, AtomSel::firstsel, get_molecule, SymbolTableElement::is_a, SymbolTableElement::IS_FLOAT, SymbolTableElement::IS_INT, SymbolTableElement::IS_STRING, SymbolTableElement::KEYWORD, SymbolTableElement::keyword_double, SymbolTableElement::keyword_int, SymbolTableElement::keyword_single, SymbolTableElement::keyword_string, AtomSel::lastsel, NULL, AtomSel::num_atoms, AtomSel::on, SymbolTableElement::returns_a, AtomSel::selected, SymbolTableElement::SINGLEWORD, and AtomSel::which_frame.

Referenced by atomsel_getattro, and legacy_atomsel_get.

PyObject* atomsel_getattro PyObject *    o,
PyObject *    attr_name
[static]
 

Definition at line 391 of file py_atomsel.C.

References atomsel_get, and NULL.

PyObject * atomsel_iter PyObject *   
 

Definition at line 2323 of file py_atomsel.C.

References atomsel_iterobject::a, atomsel_iterobject::index, and itertype.

PyObject* atomsel_new PyTypeObject *    type,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 113 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, valid_molid, and AtomSel::which_frame.

PyObject* atomsel_repr PyAtomSelObject   obj [static]
 

Definition at line 90 of file py_atomsel.C.

References as_pystring, PyAtomSelObject::atomSel, AtomSel::cmdStr, AtomSel::molid, result, and AtomSel::which_frame.

int atomsel_set PyAtomSelObject   a,
const char *    name,
PyObject *    val
[static]
 

Definition at line 470 of file py_atomsel.C.

References MoleculeList::add_color_names, PyAtomSelObject::app, PyAtomSelObject::atomSel, VMDApp::atomSelParser, build_set_values, DrawMolItem::COL_REGEN, NameList< SymbolTableElement * >::data, SymbolTable::fctns, SymbolTable::find_attribute, DrawMolecule::force_recalc, get_molecule, help_constcharptr, help_double, help_int, BaseMolecule::id, SymbolTableElement::is_a, SymbolTable::is_changeable, SymbolTableElement::IS_FLOAT, SymbolTableElement::IS_INT, SymbolTableElement::IS_STRING, SymbolTableElement::KEYWORD, VMDApp::moleculeList, NULL, AtomSel::num_atoms, AtomSel::on, SymbolTableElement::returns_a, DrawMolItem::SEL_REGEN, SymbolTableElement::set_keyword_double, SymbolTableElement::set_keyword_int, SymbolTableElement::set_keyword_string, SymbolTableElement::SINGLEWORD, and AtomSel::which_frame.

int atomsel_setattro PyObject *    o,
PyObject *    name,
PyObject *    value
[static]
 

Definition at line 591 of file py_atomsel.C.

References as_constcharptr, and atomsel_set.

PyObject* atomsel_str PyAtomSelObject   obj [static]
 

Definition at line 107 of file py_atomsel.C.

References as_pystring, PyAtomSelObject::atomSel, and AtomSel::cmdStr.

Py_ssize_t atomselection_length PyObject *    a [static]
 

Definition at line 2086 of file py_atomsel.C.

PyObject* atomselection_subscript PyAtomSelObject   a,
PyObject *    keyobj
[static]
 

Definition at line 2092 of file py_atomsel.C.

References PyAtomSelObject::atomSel, AtomSel::num_atoms, AtomSel::on, and result.

int build_set_values const void *    list,
const AtomSel   atomSel,
PyObject *    val,
int    dtype_size,
void(*    converter)(void *, PyObject *)
[static]
 

Definition at line 425 of file py_atomsel.C.

References AtomSel::firstsel, is_pystring, AtomSel::lastsel, and AtomSel::on.

Referenced by atomsel_set.

PyObject* center PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1083 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, get_molecule, measure_center, measure_error, VMDApp::moleculeList, NULL, and parse_weight.

PyObject* centerperresidue PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 953 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, get_molecule, measure_center_perresidue, measure_error, VMDApp::moleculeList, NULL, parse_weight, and AtomSel::selected.

PyObject* contacts PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1559 of file py_atomsel.C.

References PyAtomSelObject::app, as_pyint, BaseMolecule::atom, PyAtomSelObject::atomSel, Atomsel_Type, MolAtom::bonded, AtomSel::cmdStr, AtomSel::coordinates, get_molecule, GridSearchPair::ind1, GridSearchPair::ind2, VMDApp::moleculeList, AtomSel::molid, GridSearchPair::next, NULL, AtomSel::num_atoms, AtomSel::on, result, AtomSel::selected, and vmd_gridsearch3.

DrawMolecule* get_molecule PyAtomSelObject   a
 

Definition at line 54 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, MoleculeList::mol_from_id, VMDApp::moleculeList, AtomSel::molid, and NULL.

Referenced by atomsel_get, atomsel_set, center, centerperresidue, contacts, getbonds, getframe, minmax, parse_two_selections_return_weight, py_hbonds, py_move, py_moveby, py_rmsf, py_rmsfperresidue, py_update, py_write, sasa, setbonds, and setframe.

PyObject* getbonds PyAtomSelObject   a,
void *   
[static]
 

Definition at line 736 of file py_atomsel.C.

References as_pyint, BaseMolecule::atom, PyAtomSelObject::atomSel, MolAtom::bonds, MolAtom::bondTo, AtomSel::firstsel, get_molecule, AtomSel::lastsel, NULL, AtomSel::on, and AtomSel::selected.

PyObject* getframe PyAtomSelObject   a,
void *   
[static]
 

Definition at line 613 of file py_atomsel.C.

References as_pyint, PyAtomSelObject::atomSel, get_molecule, NULL, and AtomSel::which_frame.

PyObject* getmolid PyAtomSelObject   a,
void *   
[static]
 

Definition at line 847 of file py_atomsel.C.

References PyAtomSelObject::app, as_pyint, PyAtomSelObject::atomSel, MoleculeList::mol_from_id, VMDApp::moleculeList, AtomSel::molid, and NULL.

void help_constcharptr void *    p,
PyObject *    obj
[static]
 

Definition at line 418 of file py_atomsel.C.

References as_constcharptr.

Referenced by atomsel_set.

void help_double void *    p,
PyObject *    obj
[static]
 

Definition at line 413 of file py_atomsel.C.

Referenced by atomsel_set.

void help_int void *    p,
PyObject *    obj
[static]
 

Definition at line 408 of file py_atomsel.C.

References as_int.

Referenced by atomsel_set.

PyObject* initatomsel void   
 

Definition at line 2335 of file py_atomsel.C.

References Atomsel_Type.

void iter_dealloc atomsel_iterobject   it
 

Definition at line 2162 of file py_atomsel.C.

References atomsel_iterobject::a, and it.

PyObject* iter_len atomsel_iterobject   it
 

Definition at line 2167 of file py_atomsel.C.

References atomsel_iterobject::a, as_pyint, PyAtomSelObject::atomSel, it, and AtomSel::selected.

PyObject* iter_next atomsel_iterobject   it
 

Definition at line 2154 of file py_atomsel.C.

References atomsel_iterobject::a, as_pyint, PyAtomSelObject::atomSel, atomsel_iterobject::index, it, AtomSel::num_atoms, and AtomSel::on.

PyObject* legacy_atomsel_get PyObject *    o,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 370 of file py_atomsel.C.

References atomsel_get, NULL, and result.

PyObject* legacy_atomsel_set PyObject *    o,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 568 of file py_atomsel.C.

References atomsel_set, and NULL.

PyObject* minmax PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 912 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, NameList< float * >::data, BaseMolecule::extraflt, get_molecule, measure_error, measure_minmax, VMDApp::moleculeList, NULL, AtomSel::num_atoms, and AtomSel::on.

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

float* parse_two_selections_return_weight PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs,
AtomSel **    othersel
[static]
 

Definition at line 1120 of file py_atomsel.C.

References PyAtomSelObject::atomSel, Atomsel_Type, get_molecule, NULL, parse_weight, and AtomSel::selected.

Referenced by py_fit, py_rmsd, py_rmsd_q, and py_rmsdperresidue.

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

Definition at line 864 of file py_atomsel.C.

References NULL, and AtomSel::selected.

Referenced by center, centerperresidue, parse_two_selections_return_weight, py_rgyr, and py_rmsdmat_q.

PyObject* py_fit PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1425 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, Matrix4::mat, mat, measure_error, measure_fit, VMDApp::moleculeList, NULL, parse_two_selections_return_weight, and result.

PyObject* py_hbonds PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1676 of file py_atomsel.C.

References PyAtomSelObject::app, as_pyint, PyAtomSelObject::atomSel, atomsel_Check, Atomsel_Type, AtomSel::cmdStr, AtomSel::coordinates, get_molecule, measure_hbonds, VMDApp::moleculeList, AtomSel::molid, NULL, AtomSel::num_atoms, result, and AtomSel::selected.

PyObject* py_list_attrs PyAtomSelObject   obj,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 318 of file py_atomsel.C.

References PyAtomSelObject::app, as_pystring, VMDApp::atomSelParser, NameList< SymbolTableElement * >::data, SymbolTable::fctns, SymbolTableElement::is_a, SymbolTable::is_changeable, SymbolTableElement::KEYWORD, NameList< SymbolTableElement * >::name, NULL, NameList< SymbolTableElement * >::num, result, and SymbolTableElement::SINGLEWORD.

PyObject* py_move PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1510 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::cmdStr, AtomSel::coordinates, DrawMolecule::force_recalc, get_molecule, Matrix4::mat, mat, measure_error, measure_move, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, AtomSel::molid, NULL, py_get_vector, and AtomSel::selected.

PyObject* py_moveby PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1466 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::cmdStr, AtomSel::coordinates, AtomSel::firstsel, DrawMolecule::force_recalc, get_molecule, AtomSel::lastsel, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, AtomSel::molid, NULL, AtomSel::on, AtomSel::selected, and vec_add.

PyObject* py_rgyr PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1386 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, measure_error, measure_rgyr, VMDApp::moleculeList, NULL, and parse_weight.

PyObject* py_rmsd PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1224 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.

PyObject* py_rmsd_q PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1258 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, AtomSel::coordinates, measure_error, measure_rmsd_qcp, VMDApp::moleculeList, NULL, parse_two_selections_return_weight, and AtomSel::selected.

PyObject* py_rmsdmat_q PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwds
[static]
 

Definition at line 1287 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, measure_error, measure_rmsdmat_qcp, VMDApp::molecule_numframes, VMDApp::moleculeList, AtomSel::molid, NULL, parse_weight, and AtomSel::selected.

PyObject* py_rmsdperresidue PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1174 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, measure_error, measure_rmsd_perresidue, VMDApp::moleculeList, NULL, parse_two_selections_return_weight, and AtomSel::selected.

PyObject* py_rmsf PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1335 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, get_molecule, measure_error, measure_rmsf, VMDApp::moleculeList, NULL, and AtomSel::selected.

PyObject* py_rmsfperresidue PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1030 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, get_molecule, measure_error, measure_rmsf_perresidue, VMDApp::moleculeList, NULL, and AtomSel::selected.

PyObject* py_update PyAtomSelObject   a [static]
 

Definition at line 652 of file py_atomsel.C.

References PyAtomSelObject::atomSel, AtomSel::change, get_molecule, and NULL.

PyObject* py_write PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 671 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::WAIT_ALL, FileSpec::waitfor, and AtomSel::which_frame.

PyObject* sasa PyAtomSelObject   a,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1819 of file py_atomsel.C.

References PyAtomSelObject::app, PyAtomSelObject::atomSel, Atomsel_Type, AtomSel::coordinates, NameList< float * >::data, BaseMolecule::extraflt, get_molecule, measure_error, measure_sasa, VMDApp::moleculeList, NULL, ResizeArray::num, and sasa.

Referenced by sasa.

int setbonds PyAtomSelObject   a,
PyObject *    obj,
void *   
[static]
 

Definition at line 781 of file py_atomsel.C.

References as_int, BaseMolecule::atom, PyAtomSelObject::atomSel, MolAtom::bonds, MolAtom::bondTo, AtomSel::firstsel, DrawMolecule::force_recalc, get_molecule, AtomSel::lastsel, DrawMolItem::MOL_REGEN, BaseMolecule::nAtoms, AtomSel::on, and AtomSel::selected.

int setframe PyAtomSelObject   a,
PyObject *    frameobj,
void *   
[static]
 

Definition at line 624 of file py_atomsel.C.

References as_int, PyAtomSelObject::atomSel, get_molecule, DrawMolecule::numframes, AtomSel::TS_LAST, AtomSel::TS_NOW, and AtomSel::which_frame.


Variable Documentation

const char atomsel_doc[] [static]
 

Initial value:

"Create a new atom selection object\n\n"
"Args:\n"
"    selection (str): Atom selection string. Defaults to 'all'\n"
"    molid (int): Molecule ID to select from. Defaults to -1 (top molecule)\n"
"    frame (int): Frame to select on. Defaults to -1 (current)\n\n"
"Example of usage:\n"
"    >>> from vmd import atomsel\n"
"    >>> s1 = atomsel('residue 1 to 10 and backbone')\n"
"    >>> s1.resid\n"
"     <snip> \n"
"    >>> s1.beta = 5 # Set beta to 5 for all 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 64 of file py_atomsel.C.

PyGetSetDef atomsel_getset[] [static]
 

Initial value:

 {
  {(char*) "frame", (getter)getframe, (setter)setframe, (char*) frame_doc, NULL},
  {(char*) "bonds", (getter)getbonds, (setter)setbonds, (char*) bonds_doc, NULL},
  {(char*) "molid", (getter)getmolid, (setter)NULL, (char*) molid_doc, NULL},
  {NULL },
}

Definition at line 855 of file py_atomsel.C.

PyMappingMethods atomsel_mapping [static]
 

Initial value:

 {
  atomselection_length,
  (binaryfunc)atomselection_subscript,
  0
}

Definition at line 2108 of file py_atomsel.C.

PyTypeObject Atomsel_Type
 

Definition at line 2277 of file py_atomsel.C.

Referenced by atomsel_Check, contacts, initatomsel, parse_two_selections_return_weight, py_hbonds, and sasa.

PyMethodDef atomselection_methods[] [static]
 

Initial value:

 {
  { "list_attributes", (PyCFunction)py_list_attrs, METH_VARARGS|METH_KEYWORDS, listattrs_doc },
  { "get", (PyCFunction)legacy_atomsel_get, METH_VARARGS|METH_KEYWORDS, get_doc  },
  { "set", (PyCFunction)legacy_atomsel_set, METH_VARARGS|METH_KEYWORDS, 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|METH_KEYWORDS, minmax_doc },
  { "center", (PyCFunction)center, METH_VARARGS|METH_KEYWORDS, center_doc },
  { "rmsd", (PyCFunction)py_rmsd, METH_VARARGS|METH_KEYWORDS, rmsd_doc },
  { "rmsdQCP", (PyCFunction)py_rmsd_q, METH_VARARGS|METH_KEYWORDS, rmsd_q_doc },
  { "rmsdmat", (PyCFunction)py_rmsdmat_q, METH_VARARGS|METH_KEYWORDS, rmsdmat_q_doc },
  { "rmsf", (PyCFunction)py_rmsf, METH_VARARGS|METH_KEYWORDS, rmsf_doc },
  { "centerperresidue", (PyCFunction)centerperresidue, METH_VARARGS|METH_KEYWORDS, centerperres_doc },
  { "rmsdperresidue", (PyCFunction)py_rmsdperresidue, METH_VARARGS|METH_KEYWORDS, rmsdperres_doc },
  { "rmsfperresidue", (PyCFunction)py_rmsfperresidue, METH_VARARGS|METH_KEYWORDS, rmsfperres_doc },
  { "rgyr", (PyCFunction)py_rgyr, METH_VARARGS|METH_KEYWORDS, rgyr_doc },
  { "fit", (PyCFunction)py_fit, METH_VARARGS|METH_KEYWORDS, fit_doc },
  { "move", (PyCFunction)py_move, METH_VARARGS|METH_KEYWORDS, move_doc },
  { "moveby", (PyCFunction)py_moveby, METH_VARARGS|METH_KEYWORDS, moveby_doc },
  { "contacts", (PyCFunction)contacts, METH_VARARGS|METH_KEYWORDS, contacts_doc },
  { "hbonds", (PyCFunction)py_hbonds, METH_VARARGS|METH_KEYWORDS, py_hbonds_doc },
  { "sasa", (PyCFunction)sasa, METH_VARARGS|METH_KEYWORDS, sasa_doc },




  { NULL, NULL }
}

Definition at line 2115 of file py_atomsel.C.

const char bonds_doc[] [static]
 

Initial value:

"For each atom in selection, a list of the indices of atoms to which it is\n"
"bonded.\nTo set bonds, pass a sequence with length of the number of atoms in\n"
"the selection, with each entry in the sequence being a list or tuple\n"
"containing the atom indices to which that atom in the selection is bound\n\n"
"For example, for a water molecule with atoms H-O-H:\n"
">>> sel = atomsel('water and residue 0')\n"
">>> sel.bonds = [(1), (0,2), (1)]"

Definition at line 728 of file py_atomsel.C.

const char center_doc[] [static]
 

Initial value:

"Get the coordinates of the center of the selection, optionally with weights\n"
"on the selection atoms\n\n"
"Args:\n"
"    weight (list of float): Weight on each atom. Optional\n"
"Returns:\n"
"    (3-tuple of float): (x,y,z) coordinates of center of the selection"

Definition at line 1076 of file py_atomsel.C.

const char centerperres_doc[] [static]
 

Initial value:

"Get the coordinates of the center of each residue in the selection,\n"
"optionally weighted by weight\n\n"
"Args:\n"
"    weight (list of float): Weights for each atom in selection. Optional.\n"
"        weights cannot be 0 otherwise NaN will be returned.\n"
"Returns:\n"
"    (list of tuple): (x,y,z) coordinates of center of each residue"

Definition at line 945 of file py_atomsel.C.

const char contacts_doc[] [static]
 

Initial value:

"Finds all atoms in selection within a given distance of any atom in the\n"
"given selection that are not directly bonded to it. Selections can be in\n"
"different molecules.\n\n"
"Args:\n"
"    selection (atomsel): Atom selection to compare against\n"
"    cutoff (float): Distance cutoff for atoms to be considered contacting\n"
"Returns:\n"
"    (2 lists): Atom indices in this selection, and in given selection\n"
"        that are within the cutoff."

Definition at line 1549 of file py_atomsel.C.

const char fit_doc[] [static]
 

Initial value:

"Compute the transformation matrix for the root-mean-square (RMS) alignment\n"
"of this selection to the one given. The format of the matrix is suitable\n"
"for passing to the `atomsel.move()` method\n\n"
"Args:\n"
"    selection (atomsel): Selection to compute fit to. Must have the same\n"
"        number of atoms as this selection\n"
"    weight (list of float): Per-atom weights to apply during calculation\n"
"        Must be the same size as this selection. Optional\n"
"Returns:\n"
"    (16-tuple of float): Transformation matrix, in column major / fortran\n"
"        ordering"

Definition at line 1413 of file py_atomsel.C.

const char frame_doc[] [static]
 

Initial value:

"Get the frame an atomsel object references. Changing the frame does not\n"
"immediately update the selection. Use `atomsel.update()` to do that.\n"
"Special frame values are -1 for the current frame and -2 for the last frame"

Definition at line 609 of file py_atomsel.C.

const char get_doc[] [static]
 

Initial value:

"Get attribute values for selected atoms\n\n"
"Args:\n"
"    attribute (str): Attribute to query\n"
"Returns:\n"
"    (list): Attribute value for each atom in selection"

Definition at line 168 of file py_atomsel.C.

PyMethodDef iter_methods[]
 

Initial value:

 {
  {"__length_hint__", (PyCFunction)iter_len, METH_NOARGS },
  {NULL, NULL}
}

Definition at line 2171 of file py_atomsel.C.

PyTypeObject itertype
 

Definition at line 2243 of file py_atomsel.C.

Referenced by atomsel_iter.

const char listattrs_doc[] [static]
 

Initial value:

"List available atom attributes\n"
"Args:\n"
"    changeable (bool): If only user-changeable attributes should be listed\n"
"        Defaults to False\n"
"Returns:\n"
"    (list of str): Atom attributes. These attributes may be accessed or\n"
"        set with a . after the class name.\n"
"Example to list available attributes and get the x coordinate attribute:\n"
"    >>> sel = atomsel('protein')\n"
"    >>> sel.list_attributes()\n"
"    >>> sel.x"

Definition at line 306 of file py_atomsel.C.

const char minmax_doc[] [static]
 

Initial value:

"Get minimum and maximum coordinates for selected atoms\n\n"
"Args:\n"
"    radii (bool): If atomic radii should be included in calculation\n"
"        Defaults to False.\n"
"Returns:\n"
"    (2-tuple of tuples): (x,y,z) coordinate of minimum, then maximum atom"

Definition at line 905 of file py_atomsel.C.

const char molid_doc[] [static]
 

Initial value:

"The molecule ID the selection is associated with"

Definition at line 845 of file py_atomsel.C.

const char move_doc[] [static]
 

Initial value:

"Apply a coordinate transformation to the selection. To undo the move,\n"
"calculate the inverse coordinate transformation matrix with\n"
"`numpy.linalg.inv(matrix)` and pass that to this method\n\n"
"Args:\n"
"    matrix (numpy 16, matrix): Coordinate transformation, in form returned\n"
"        by `atomsel.fit()`, column major / fortran ordering"

Definition at line 1503 of file py_atomsel.C.

const char moveby_doc[] [static]
 

Initial value:

"Shift the selection by a vector\n\n"
"Args:\n"
"    vector (3-tuple of float): (x, y, z) movement to apply"

Definition at line 1462 of file py_atomsel.C.

const char py_hbonds_doc[] [static]
 

Initial value:

"Get hydrogen bonds present in current frame of selection using simple\n"
"geometric criteria.\n\n"
"Args:\n"
"    cutoff (float): Distance cutoff between donor and acceptor atoms\n"
"    maxangle (float): Angle cutoff between donor, hydrogen, and acceptor.\n"
"        Angle must be less than this value from 180 degrees.\n"
"    acceptor (atomsel): If given, atomselection for selector atoms, and this\n"
"        selection is assumed to have donor atoms. Both selections must be in\n"
"        the same molecule. If there is overlap between donor and acceptor\n"
"        selection, the output may be inaccurate. Optional.\n"
"Returns:\n"
"    (list of 3 lists): Donor atom indices, acceptor atom indices, and\n"
"        proton atom indices of identified hydrogen bonds\n"

Definition at line 1661 of file py_atomsel.C.

const char rgyr_doc[] [static]
 

Initial value:

"Calculate the radius of gyration of this selection\n\n"
"Args:\n"
"    weight (list of float): Per-atom weights to apply during calcuation\n"
"        Must be same size as selection. Optional\n"
"Returns:\n"
"    (float): Radius of gyration"

Definition at line 1379 of file py_atomsel.C.

const char rmsd_doc[] [static]
 

Initial value:

"Calculate the root-mean-square distance (RMSD) between selections. Atoms\n"
"must be in the same order in each selection\n\n"
"Args:\n"
"    selection (atomsel): Other selection to compute RMSD to. Must have\n"
"        the same number of atoms as this selection\n"
"    weight (list of float): Weight per atom, optional\n"
"Returns:\n"
"    (float): RMSD between selections."

Definition at line 1215 of file py_atomsel.C.

const char rmsd_q_doc[] [static]
 

Initial value:

"Calculate the root-mean-square distance (RMSD) between selection after\n"
"rotating them optimally\n\n"
"Args:\n"
"    selection (atomsel): Other selection to compute RMSD to. Must have\n"
"        the same number of atoms as this selection\n"
"    weight (list of float): Weight per atom, optional\n"
"Returns:\n"
"    (float): RMSD between selections."

Definition at line 1249 of file py_atomsel.C.

char* rmsdmat_q_doc [static]
 

Initial value:

 (char *)
  "rmsdmat(sel=this, weight=None, first=0, last=-1, step=1) -> pairwise \n"
  "  rmsd over a trajectory, returned as a matrix.\n"
  "  Weight must be None or list of same size as selection.\n"
  "  Uses QCP algorithm internally, so does not depend on pre-alignment."

Definition at line 1282 of file py_atomsel.C.

const char rmsdperres_doc[] [static]
 

Initial value:

"Get the per-residue root-mean-square (RMS) distance between selections\n\n"
"Args:\n"
"    selection (atomsel): Selection to compute distance to. Must have the\n"
"        same number of atoms as this selection\n"
"    weight (list of float): Weight for atoms, one per atom in selection.\n"
"        Optional\n"
"Returns:\n"
"    (list of float): RMSD between each residue in selection"

Definition at line 1165 of file py_atomsel.C.

const char rmsf_doc[] [static]
 

Initial value:

"Measures the root-mean-square fluctuation (RMSF) along a trajectory on a\n"
"per-atom basis. RMSF is the mean deviation from the average position\n\n"
"Args:\n"
"    first (int): First frame to include. Defaults to 0 (beginning).\n"
"    last (int): Last frame to include. Defaults to -1 (end).\n"
"    step (int): Use every step-th frame. Defaults to 1 (all frames)\n"
"Returns:\n"
"    (list of float): RMSF for each atom in selection"

Definition at line 1326 of file py_atomsel.C.

const char rmsfperres_doc[] [static]
 

Initial value:

"Measures the root-mean-square fluctuation (RMSF) along a trajectory on a\n"
"per-residue basis. RMSF is the mean deviation from the average position\n\n"
"Args:\n"
"    first (int): First frame to include. Defaults to 0 (beginning).\n"
"    last (int): Last frame to include. Defaults to -1 (end).\n"
"    step (int): Use every step-th frame. Defaults to 1 (all frames)\n"
"Returns:\n"
"    (list of float): RMSF for each residue in selection"

Definition at line 1021 of file py_atomsel.C.

const char sasa_doc[] [static]
 

Initial value:

"Get solvent accessible surface area of selection\n\n"
"Args:\n"
"    srad (float): Solvent radius\n"
"    samples (int): Maximum number of sample points per atom. Defaults to 500\n"
"    points (bool): True to also return the coordinates of surface points.\n"
"        Defaults to True.\n"
"    restrict (atomsel): Calculate SASA contributions from atoms in this\n"
"        selection only. Useful for getting SASA of residues in the context\n"
"        of their environment. Optional\n"
"Returns:\n"
"    (float): Solvent accessible surface area\n"
"    OR (float, list of 3-tuple): SASA, points, if points=True\n"
"Example to get percent solvent accssibility of a ligand\n"
"    >>> big_sel = atomsel('protein or resname LIG')\n"
"    >>> lig_sel = atomsel('resname LIG')\n"
"    >>> ligand_in_protein_sasa = big_sel.sasa(srad=1.4, restrict=lig_sel)\n"
"    >>> ligand_alone_sasa, points = lig_sel.sasa(srad=1.4, points=True)\n"
"    >>> print(100. * ligand_in_protein_sasa / ligand_alone_sasa)"

Definition at line 1800 of file py_atomsel.C.

const char set_doc[] [static]
 

Initial value:

"Set attributes for selected atoms\n\n"
"Args:\n"
"    attribute (str): Attribute to set\n"
"    value: Value for attribute. If single value, all atoms will be set to\n"
"        have the same value. Otherwise, pass a sequence (list or tuple) of\n"
"        values, one per atom in selection"

Definition at line 561 of file py_atomsel.C.

const char update_doc[] [static]
 

Initial value:

"Recompute which atoms in the molecule belong to this selection. For example\n"
"when the selection is distance base (e.g. it uses 'within'), changes to the\n"
"frame of this atom selection will not be reflected in the selected atoms\n"
"until this method is called"

Definition at line 647 of file py_atomsel.C.

const char write_doc[] [static]
 

Initial value:

"Write atoms in this selection to a file of the given type\n\n"
"Args:\n"
"    filetype (str): File type to write, as defined by molfileplugin\n"
"    filename (str): Filename to write to"

Definition at line 666 of file py_atomsel.C.


Generated on Sat Apr 20 02:44:17 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002