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
        Candidate_v1.7.0
        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 24f128 was             4fbca9c, checked in by Frederik Heber <heber@…>, 15 years ago | 
        
          | 
PdbParser::save() fully working.
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            2.5 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 | * PdbAtomInfoContainer.cpp | 
|---|
| 10 | * | 
|---|
| 11 | *  Created on: Dec 4, 2010 | 
|---|
| 12 | *      Author: heber | 
|---|
| 13 | */ | 
|---|
| 14 |  | 
|---|
| 15 | // include config.h | 
|---|
| 16 | #ifdef HAVE_CONFIG_H | 
|---|
| 17 | #include <config.h> | 
|---|
| 18 | #endif | 
|---|
| 19 |  | 
|---|
| 20 | #include "Helpers/MemDebug.hpp" | 
|---|
| 21 |  | 
|---|
| 22 | //#include "Helpers/Assert.hpp" | 
|---|
| 23 | //#include "Helpers/Log.hpp" | 
|---|
| 24 | #include "Helpers/toString.hpp" | 
|---|
| 25 | //#include "Helpers/Verbose.hpp" | 
|---|
| 26 | #include "PdbAtomInfoContainer.hpp" | 
|---|
| 27 |  | 
|---|
| 28 |  | 
|---|
| 29 | PdbAtomInfoContainer::PdbAtomInfoContainer() : | 
|---|
| 30 | serial(0), | 
|---|
| 31 | name("-"), | 
|---|
| 32 | altloc('0'), | 
|---|
| 33 | resName("-"), | 
|---|
| 34 | chainID('0'), | 
|---|
| 35 | resSeq(0), | 
|---|
| 36 | iCode(' '), | 
|---|
| 37 | occupancy(0.), | 
|---|
| 38 | tempFactor(0.), | 
|---|
| 39 | charge(0) | 
|---|
| 40 | {} | 
|---|
| 41 |  | 
|---|
| 42 | PdbAtomInfoContainer::~PdbAtomInfoContainer() | 
|---|
| 43 | {} | 
|---|
| 44 |  | 
|---|
| 45 | void PdbAtomInfoContainer::set(const PdbKey::PdbDataKey key, std::string value) | 
|---|
| 46 | { | 
|---|
| 47 | switch (key) { | 
|---|
| 48 | case PdbKey::serial : | 
|---|
| 49 | ScanKey(serial, value); | 
|---|
| 50 | break; | 
|---|
| 51 | case PdbKey::name : | 
|---|
| 52 | ScanKey(name, value); | 
|---|
| 53 | break; | 
|---|
| 54 | case PdbKey::altloc : | 
|---|
| 55 | ScanKey(altloc, value); | 
|---|
| 56 | break; | 
|---|
| 57 | case PdbKey::resName : | 
|---|
| 58 | ScanKey(resName, value); | 
|---|
| 59 | break; | 
|---|
| 60 | case PdbKey::chainID : | 
|---|
| 61 | ScanKey(chainID, value); | 
|---|
| 62 | break; | 
|---|
| 63 | case PdbKey::resSeq : | 
|---|
| 64 | ScanKey(resSeq, value); | 
|---|
| 65 | break; | 
|---|
| 66 | case PdbKey::iCode : | 
|---|
| 67 | ScanKey(iCode, value); | 
|---|
| 68 | break; | 
|---|
| 69 | case PdbKey::occupancy : | 
|---|
| 70 | ScanKey(occupancy, value); | 
|---|
| 71 | break; | 
|---|
| 72 | case PdbKey::tempFactor : | 
|---|
| 73 | ScanKey(tempFactor, value); | 
|---|
| 74 | break; | 
|---|
| 75 | case PdbKey::charge : | 
|---|
| 76 | ScanKey(charge, value); | 
|---|
| 77 | break; | 
|---|
| 78 | default : | 
|---|
| 79 | std::cout << "Unknown key: " << key << ", value: " << value << std::endl; | 
|---|
| 80 | break; | 
|---|
| 81 | } | 
|---|
| 82 | } | 
|---|
| 83 |  | 
|---|
| 84 | std::string PdbAtomInfoContainer::get(const PdbKey::PdbDataKey key) const | 
|---|
| 85 | { | 
|---|
| 86 | switch (key) { | 
|---|
| 87 | case PdbKey::serial : | 
|---|
| 88 | return toString(serial); | 
|---|
| 89 | case PdbKey::name : | 
|---|
| 90 | return toString(name); | 
|---|
| 91 | case PdbKey::altloc : | 
|---|
| 92 | return toString(altloc); | 
|---|
| 93 | case PdbKey::resName : | 
|---|
| 94 | return toString(resName); | 
|---|
| 95 | case PdbKey::chainID : | 
|---|
| 96 | return toString(chainID); | 
|---|
| 97 | case PdbKey::resSeq : | 
|---|
| 98 | return toString(resSeq); | 
|---|
| 99 | case PdbKey::iCode : | 
|---|
| 100 | return toString(iCode); | 
|---|
| 101 | case PdbKey::occupancy : | 
|---|
| 102 | return toString(occupancy); | 
|---|
| 103 | case PdbKey::tempFactor : | 
|---|
| 104 | return toString(tempFactor); | 
|---|
| 105 | case PdbKey::charge : | 
|---|
| 106 | return toString(charge); | 
|---|
| 107 | default : | 
|---|
| 108 | std::cout << "Unknown key: " << key << std::endl; | 
|---|
| 109 | return ""; | 
|---|
| 110 | } | 
|---|
| 111 | } | 
|---|
| 112 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.