/** \file element.cpp * * Function implementations for the class element. * */ #include "Helpers/MemDebug.hpp" #include #include #include "element.hpp" using namespace std; /************************************* Functions for class element **********************************/ /** Constructor of class element. */ element::element() : mass(0), CovalentRadius(0), VanDerWaalsRadius(0), Z(-1), previous(NULL), next(NULL), sort(NULL), No(-1), Valence(0), NoValenceOrbitals(0) { }; /** Destructor of class element. */ element::~element() {}; /** Prints element data to \a *out. * \param *out outstream */ bool element::Output(ostream * const out) const { if (out != NULL) { *out << name << "\t" << symbol << "\t" << period << "\t" << group << "\t" << block << "\t" << Z << "\t" << mass << "\t" << CovalentRadius << "\t" << VanDerWaalsRadius << endl; //*out << Z << "\t" << fixed << setprecision(11) << showpoint << mass << "g/mol\t" << name << "\t" << symbol << "\t" << endl; return true; } else return false; }; /** Prints element data to \a *out. * \param *out outstream * \param No cardinal number of element * \param NoOfAtoms total number of atom of this element type */ bool element::Checkout(ostream * const out, const int Number, const int NoOfAtoms) const { if (out != NULL) { *out << "Ion_Type" << Number << "\t" << NoOfAtoms << "\t" << Z << "\t1.0\t3\t3\t" << fixed << setprecision(11) << showpoint << mass << "\t" << name << "\t" << symbol <