Ignore:
Timestamp:
Jun 19, 2010, 3:54:47 PM (15 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:
bf0edf
Parents:
ad2b411
git-author:
Frederik Heber <heber@…> (06/19/10 12:35:01)
git-committer:
Frederik Heber <heber@…> (06/19/10 15:54:47)
Message:

FIX: Atoms were stored not in the sequence they were loaded.

  1. The main problem is molecule::atomSet which is a set<atom *>, i.e. atoms are sorted by their appearance in memory. As memory need not be allocated sequentially, this gives rise to extreme arbitririty which is not desired. Instead the atoms should be stored in the sequence they were loaded/created. The solution is as follows:
  • config::SaveAll()
  • molecule::atomSet is now a list<atom *>
  • molecule::atomIds is a new set<atomId_t> (atomIdSet) which controls that (global) ids remain unique in the no more Atomset's set (but list)
  • molecule::erase() erases also in atomIds
  • molecule::insert() checks whether id is present by atomIds
  • molecule::find() as std::list does not have a find, we just go through the list until the object is found (or not), this may be speeded up by another internal list.
  • molecule::InternalPointer made lots of confusion as virtual function GoToFirst() is const, hence begin() (needed therein) returns const_iterator, which then cannot be simply re-cast into an iterator: We make it a pointer, reinterpret_cast the pointer and reference it back. Although InternalPointer is mutable, the compiler cannot use the non-const function begin() (it cannot be made const, as overloading is not allowed). (this is noted in the code also extensively.)
  • molecule::containsAtom() does not use count but the new find, as it returns only boolean anyway.
  • rewrote MoleculeListClass::SimpleMerge() to get rid of the extra iterator, as we remove all atoms in the end anyway.
  • FIX: MoleculeListClass::SimpleMultiMerge() - the created mol was not inserted into the moleculelist in the end, although it is the only one to remain.
  1. All other databases had missing headers with respect to those stored in elements_db.cpp. Hence, valence of hydrogen was not parsed and this caused several failures in CalculateOrbitals() (Psi numbers and MaxMinSetp in pcp conf file).
  1. Subsequenytly, various test cases (12, 21, 30, 31, 36-38, 39) were broken. This had two reasons:
  • Seemingly, CalculateOrbitals() was broken before hence MaxMinStep (pcp config) and MaxPsiDouble/PsiMaxNn[Up|Down] were always 0. (10-21,30-31,39)
  • As the order is now correct, fixes from commits c9217161ec2a5d5db508557fe98a32068461f45b and 22a6da8380911571debebd69444d2615450bbbd8 were obselete and have been reverted (order of the Ion?_Type...): Molecules/6 (30), Molecules/7 (31), Filling/1 (39)
  • Due to different ordering, Tesselation/3 (38) had completely different .dat file (though same tesselation)
  • r3d had small differences, mostly order or epsilon (0 not being 0 but ..-e16), hence diffing was deactivated, as r3d is deprecated anyway (since vmd can render triangles as well and better).

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/regression/Tesselation/3/post/NonConvexEnvelope.r3d

    rad2b411 r274d45  
    33# All atoms as spheres
    442
     5  0.939662 -3.01666 0.414493    0.1     1. 1. 1.
     62
     7  -0.152738 -1.94716 0.354093   0.1     1. 1. 1.
     82
     9  0.0659622 -1.03376 -0.880907  0.1     1. 1. 1.
     102
     11  -1.50434 -2.59696 0.0723932   0.1     1. 1. 1.
     122
     13  -0.0717378 -1.05346 1.57779   0.1     1. 1. 1.
     142
     15  1.52186 -0.603155 -0.873807   0.1     1. 1. 1.
     162
     17  -0.346038 -1.95996 -2.03011   0.1     1. 1. 1.
     182
     19  -2.63434 -1.74086 0.647893    0.1     1. 1. 1.
     202
     21  -1.61364 -2.66266 -1.47131    0.1     1. 1. 1.
     222
     23  1.36626 -0.519255 1.65039     0.1     1. 1. 1.
     242
     25  1.74646 0.246745 0.389693     0.1     1. 1. 1.
     262
     27  1.78606 0.287745 -2.09451     0.1     1. 1. 1.
     282
     29  -2.65324 -0.381955 -0.0548068         0.1     1. 1. 1.
     302
     31  -3.97304 -2.44796 0.426993    0.1     1. 1. 1.
     322
     33  3.21726 0.635145 0.478793     0.1     1. 1. 1.
     342
     35  3.13516 0.931145 -1.97401     0.1     1. 1. 1.
     362
     37  -3.80794 0.459345 0.492693    0.1     1. 1. 1.
     382
     39  3.34736 1.81094 1.44919       0.1     1. 1. 1.
     402
     41  3.76986 1.05884 -0.855107     0.1     1. 1. 1.
     422
     43  4.05806 -0.522555 1.01199     0.1     1. 1. 1.
     442
     45  -3.82684 1.81824 -0.210007    0.1     1. 1. 1.
     462
     47  5.16496 1.66244 -0.848507     0.1     1. 1. 1.
     482
     49  5.48576 -0.422855 0.476393    0.1     1. 1. 1.
     502
     51  -4.98154 2.65954 0.337493     0.1     1. 1. 1.
     522
     53  5.91796 1.03174 0.331693      0.1     1. 1. 1.
     542
     55  -5.00044 4.01854 -0.365207    0.1     1. 1. 1.
     562
     57  -6.30524 1.93554 0.0833932    0.1     1. 1. 1.
     582
     59  7.32406 1.08574 0.0829932     0.1     1. 1. 1.
     602
    561  0.777562 -3.65286 1.28459     0.1     1. 1. 1.
    6622
     
    941502
    95151  7.55546 2.01984 -0.0120068    0.1     1. 1. 1.
    96 2
    97   0.939662 -3.01666 0.414493    0.1     1. 1. 1.
    98 2
    99   -0.152738 -1.94716 0.354093   0.1     1. 1. 1.
    100 2
    101   0.0659622 -1.03376 -0.880907  0.1     1. 1. 1.
    102 2
    103   -1.50434 -2.59696 0.0723932   0.1     1. 1. 1.
    104 2
    105   -0.0717378 -1.05346 1.57779   0.1     1. 1. 1.
    106 2
    107   1.52186 -0.603155 -0.873807   0.1     1. 1. 1.
    108 2
    109   -0.346038 -1.95996 -2.03011   0.1     1. 1. 1.
    110 2
    111   -2.63434 -1.74086 0.647893    0.1     1. 1. 1.
    112 2
    113   -1.61364 -2.66266 -1.47131    0.1     1. 1. 1.
    114 2
    115   1.36626 -0.519255 1.65039     0.1     1. 1. 1.
    116 2
    117   1.74646 0.246745 0.389693     0.1     1. 1. 1.
    118 2
    119   1.78606 0.287745 -2.09451     0.1     1. 1. 1.
    120 2
    121   -2.65324 -0.381955 -0.0548068         0.1     1. 1. 1.
    122 2
    123   -3.97304 -2.44796 0.426993    0.1     1. 1. 1.
    124 2
    125   3.21726 0.635145 0.478793     0.1     1. 1. 1.
    126 2
    127   3.13516 0.931145 -1.97401     0.1     1. 1. 1.
    128 2
    129   -3.80794 0.459345 0.492693    0.1     1. 1. 1.
    130 2
    131   3.34736 1.81094 1.44919       0.1     1. 1. 1.
    132 2
    133   3.76986 1.05884 -0.855107     0.1     1. 1. 1.
    134 2
    135   4.05806 -0.522555 1.01199     0.1     1. 1. 1.
    136 2
    137   -3.82684 1.81824 -0.210007    0.1     1. 1. 1.
    138 2
    139   5.16496 1.66244 -0.848507     0.1     1. 1. 1.
    140 2
    141   5.48576 -0.422855 0.476393    0.1     1. 1. 1.
    142 2
    143   -4.98154 2.65954 0.337493     0.1     1. 1. 1.
    144 2
    145   5.91796 1.03174 0.331693      0.1     1. 1. 1.
    146 2
    147   -5.00044 4.01854 -0.365207    0.1     1. 1. 1.
    148 2
    149   -6.30524 1.93554 0.0833932    0.1     1. 1. 1.
    150 2
    151   7.32406 1.08574 0.0829932     0.1     1. 1. 1.
    152152# All tesselation triangles
    1531538
     
    156156  BACKFACE  0.3 0.3 1.0   0 0
    1571571
    158   5.67566 1.42984 -1.78291      7.55546 2.01984 -0.0120068      7.32406 1.08574 0.0829932       1. 0. 0.
    159 1
    160   5.67566 1.42984 -1.78291      5.53756 -0.911555 -0.496607     7.32406 1.08574 0.0829932       1. 0. 0.
    161 1
    162   6.16236 -0.927955 1.16559     5.53756 -0.911555 -0.496607     7.32406 1.08574 0.0829932       1. 0. 0.
     158  7.32406 1.08574 0.0829932     5.67566 1.42984 -1.78291        7.55546 2.01984 -0.0120068      1. 0. 0.
     1591
     160  7.32406 1.08574 0.0829932     5.67566 1.42984 -1.78291        5.53756 -0.911555 -0.496607     1. 0. 0.
     1611
     162  7.32406 1.08574 0.0829932     6.16236 -0.927955 1.16559       5.53756 -0.911555 -0.496607     1. 0. 0.
    1631631
    164164  3.60736 1.29684 -2.87381      5.67566 1.42984 -1.78291        5.53756 -0.911555 -0.496607     1. 0. 0.
     
    202202  4.07696 -0.484155 2.10119     6.16236 -0.927955 1.16559       5.68906 1.58194 1.24439         1. 0. 0.
    2032031
    204   6.16236 -0.927955 1.16559     5.68906 1.58194 1.24439         7.32406 1.08574 0.0829932       1. 0. 0.
    205 1
    206   5.68906 1.58194 1.24439       7.55546 2.01984 -0.0120068      7.32406 1.08574 0.0829932       1. 0. 0.
     204  7.32406 1.08574 0.0829932     6.16236 -0.927955 1.16559       5.68906 1.58194 1.24439         1. 0. 0.
     2051
     206  7.32406 1.08574 0.0829932     5.68906 1.58194 1.24439         7.55546 2.01984 -0.0120068      1. 0. 0.
    2072071
    208208  3.22946 1.45274 2.47189       4.33006 2.26874 1.33549         5.68906 1.58194 1.24439         1. 0. 0.
Note: See TracChangeset for help on using the changeset viewer.