NAMD
Classes | Macros | Typedefs | Functions | Variables
Controller.C File Reference
#include "InfoStream.h"
#include "memusage.h"
#include "Node.h"
#include "Molecule.h"
#include "SimParameters.h"
#include "Controller.h"
#include "ReductionMgr.h"
#include "CollectionMaster.h"
#include "Output.h"
#include "strlib.h"
#include "BroadcastObject.h"
#include "NamdState.h"
#include "ScriptTcl.h"
#include "Broadcasts.h"
#include "LdbCoordinator.h"
#include "Thread.h"
#include <math.h>
#include <signal.h>
#include "NamdOneTools.h"
#include "PatchMap.h"
#include "PatchMap.inl"
#include "Random.h"
#include "imd.h"
#include "IMDOutput.h"
#include "BackEnd.h"
#include <fstream>
#include <iomanip>
#include <errno.h>
#include "qd.h"
#include "ComputeNonbondedMICKernel.h"
#include "Debug.h"

Go to the source code of this file.

Classes

class  PressureProfileReduction
 
struct  minpoint
 

Macros

#define cbrt(x)   pow(x,(double)(1.0/3.0))
 
#define MIN_DEBUG_LEVEL   3
 
#define XXXBIGREAL   1.0e32
 
#define AVGXY(T)
 
#define CALCULATE
 
#define MOVETO(X)
 
#define PRINT_BRACKET
 
#define LIMIT_SCALING(VAR, MIN, MAX, FLAG)
 
#define AVGXY(T)
 
#define CALLBACKDATA(LABEL, VALUE)   labels << (LABEL) << " "; values << (VALUE) << " ";
 
#define CALLBACKLIST(LABEL, VALUE)   labels << (LABEL) << " "; values << "{" << (VALUE) << "} ";
 

Typedefs

typedef void(* namd_sighandler_t )(int)
 

Functions

static void my_sigint_handler (int sig)
 
static char * FORMAT (BigReal X, int decimal=4)
 
static char * FORMAT (const char *X, int decimal=4)
 
static char * ETITLE (int X)
 

Variables

int eventEndOfTimeStep
 
static int gotsigint = 0
 

Macro Definition Documentation

#define AVGXY (   T)
Value:
T.xy = T.yx = 0; T.xx = T.yy = 0.5 * ( T.xx + T.yy );\
T.xz = T.zx = T.yz = T.zy = 0.5 * ( T.xz + T.yz );

Referenced by Controller::calcPressure(), and Controller::Controller().

#define AVGXY (   T)
Value:
T.xy = T.yx = 0; T.xx = T.yy = 0.5 * ( T.xx + T.yy );\
T.xz = T.zx = T.yz = T.zy = 0.5 * ( T.xz + T.yz );
#define CALCULATE
Value:
printMinimizeEnergies(step); \
outputExtendedSystem(step); \
rebalanceLoad(step); \
if ( step == numberOfSteps ) return; \
else ++step;
if(ComputeNonbondedUtil::goMethod==2)

Definition at line 553 of file Controller.C.

Referenced by Controller::minimize().

#define CALLBACKDATA (   LABEL,
  VALUE 
)    labels << (LABEL) << " "; values << (VALUE) << " ";
#define CALLBACKLIST (   LABEL,
  VALUE 
)    labels << (LABEL) << " "; values << "{" << (VALUE) << "} ";
#define cbrt (   x)    pow(x,(double)(1.0/3.0))

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 52 of file Controller.C.

#define LIMIT_SCALING (   VAR,
  MIN,
  MAX,
  FLAG 
)
Value:
{\
if ( VAR < (MIN) ) { VAR = (MIN); FLAG = 1; } \
if ( VAR > (MAX) ) { VAR = (MAX); FLAG = 1; } }
if(ComputeNonbondedUtil::goMethod==2)

Referenced by Controller::berendsenPressure().

#define MIN_DEBUG_LEVEL   3

Definition at line 56 of file Controller.C.

#define MOVETO (   X)
Value:
if ( step == numberOfSteps ) { \
if ( minVerbose ) { iout << "LINE MINIMIZER: RETURNING TO " << mid.x << " FROM " << last.x << "\n" << endi; } \
if ( newDir || (mid.x-last.x) ) { \
broadcast->minimizeCoefficient.publish(minSeq++,mid.x-last.x); \
} else { \
broadcast->minimizeCoefficient.publish(minSeq++,0.); \
broadcast->minimizeCoefficient.publish(minSeq++,0.); \
min_reduction->require(); \
broadcast->minimizeCoefficient.publish(minSeq++,0.); \
} \
enqueueCollections(step); \
} else if ( (X)-last.x ) { \
broadcast->minimizeCoefficient.publish(minSeq++,(X)-last.x); \
newDir = 0; \
last.x = (X); \
enqueueCollections(step); \
CALCULATE \
last.u = min_energy; \
last.dudx = -1. * min_f_dot_v; \
last.noGradient = min_huge_count; \
if ( minVerbose ) { \
iout << "LINE MINIMIZER: POSITION " << last.x << " ENERGY " << last.u << " GRADIENT " << last.dudx; \
if ( last.noGradient ) iout << " HUGECOUNT " << last.noGradient; \
iout << "\n" << endi; \
} \
}
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
#define X
Definition: msm_defn.h:29
if(ComputeNonbondedUtil::goMethod==2)
#define iout
Definition: InfoStream.h:51
#define CALCULATE
Definition: Controller.C:553

Definition at line 560 of file Controller.C.

Referenced by Controller::minimize().

#define PRINT_BRACKET
Value:
iout << "LINE MINIMIZER BRACKET: DX " \
<< (mid.x-lo.x) << " " << (hi.x-mid.x) << \
" DU " << (mid.u-lo.u) << " " << (hi.u-mid.u) << " DUDX " << \
lo.dudx << " " << mid.dudx << " " << hi.dudx << " \n" << endi;
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
#define iout
Definition: InfoStream.h:51

Referenced by Controller::minimize().

#define XXXBIGREAL   1.0e32

Definition at line 60 of file Controller.C.

Referenced by Controller::Controller(), and Controller::printEnergies().

Typedef Documentation

typedef void(* namd_sighandler_t)(int)

Definition at line 426 of file Controller.C.

Function Documentation

static char* ETITLE ( int  X)
static

Definition at line 1413 of file Controller.C.

Referenced by Controller::printEnergies().

1414 {
1415  static char tmp_string[21];
1416  sprintf(tmp_string,"ENERGY: %7d",X);
1417  return tmp_string;
1418 }
#define X
Definition: msm_defn.h:29
static char* FORMAT ( BigReal  X,
int  decimal = 4 
)
static

Definition at line 1388 of file Controller.C.

1389 {
1390  static char tmp_string[50];
1391  static char format_string[50];
1392  const double maxnum = 99999999999.9999;
1393  if ( X > maxnum ) X = maxnum;
1394  if ( X < -maxnum ) X = -maxnum;
1395 
1396  int whole = (decimal <= 4 ? 14 : 10 + decimal);
1397  sprintf(format_string, " %%%d.%df", whole, decimal);
1398  sprintf(tmp_string, format_string, X);
1399  return tmp_string;
1400 }
#define X
Definition: msm_defn.h:29
static char* FORMAT ( const char *  X,
int  decimal = 4 
)
static

Definition at line 1402 of file Controller.C.

1403 {
1404  static char tmp_string[50];
1405  static char format_string[50];
1406 
1407  int width = (decimal <= 4 ? 14 : 10 + decimal);
1408  sprintf(format_string, " %%%ds", width);
1409  sprintf(tmp_string, format_string, X);
1410  return tmp_string;
1411 }
#define X
Definition: msm_defn.h:29
static void my_sigint_handler ( int  sig)
static

Definition at line 422 of file Controller.C.

422  {
423  if (sig == SIGINT) gotsigint = 1;
424 }
static int gotsigint
Definition: Controller.C:421

Variable Documentation

int eventEndOfTimeStep

Definition at line 286 of file Node.C.

int gotsigint = 0
static

Definition at line 421 of file Controller.C.