Changeset ab1932 for src/molecules.cpp


Ignore:
Timestamp:
Aug 3, 2009, 8:21:05 PM (16 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, 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:
03e57a
Parents:
0dbddc (diff), edb93c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'TesselationRefactoring' into ConcaveHull

Conflicts:

molecuilder/src/boundary.cpp
molecuilder/src/boundary.hpp
molecuilder/src/linkedcell.cpp
molecuilder/src/linkedcell.hpp
molecuilder/src/molecules.hpp

All of Saskia Metzler's new function were transfered from boundary.cpp to tesselation.cpp and the changes due to TesselPoint, LinkedCell and so on incorporated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecules.cpp

    r0dbddc rab1932  
    55 */
    66
     7#include "config.hpp"
    78#include "molecules.hpp"
    89
     
    4243  end->father = NULL;
    4344  link(start,end);
     45  InternalPointer = start;
    4446  // init bond chain list
    4547  first = new bond(start, end, 1, -1);
     
    8284  delete(end);
    8385  delete(start);
     86};
     87
     88
     89/** Determine center of all atoms.
     90 * \param *out output stream for debugging
     91 * \return pointer to allocated with central coordinates
     92 */
     93Vector *molecule::GetCenter(ofstream *out)
     94{
     95  Vector *center = DetermineCenterOfAll(out);
     96  return center;
     97};
     98
     99/** Return current atom in the list.
     100 * \return pointer to atom or NULL if none present
     101 */
     102TesselPoint *molecule::GetPoint()
     103{
     104  if ((InternalPointer != start) && (InternalPointer != end))
     105    return InternalPointer;
     106  else
     107    return NULL;
     108};
     109
     110/** Return pointer to one after last atom in the list.
     111 * \return pointer to end marker
     112 */
     113TesselPoint *molecule::GetTerminalPoint()
     114{
     115  return end;
     116};
     117
     118/** Go to next atom.
     119 * Stops at last one.
     120 */
     121void molecule::GoToNext()
     122{
     123  if (InternalPointer->next != end)
     124    InternalPointer = InternalPointer->next;
     125};
     126
     127/** Go to previous atom.
     128 * Stops at first one.
     129 */
     130void molecule::GoToPrevious()
     131{
     132  if (InternalPointer->previous != start)
     133    InternalPointer = InternalPointer->previous;
     134};
     135
     136/** Goes to first atom.
     137 */
     138void molecule::GoToFirst()
     139{
     140  InternalPointer = start->next;
     141};
     142
     143/** Goes to last atom.
     144 */
     145void molecule::GoToLast()
     146{
     147  InternalPointer = end->previous;
     148};
     149
     150/** Checks whether we have any atoms in molecule.
     151 * \return true - no atoms, false - not empty
     152 */
     153bool molecule::IsEmpty()
     154{
     155  return (start->next == end);
     156};
     157
     158/** Checks whether we are at the last atom
     159 * \return true - current atom is last one, false - is not last one
     160 */
     161bool molecule::IsLast()
     162{
     163  return (InternalPointer->next == end);
    84164};
    85165
Note: See TracChangeset for help on using the changeset viewer.