[031e2c6] | 1 | /*
|
---|
| 2 | * Project: MoleCuilder
|
---|
| 3 | * Description: creates and alters molecular systems
|
---|
| 4 | * Copyright (C) 2010 University of Bonn. All rights reserved.
|
---|
| 5 | * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | /*
|
---|
| 9 | * TremoloAtomInfoContainer.cpp
|
---|
| 10 | *
|
---|
| 11 | * Created on: Dec 7, 2010
|
---|
| 12 | * Author: heber
|
---|
| 13 | */
|
---|
| 14 |
|
---|
[dd97a9] | 15 | // include config.h
|
---|
| 16 | #ifdef HAVE_CONFIG_H
|
---|
| 17 | #include <config.h>
|
---|
| 18 | #endif
|
---|
| 19 |
|
---|
[ad011c] | 20 | #include "CodePatterns/MemDebug.hpp"
|
---|
[031e2c6] | 21 |
|
---|
| 22 | #include <iostream>
|
---|
| 23 |
|
---|
[dd97a9] | 24 | #include "TremoloAtomInfoContainer.hpp"
|
---|
| 25 |
|
---|
[031e2c6] | 26 |
|
---|
| 27 | TremoloAtomInfoContainer::TremoloAtomInfoContainer() :
|
---|
| 28 | F("0"),
|
---|
| 29 | stress("0"),
|
---|
| 30 | imprData("-"),
|
---|
| 31 | GroupMeasureTypeNo("0"),
|
---|
| 32 | extType("-"),
|
---|
| 33 | name("-"),
|
---|
| 34 | resName("-"),
|
---|
| 35 | chainID("0"),
|
---|
| 36 | resSeq("0"),
|
---|
| 37 | occupancy("0"),
|
---|
| 38 | tempFactor("0"),
|
---|
| 39 | segID("0"),
|
---|
| 40 | Charge("0"),
|
---|
| 41 | charge("0"),
|
---|
| 42 | GrpTypeNo("0"),
|
---|
| 43 | torsion("-"),
|
---|
[0bbfa1] | 44 | neighbors(std::vector<int>(0, 5)),
|
---|
| 45 | neighbors_processed(false)
|
---|
[031e2c6] | 46 | {}
|
---|
| 47 |
|
---|
| 48 | void TremoloAtomInfoContainer::set(TremoloKey::atomDataKey key, std::string value) {
|
---|
| 49 | switch (key) {
|
---|
| 50 | case TremoloKey::F :
|
---|
| 51 | F = value;
|
---|
| 52 | break;
|
---|
| 53 | case TremoloKey::stress :
|
---|
| 54 | stress = value;
|
---|
| 55 | break;
|
---|
| 56 | case TremoloKey::imprData :
|
---|
| 57 | imprData = value;
|
---|
| 58 | break;
|
---|
| 59 | case TremoloKey::GroupMeasureTypeNo :
|
---|
| 60 | GroupMeasureTypeNo = value;
|
---|
| 61 | break;
|
---|
| 62 | case TremoloKey::extType :
|
---|
| 63 | extType = value;
|
---|
| 64 | break;
|
---|
| 65 | case TremoloKey::name :
|
---|
| 66 | name = value;
|
---|
| 67 | break;
|
---|
| 68 | case TremoloKey::resName :
|
---|
| 69 | resName = value;
|
---|
| 70 | break;
|
---|
| 71 | case TremoloKey::chainID :
|
---|
| 72 | chainID = value;
|
---|
| 73 | break;
|
---|
| 74 | case TremoloKey::resSeq :
|
---|
| 75 | resSeq = value;
|
---|
| 76 | break;
|
---|
| 77 | case TremoloKey::occupancy :
|
---|
| 78 | occupancy = value;
|
---|
| 79 | break;
|
---|
| 80 | case TremoloKey::tempFactor :
|
---|
| 81 | tempFactor = value;
|
---|
| 82 | break;
|
---|
| 83 | case TremoloKey::segID :
|
---|
| 84 | segID = value;
|
---|
| 85 | break;
|
---|
| 86 | case TremoloKey::Charge :
|
---|
| 87 | Charge = value;
|
---|
| 88 | break;
|
---|
| 89 | case TremoloKey::charge :
|
---|
| 90 | charge = value;
|
---|
| 91 | break;
|
---|
| 92 | case TremoloKey::GrpTypeNo :
|
---|
| 93 | GrpTypeNo = value;
|
---|
| 94 | break;
|
---|
| 95 | case TremoloKey::torsion :
|
---|
| 96 | torsion = value;
|
---|
| 97 | break;
|
---|
[ff3c40] | 98 | case TremoloKey::noKey :
|
---|
| 99 | break;
|
---|
[031e2c6] | 100 | default :
|
---|
| 101 | std::cout << "Unknown key: " << key << ", value: " << value << std::endl;
|
---|
| 102 | break;
|
---|
| 103 | }
|
---|
| 104 | }
|
---|
| 105 |
|
---|
| 106 | std::string TremoloAtomInfoContainer::get(TremoloKey::atomDataKey key) {
|
---|
| 107 | switch (key) {
|
---|
| 108 | case TremoloKey::F :
|
---|
| 109 | return F;
|
---|
| 110 | case TremoloKey::stress :
|
---|
| 111 | return stress;
|
---|
| 112 | case TremoloKey::imprData :
|
---|
| 113 | return imprData;
|
---|
| 114 | case TremoloKey::GroupMeasureTypeNo :
|
---|
| 115 | return GroupMeasureTypeNo;
|
---|
| 116 | case TremoloKey::extType :
|
---|
| 117 | return extType;
|
---|
| 118 | case TremoloKey::name :
|
---|
| 119 | return name;
|
---|
| 120 | case TremoloKey::resName :
|
---|
| 121 | return resName;
|
---|
| 122 | case TremoloKey::chainID :
|
---|
| 123 | return chainID;
|
---|
| 124 | case TremoloKey::resSeq :
|
---|
| 125 | return resSeq;
|
---|
| 126 | case TremoloKey::occupancy :
|
---|
| 127 | return occupancy;
|
---|
| 128 | case TremoloKey::tempFactor :
|
---|
| 129 | return tempFactor;
|
---|
| 130 | case TremoloKey::segID :
|
---|
| 131 | return segID;
|
---|
| 132 | case TremoloKey::Charge :
|
---|
| 133 | return Charge;
|
---|
| 134 | case TremoloKey::charge :
|
---|
| 135 | return charge;
|
---|
| 136 | case TremoloKey::GrpTypeNo :
|
---|
| 137 | return GrpTypeNo;
|
---|
| 138 | case TremoloKey::torsion :
|
---|
| 139 | return torsion;
|
---|
[ff3c40] | 140 | case TremoloKey::noKey :
|
---|
| 141 | return std::string("noKey"); // warning string
|
---|
[031e2c6] | 142 | default :
|
---|
| 143 | std::cout << "Unknown key: " << key << std::endl;
|
---|
| 144 | return "";
|
---|
| 145 | }
|
---|
| 146 | }
|
---|
| 147 |
|
---|