NAMD
Functions
PressureProfile.h File Reference
#include "common.h"

Go to the source code of this file.

Functions

void pp_clamp (int &n, int nslabs)
 
void pp_reduction (int nslabs, int n1, int n2, int atype1, int atype2, int numtypes, BigReal vxx, BigReal vyy, BigReal vzz, BigReal *reduction)
 

Function Documentation

void pp_clamp ( int &  n,
int  nslabs 
)
inline

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

Definition at line 15 of file PressureProfile.h.

Referenced by AngleElem::computeForce(), CrosstermElem::computeForce(), DihedralElem::computeForce(), ImproperElem::computeForce(), TholeElem::computeForce(), AnisoElem::computeForce(), BondElem::computeForce(), and GromacsPairElem::computeForce().

15  {
16  int a = n < 0 ? nslabs : 0;
17  int b = n >= nslabs ? nslabs : 0;
18  n += a-b;
19 }
void pp_reduction ( int  nslabs,
int  n1,
int  n2,
int  atype1,
int  atype2,
int  numtypes,
BigReal  vxx,
BigReal  vyy,
BigReal  vzz,
BigReal reduction 
)
inline

Definition at line 22 of file PressureProfile.h.

Referenced by AngleElem::computeForce(), CrosstermElem::computeForce(), DihedralElem::computeForce(), ImproperElem::computeForce(), TholeElem::computeForce(), AnisoElem::computeForce(), BondElem::computeForce(), and GromacsPairElem::computeForce().

25  {
26 
27  int slaboffset = atype1*numtypes + atype2;
28  reduction += slaboffset * 3*nslabs;
29 
30  vxx *= 0.5;
31  vyy *= 0.5;
32  vzz *= 0.5;
33  reduction[3*n1 ] += vxx;
34  reduction[3*n1+1] += vyy;
35  reduction[3*n1+2] += vzz;
36  reduction[3*n2 ] += vxx;
37  reduction[3*n2+1] += vyy;
38  reduction[3*n2+2] += vzz;
39 }