NAMD
Classes | Macros | Functions
ComputeEwald.C File Reference
#include "Node.h"
#include "PatchMap.h"
#include "PatchMap.inl"
#include "AtomMap.h"
#include "ComputeEwald.h"
#include "PatchMgr.h"
#include "Molecule.h"
#include "ReductionMgr.h"
#include "ComputeMgr.h"
#include "ComputeMgr.decl.h"
#include "ComputeNonbondedUtil.h"
#include "SimParameters.h"
#include "PmeBase.h"
#include <stdio.h>
#include "Debug.h"

Go to the source code of this file.

Classes

class  EwaldParticle
 

Macros

#define MIN_DEBUG_LEVEL   1
 

Functions

static int * generateAtomTypeTable (int ntypes)
 
static void init_exp (float *xp, int K, float recip, float kappa)
 

Macro Definition Documentation

◆ MIN_DEBUG_LEVEL

#define MIN_DEBUG_LEVEL   1

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

Definition at line 27 of file ComputeEwald.C.

Function Documentation

◆ generateAtomTypeTable()

static int* generateAtomTypeTable ( int  ntypes)
static

Definition at line 40 of file ComputeEwald.C.

Referenced by ComputeEwald::ComputeEwald().

40  {
41  int *table = new int[ntypes*ntypes];
42  int ind = 0;
43  for (int i=0; i<ntypes; i++) {
44  for (int j=i; j<ntypes; j++) {
45  table[ntypes*i+j] = table[ntypes*j+i] = ind++;
46  }
47  }
48  return table;
49 }

◆ init_exp()

static void init_exp ( float *  xp,
int  K,
float  recip,
float  kappa 
)
static

Definition at line 290 of file ComputeEwald.C.

References M_PI.

290  {
291  float piob = M_PI / kappa;
292  piob *= piob;
293  float fac = -piob*recip*recip;
294  for (int i=0; i<= K; i++)
295  xp[i] = exp(fac*i*i);
296 }
#define M_PI
Definition: GoMolecule.C:40