1 #ifndef TOOLS_SPECIES_H 2 #define TOOLS_SPECIES_H 12 #include <util/containers/DArray.h> 13 #include <util/containers/DSArray.h> 14 #include <util/containers/ArrayIterator.h> 62 void addAtom(
Atom& atom);
72 void begin(Iterator& iterator);
109 template <
class Archive>
110 void serialize(Archive& ar,
const unsigned int version);
186 {
return molecules_[i]; }
203 inline int Species::size()
const 204 {
return molecules_.size(); }
210 {
return capacity_; }
215 template <
class Archive>
220 if (Archive::is_loading()) {
int nAtom() const
Get number of atoms per molecule for this Species.
void serialize(Archive &ar, const unsigned int version)
Serialize this ParamComponent as a string.
virtual ~Species()
Destructor.
int nAtom_
Number of atoms per molecule.
Utility classes for scientific computation.
Forward iterator for an Array or a C array.
bool isValid() const
Return true if Species is valid, or throw an Exception.
void setId(int id)
Set integer id for this Species.
int id_
Integer index for this Species.
Dynamically allocatable contiguous array template.
int id() const
Get integer id of this Species.
int capacity() const
Maximum allowed number of molecules for this Species.
Dynamically allocated array with variable logical size.
A Species represents a set of chemically similar molecules.