Changeset 951aa6 for src


Ignore:
Timestamp:
Feb 11, 2016, 8:07:50 AM (9 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:
db842b
Parents:
29f7c1
git-author:
Frederik Heber <heber@…> (12/29/15 19:50:22)
git-committer:
Frederik Heber <heber@…> (02/11/16 08:07:50)
Message:

Removed molecule's resetFormula() and doCountBonds() and doCountNoNonHydrogen().

  • we don't do these as Cacheables anymore.
Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/molecule.cpp

    r29f7c1 r951aa6  
    957957}
    958958
    959 /** Brings molecule::AtomCount and atom::*Name up-to-date.
    960  * \param *out output stream for debugging
    961  */
    962 size_t molecule::doCountNoNonHydrogen() const
    963 {
    964   int temp = 0;
    965   // go through atoms and look for new ones
    966   for (molecule::const_iterator iter = begin(); iter != end(); ++iter)
    967     if ((*iter)->getType()->getAtomicNumber() != 1) // count non-hydrogen atoms whilst at it
    968       ++temp;
    969   return temp;
    970 };
    971 
    972 /** Counts the number of present bonds.
    973  * \return number of bonds
    974  */
    975 int molecule::doCountBonds() const
    976 {
    977   unsigned int counter = 0;
    978   for(molecule::const_iterator AtomRunner = begin(); AtomRunner != end(); ++AtomRunner) {
    979     const BondList& ListOfBonds = (*AtomRunner)->getListOfBonds();
    980     for(BondList::const_iterator BondRunner = ListOfBonds.begin();
    981         BondRunner != ListOfBonds.end();
    982         ++BondRunner)
    983       if ((*BondRunner)->leftatom == *AtomRunner)
    984         counter++;
    985   }
    986   return counter;
    987 }
    988 
    989 
    990959/** Returns an index map for two father-son-molecules.
    991960 * The map tells which atom in this molecule corresponds to which one in the other molecul with their fathers.
     
    12021171}
    12031172
    1204 void molecule::resetFormula()
    1205 {
    1206   // clear
    1207   formula.clear();
    1208 
    1209   for (molecule::const_iterator iter = const_cast<const molecule *>(this)->begin();
    1210       iter != const_cast<const molecule *>(this)->end(); ++iter)
    1211     formula+=(*iter)->getType();
    1212 }
    1213 
    12141173void molecule::select()
    12151174{
  • src/molecule.hpp

    r29f7c1 r951aa6  
    135135  const std::string getName() const;
    136136  int getAtomCount() const;
    137   size_t doCountNoNonHydrogen() const;
    138   int doCountBonds() const;
    139137  size_t getNoNonHydrogen() const{
    140138    return NoNonHydrogen;
     
    275273   */
    276274  void setAtomName(atom *_atom) const;
    277 
    278   /** Resets the formula for this molecule.
    279    *
    280    * This is required in case an atom changes its element as we then don't
    281    * have any knowledge about its previous element anymore.
    282    */
    283   void resetFormula();
    284275
    285276  //!> grant World (only) access to selection state changers
Note: See TracChangeset for help on using the changeset viewer.