Ignore:
Timestamp:
Aug 28, 2010, 12:57:56 AM (15 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, Candidate_v1.7.0, Candidate_v1.7.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:
21585f
Parents:
5c6946
git-author:
Frederik Heber <heber@…> (08/27/10 10:37:13)
git-committer:
Frederik Heber <heber@…> (08/28/10 00:57:56)
Message:

Added PdbParser with save capability.

  • load does not yet work.
  • added test part to Simple_configuration/2 (new file test.pdb)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/PdbParser.hpp

    r5c6946 rbb6193  
    1313
    1414/**
    15  * Known keys for the ATOMDATA line.
     15 * Known keys for the Pdb line.
    1616 */
    17 class TremoloKey {
     17class PdbKey {
    1818public:
    19   enum atomDataKey {
     19  enum PdbDataKey {
    2020    noKey,
    2121    x,
    22     u,
    23     F,
    24     stress,
    2522    Id,
    26     neighbors,
    27     imprData,
    28     GroupMeasureTypeNo,
    2923    Type,
    3024    extType,
     
    3630    tempFactor,
    3731    segID,
    38     Charge,
    39     charge,
    40     GrpTypeNo,
    41     torsion
     32    charge
    4233  };
    4334};
     
    4637 * Holds tremolo-specific information which is not store in the atom class.
    4738 */
    48 class TremoloAtomInfoContainer {
     39class PdbAtomInfoContainer {
    4940public:
    50   TremoloAtomInfoContainer();
    51   void set(TremoloKey::atomDataKey key, std::string value);
    52   std::string get(TremoloKey::atomDataKey key);
    53   std::string F;
    54   std::string stress;
    55   std::string imprData;
    56   std::string GroupMeasureTypeNo;
     41  PdbAtomInfoContainer();
     42  void set(PdbKey::PdbDataKey key, std::string value);
     43  std::string get(PdbKey::PdbDataKey key);
     44  std::string name;
    5745  std::string extType;
    58   std::string name;
    5946  std::string resName;
    6047  std::string chainID;
     
    6350  std::string tempFactor;
    6451  std::string segID;
    65   std::string Charge;
    6652  std::string charge;
    67   std::string GrpTypeNo;
    68   std::string torsion;
    69   std::vector<int> neighbors;
    7053};
    7154
     
    8063  void load(std::istream* file);
    8164  void save(std::ostream* file);
    82   void setFieldsForSave(std::string atomDataLine);
    8365
    8466
     
    9375  bool isUsedField(std::string fieldName);
    9476  void writeNeighbors(std::ostream* file, int numberOfNeighbors, atom* currentAtom);
    95   void saveLine(std::ostream* file, atom* currentAtom);
     77  void saveLine(ostream* file, const atom* currentAtom, const char *name, const int AtomNo, const int ResdueNo);
     78;
    9679
    9780  /**
    9881   * Map to associate the known keys with numbers.
    9982   */
    100   std::map<std::string, TremoloKey::atomDataKey> knownKeys;
    101 
    102   /**
    103    * Fields used in the tremolo file.
    104    */
    105   std::vector<std::string> usedFields;
     83  std::map<std::string, PdbKey::PdbDataKey> knownKeys;
    10684
    10785  /**
     
    10987   * file.
    11088   */
    111   std::map<int, TremoloAtomInfoContainer> additionalAtomData;
     89  std::map<int, PdbAtomInfoContainer> additionalAtomData;
    11290
    11391  /**
    11492   * Default additional atom data.
    11593   */
    116   TremoloAtomInfoContainer defaultAdditionalData;
     94  PdbAtomInfoContainer defaultAdditionalData;
    11795
    11896  /**
Note: See TracChangeset for help on using the changeset viewer.