Changeset cff66c


Ignore:
Timestamp:
Mar 1, 2011, 1:17: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:
607eab
Parents:
111f4a
git-author:
Frederik Heber <heber@…> (02/28/11 15:16:58)
git-committer:
Frederik Heber <heber@…> (03/01/11 13:17:08)
Message:

Removed bool is Angstroem from all BondGraph::...() member functions.

Location:
src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/FragmentationAction/CreateAdjacencyAction.cpp

    r111f4a rcff66c  
    5656  DoLog(1) && (Log() << Verbose(1) << "Constructing bond graph for selected atoms ... " << endl);
    5757
    58   config *configuration = World::getInstance().getConfig();
    5958  BondGraph *BG = World::getInstance().getBondGraph();
    6059  ASSERT(BG != NULL, "FragmentationCreateAdjacencyAction: BondGraph is NULL.");
    6160  double BondDistance = BG->getMaxPossibleBondDistance(AtomSetMixin<std::vector<atom *> >(World::getInstance().getSelectedAtoms()));
    62   bool IsAngstroem = configuration->GetIsAngstroem();
    6361
    6462  atom *Walker = NULL;
     
    136134                          //Log() << Verbose(1) << "Checking distance " << OtherWalker->x.PeriodicDistanceSquared(&(Walker->x), cell_size) << " against typical bond length of " << bonddistance*bonddistance << "." << endl;
    137135                          range<double> MinMaxDistanceSquared(0.,0.);
    138                           BG->getMinMaxDistanceSquared(Walker, OtherWalker, MinMaxDistanceSquared, IsAngstroem);
     136                          BG->getMinMaxDistanceSquared(Walker, OtherWalker, MinMaxDistanceSquared);
    139137                          const double distance = domain.periodicDistanceSquared(OtherWalker->getPosition(),Walker->getPosition());
    140138                          const bool status = MinMaxDistanceSquared.isInRange(distance);
  • src/bondgraph.cpp

    r111f4a rcff66c  
    100100    const element * const Walker,
    101101    const element * const OtherWalker,
    102     range<double> &MinMaxDistance,
    103     bool IsAngstroem) const
     102    range<double> &MinMaxDistance) const
    104103{
    105104  MinMaxDistance.first = OtherWalker->getCovalentRadius() + Walker->getCovalentRadius();
     
    112111    const element * const Walker,
    113112    const element * const OtherWalker,
    114     range<double> &MinMaxDistance,
    115     bool IsAngstroem) const
     113    range<double> &MinMaxDistance) const
    116114{
    117115  ASSERT(BondLengthMatrix, "BondGraph::BondLengthMatrixMinMaxDistance() called without NULL BondLengthMatrix.");
     
    127125    const element * const Walker,
    128126    const element * const OtherWalker,
    129     range<double> &MinMaxDistance,
    130     bool IsAngstroem) const
     127    range<double> &MinMaxDistance) const
    131128{
    132129  if (BondLengthMatrix == NULL) {// safety measure if no matrix has been parsed yet
    133130    LOG(2, "INFO: Using Covalent radii criterion for [min,max) distances.");
    134     CovalentMinMaxDistance(Walker, OtherWalker, MinMaxDistance, IsAngstroem);
     131    CovalentMinMaxDistance(Walker, OtherWalker, MinMaxDistance);
    135132  } else {
    136133    LOG(2, "INFO: Using Covalent radii criterion for [min,max) distances.");
    137     BondLengthMatrixMinMaxDistance(Walker, OtherWalker, MinMaxDistance, IsAngstroem);
     134    BondLengthMatrixMinMaxDistance(Walker, OtherWalker, MinMaxDistance);
    138135  }
    139136}
     
    142139    const BondedParticle * const Walker,
    143140    const BondedParticle * const OtherWalker,
    144     range<double> &MinMaxDistance,
    145     bool IsAngstroem) const
    146 {
    147   getMinMaxDistance(Walker->getType(), OtherWalker->getType(),MinMaxDistance, IsAngstroem);
     141    range<double> &MinMaxDistance) const
     142{
     143  getMinMaxDistance(Walker->getType(), OtherWalker->getType(),MinMaxDistance);
    148144}
    149145
     
    151147    const BondedParticle * const Walker,
    152148    const BondedParticle * const OtherWalker,
    153     range<double> &MinMaxDistance,
    154     bool IsAngstroem) const
     149    range<double> &MinMaxDistance) const
    155150{
    156151  // use non-squared version
    157   getMinMaxDistance(Walker, OtherWalker,MinMaxDistance, IsAngstroem);
     152  getMinMaxDistance(Walker, OtherWalker,MinMaxDistance);
    158153  // and square
    159154  MinMaxDistance.first *= MinMaxDistance.first;
     
    195190                            "BondGraph::CreateAdjacency() - TesselPoint that was not an atom retrieved from LinkedNode");
    196191                        range<double> MinMaxDistanceSquared(0.,0.);
    197                         getMinMaxDistanceSquared(Walker, OtherWalker, MinMaxDistanceSquared, IsAngstroem);
     192                        getMinMaxDistanceSquared(Walker, OtherWalker, MinMaxDistanceSquared);
    198193                        const double distance = domain.periodicDistanceSquared(OtherWalker->getPosition(),Walker->getPosition());
    199194                        LOG(2, "INFO: Checking squared distance " << distance << " against typical bond length of " << MinMaxDistanceSquared << ".");
  • src/bondgraph.hpp

    r111f4a rcff66c  
    9393          ++otheriter) {
    9494        range<double> MinMaxDistance(0.,0.);
    95         getMinMaxDistance((*iter),(*otheriter), MinMaxDistance, IsAngstroem);
     95        getMinMaxDistance((*iter),(*otheriter), MinMaxDistance);
    9696        if (MinMaxDistance.last > max_distance)
    9797          max_distance = MinMaxDistance.last;
     
    106106   * \param *OtherWalker second BondedParticle
    107107   * \param &MinMaxDistance Range for interval on return
    108    * \param IsAngstroem whether units are in angstroem or bohr radii
    109108   */
    110109  void getMinMaxDistance(
    111110      const BondedParticle * const Walker,
    112111      const BondedParticle * const OtherWalker,
    113       range<double> &MinMaxDistance,
    114       bool IsAngstroem) const;
     112      range<double> &MinMaxDistance) const;
    115113
    116114  /** Returns SQUARED bond criterion for given pair based on a bond length matrix.
     
    120118   * \param *OtherWalker second BondedParticle
    121119   * \param &MinMaxDistance Range for interval on return
    122    * \param IsAngstroem whether units are in angstroem or bohr radii
    123120   */
    124121  void getMinMaxDistanceSquared(
    125122      const BondedParticle * const Walker,
    126123      const BondedParticle * const OtherWalker,
    127       range<double> &MinMaxDistance,
    128       bool IsAngstroem) const;
     124      range<double> &MinMaxDistance) const;
    129125
    130126  /** Creates the adjacency list for a given \a Range of iterable atoms.
     
    324320   * \param *OtherWalker second BondedParticle
    325321   * \param &MinMaxDistance Range for interval on return
    326    * \param IsAngstroem whether units are in angstroem or bohr radii
    327322   */
    328323  void getMinMaxDistance(
    329324      const element * const Walker,
    330325      const element * const OtherWalker,
    331       range<double> &MinMaxDistance,
    332       bool IsAngstroem) const;
     326      range<double> &MinMaxDistance) const;
    333327
    334328  /** Returns bond criterion for given pair of elements based on a bond length matrix.
     
    338332   * \param *OtherWalker second element
    339333   * @param MinMaxDistance reference to range type set on return
    340    * \param IsAngstroem whether units are in angstroem or bohr radii
    341334   */
    342335  void BondLengthMatrixMinMaxDistance(
    343336      const element * const Walker,
    344337      const element * const OtherWalker,
    345       range<double> &DistanceInterval,
    346       bool IsAngstroem) const;
     338      range<double> &MinMaxDistance) const;
    347339
    348340  /** Returns bond criterion for given pair of elements based on covalent radius.
     
    350342   * \param *OtherWalker second element
    351343   * @param MinMaxDistance reference to range type set on return
    352    * \param IsAngstroem whether units are in angstroem or bohr radii
    353344   */
    354345  void CovalentMinMaxDistance(
    355346      const element * const Walker,
    356347      const element * const OtherWalker,
    357       range<double> &DistanceInterval,
    358       bool IsAngstroem) const;
     348      range<double> &MinMaxDistance) const;
    359349
    360350
  • src/molecule.cpp

    r111f4a rcff66c  
    346346  range<double> MinMaxBondDistance(0.,0.);
    347347  const BondGraph * const BG = World::getInstance().getBondGraph();
    348   BG->getMinMaxDistance(TopOrigin,TopReplacement,MinMaxBondDistance,IsAngstroem);
     348  BG->getMinMaxDistance(TopOrigin,TopReplacement,MinMaxBondDistance);
    349349  if (!MinMaxBondDistance.isInRange(bondlength)) {
    350350//    Log() << Verbose(4) << "InBondvector is: ";
  • src/molecule_fragmentation.cpp

    r111f4a rcff66c  
    18121812          //Log() << Verbose(3) << "Checking " << i << "th distance of " << *Binder->leftatom << " to " << *Binder->rightatom << ": " << tmp << "." << endl;
    18131813          range<double> MinMaxDistance(0.,0.);
    1814           BG->getMinMaxDistance(Binder->leftatom, Binder->rightatom, MinMaxDistance, true);
     1814          BG->getMinMaxDistance(Binder->leftatom, Binder->rightatom, MinMaxDistance);
    18151815          if (!MinMaxDistance.isInRange(tmp)) {
    18161816            DoLog(2) && (Log() << Verbose(2) << "Correcting at bond " << *Binder << "." << endl);
     
    18271827        tmp = Binder->leftatom->at(i) - Binder->rightatom->at(i);
    18281828        range<double> MinMaxDistance(0.,0.);
    1829         BG->getMinMaxDistance(Binder->leftatom, Binder->rightatom, MinMaxDistance, true);
     1829        BG->getMinMaxDistance(Binder->leftatom, Binder->rightatom, MinMaxDistance);
    18301830        if (fabs(tmp) > MinMaxDistance.last)  // check against Min is not useful for components
    18311831          Translationvector[i] = (tmp < 0) ? +1. : -1.;
  • src/molecule_geometry.cpp

    r111f4a rcff66c  
    394394              tmp = (*iter)->at(j) - (*Runner)->GetOtherAtom(*iter)->at(j);
    395395              range<double> MinMaxBondDistance(0.,0.);
    396               BG->getMinMaxDistance((*iter), (*Runner)->GetOtherAtom(*iter), MinMaxBondDistance, true);
     396              BG->getMinMaxDistance((*iter), (*Runner)->GetOtherAtom(*iter), MinMaxBondDistance);
    397397              if (fabs(tmp) > MinMaxBondDistance.last) {  // check against Min is not useful for components
    398398                flag = false;
Note: See TracChangeset for help on using the changeset viewer.