Simpatico  v1.10
List of all members | Public Member Functions | Static Public Member Functions | Friends
DdMd::AtomType Class Reference

Detailed Description

Descriptor for a type of Atom.

An AtomTypeType has a mass, a name string, and an integer id. [It will later acquire a charge.]

Definition at line 26 of file ddMd/chemistry/AtomType.h.

#include <AtomType.h>

Public Member Functions

 AtomType ()
 Constructor. More...
 
Mutators
void setId (int Id)
 Set the type index. More...
 
void setMass (double mass)
 Set the mass. More...
 
void setName (std::string name)
 Set the name string. More...
 
Accessors
double mass () const
 Get the mass. More...
 
const std::string & name () const
 Get the name string. More...
 
int id () const
 Get the index. More...
 

Static Public Member Functions

static void initStatic ()
 Call this to guarantee initialization of static data. More...
 

Friends

std::istream & operator>> (std::istream &in, AtomType &atomType)
 istream extractor (>>) for an AtomType. More...
 
std::ostream & operator<< (std::ostream &out, const AtomType &atomType)
 ostream inserter (<<) for an AtomType. More...
 
template<class Archive >
void serialize (Archive &ar, AtomType &atomType, const unsigned int version)
 Serialize an AtomType. More...
 

Constructor & Destructor Documentation

DdMd::AtomType::AtomType ( )

Constructor.

Definition at line 19 of file ddMd/chemistry/AtomType.cpp.

Member Function Documentation

void DdMd::AtomType::setId ( int  Id)

Set the type index.

Parameters
Idinteger index.

Definition at line 28 of file ddMd/chemistry/AtomType.cpp.

References id().

void DdMd::AtomType::setMass ( double  mass)
inline

Set the mass.

Parameters
massatom mass

Definition at line 106 of file ddMd/chemistry/AtomType.h.

References mass().

void DdMd::AtomType::setName ( std::string  name)
inline

Set the name string.

Parameters
namename string

Definition at line 110 of file ddMd/chemistry/AtomType.h.

References name().

double DdMd::AtomType::mass ( ) const
inline
const std::string & DdMd::AtomType::name ( ) const
inline

Get the name string.

Definition at line 118 of file ddMd/chemistry/AtomType.h.

Referenced by initStatic(), and setName().

int DdMd::AtomType::id ( ) const
inline

Get the index.

Definition at line 122 of file ddMd/chemistry/AtomType.h.

References operator<<, and operator>>.

Referenced by setId().

void DdMd::AtomType::initStatic ( )
static

Call this to guarantee initialization of static data.

Definition at line 59 of file ddMd/chemistry/AtomType.cpp.

References mass(), and name().

Referenced by DdMd::Simulation::Simulation().

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  in,
AtomType atomType 
)
friend

istream extractor (>>) for an AtomType.

Format:

name mass

Parameters
ininput stream
atomTypeAtomType to be read from stream
Returns
modified input stream

Definition at line 34 of file ddMd/chemistry/AtomType.cpp.

Referenced by id().

std::ostream& operator<< ( std::ostream &  out,
const AtomType atomType 
)
friend

ostream inserter (<<) for an AtomType.

Format, one one line with no line break:

name mass

Parameters
outoutput stream
atomTypeAtomType to be written to stream
Returns
modified output stream

Definition at line 44 of file ddMd/chemistry/AtomType.cpp.

Referenced by id().

template<class Archive >
void serialize ( Archive &  ar,
AtomType atomType,
const unsigned int  version 
)
friend

Serialize an AtomType.

Parameters
ararchive
atomTypeobject to be serialized
versionarchive version id

Definition at line 161 of file ddMd/chemistry/AtomType.h.


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