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

colvarproxy_tcl Class Reference

Methods for using Tcl within Colvars. More...

#include <colvarproxy_tcl.h>

Inheritance diagram for colvarproxy_tcl:

colvarproxy colvarproxy_vmd List of all members.

Public Methods

 colvarproxy_tcl ()
 Constructor. More...

virtual ~colvarproxy_tcl ()
 Destructor. More...

bool tcl_available ()
 Is Tcl available? (trigger initialization if needed). More...

char const * tcl_get_str (void *obj)
 Get a string representation of the Tcl object pointed to by obj. More...

int tcl_run_script (std::string const &script)
int tcl_run_file (std::string const &fileName)
int tcl_run_force_callback ()
 Tcl implementation of run_force_callback(). More...

int tcl_run_colvar_callback (std::string const &name, std::vector< const colvarvalue * > const &cvcs, colvarvalue &value)
 Tcl implementation of run_colvar_callback(). More...

int tcl_run_colvar_gradient_callback (std::string const &name, std::vector< const colvarvalue * > const &cvcs, std::vector< cvm::matrix2d< cvm::real > > &gradient)
 Tcl implementation of run_colvar_gradient_callback(). More...

Tcl_Interp * get_tcl_interp ()
 Get a pointer to the Tcl interpreter. More...

void set_tcl_interp (Tcl_Interp *interp)
 Set the pointer to the Tcl interpreter. More...

virtual void init_tcl_pointers ()
 Set Tcl pointers. More...


Protected Attributes

Tcl_Interp * tcl_interp_
 Pointer to Tcl interpreter object. More...


Detailed Description

Methods for using Tcl within Colvars.

Definition at line 28 of file colvarproxy_tcl.h.


Constructor & Destructor Documentation

colvarproxy_tcl::colvarproxy_tcl  
 

Constructor.

Definition at line 24 of file colvarproxy_tcl.C.

References NULL, and tcl_interp_.

colvarproxy_tcl::~colvarproxy_tcl   [virtual]
 

Destructor.

Definition at line 30 of file colvarproxy_tcl.C.


Member Function Documentation

Tcl_Interp* colvarproxy_tcl::get_tcl_interp   [inline]
 

Get a pointer to the Tcl interpreter.

Definition at line 70 of file colvarproxy_tcl.h.

References tcl_interp_.

Referenced by colvarscript::colvarscript, tcl_run_colvar_callback, tcl_run_colvar_gradient_callback, tcl_run_file, tcl_run_force_callback, and tcl_run_script.

void colvarproxy_tcl::init_tcl_pointers   [virtual]
 

Set Tcl pointers.

Reimplemented in colvarproxy_vmd.

Definition at line 35 of file colvarproxy_tcl.C.

References NULL, set_tcl_interp, and tcl_interp_.

Referenced by colvarscript::colvarscript, and colvarproxy_vmd::init_tcl_pointers.

void colvarproxy_tcl::set_tcl_interp Tcl_Interp *    interp [inline]
 

Set the pointer to the Tcl interpreter.

Definition at line 76 of file colvarproxy_tcl.h.

References tcl_interp_.

Referenced by colvarproxy_vmd::colvarproxy_vmd, and init_tcl_pointers.

bool colvarproxy_tcl::tcl_available   [inline]
 

Is Tcl available? (trigger initialization if needed).

Definition at line 39 of file colvarproxy_tcl.h.

char const * colvarproxy_tcl::tcl_get_str void *    obj
 

Get a string representation of the Tcl object pointed to by obj.

Definition at line 52 of file colvarproxy_tcl.C.

References NULL.

int colvarproxy_tcl::tcl_run_colvar_callback std::string const &    name,
std::vector< const colvarvalue * > const &    cvcs,
colvarvalue   value
 

Tcl implementation of run_colvar_callback().

Definition at line 121 of file colvarproxy_tcl.C.

References COLVARS_ERROR, COLVARS_NOT_IMPLEMENTED, colvarmodule::error, colvarvalue::from_simple_string, colvarmodule::get_error, get_tcl_interp, colvarmodule::log, NULL, result, and string.

Referenced by colvarproxy_vmd::run_colvar_callback.

int colvarproxy_tcl::tcl_run_colvar_gradient_callback std::string const &    name,
std::vector< const colvarvalue * > const &    cvcs,
std::vector< cvm::matrix2d< cvm::real > > &    gradient
 

Tcl implementation of run_colvar_gradient_callback().

Definition at line 168 of file colvarproxy_tcl.C.

References COLVARS_ERROR, COLVARS_NOT_IMPLEMENTED, colvarmodule::error, colvarmodule::get_error, get_tcl_interp, colvarmodule::log, n, NULL, size, and string.

Referenced by colvarproxy_vmd::run_colvar_gradient_callback.

int colvarproxy_tcl::tcl_run_file std::string const &    fileName
 

Definition at line 80 of file colvarproxy_tcl.C.

References COLVARS_ERROR, COLVARS_NOT_IMPLEMENTED, colvarmodule::error, colvarmodule::get_error, get_tcl_interp, and colvarmodule::log.

Referenced by colvarmodule::run_tcl_script.

int colvarproxy_tcl::tcl_run_force_callback  
 

Tcl implementation of run_force_callback().

Definition at line 97 of file colvarproxy_tcl.C.

References COLVARS_ERROR, COLVARS_NOT_IMPLEMENTED, colvarmodule::error, colvarmodule::get_error, get_tcl_interp, colvarmodule::log, NULL, string, and colvarmodule::to_str.

Referenced by colvarproxy_vmd::run_force_callback.

int colvarproxy_tcl::tcl_run_script std::string const &    script
 

Definition at line 63 of file colvarproxy_tcl.C.

References COLVARS_ERROR, COLVARS_NOT_IMPLEMENTED, colvarmodule::error, colvarmodule::get_error, get_tcl_interp, and colvarmodule::log.


Member Data Documentation

Tcl_Interp* colvarproxy_tcl::tcl_interp_ [protected]
 

Pointer to Tcl interpreter object.

Definition at line 86 of file colvarproxy_tcl.h.

Referenced by colvarproxy_tcl, get_tcl_interp, init_tcl_pointers, and set_tcl_interp.


The documentation for this class was generated from the following files:
Generated on Fri Dec 6 02:46:54 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002