ComputeTclBC.h

Go to the documentation of this file.
00001 
00007 #ifndef COMPUTETCLBC_H
00008 #define COMPUTETCLBC_H
00009 
00010 #ifdef NAMD_TCL
00011 #include <tcl.h>
00012 #endif
00013 
00014 #include "ComputeHomePatches.h"
00015 #include "ReductionMgr.h"
00016 #include "Tensor.h"
00017 #ifndef WIN32
00018 #include <strings.h>
00019 #endif
00020 
00021 class ComputeMgr;
00022 
00023 class ComputeTclBC : public ComputeHomePatches {
00024 
00025 public:
00026   ComputeTclBC(ComputeID c);
00027   virtual ~ComputeTclBC();
00028   void doWork();
00029 
00030 private:
00031   int wrapmode;
00032   Lattice *lattice;
00033 
00034   ResizeArray<char> drops;
00035   void cleardrops() {
00036     memset((void*)drops.begin(), 0, drops.size()*sizeof(char));
00037   }
00038 
00039   ResizeArrayIter<PatchElem> ap;
00040   int i_atom, n_atom;
00041   CompAtom *atoms;
00042   FullAtom *fullatoms;
00043   Force *forces;
00044   BigReal energy;
00045   SubmitReduction *reduction;
00046 
00047 #ifdef NAMD_TCL
00048   Tcl_Interp *interp;
00049   static int Tcl_print(ClientData, Tcl_Interp *, int, const char **);
00050   static int Tcl_wrapmode(ClientData, Tcl_Interp *, int, const char **);
00051   static int Tcl_cleardrops(ClientData, Tcl_Interp *, int, Tcl_Obj * const []);
00052   static int Tcl_dropatom(ClientData, Tcl_Interp *, int, Tcl_Obj * const []);
00053   static int Tcl_nextatom(ClientData, Tcl_Interp *, int, Tcl_Obj * const []);
00054   static int Tcl_getcoord(ClientData, Tcl_Interp *, int, Tcl_Obj * const []);
00055   static int Tcl_getcell(ClientData, Tcl_Interp *, int, Tcl_Obj * const []);
00056   static int Tcl_getmass(ClientData, Tcl_Interp *, int, Tcl_Obj * const []);
00057   static int Tcl_getcharge(ClientData, Tcl_Interp *, int, Tcl_Obj * const []);
00058   static int Tcl_getid(ClientData, Tcl_Interp *, int, Tcl_Obj * const []);
00059   static int Tcl_addforce(ClientData, Tcl_Interp *, int, Tcl_Obj * const []);
00060   static int Tcl_addenergy(ClientData, Tcl_Interp *, int, Tcl_Obj * const []);
00061 #endif
00062 
00063 };
00064 
00065 #endif
00066 
00067 
00068 
00069 
00070 
00071 
00072 

Generated on Thu Jun 21 01:17:14 2018 for NAMD by  doxygen 1.4.7