Changeset 1363de


Ignore:
Timestamp:
Mar 2, 2011, 9:53:08 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:
0d9546
Parents:
09ac12
git-author:
Frederik Heber <heber@…> (02/25/11 20:35:17)
git-committer:
Frederik Heber <heber@…> (03/02/11 21:53:08)
Message:

DOCUFIX: atom - Moved all doxygen documentation to header file.

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/atom.cpp

    r09ac12 r1363de  
    3636
    3737
    38 /** Constructor of class atom.
    39  */
    4038atom::atom() :
    4139  father(this),
     
    4442{};
    4543
    46 /** Constructor of class atom.
    47  */
    4844atom::atom(atom *pointer) :
    4945    ParticleInfo(pointer),
     
    8379}
    8480
    85 /** Climbs up the father list until NULL, last is returned.
    86  * \return true father, i.e. whose father points to itself, NULL if it could not be found or has none (added hydrogen)
    87  */
    8881atom *atom::GetTrueFather()
    8982{
     
    110103};
    111104
    112 /** Check whether father is equal to given atom.
    113  * \param *ptr atom to compare father to
    114  * \param **res return value (only set if atom::father is equal to \a *ptr)
    115  */
    116105void atom::EqualsFather ( const atom *ptr, const atom **res ) const
    117106{
     
    124113}
    125114
    126 /** Checks whether atom is within the given box.
    127  * \param offset offset to box origin
    128  * \param *parallelepiped box matrix
    129  * \return true - is inside, false - is not
    130  */
    131115bool atom::IsInShape(const Shape& shape) const
    132116{
     
    134118};
    135119
    136 /** Output of a single atom with given numbering.
    137  * \param ElementNo cardinal number of the element
    138  * \param AtomNo cardinal number among these atoms of the same element
    139  * \param *out stream to output to
    140  * \param *comment commentary after '#' sign
    141   * \return true - \a *out present, false - \a *out is NULL
    142  */
    143120bool atom::OutputIndexed(ofstream * const out, const int ElementNo, const int AtomNo, const char *comment) const
    144121{
     
    158135};
    159136
    160 /** Output of a single atom with numbering from array according to atom::type.
    161  * \param *ElementNo cardinal number of the element
    162  * \param *AtomNo cardinal number among these atoms of the same element
    163  * \param *out stream to output to
    164  * \param *comment commentary after '#' sign
    165   * \return true - \a *out present, false - \a *out is NULL
    166  */
    167137bool atom::OutputArrayIndexed(ostream * const out,const enumeration<const element*> &elementLookup, int *AtomNo, const char *comment) const
    168138{
     
    185155};
    186156
    187 /** Output of a single atom as one line in xyz file.
    188  * \param *out stream to output to
    189   * \return true - \a *out present, false - \a *out is NULL
    190  */
    191157bool atom::OutputXYZLine(ofstream *out) const
    192158{
     
    198164};
    199165
    200 /** Output of a single atom as one line in xyz file.
    201  * \param *out stream to output to
    202  * \param *ElementNo array with ion type number in the config file this atom's element shall have
    203  * \param *AtomNo array with atom number in the config file this atom shall have, is increase by one automatically
    204  * \param step Trajectory time step to output
    205   * \return true - \a *out present, false - \a *out is NULL
    206  */
    207166bool atom::OutputTrajectory(ofstream * const out, const enumeration<const element*> &elementLookup, int *AtomNo, const int step) const
    208167{
     
    224183};
    225184
    226 /** Output of a single atom as one lin in xyz file.
    227  * \param *out stream to output to
    228  * \param step Trajectory time step to output
    229  * \return true - \a *out present, false - \a *out is NULL
    230  */
    231185bool atom::OutputTrajectoryXYZ(ofstream * const out, const int step) const
    232186{
     
    241195};
    242196
    243 /** Outputs the MPQC configuration line for this atom.
    244  * \param *out output stream
    245  * \param *center center of molecule subtracted from position
    246  * \param *AtomNo pointer to atom counter that is increased by one
    247  */
    248197void atom::OutputMPQCLine(ostream * const out, const Vector *center) const
    249198{
     
    253202};
    254203
    255 /** Compares the indices of \a this atom with a given \a ptr.
    256  * \param ptr atom to compare index against
    257  * \return true - this one's is smaller, false - not
    258  */
    259204bool atom::Compare(const atom &ptr) const
    260205{
     
    265210};
    266211
    267 /** Returns squared distance to a given vector.
    268  * \param origin vector to calculate distance to
    269  * \return distance squared
    270  */
    271212double atom::DistanceSquaredToVector(const Vector &origin) const
    272213{
     
    274215};
    275216
    276 /** Returns distance to a given vector.
    277  * \param origin vector to calculate distance to
    278  * \return distance
    279  */
    280217double atom::DistanceToVector(const Vector &origin) const
    281218{
     
    283220};
    284221
    285 /** Initialises the component number array.
    286  * Size is set to atom::ListOfBonds.size()+1 (last is th encode end by -1)
    287  */
    288222void atom::InitComponentNr()
    289223{
     
    347281}
    348282
    349 /** Makes the atom be contained in the new molecule \a *_mol.
    350  * Uses atom::removeFromMolecule() to delist from old molecule.
    351  * \param *_mol pointer to new molecule
    352  */
    353283void atom::setMolecule(molecule *_mol){
    354284  // take this atom from the old molecule
     
    360290}
    361291
    362 /** Returns pointer to the molecule which atom belongs to.
    363  * \return containing molecule
    364  */
    365292molecule* atom::getMolecule() const {
    366293  return mol;
    367294}
    368295
    369 /** Erases the atom in atom::mol's list of atoms and sets it to zero.
    370  */
    371296void atom::removeFromMolecule(){
    372297  if(mol){
  • src/atom.hpp

    r09ac12 r1363de  
    4747  friend atom* NewAtom(atomId_t);
    4848  friend void  DeleteAtom(atom*);
    49   public:
     49public:
    5050    atom *father;   //!< In many-body bond order fragmentations points to originating atom
    5151    int *sort;      //!< sort criteria
    5252
     53  /** Clones this atom.
     54   *
     55   * Does not clone the bonds!
     56   *
     57   * @return reference to atom
     58   */
    5359  virtual atom *clone();
    5460
     
    6167  virtual void UpdateSteps();
    6268
     69  /** Output of a single atom with given numbering.
     70   * \param ElementNo cardinal number of the element
     71   * \param AtomNo cardinal number among these atoms of the same element
     72   * \param *out stream to output to
     73   * \param *comment commentary after '#' sign
     74   * \return true - \a *out present, false - \a *out is NULL
     75   */
    6376  bool OutputIndexed(ofstream * const out, const int ElementNo, const int AtomNo, const char *comment = NULL) const;
     77
     78  /** Output of a single atom with numbering from array according to atom::type.
     79   * \param *ElementNo cardinal number of the element
     80   * \param *AtomNo cardinal number among these atoms of the same element
     81   * \param *out stream to output to
     82   * \param *comment commentary after '#' sign
     83   * \return true - \a *out present, false - \a *out is NULL
     84   */
    6485  bool OutputArrayIndexed(ostream * const out,const enumeration<const element*>&, int *AtomNo, const char *comment = NULL) const;
     86
     87  /** Output of a single atom as one line in xyz file.
     88   * \param *out stream to output to
     89   * \return true - \a *out present, false - \a *out is NULL
     90   */
    6591  bool OutputXYZLine(ofstream *out) const;
     92
     93  /** Output of a single atom as one line in xyz file.
     94   * \param *out stream to output to
     95   * \param *ElementNo array with ion type number in the config file this atom's element shall have
     96   * \param *AtomNo array with atom number in the config file this atom shall have, is increase by one automatically
     97   * \param step Trajectory time step to output
     98   * \return true - \a *out present, false - \a *out is NULL
     99   */
    66100  bool OutputTrajectory(ofstream * const out, const enumeration<const element*>&, int *AtomNo, const int step) const;
     101
     102  /** Output of a single atom as one lin in xyz file.
     103   * \param *out stream to output to
     104   * \param step Trajectory time step to output
     105   * \return true - \a *out present, false - \a *out is NULL
     106   */
    67107  bool OutputTrajectoryXYZ(ofstream * const out, const int step) const;
     108
     109  /** Outputs the MPQC configuration line for this atom.
     110   * \param *out output stream
     111   * \param *center center of molecule subtracted from position
     112   * \param *AtomNo pointer to atom counter that is increased by one
     113   */
    68114  void OutputMPQCLine(ostream * const out, const Vector *center) const;
    69115
     116  /** Initialises the component number array.
     117   * Size is set to atom::ListOfBonds.size()+1 (last is th encode end by -1)
     118   */
    70119  void InitComponentNr();
     120
     121  /** Resets GraphNr to -1.
     122   *
     123   */
    71124  void resetGraphNr();
    72125
     126  /** Check whether father is equal to given atom.
     127   * \param *ptr atom to compare father to
     128   * \param **res return value (only set if atom::father is equal to \a *ptr)
     129   */
    73130  void EqualsFather ( const atom *ptr, const atom **res ) const;
     131
     132  /** States whether the given \a *ptr is our father.
     133   *
     134   * @param ptr atom to compare atom::Father with
     135   * @return true - \a *ptr is father, false - not
     136   */
    74137  bool isFather(const atom *ptr);
     138
     139  /** If we are copy of copy, we are linked to be just a copy.
     140   *
     141   */
    75142  void CorrectFather();
     143
     144  /** Climbs up the father list until NULL, last is returned.
     145   * \return true father, i.e. whose father points to itself, NULL if it could not be found or has none (added hydrogen)
     146   */
    76147  atom *GetTrueFather();
     148
     149  /** Compares the indices of \a this atom with a given \a ptr.
     150   * \param ptr atom to compare index against
     151   * \return true - this one's is smaller, false - not
     152   */
    77153  bool Compare(const atom &ptr) const;
    78154
     155  /** Returns distance to a given vector.
     156   * \param origin vector to calculate distance to
     157   * \return distance
     158   */
    79159  double DistanceToVector(const Vector &origin) const;
     160
     161  /** Returns squared distance to a given vector.
     162   * \param origin vector to calculate distance to
     163   * \return distance squared
     164   */
    80165  double DistanceSquaredToVector(const Vector &origin) const;
     166  /** Checks whether atom is within the given box.
     167   * \param offset offset to box origin
     168   * \param *parallelepiped box matrix
     169   * \return true - is inside, false - is not
     170   */
    81171  bool IsInShape(const Shape&) const;
    82172
     
    101191   virtual void setId(atomId_t);
    102192
     193   /** Makes the atom be contained in the new molecule \a *_mol.
     194    * Uses atom::removeFromMolecule() to delist from old molecule.
     195    * \param *_mol pointer to new molecule
     196    */
    103197   void setMolecule(molecule*);
     198
     199   /** Returns pointer to the molecule which atom belongs to.
     200    * \return containing molecule
     201    */
    104202   molecule* getMolecule() const;
     203
     204   /** Erases the atom in atom::mol's list of atoms and sets it to zero.
     205    */
    105206   void removeFromMolecule();
    106207
     208   /** Getter for ParticleInfo::Nr of the atom.
     209    *
     210    * @return index
     211    */
    107212   int getNr() const;
    108213
Note: See TracChangeset for help on using the changeset viewer.