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

TclCommands.C File Reference

#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "tcl.h"
#include "MoleculeList.h"
#include "TclCommands.h"
#include "SymbolTable.h"
#include "VMDApp.h"
#include "config.h"
#include "Inform.h"
#include "MolFilePlugin.h"
#include "CommandQueue.h"
#include "Measure.h"

Go to the source code of this file.

Defines

#define ATOMSEL_SET_BAD_DATA(x)
#define ATOMSEL_SET_BADDATA2(x)
#define CHECK_MATCH(string, val)   if(!strcmp(argv[1],string)){option=val;break;}

Functions

Moleculefind_molecule (Tcl_Interp *interp, MoleculeList *mlist, const char *text)
int access_tcl_atomsel (ClientData my_data, Tcl_Interp *interp, int argc, const char *argv[])
int access_tcl_atomsel_obj (ClientData my_data, Tcl_Interp *interp, int argc, Tcl_Obj *const argv[])
void remove_tcl_atomsel (ClientData my_data)
int split_tcl_atomsel_info (Tcl_Interp *interp, SymbolTable *parser, const char *opts, int *num, int **mapping)
int make_tcl_atomsel (ClientData cd, Tcl_Interp *interp, int argc, const char *argv[])
AtomSeltcl_commands_get_sel (Tcl_Interp *interp, const char *str)
int atomselect_move (Tcl_Interp *interp, AtomSel *sel, const char *mattext)
int atomselect_moveby (Tcl_Interp *interp, AtomSel *sel, const char *vectxt)
int atomsel_set (ClientData my_data, Tcl_Interp *interp, int argc, Tcl_Obj *const objv[])
void Atomsel_Delete (ClientData cd, Tcl_Interp *)
int Atomsel_Init (Tcl_Interp *interp)


Define Documentation

#define ATOMSEL_SET_BAD_DATA  
 

Value:

do { \
  char buf[80];  \
  sprintf(buf, "atomsel: set: bad data in %dth element", x); \
  Tcl_AppendResult(interp, buf, NULL); \
  delete [] data; \
  delete [] atomon; \
  delete [] elems; \
} while (0)

Definition at line 403 of file TclCommands.C.

Referenced by atomsel_set.

#define ATOMSEL_SET_BADDATA2  
 

Value:

do { \
  char buf[80];  \
  sprintf(buf, "atomsel: set: bad data in %dth element", x);\
  Tcl_AppendResult(interp, buf, NULL); \
  delete [] data; \
  delete [] atomon; \
  delete [] elems; \
} while (0)

Definition at line 413 of file TclCommands.C.

Referenced by atomsel_set.

#define CHECK_MATCH string,
val       if(!strcmp(argv[1],string)){option=val;break;}
 

Definition at line 722 of file TclCommands.C.

Referenced by access_tcl_atomsel.


Function Documentation

int access_tcl_atomsel ClientData    my_data,
Tcl_Interp *    interp,
int    argc,
const char *    argv[]
[static]
 

Definition at line 739 of file TclCommands.C.

References NameList< int >::add_name, BaseMolecule::atom, atomselect_move, atomselect_moveby, VMDApp::atomSelParser, BaseMolecule::BONDORDERS, BaseMolecule::BONDS, MolAtom::bonds, MolAtom::bondTo, BaseMolecule::bondTypeNames, BaseMolecule::BONDTYPES, AtomSel::change, CHECK_MATCH, AtomSel::cmdStr, NameList< SymbolTableElement * >::data, SymbolTable::fctns, FileSpec::first, AtomSel::firstsel, DrawMolecule::force_recalc, AtomSel::get_frame_value, BaseMolecule::getbondorder, BaseMolecule::getbondtype, SymbolTableElement::is_a, SymbolTableElement::keyword_double, SymbolTableElement::keyword_int, SymbolTableElement::keyword_single, SymbolTableElement::keyword_string, FileSpec::last, AtomSel::lastsel, MAXATOMBONDS, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_frame, VMDApp::molecule_numframes, VMDApp::molecule_savetrajectory, VMDApp::molecule_valid_id, VMDApp::moleculeList, AtomSel::molid, NameList< int >::name, NameList< SymbolTableElement * >::name, BaseMolecule::nAtoms, AtomSel::NO_PARSE, NULL, num, AtomSel::num_atoms, AtomSel::on, result, SymbolTableElement::returns_a, AtomSel::selected, FileSpec::selection, BaseMolecule::set_dataset_flag, BaseMolecule::setbondorder, BaseMolecule::setbondtype, atomsel_ctxt::singleword, SymbolTableElement::SINGLEWORD, split_tcl_atomsel_info, FileSpec::stride, AtomSel::TS_LAST, AtomSel::TS_NOW, FileSpec::WAIT_ALL, FileSpec::waitfor, and AtomSel::which_frame.

Referenced by access_tcl_atomsel_obj.

int access_tcl_atomsel_obj ClientData    my_data,
Tcl_Interp *    interp,
int    argc,
Tcl_Obj *const    argv[]
[static]
 

Definition at line 724 of file TclCommands.C.

References access_tcl_atomsel, atomsel_set, and NULL.

Referenced by make_tcl_atomsel.

void Atomsel_Delete ClientData    cd,
Tcl_Interp *   
[static]
 

Definition at line 1397 of file TclCommands.C.

Referenced by Atomsel_Init.

int Atomsel_Init Tcl_Interp *    interp
 

Definition at line 1401 of file TclCommands.C.

References Atomsel_Delete, make_tcl_atomsel, NULL, and num.

int atomsel_set ClientData    my_data,
Tcl_Interp *    interp,
int    argc,
Tcl_Obj *const    objv[]
[static]
 

Definition at line 423 of file TclCommands.C.

References MoleculeList::add_color_names, ATOMSEL_SET_BAD_DATA, ATOMSEL_SET_BADDATA2, VMDApp::atomSelParser, DrawMolItem::COL_REGEN, data, NameList< SymbolTableElement * >::data, SymbolTable::fctns, SymbolTable::find_attribute, AtomSel::firstsel, DrawMolecule::force_recalc, SymbolTableElement::is_a, SymbolTableElement::IS_FLOAT, SymbolTableElement::IS_INT, SymbolTableElement::IS_STRING, SymbolTableElement::KEYWORD, AtomSel::lastsel, MoleculeList::mol_from_id, VMDApp::moleculeList, AtomSel::molid, NULL, AtomSel::num_atoms, AtomSel::on, SymbolTableElement::returns_a, DrawMolItem::SEL_REGEN, AtomSel::selected, SymbolTableElement::set_fctn, SymbolTableElement::set_keyword_double, SymbolTableElement::set_keyword_int, SymbolTableElement::set_keyword_string, and AtomSel::which_frame.

Referenced by access_tcl_atomsel_obj, atomsel_setattro, and legacy_atomsel_set.

int atomselect_move Tcl_Interp *    interp,
AtomSel   sel,
const char *    mattext
[static]
 

Definition at line 305 of file TclCommands.C.

References AtomSel::coordinates, DrawMolecule::force_recalc, Matrix4::mat, mat, measure_error, measure_move, MEASURE_NOERR, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, AtomSel::molid, NULL, and tcl_get_matrix.

Referenced by access_tcl_atomsel.

int atomselect_moveby Tcl_Interp *    interp,
AtomSel   sel,
const char *    vectxt
[static]
 

Definition at line 346 of file TclCommands.C.

References AtomSel::coordinates, AtomSel::firstsel, DrawMolecule::force_recalc, AtomSel::lastsel, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, AtomSel::molid, NULL, AtomSel::on, and vec_add.

Referenced by access_tcl_atomsel.

Molecule* find_molecule Tcl_Interp *    interp,
MoleculeList   mlist,
const char *    text
[static]
 

Definition at line 47 of file TclCommands.C.

References BaseMolecule::id, mol_from_id, NULL, and MoleculeList::top.

Referenced by make_tcl_atomsel.

int make_tcl_atomsel ClientData    cd,
Tcl_Interp *    interp,
int    argc,
const char *    argv[]
[static]
 

Definition at line 132 of file TclCommands.C.

References access_tcl_atomsel_obj, SymbolTable::add_custom_singleword, VMDApp::atomSelParser, AtomSel::change, VMDApp::commandQueue, SymbolTable::custom_singleword_name, NameList< SymbolTableElement * >::data, SymbolTable::fctns, find_molecule, SymbolTableElement::FUNCTION, SymbolTable::get_custom_singleword, AtomSel::get_frame_value, BaseMolecule::id, SymbolTableElement::IS_FLOAT, SymbolTableElement::IS_INT, SymbolTableElement::IS_STRING, SymbolTableElement::KEYWORD, VMDApp::moleculeList, NameList< SymbolTableElement * >::name, AtomSel::NO_PARSE, NULL, num, NameList< SymbolTableElement * >::num, SymbolTable::num_custom_singleword, SymbolTable::remove_custom_singleword, remove_tcl_atomsel, CommandQueue::runcommand, SymbolTableElement::SINGLEWORD, SymbolTableElement::STRINGFCTN, and AtomSel::TS_NOW.

Referenced by Atomsel_Init.

void remove_tcl_atomsel ClientData    my_data [static]
 

Definition at line 1392 of file TclCommands.C.

Referenced by make_tcl_atomsel.

int split_tcl_atomsel_info Tcl_Interp *    interp,
SymbolTable   parser,
const char *    opts,
int *    num,
int **    mapping
[static]
 

Definition at line 82 of file TclCommands.C.

References NameList< SymbolTableElement * >::data, SymbolTable::fctns, SymbolTable::find_attribute, SymbolTableElement::is_a, SymbolTableElement::KEYWORD, NULL, num, and SymbolTableElement::SINGLEWORD.

Referenced by access_tcl_atomsel.

AtomSel* tcl_commands_get_sel Tcl_Interp *    interp,
const char *    str
 

Definition at line 294 of file TclCommands.C.

References NULL.


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