#include <GlobalMasterMisc.h>
Inheritance diagram for GlobalMasterMisc:

Public Member Functions | |
| GlobalMasterMisc () | |
| virtual | ~GlobalMasterMisc () |
Protected Member Functions | |
| virtual void | easy_init (const char *) |
| virtual void | easy_calc (void) |
Protected Attributes | |
| Vector | originalPosition |
| bool | firstTime |
Definition at line 19 of file GlobalMasterMisc.h.
|
|
Definition at line 20 of file GlobalMasterMisc.C. References easy_init(). 00020 : GlobalMasterEasy("miscForcesScript") { 00021 // Initialize subclass 00022 easy_init(config); 00023 delete[] config; 00024 }
|
|
|
Definition at line 26 of file GlobalMasterMisc.C. 00026 {
00027 ;
00028 }
|
|
|
Reimplemented from GlobalMasterEasy. Definition at line 60 of file GlobalMasterMisc.C. References GlobalMasterEasy::addEnergy(), GlobalMasterEasy::addForce(), BigReal, firstTime, GlobalMasterEasy::getPosition(), iINFO(), iout, NAMD_die(), and originalPosition. 00060 {
00061 if(firstTime) {
00062 if(getPosition(0,originalPosition)) {
00063 NAMD_die("Couldn't get initial position.");
00064 }
00065 iout << iINFO << "Initial pos: " << originalPosition << "\n" << endi;
00066 firstTime = false;
00067 }
00068
00069 Vector myp;
00070 BigReal k = 100.0;
00071 if(getPosition(0,myp)) {
00072 NAMD_die("Couldn't get position.");
00073 }
00074 iout << iINFO << "Atom 0 is at " << myp << "\n" << endi;
00075 addForce(0,-k * (myp-originalPosition));
00076 iout<<iINFO << "Adding force " << -k*(myp-originalPosition) << "\n" << endi;
00077 addEnergy(0.5 * k * (myp-originalPosition).length2());
00078 }
|
|
|
Reimplemented from GlobalMasterEasy. Definition at line 41 of file GlobalMasterMisc.C. References firstTime, iINFO(), iout, and GlobalMasterEasy::requestAtom(). Referenced by GlobalMasterMisc(). 00041 {
00042 iout << iINFO << " MISC FORCES CONFIG\n";
00043 iout << iINFO << "**********************\n";
00044 iout << config;
00045 iout << iINFO << "**********************\n" << endi;
00046
00047 requestAtom(0);
00048
00049 firstTime = true;
00050 }
|
|
|
Definition at line 29 of file GlobalMasterMisc.h. Referenced by easy_calc(), and easy_init(). |
|
|
Definition at line 28 of file GlobalMasterMisc.h. Referenced by easy_calc(). |
1.3.9.1