NAMD
Public Member Functions | Public Attributes | List of all members
HydrogenGroupID Class Reference

#include <Hydrogen.h>

Public Member Functions

 HydrogenGroupID ()
 
 ~HydrogenGroupID ()
 
int operator< (const HydrogenGroupID &a) const
 

Public Attributes

AtomID atomID
 
int isGP
 
int atomsInGroup
 
int waterVal
 
int GPID
 
int isMP
 
int MPID
 
int atomsInMigrationGroup
 

Detailed Description

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

Definition at line 14 of file Hydrogen.h.

Constructor & Destructor Documentation

HydrogenGroupID::HydrogenGroupID ( )
inline

Definition at line 34 of file Hydrogen.h.

34 {};
HydrogenGroupID::~HydrogenGroupID ( )
inline

Definition at line 35 of file Hydrogen.h.

35 {};

Member Function Documentation

int HydrogenGroupID::operator< ( const HydrogenGroupID a) const
inline

Definition at line 37 of file Hydrogen.h.

References atomID, GPID, isGP, isMP, and MPID.

37  {
38  int rval;
39  int mp1 = ( isMP ? atomID : MPID );
40  int mp2 = ( a.isMP ? a.atomID : a.MPID );
41  if ( mp1 != mp2 ) {
42  rval = ( mp1 < mp2 );
43  } else { // same migration group, compare hydrogen groups
44  int gp1 = ( isGP ? atomID : GPID );
45  int gp2 = ( a.isGP ? a.atomID : a.GPID );
46  if ( gp1 != gp2 ) {
47  rval = ( gp1 < gp2 );
48  // in the same group, check for group parent
49  } else if ( a.isGP ) { // compare to self should return 0
50  rval = 0;
51  } else if ( isGP ) {
52  rval = 1;
53  // neither is group parent, check for drude
54  } else if ( a.atomID == gp1 + 1 ) { // compare to self return 0
55  rval = 0;
56  } else if ( atomID == gp1 + 1 ) {
57  rval = 1;
58  // neither is drude
59  } else {
60  rval = (atomID < a.atomID);
61  }
62  }
63  return rval;
64  }
AtomID atomID
Definition: Hydrogen.h:16

Member Data Documentation

AtomID HydrogenGroupID::atomID

Definition at line 16 of file Hydrogen.h.

Referenced by WorkDistrib::createAtomLists(), and operator<().

int HydrogenGroupID::atomsInGroup

Definition at line 19 of file Hydrogen.h.

Referenced by WorkDistrib::createAtomLists(), and outputCompressedFile().

int HydrogenGroupID::atomsInMigrationGroup

Definition at line 29 of file Hydrogen.h.

Referenced by WorkDistrib::createAtomLists(), and outputCompressedFile().

int HydrogenGroupID::GPID

Definition at line 25 of file Hydrogen.h.

Referenced by operator<(), and outputCompressedFile().

int HydrogenGroupID::isGP

Definition at line 18 of file Hydrogen.h.

Referenced by WorkDistrib::createAtomLists(), and operator<().

int HydrogenGroupID::isMP

Definition at line 27 of file Hydrogen.h.

Referenced by WorkDistrib::createAtomLists(), and operator<().

int HydrogenGroupID::MPID

Definition at line 28 of file Hydrogen.h.

Referenced by operator<(), and outputCompressedFile().

int HydrogenGroupID::waterVal

Definition at line 21 of file Hydrogen.h.


The documentation for this class was generated from the following file: