source: src/Parser/TremoloAtomInfoContainer.cpp@ 47d041

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_BoundInBox_CenterInBox_MoleculeActions Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since 47d041 was 305e7e, checked in by Frederik Heber <heber@…>, 14 years ago

FIX: Type is actually spelled type with TREMOLO.

  • Property mode set to 100644
File size: 4.4 KB
Line 
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
15// include config.h
16#ifdef HAVE_CONFIG_H
17#include <config.h>
18#endif
19
20#include "CodePatterns/MemDebug.hpp"
21
22#include "CodePatterns/toString.hpp"
23
24#include <iostream>
25
26#include "TremoloAtomInfoContainer.hpp"
27
28
29TremoloAtomInfoContainer::TremoloAtomInfoContainer() :
30 F("0"),
31 stress("0"),
32 imprData("-"),
33 GroupMeasureTypeNo("0"),
34 type("-"),
35 extType("-"),
36 name("-"),
37 resName("-"),
38 chainID("0"),
39 resSeq("0"),
40 occupancy("0"),
41 tempFactor("0"),
42 segID("0"),
43 Charge("0"),
44 charge("0"),
45 GrpTypeNo("0"),
46 torsion("-"),
47 neighbors(std::vector<int>(0, 5)),
48 neighbors_processed(false)
49{}
50
51void TremoloAtomInfoContainer::set(TremoloKey::atomDataKey key, std::string value) {
52 switch (key) {
53 case TremoloKey::F :
54 F = value;
55 break;
56 case TremoloKey::stress :
57 stress = value;
58 break;
59 case TremoloKey::imprData :
60 imprData = value;
61 break;
62 case TremoloKey::GroupMeasureTypeNo :
63 GroupMeasureTypeNo = value;
64 break;
65 case TremoloKey::type :
66 type = value;
67 break;
68 case TremoloKey::extType :
69 extType = value;
70 break;
71 case TremoloKey::name :
72 name = value;
73 break;
74 case TremoloKey::resName :
75 resName = value;
76 break;
77 case TremoloKey::chainID :
78 chainID = value;
79 break;
80 case TremoloKey::resSeq :
81 resSeq = value;
82 break;
83 case TremoloKey::occupancy :
84 occupancy = value;
85 break;
86 case TremoloKey::tempFactor :
87 tempFactor = value;
88 break;
89 case TremoloKey::segID :
90 segID = value;
91 break;
92 case TremoloKey::Charge :
93 Charge = value;
94 break;
95 case TremoloKey::charge :
96 charge = value;
97 break;
98 case TremoloKey::GrpTypeNo :
99 GrpTypeNo = value;
100 break;
101 case TremoloKey::torsion :
102 torsion = value;
103 break;
104 case TremoloKey::noKey :
105 break;
106 default :
107 std::cout << "Unknown key: " << key << ", value: " << value << std::endl;
108 break;
109 }
110}
111
112std::string TremoloAtomInfoContainer::get(TremoloKey::atomDataKey key) const
113{
114 switch (key) {
115 case TremoloKey::F :
116 return F;
117 case TremoloKey::stress :
118 return stress;
119 case TremoloKey::imprData :
120 return imprData;
121 case TremoloKey::GroupMeasureTypeNo :
122 return GroupMeasureTypeNo;
123 case TremoloKey::type :
124 return type;
125 case TremoloKey::extType :
126 return extType;
127 case TremoloKey::name :
128 return name;
129 case TremoloKey::resName :
130 return resName;
131 case TremoloKey::chainID :
132 return chainID;
133 case TremoloKey::resSeq :
134 return resSeq;
135 case TremoloKey::occupancy :
136 return occupancy;
137 case TremoloKey::tempFactor :
138 return tempFactor;
139 case TremoloKey::segID :
140 return segID;
141 case TremoloKey::Charge :
142 return Charge;
143 case TremoloKey::charge :
144 return charge;
145 case TremoloKey::GrpTypeNo :
146 return GrpTypeNo;
147 case TremoloKey::torsion :
148 return torsion;
149 case TremoloKey::noKey :
150 return std::string("noKey"); // warning string
151 default :
152 std::cout << "Unknown key: " << key << std::endl;
153 return "";
154 }
155}
156
157std::ostream& operator<<(std::ostream& out, const TremoloAtomInfoContainer& info)
158{
159 out << info.get(TremoloKey::F) << "\t";
160 out << info.get(TremoloKey::stress) << "\t";
161 out << info.get(TremoloKey::imprData) << "\t";
162 out << info.get(TremoloKey::GroupMeasureTypeNo) << "\t";
163 out << info.get(TremoloKey::type) << "\t";
164 out << info.get(TremoloKey::extType) << "\t";
165 out << info.get(TremoloKey::name) << "\t";
166 out << info.get(TremoloKey::resName) << "\t";
167 out << info.get(TremoloKey::chainID) << "\t";
168 out << info.get(TremoloKey::resSeq) << "\t";
169 out << info.get(TremoloKey::occupancy) << "\t";
170 out << info.get(TremoloKey::tempFactor) << "\t";
171 out << info.get(TremoloKey::segID) << "\t";
172 out << info.get(TremoloKey::Charge) << "\t";
173 out << info.get(TremoloKey::charge) << "\t";
174 out << info.get(TremoloKey::GrpTypeNo) << "\t";
175 out << info.get(TremoloKey::torsion) << "\t";
176 out << info.neighbors << "\t";
177 out << info.neighbors_processed;
178
179 return out;
180}
Note: See TracBrowser for help on using the repository browser.