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

py_trans.C File Reference

#include "py_commands.h"
#include "VMDApp.h"
#include "CommandQueue.h"
#include "MoleculeList.h"
#include "Molecule.h"

Go to the source code of this file.

Functions

PyObject * py_rotate (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_translate (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_scale (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_center (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_scale (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_trans (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_rotation (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_set_center (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_set_scale (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_set_trans (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_set_rotation (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_resetview (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_is_fixed (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_fix (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_is_shown (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_show (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_drotate (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_dtranslate (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_dscale (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_dstrans (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_dgtrans (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * inittrans (void)

Variables

const char rotate_doc []
const char translate_doc []
const char scale_doc []
const char center_doc []
const char mol_scale_doc []
const char mol_trans_doc []
const char mol_rot_doc []
const char mcenter_doc []
const char mscale_doc []
const char mtrans_doc []
const char mrot_doc []
const char reset_doc []
const char fixed_doc []
const char setfix_doc []
const char show_doc []
const char setshow_doc []
PyMethodDef methods []
const char trans_moddoc []


Function Documentation

PyObject* inittrans void   
 

Definition at line 660 of file py_trans.C.

References methods, and trans_moddoc.

PyObject* py_dgtrans PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 607 of file py_trans.C.

References py_get_trans.

PyObject* py_drotate PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 579 of file py_trans.C.

References py_rotate.

PyObject* py_dscale PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 593 of file py_trans.C.

References py_scale.

PyObject* py_dstrans PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 600 of file py_trans.C.

References py_set_trans.

PyObject* py_dtranslate PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 586 of file py_trans.C.

References py_translate.

PyObject* py_fix PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 490 of file py_trans.C.

References get_vmdapp, MoleculeList::mol_from_id, VMDApp::molecule_fix, VMDApp::moleculeList, and NULL.

PyObject* py_get_center PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 112 of file py_trans.C.

References Displayable::centt, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, and NULL.

PyObject* py_get_rotation PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 228 of file py_trans.C.

References get_vmdapp, Matrix4::mat, mat, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, and Displayable::rotm.

PyObject* py_get_scale PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 156 of file py_trans.C.

References get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, and Displayable::scale.

PyObject* py_get_trans PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 184 of file py_trans.C.

References get_vmdapp, Displayable::globt, MoleculeList::mol_from_id, VMDApp::moleculeList, and NULL.

Referenced by py_dgtrans.

PyObject* py_is_fixed PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 460 of file py_trans.C.

References Displayable::fixed, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, and result.

PyObject* py_is_shown PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 521 of file py_trans.C.

References Displayable::displayed, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, and result.

PyObject* py_resetview PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 424 of file py_trans.C.

References get_vmdapp, MoleculeList::make_top, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, VMDApp::scene_resetview, and MoleculeList::top.

PyObject* py_rotate PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 32 of file py_trans.C.

References get_vmdapp, NULL, and VMDApp::scene_rotate_by.

Referenced by py_drotate.

PyObject* py_scale PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 87 of file py_trans.C.

References get_vmdapp, NULL, and VMDApp::scene_scale_by.

Referenced by py_dscale.

PyObject* py_set_center PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 271 of file py_trans.C.

References get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, Displayable::set_cent_trans, and z.

PyObject* py_set_rotation PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 363 of file py_trans.C.

References get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, num, and Displayable::set_rot.

PyObject* py_set_scale PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 302 of file py_trans.C.

References get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, and Displayable::set_scale.

PyObject* py_set_trans PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 332 of file py_trans.C.

References get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, Displayable::set_glob_trans, and z.

Referenced by py_dstrans.

PyObject* py_show PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 550 of file py_trans.C.

References get_vmdapp, MoleculeList::mol_from_id, VMDApp::molecule_display, VMDApp::moleculeList, and NULL.

PyObject* py_translate PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 64 of file py_trans.C.

References get_vmdapp, NULL, VMDApp::scene_translate_by, and z.

Referenced by py_dtranslate.


Variable Documentation

const char center_doc[] [static]
 

Initial value:

"Get the coordinates of the displayed center of a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (3-tuple of float) (x,y,z) coordinates of molecule center"

Definition at line 106 of file py_trans.C.

const char fixed_doc[] [static]
 

Initial value:

"Query if a molecule is fixed. Fixed molecules do not move when the scene\n"
"or view is changed.\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (bool) True if molecule is fixed"

Definition at line 453 of file py_trans.C.

const char mcenter_doc[] [static]
 

Initial value:

"Set the center of an individual molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to set center in\n"
"    center (list of 3 floats): (x, y, z) coordinates of new center"

Definition at line 266 of file py_trans.C.

PyMethodDef methods[] [static]
 

Initial value:

 {
  {"rotate_scene", (PyCFunction)py_rotate, METH_VARARGS | METH_KEYWORDS, rotate_doc},
  {"translate_scene", (PyCFunction)py_translate, METH_VARARGS | METH_KEYWORDS, translate_doc},
  {"scale_scene", (PyCFunction)py_scale, METH_VARARGS | METH_KEYWORDS, scale_doc},
  {"resetview", (PyCFunction)py_resetview, METH_VARARGS | METH_KEYWORDS, reset_doc},
  {"get_center", (PyCFunction)py_get_center, METH_VARARGS | METH_KEYWORDS, center_doc},
  {"get_scale", (PyCFunction)py_get_scale, METH_VARARGS | METH_KEYWORDS, mol_scale_doc},
  {"get_translation", (PyCFunction)py_get_trans, METH_VARARGS | METH_KEYWORDS, mol_trans_doc},
  {"get_rotation", (PyCFunction)py_get_rotation, METH_VARARGS | METH_KEYWORDS, mol_rot_doc},
  {"set_center", (PyCFunction)py_set_center, METH_VARARGS | METH_KEYWORDS, mcenter_doc},
  {"set_scale", (PyCFunction)py_set_scale, METH_VARARGS | METH_KEYWORDS, mscale_doc},
  {"set_translation", (PyCFunction)py_set_trans, METH_VARARGS | METH_KEYWORDS, mtrans_doc},
  {"set_rotation", (PyCFunction)py_set_rotation, METH_VARARGS | METH_KEYWORDS, mrot_doc},
  {"is_fixed", (PyCFunction)py_is_fixed, METH_VARARGS | METH_KEYWORDS, fixed_doc},
  {"fix", (PyCFunction)py_fix, METH_VARARGS | METH_KEYWORDS, setfix_doc},
  {"is_shown", (PyCFunction)py_is_shown, METH_VARARGS | METH_KEYWORDS, show_doc},
  {"show", (PyCFunction)py_show, METH_VARARGS | METH_KEYWORDS, setshow_doc},

  
  
  {"rotate", (PyCFunction)py_drotate, METH_VARARGS | METH_KEYWORDS, rotate_doc},
  {"translate", (PyCFunction)py_dtranslate, METH_VARARGS | METH_KEYWORDS, translate_doc},
  {"scale", (PyCFunction)py_dscale, METH_VARARGS | METH_KEYWORDS, scale_doc},
  {"set_trans", (PyCFunction)py_dstrans, METH_VARARGS | METH_KEYWORDS, mtrans_doc},
  {"get_trans", (PyCFunction)py_dgtrans, METH_VARARGS | METH_KEYWORDS, mol_trans_doc},

  {NULL, NULL}
}

Definition at line 614 of file py_trans.C.

Referenced by inittrans.

const char mol_rot_doc[] [static]
 

Initial value:

"Gets the rotation of a given molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (16-tuple of float) Rotation matrix for molecule"

Definition at line 222 of file py_trans.C.

const char mol_scale_doc[] [static]
 

Initial value:

"Get the scaling factor for a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (float) Scaling factor for molecule"

Definition at line 150 of file py_trans.C.

const char mol_trans_doc[] [static]
 

Initial value:

"Get the translation for a molecule relative to scene center\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (3-tuple of float) (x, y, z) translation applied to molecule"

Definition at line 178 of file py_trans.C.

const char mrot_doc[] [static]
 

Initial value:

"Set the rotation of an individual molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to set\n"
"    matrix (list or tuple of 16 floats): Rotation matrix to apply"

Definition at line 358 of file py_trans.C.

const char mscale_doc[] [static]
 

Initial value:

"Set the scale of an individual molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to set scale of\n"
"    scale (float): New scale value for molecule"

Definition at line 297 of file py_trans.C.

const char mtrans_doc[] [static]
 

Initial value:

"Set the translation of an individual molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to set translation of\n"
"    trans (list of 3 floats): New (x,y,z) translation for molecule"

Definition at line 327 of file py_trans.C.

const char reset_doc[] [static]
 

Initial value:

"Centers the view around a given molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to center"

Definition at line 420 of file py_trans.C.

const char rotate_doc[] [static]
 

Initial value:

"Rotate the scene about an axis\n\n"
"Args:\n"
"    axis (str): Axis to rotate around, either 'x', 'y', or 'z'\n"
"    angle (float): Angle to rotate by"

Definition at line 27 of file py_trans.C.

const char scale_doc[] [static]
 

Initial value:

"Set the scale or zoom level for the scene\n\n"
"Args:\n"
"    scale (float): Scale value"

Definition at line 83 of file py_trans.C.

const char setfix_doc[] [static]
 

Initial value:

"Set the fixed status of a molecule. Fixed molecules do not move when the\n"
"scene or view is changed.\n\n"
"Args:\n"
"    molid (int): Molecule ID to set fixed status for\n"
"    fixed (bool): If molecule should be fixed"

Definition at line 484 of file py_trans.C.

const char setshow_doc[] [static]
 

Initial value:

"Set if a molecule is shown\n\n"
"Args:\n"
"    molid (int): Molecule ID to show or hide\n"
"    shown (bool): True if molecule should be shown"

Definition at line 545 of file py_trans.C.

const char show_doc[] [static]
 

Initial value:

"Query if a molecule is shown\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (bool) True if molecule is shown"

Definition at line 515 of file py_trans.C.

const char trans_moddoc[] [static]
 

Initial value:

"Methods for manipulating the transformations applied to a molecule in the "
"render window, including its position, rotation, center, and scale."

Definition at line 644 of file py_trans.C.

Referenced by inittrans.

const char translate_doc[] [static]
 

Initial value:

"Translate the scene by a vector\n\n"
"Args:\n"
"    x (float): Amount to move in X direction\n"
"    y (float): Amount to move in Y direction\n"
"    z (float): Amount to move in Z direction"

Definition at line 58 of file py_trans.C.


Generated on Fri Nov 8 02:46:09 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002