VDWTable Class Reference

#include <GromacsTopFile.h>

List of all members.

Public Member Functions

void addType (const char *typea, const char *typeb, Real c6, Real c12)
void add14Type (const char *typea, const char *typeb, Real c6pair, Real c12pair)
int getParams (const char *typea, const char *typeb, Real *c6, Real *c12, Real *c6pair, Real *c12pair) const


Detailed Description

Definition at line 386 of file GromacsTopFile.h.


Member Function Documentation

void VDWTable::add14Type ( const char *  typea,
const char *  typeb,
Real  c6pair,
Real  c12pair 
)

Definition at line 1377 of file GromacsTopFile.C.

References ResizeArray< Elem >::add().

01378                                           {
01379   int i;
01380 
01381   /* check to see if the pair is already in the table */
01382   i = getIndex(typea,typeb);
01383   if(i != -1) {  /* it was in the table */
01384     c6PairArray[i] = c6pair;
01385     c12PairArray[i] = c12pair;
01386   }
01387   else { /* it wasn't in the table - add it! */
01388     typeAArray.add(strdup(typea));
01389     typeBArray.add(strdup(typeb));
01390     c6PairArray.add(c6pair);
01391     c12PairArray.add(c12pair);
01392     c6Array.add(0);
01393     c12Array.add(0);
01394   }
01395 }

void VDWTable::addType ( const char *  typea,
const char *  typeb,
Real  c6,
Real  c12 
)

Definition at line 1357 of file GromacsTopFile.C.

References ResizeArray< Elem >::add().

Referenced by GromacsTopFile::GromacsTopFile().

01358                                  {
01359   int i;
01360 
01361   /* check to see if the pair is already in the table */
01362   i = getIndex(typea,typeb);
01363   if(i != -1) {  /* it was in the table */
01364     c6Array[i] = c6;
01365     c12Array[i] = c12;
01366   }
01367   else { /* it wasn't in the table - add it! */
01368     typeAArray.add(strdup(typea));
01369     typeBArray.add(strdup(typeb));
01370     c6Array.add(c6);
01371     c12Array.add(c12);
01372     c6PairArray.add(0);
01373     c12PairArray.add(0);
01374   }
01375 }

int VDWTable::getParams ( const char *  typea,
const char *  typeb,
Real c6,
Real c12,
Real c6pair,
Real c12pair 
) const

Definition at line 1400 of file GromacsTopFile.C.

Referenced by GromacsTopFile::getVDWParams().

01401                                                                       {
01402   int i;
01403   /* check to see if the pair is already in the table */
01404   i = getIndex(typea,typeb);
01405   if(i != -1) {  /* it was in the table - return the parameters  */
01406     *c6 = c6Array[i];
01407     *c12 = c12Array[i];
01408     *c6pair = c6PairArray[i];
01409     *c12pair = c12PairArray[i];
01410   }
01411   return i;
01412 }


The documentation for this class was generated from the following files:
Generated on Wed Nov 22 01:17:23 2017 for NAMD by  doxygen 1.4.7