8 #include "ConfigReader.h" 9 #include <tools/storage/Configuration.h> 22 : configurationPtr_(0)
30 : configurationPtr_(&configuration),
31 needsAuxiliaryFile_(needsAuxiliaryFile)
51 for (
int i = 0; i < nSpecies; ++i) {
57 if (storagePtr->
size() != nFill) {
58 std::cout <<
"Warning: Mismatched numbers of atoms" << std::endl;
64 int speciesId, moleculeId, atomId, nMolecule, nAtom;
66 for (speciesId = 0; speciesId < nSpecies; ++speciesId) {
69 nAtom = speciesPtr->
nAtom();
70 for (moleculeId = 0; moleculeId < nMolecule; ++moleculeId) {
71 for (atomId = 0; atomId < nAtom; ++atomId) {
72 atomPtr = storagePtr->
ptr(
id);
74 std::cout <<
"Warning: missing atom" << std::endl;
98 for (
int i = 0; i < nSpecies; ++i) {
104 for ( ; iter.
notEnd(); ++iter) {
105 speciesId = iter->speciesId;
109 if (speciesId >= nSpecies) {
114 for (
int i = 0; i < nSpecies; ++i) {
int nAtom() const
Get number of atoms per molecule for this Species.
bool notEnd() const
Is the current pointer not at the end of the array?
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
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 setClassName(const char *className)
Set class name string.
int capacity() const
Maximum allowed number of molecules for this Species.
A Species represents a set of chemically similar molecules.