source: src/Parser/TremoloAtomInfoContainer.cpp@ 0bbfa1

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

BUGFIX: Parsing a second .data file failed.

  • atomIdMap was not cleared in TremoloParser::load().
  • neighbors of first parsing get processed again after second parsing, hence bonds are added twice.
  • Property mode set to 100644
File size: 3.0 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 "TremoloAtomInfoContainer.hpp"
16
17#include <iostream>
18
19
20TremoloAtomInfoContainer::TremoloAtomInfoContainer() :
21 F("0"),
22 stress("0"),
23 imprData("-"),
24 GroupMeasureTypeNo("0"),
25 extType("-"),
26 name("-"),
27 resName("-"),
28 chainID("0"),
29 resSeq("0"),
30 occupancy("0"),
31 tempFactor("0"),
32 segID("0"),
33 Charge("0"),
34 charge("0"),
35 GrpTypeNo("0"),
36 torsion("-"),
37 neighbors(std::vector<int>(0, 5)),
38 neighbors_processed(false)
39{}
40
41void TremoloAtomInfoContainer::set(TremoloKey::atomDataKey key, std::string value) {
42 switch (key) {
43 case TremoloKey::F :
44 F = value;
45 break;
46 case TremoloKey::stress :
47 stress = value;
48 break;
49 case TremoloKey::imprData :
50 imprData = value;
51 break;
52 case TremoloKey::GroupMeasureTypeNo :
53 GroupMeasureTypeNo = value;
54 break;
55 case TremoloKey::extType :
56 extType = value;
57 break;
58 case TremoloKey::name :
59 name = value;
60 break;
61 case TremoloKey::resName :
62 resName = value;
63 break;
64 case TremoloKey::chainID :
65 chainID = value;
66 break;
67 case TremoloKey::resSeq :
68 resSeq = value;
69 break;
70 case TremoloKey::occupancy :
71 occupancy = value;
72 break;
73 case TremoloKey::tempFactor :
74 tempFactor = value;
75 break;
76 case TremoloKey::segID :
77 segID = value;
78 break;
79 case TremoloKey::Charge :
80 Charge = value;
81 break;
82 case TremoloKey::charge :
83 charge = value;
84 break;
85 case TremoloKey::GrpTypeNo :
86 GrpTypeNo = value;
87 break;
88 case TremoloKey::torsion :
89 torsion = value;
90 break;
91 default :
92 std::cout << "Unknown key: " << key << ", value: " << value << std::endl;
93 break;
94 }
95}
96
97std::string TremoloAtomInfoContainer::get(TremoloKey::atomDataKey key) {
98 switch (key) {
99 case TremoloKey::F :
100 return F;
101 case TremoloKey::stress :
102 return stress;
103 case TremoloKey::imprData :
104 return imprData;
105 case TremoloKey::GroupMeasureTypeNo :
106 return GroupMeasureTypeNo;
107 case TremoloKey::extType :
108 return extType;
109 case TremoloKey::name :
110 return name;
111 case TremoloKey::resName :
112 return resName;
113 case TremoloKey::chainID :
114 return chainID;
115 case TremoloKey::resSeq :
116 return resSeq;
117 case TremoloKey::occupancy :
118 return occupancy;
119 case TremoloKey::tempFactor :
120 return tempFactor;
121 case TremoloKey::segID :
122 return segID;
123 case TremoloKey::Charge :
124 return Charge;
125 case TremoloKey::charge :
126 return charge;
127 case TremoloKey::GrpTypeNo :
128 return GrpTypeNo;
129 case TremoloKey::torsion :
130 return torsion;
131 default :
132 std::cout << "Unknown key: " << key << std::endl;
133 return "";
134 }
135}
136
Note: See TracBrowser for help on using the repository browser.