| 1 | 
  | 
/********************************************************************** | 
| 2 | 
  | 
 | 
| 3 | 
  | 
This basic Periodic Table class was originally taken from the data.h  | 
| 4 | 
< | 
file in OpenBabel. The code has been modified to match the OOPSE coding style. | 
| 4 | 
> | 
file in OpenBabel. The code has been modified to match the OpenMD coding style. | 
| 5 | 
  | 
 | 
| 6 | 
  | 
We have retained the OpenBabel copyright and GPL license on this class:   | 
| 7 | 
  | 
 | 
| 25 | 
  | 
 * @file ElementsTable.hpp | 
| 26 | 
  | 
 * @author gezelter | 
| 27 | 
  | 
 * @date 12/21/2007 | 
| 28 | 
– | 
 * @time 11:30am | 
| 28 | 
  | 
 * @version 1.0 | 
| 29 | 
  | 
 */ | 
| 30 | 
  | 
 | 
| 35 | 
  | 
#include <vector> | 
| 36 | 
  | 
#include "primitives/Element.hpp" | 
| 37 | 
  | 
 | 
| 38 | 
< | 
namespace oopse { | 
| 38 | 
> | 
namespace OpenMD { | 
| 39 | 
  | 
 | 
| 40 | 
  | 
  /** | 
| 41 | 
< | 
   * @class ElementsTable.hpp "util/ElementsTable.hpp" | 
| 41 | 
> | 
   * @class ElementsTable | 
| 42 | 
  | 
   * @brief Periodic Table of the Elements  | 
| 43 | 
  | 
   * Using element data is a place holder when we lack information about | 
| 44 | 
  | 
   * a specific atom type.  In particular, the Langevin algorithms must | 
| 97 | 
  | 
    unsigned int GetSize() { return GetNumberOfElements(); } | 
| 98 | 
  | 
    /** | 
| 99 | 
  | 
     * @return the atomic number matching the element symbol passed | 
| 100 | 
+ | 
     * or 0 if not defined.  | 
| 101 | 
+ | 
     * @param str the element symbol | 
| 102 | 
+ | 
     */ | 
| 103 | 
+ | 
    int GetAtomicNum(const char *str); | 
| 104 | 
+ | 
    /** | 
| 105 | 
+ | 
     * @return the atomic number matching the element symbol passed | 
| 106 | 
  | 
     * or 0 if not defined. For 'D' or 'T' hydrogen isotopes, will return | 
| 107 | 
  | 
     * a value in the second argument | 
| 108 | 
  | 
     * @param str the element symbol | 
| 109 | 
  | 
     * @param iso the isotope index for Deuterium or Tritium | 
| 110 | 
  | 
     */ | 
| 106 | 
– | 
    int GetAtomicNum(const char *str); | 
| 111 | 
  | 
    int GetAtomicNum(const char *str, int &iso); | 
| 112 | 
  | 
    /** | 
| 113 | 
  | 
     * @return the element symbol matching the atomic number passed | 
| 114 | 
  | 
     * @param atomicnum the atomic number of the element | 
| 115 | 
  | 
     */ | 
| 116 | 
< | 
    char *GetSymbol(int atomicnum); | 
| 116 | 
> | 
    const char *GetSymbol(int atomicnum); | 
| 117 | 
  | 
    /** | 
| 118 | 
  | 
     * @return the van der Waals radius for this atomic number | 
| 119 | 
  | 
     * @param atomicnum the atomic number of the element |