source: src/Parser/TremoloAtomInfoContainer.cpp@ 1a6bda

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 1a6bda was ad011c, checked in by Frederik Heber <heber@…>, 14 years ago

CodePatterns places all includes now in subfolder CodePatterns/.

  • change all includes accordingly.
  • this was necessary as Helpers and Patterns are not very distinctive names for include folders. Already now, we had a conflict between Helpers from CodePatterns and Helpers from this project.
  • changed compilation test in ax_codepatterns.m4 when changing CodePatterns includes.
  • Property mode set to 100644
File size: 3.3 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 <iostream>
23
24#include "TremoloAtomInfoContainer.hpp"
25
26
27TremoloAtomInfoContainer::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("-"),
44 neighbors(std::vector<int>(0, 5)),
45 neighbors_processed(false)
46{}
47
48void 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;
98 case TremoloKey::noKey :
99 break;
100 default :
101 std::cout << "Unknown key: " << key << ", value: " << value << std::endl;
102 break;
103 }
104}
105
106std::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;
140 case TremoloKey::noKey :
141 return std::string("noKey"); // warning string
142 default :
143 std::cout << "Unknown key: " << key << std::endl;
144 return "";
145 }
146}
147
Note: See TracBrowser for help on using the repository browser.