Changeset caf5d6 for src/molecules.cpp


Ignore:
Timestamp:
Dec 11, 2008, 3:23:01 PM (16 years ago)
Author:
Christian Neuen <neuen@…>
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:
e4ea46
Parents:
f714979
Message:

Atom indices are now correctly processed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecules.cpp

    rf714979 rcaf5d6  
    15181518{
    15191519  atom *walker = NULL;
    1520   int No = 0;
     1520  int AtomNo = 0, ElementNo;
    15211521  time_t now;
     1522  element *runner = NULL;
    15221523
    15231524  now = time((time_t *)NULL);   // Get the system time and put it into 'now' as 'calender time'
     
    15251526  while (walker->next != end) { // go through every atom and count
    15261527    walker = walker->next;
    1527     No++;
     1528    AtomNo++;
    15281529  }
    15291530  if (out != NULL) {
    1530     *out << No << "\n\tCreated by molecuilder on " << ctime(&now);
    1531     walker = start;
    1532     while (walker->next != end) { // go through every atom of this element
    1533       walker = walker->next;
    1534       walker->OutputXYZLine(out);
     1531    *out << AtomNo << "\n\tCreated by molecuilder on " << ctime(&now);
     1532    ElementNo = 0;
     1533    runner = elemente->start;
     1534    while (runner->next != elemente->end) { // go through every element
     1535                runner = runner->next;
     1536      if (ElementsInMolecule[runner->Z]) { // if this element got atoms
     1537        ElementNo++;
     1538        walker = start;
     1539        while (walker->next != end) { // go through every atom of this element
     1540          walker = walker->next;
     1541          if (walker->type == runner) { // if this atom fits to element
     1542            walker->OutputXYZLine(out);
     1543          }
     1544        }
     1545      }
    15351546    }
    15361547    return true;
     
    17161727                        };
    17171728                        AddBond(Walker, OtherWalker); //Add the bond between the two atoms with respective indices.
    1718                         BondCount++; //Increase bond count of molecule
     1729                       
    17191730                }
    17201731
Note: See TracChangeset for help on using the changeset viewer.