Ignore:
Timestamp:
Dec 16, 2010, 5:32:18 PM (14 years ago)
Author:
Frederik Heber <heber@…>
Branches:
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
Children:
1d02fe3
Parents:
24f128
git-author:
Frederik Heber <heber@…> (12/07/10 12:54:42)
git-committer:
Frederik Heber <heber@…> (12/16/10 17:32:18)
Message:

PdbParser is now complete with respect to additionalAtomData.

  • serial, name, resName, resSeq, element, and charge are updated if changed, otherwise we use values from PdbAtomInfoContainer.
  • PdbParser::saveLine() completely uses information from PdbAtomInfoContainer.

Testchanges:

  • Simple_configuration/2/post/test.pdb updated as we are now closer to real PDB format also concerning alignment and the resName changed again.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/PdbAtomInfoContainer.hpp

    r24f128 r16462f  
    1111#include "PdbKey.hpp"
    1212
     13class Vector;
     14
    1315#include <string>
     16#include <typeinfo>
    1417
    1518/**
     
    2225
    2326  // getter and setter
    24   std::string get(const PdbKey::PdbDataKey key) const;
     27  template <class T> T get(const PdbKey::PdbDataKey key) const  {
     28    switch (key) {
     29      default :
     30        std::cout << "Unknown key or not representable as " << typeid(T).name() << ": " << key << std::endl;
     31        break;
     32    }
     33    return (T)NULL;
     34  }
    2535  void set(const PdbKey::PdbDataKey key, std::string value);
    2636
     
    4656
    4757private:
     58  std::string token;
    4859  int serial;
    4960  std::string name;
    50   char altloc;
     61  char altLoc;
    5162  std::string resName;
    5263  char chainID;
    5364  int resSeq;
    5465  char iCode;
     66  Vector XYZ;
    5567  float occupancy;
    5668  float tempFactor;
     69  std::string element;
    5770  int charge;
    5871};
    5972
     73template <>
     74std::string PdbAtomInfoContainer::get<std::string>(const PdbKey::PdbDataKey key) const;
     75template <>
     76int PdbAtomInfoContainer::get<int>(const PdbKey::PdbDataKey key) const;
     77template <>
     78double PdbAtomInfoContainer::get<double>(const PdbKey::PdbDataKey key) const;
     79
    6080#endif /* PDBATOMINFOCONTAINER_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.