#include <stdlib.h>#include "MoleculeList.h"#include "tcl.h"#include "Timestep.h"#include "TclCommands.h"#include "Molecule.h"#include "MaterialList.h"#include "VMDApp.h"#include "Inform.h"#include "QMData.h"Go to the source code of this file.
Compounds | |
| class | ctxt |
| XXX old-style context structure; from when we used a SymbolTable instance to loop up functions for molinfo. More... | |
Defines | |
| #define | generic_molinfo_data(name, func) |
| #define | generic_molinfo_simulation(name, term) |
| #define | generic_molinfo_pbc(name, term) |
| #define | generic_molinfo_wave_int(name, term) |
| #define | generic_molinfo_qmts_int(name, term) |
| #define | generic_molinfo_qmts_arr(type, name, term, n) |
| #define | generic_molinfo_qmts_mat(type, name, term, n, m) |
| #define | generic_molinfo_qm(type, name, term) |
| #define | generic_molinfo_qm_string(name, term) |
| #define | generic_molinfo_qm_arr(type, name, term, n) |
| #define | generic_molinfo_qm_mat(type, name, term, n) |
| #define | generic_molinfo_set_data(name, func1, func2) |
| #define | generic_molinfo_simulation_set(name, type) |
| #define | generic_molinfo_pbc_set(name, type) |
Functions | |
| void | write_matrix (Tcl_Interp *interp, const float *mat) |
| int | read_matrix (Tcl_Interp *interp, const char *s, float *mat) |
| int | molinfo_get (ctxt context, int molid, int argc, const char *argv[], Tcl_Interp *interp, int frame_num) |
| int | molinfo_set (ctxt context, int molid, int argc, const char *argv[], const char *data[], Tcl_Interp *interp, int frame_num) |
| int | molecule_tcl (ClientData data, Tcl_Interp *interp, int argc, const char *argv[]) |
|
|
Value: } else if (!strcmp(arg, name)) { \
char buf[20]; sprintf(buf, "%d", func); Tcl_AppendElement(interp, buf);Definition at line 81 of file TclMolInfo.C. Referenced by molinfo_get. |
|
|
Value: } else if (!strcmp(arg, name)) { \
Timestep *ts = mol->get_frame(context.molinfo_frame_number); \
if (!ts) Tcl_AppendElement(interp, "0"); \
else { char buf[20]; sprintf(buf, "%f", ts->term); Tcl_AppendElement(interp, buf); }Definition at line 91 of file TclMolInfo.C. Referenced by molinfo_get. |
|
|
Value: } else if (!strcmp(argv[term], name)) { \
Timestep *ts = mol->get_frame(context.molinfo_frame_number); \
if (ts) { ts->type = (float) atof(data[term]); mol->change_pbc(); }Definition at line 843 of file TclMolInfo.C. Referenced by molinfo_set. |
|
|
Value: } else if (!strcmp(arg, name)) { \
if (!mol->qm_data) \
Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), \
Tcl_NewIntObj(0)); \
else { \
char buf[QMDATA_BUFSIZ]; sprintf(buf, type, mol->qm_data->term); \
Tcl_AppendElement(interp, buf); \
}Definition at line 156 of file TclMolInfo.C. Referenced by molinfo_get. |
|
|
Value: } else if (!strcmp(arg, name)) { \
Tcl_Obj *tcl_result = Tcl_NewListObj(0, NULL); \
if (mol->qm_data && mol->qm_data->get_##term()) { \
char buf[20]; \
unsigned int i; \
for (i=0; i<(unsigned int)n; i++) { \
sprintf(buf, type, mol->qm_data->get_##term()[i]); \
Tcl_ListObjAppendElement(interp, tcl_result, Tcl_NewStringObj(buf, -1)); \
} \
} \
Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), tcl_result);Definition at line 175 of file TclMolInfo.C. Referenced by molinfo_get. |
|
|
Value: } else if (!strcmp(arg, name)) { \
if (mol->qm_data) { \
if (mol->qm_data->get_##term()) { \
char buf[20]; \
unsigned int i, j; \
Tcl_Obj *tcl_result = Tcl_NewListObj(0, NULL); \
for (i=0; i<(unsigned int)n; i++) { \
Tcl_Obj *rowListObj = Tcl_NewListObj(0, NULL); \
for (j=0; j<(unsigned int)n; j++) { \
sprintf(buf, type, mol->qm_data->get_##term()[i*n+j]); \
Tcl_ListObjAppendElement(interp, rowListObj, Tcl_NewStringObj(buf, -1)); \
} \
Tcl_ListObjAppendElement(interp, tcl_result, rowListObj); \
} \
Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), tcl_result); \
} \
}Definition at line 188 of file TclMolInfo.C. Referenced by molinfo_get. |
|
|
Value: } else if (!strcmp(arg, name)) { \
if (mol->qm_data) { \
char buf[QMDATA_BUFSIZ]; sprintf(buf, QMDATA_BUFSTRFMT, mol->qm_data->term); \
Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), Tcl_NewStringObj(buf, -1)); \
} else { \
Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), Tcl_NewListObj(0, NULL)); \
}Definition at line 166 of file TclMolInfo.C. Referenced by molinfo_get. |
|
|
Value: } else if (!strcmp(arg, name)) { \
Tcl_Obj *tcl_result = Tcl_NewListObj(0, NULL); \
Timestep *ts = mol->get_frame(context.molinfo_frame_number); \
if (ts && ts->qm_timestep && ts->qm_timestep->get_##term()) { \
char buf[20]; \
unsigned int i; \
for (i=0; i<(unsigned int)n; i++) { \
sprintf(buf, type, ts->qm_timestep->get_##term()[i]); \
Tcl_ListObjAppendElement(interp, tcl_result, Tcl_NewStringObj(buf, -1)); \
} \
} \
Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), tcl_result);Definition at line 123 of file TclMolInfo.C. Referenced by molinfo_get. |
|
|
Value: } else if (!strcmp(arg, name)) { \
Timestep *ts = mol->get_frame(context.molinfo_frame_number); \
if (!ts || !ts->qm_timestep) \
Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), \
Tcl_NewIntObj(0)); \
else { \
char buf[20]; sprintf(buf, "%i", ts->qm_timestep->get_##term()); \
Tcl_AppendElement(interp, buf); \
}Definition at line 112 of file TclMolInfo.C. Referenced by molinfo_get. |
|
|
Value: } else if (!strcmp(arg, name)) { \
Tcl_Obj *tcl_result = Tcl_NewListObj(0, NULL); \
Timestep *ts = mol->get_frame(context.molinfo_frame_number); \
if (ts && ts->qm_timestep && ts->qm_timestep->term) { \
char buf[20]; \
unsigned int i, j; \
for (i=0; i<(unsigned int)n; i++) { \
Tcl_Obj *rowListObj = Tcl_NewListObj(0, NULL); \
for (j=0; j<(unsigned int)m; j++) { \
sprintf(buf, type, ts->qm_timestep->term[i*n+j]); \
Tcl_ListObjAppendElement(interp, rowListObj, Tcl_NewStringObj(buf, -1)); \
} \
Tcl_ListObjAppendElement(interp, tcl_result, rowListObj); \
} \
} \
Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), tcl_result);Definition at line 137 of file TclMolInfo.C. |
|
|
Value: } else if (!strcmp(argv[term], name)) { \
int onoff; \
if (Tcl_GetBoolean(interp, data[term], &onoff) != TCL_OK) return TCL_ERROR; \
if (onoff) { func1 ; } else { func2 ; }Definition at line 832 of file TclMolInfo.C. Referenced by molinfo_set. |
|
|
Value: } else if (!strcmp(arg, name)) { \
Timestep *ts = mol->get_frame(context.molinfo_frame_number); \
if (!ts) Tcl_AppendElement(interp, "0"); \
else { char buf[20]; sprintf(buf, "%f", ts->energy[term]); Tcl_AppendElement(interp, buf); }Definition at line 85 of file TclMolInfo.C. Referenced by molinfo_get. |
|
|
Value: } else if (!strcmp(argv[term], name)) { \
Timestep *ts = mol->get_frame(context.molinfo_frame_number); \
if (ts) ts->energy[type] = (float) atof(data[term]);Definition at line 838 of file TclMolInfo.C. Referenced by molinfo_set. |
|
|
Value: } else if (!strcmp(arg, name)) { \
Tcl_Obj *tcl_result = Tcl_NewListObj(0, NULL); \
Timestep *ts = mol->get_frame(context.molinfo_frame_number); \
if (ts && ts->qm_timestep) { \
int i; \
char buf[32]; \
for (i=0; i<ts->qm_timestep->get_num_wavef(); i++) { \
sprintf(buf, "%d", ts->qm_timestep->get_##term(i)); \
Tcl_ListObjAppendElement(interp, tcl_result, Tcl_NewStringObj(buf, -1)); \
} \
} \
Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), tcl_result);Definition at line 98 of file TclMolInfo.C. Referenced by molinfo_get. |
|
||||||||||||||||||||
|
Definition at line 1109 of file TclMolInfo.C. References ctxt::app, data, AtomSel::get_frame_value, BaseMolecule::id, VMDApp::materialList, ctxt::matlist, ctxt::mlist, MoleculeList::molecule, VMDApp::moleculeList, molinfo_get, molinfo_set, NULL, num, MoleculeList::num, result, MoleculeList::top, and AtomSel::TS_NOW. |
|
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||
|
Definition at line 68 of file TclMolInfo.C. Referenced by molinfo_set. |
|
||||||||||||
|
Definition at line 58 of file TclMolInfo.C. References mat. Referenced by molinfo_get. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002