/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * PdbAtomInfoContainer.cpp * * Created on: Dec 4, 2010 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "Helpers/MemDebug.hpp" //#include "Helpers/Assert.hpp" //#include "Helpers/Log.hpp" #include "Helpers/toString.hpp" //#include "Helpers/Verbose.hpp" #include "PdbAtomInfoContainer.hpp" PdbAtomInfoContainer::PdbAtomInfoContainer() : serial(0), name("-"), altloc('0'), resName("-"), chainID('0'), resSeq(0), iCode(' '), occupancy(0.), tempFactor(0.), charge(0) {} PdbAtomInfoContainer::~PdbAtomInfoContainer() {} void PdbAtomInfoContainer::set(const PdbKey::PdbDataKey key, std::string value) { switch (key) { case PdbKey::serial : ScanKey(serial, value); break; case PdbKey::name : ScanKey(name, value); break; case PdbKey::altloc : ScanKey(altloc, value); break; case PdbKey::resName : ScanKey(resName, value); break; case PdbKey::chainID : ScanKey(chainID, value); break; case PdbKey::resSeq : ScanKey(resSeq, value); break; case PdbKey::iCode : ScanKey(iCode, value); break; case PdbKey::occupancy : ScanKey(occupancy, value); break; case PdbKey::tempFactor : ScanKey(tempFactor, value); break; case PdbKey::charge : ScanKey(charge, value); break; default : std::cout << "Unknown key: " << key << ", value: " << value << std::endl; break; } } std::string PdbAtomInfoContainer::get(const PdbKey::PdbDataKey key) const { switch (key) { case PdbKey::serial : return toString(serial); case PdbKey::name : return toString(name); case PdbKey::altloc : return toString(altloc); case PdbKey::resName : return toString(resName); case PdbKey::chainID : return toString(chainID); case PdbKey::resSeq : return toString(resSeq); case PdbKey::iCode : return toString(iCode); case PdbKey::occupancy : return toString(occupancy); case PdbKey::tempFactor : return toString(tempFactor); case PdbKey::charge : return toString(charge); default : std::cout << "Unknown key: " << key << std::endl; return ""; } }