Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

HydrogenGroupID Class Reference

#include <Hydrogen.h>

List of all members.

Public Member Functions

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

Public Attributes

AtomID atomID
int isGP
int atomsInGroup
int sortVal
int GPID


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 27 of file Hydrogen.h.

00027 {};

HydrogenGroupID::~HydrogenGroupID  )  [inline]
 

Definition at line 28 of file Hydrogen.h.

00028 {};


Member Function Documentation

int HydrogenGroupID::operator< const HydrogenGroupID a  )  const [inline]
 

Definition at line 30 of file Hydrogen.h.

References atomID, GPID, isGP, and sortVal.

00030                                                     {
00031       int rval;
00032       // check for overall group ordering
00033       if (sortVal != a.sortVal) rval = (sortVal < a.sortVal);
00034       else if (isGP)    // same group.  Check for other hydrogen ordering
00035         {
00036         // case 1: both are group parents
00037         if (a.isGP)     rval = (atomID < a.atomID);
00038         // case 2: only this atom is a group parent
00039         else            rval = (atomID <= a.GPID);
00040         }
00041       else
00042         {
00043         // case 3: only 'a' is a group parent
00044         if (a.isGP)     rval = (GPID < a.atomID);
00045         // case 4: both are in a group
00046         // case 4.1: both in different groups
00047         else if (GPID != a.GPID)        rval = (GPID < a.GPID);
00048         // case 4.2: both in same group
00049         else rval = (atomID < a.atomID);
00050         }
00051       return(rval);
00052     }

int HydrogenGroupID::operator== const HydrogenGroupID a  )  const [inline]
 

Definition at line 54 of file Hydrogen.h.

References GPID, and isGP.

00054                                                      {
00055       // only the same when both part of same group
00056       return (!isGP && !a.isGP && (GPID == a.GPID) );
00057     }


Member Data Documentation

AtomID HydrogenGroupID::atomID
 

Definition at line 16 of file Hydrogen.h.

Referenced by operator<().

int HydrogenGroupID::atomsInGroup
 

Definition at line 19 of file Hydrogen.h.

int HydrogenGroupID::GPID
 

Definition at line 25 of file Hydrogen.h.

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

int HydrogenGroupID::isGP
 

Definition at line 18 of file Hydrogen.h.

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

int HydrogenGroupID::sortVal
 

Definition at line 21 of file Hydrogen.h.

Referenced by operator<().


The documentation for this class was generated from the following file:
Generated on Sun Oct 12 04:08:18 2008 for NAMD by  doxygen 1.3.9.1