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@…>

Location:
tests/regression/Tesselation/3/post
Files:
2 edited

Legend:

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

    rad2b411 r274d45  
    22VARIABLES = "X" "Y" "Z" "U"
    33ZONE T="test", N=44, E=86, DATAPACKING=POINT, ZONETYPE=FETRIANGLE
     46.9077 1.1106 0.1214 1
    450.3612 -3.628 1.323 1
    560.4884 -3.5983 -0.4521 3
     
    4546-6.8554 1.8134 -0.9499 1
    46477.1391 2.0447 0.0264 0
    47 6.9077 1.1106 0.1214 1
    4848
    49 31 43 44
    50 31 34 44
    51 33 34 44
    52 22 31 34
    53 16 22 34
    54 7 16 34
    55 7 9 16
    56 2 7 9
    57 2 7 34
    58 2 3 34
    59 3 28 34
    60 28 33 34
    61 1 2 3
    62 1 3 28
    63 1 14 28
    64 14 27 28
    65 27 28 33
    66 1 6 14
    67 6 13 14
    68 13 14 27
    69 13 24 27
    70 24 27 36
    71 27 33 36
    72 33 36 44
    73 36 43 44
    74 24 25 36
    75 24 25 26
    76 25 26 32
    77 25 32 43
    78 25 36 43
    79 13 24 26
    80 13 26 29
    81 5 13 29
    82 5 23 29
    83 23 29 35
    84 29 35 38
    85 26 29 38
    86 26 29 38
    87 15 26 29
    88 15 17 29
    89 15 17 26
    90 17 26 32
    91 17 22 32
    92 5 6 23
    93 5 6 13
    94 6 10 23
    95 10 19 23
    96 19 23 40
    97 23 35 40
    98 35 40 41
    99 10 19 21
    100 4 10 21
    101 4 6 10
    102 1 4 6
    103 35 37 38
    104 35 37 41
    105 17 29 30
    106 29 30 38
    107 30 38 39
    108 8 17 30
    109 8 16 17
    110 16 17 22
    111 8 18 30
    112 8 12 18
    113 12 18 30
    114 12 20 30
    115 20 30 42
    116 30 39 42
    117 8 11 12
    118 8 9 11
    119 8 9 16
    120 11 12 20
    121 11 20 21
    122 4 11 21
    123 2 4 11
    124 1 2 4
    125 2 9 11
    126 19 20 21
    127 19 20 40
    128 20 40 42
    129 40 41 42
    130 22 31 32
    131 31 32 43
    132 39 41 42
    133 37 39 41
    134 37 38 39
     491 32 44
     501 32 35
     511 34 35
     5223 32 35
     5317 23 35
     548 17 35
     558 10 17
     563 8 10
     573 8 35
     583 4 35
     594 29 35
     6029 34 35
     612 3 4
     622 4 29
     632 15 29
     6415 28 29
     6528 29 34
     662 7 15
     677 14 15
     6814 15 28
     6914 25 28
     7025 28 37
     7128 34 37
     721 34 37
     731 37 44
     7425 26 37
     7525 26 27
     7626 27 33
     7726 33 44
     7826 37 44
     7914 25 27
     8014 27 30
     816 14 30
     826 24 30
     8324 30 36
     8430 36 39
     8527 30 39
     8627 30 39
     8716 27 30
     8816 18 30
     8916 18 27
     9018 27 33
     9118 23 33
     926 7 24
     936 7 14
     947 11 24
     9511 20 24
     9620 24 41
     9724 36 41
     9836 41 42
     9911 20 22
     1005 11 22
     1015 7 11
     1022 5 7
     10336 38 39
     10436 38 42
     10518 30 31
     10630 31 39
     10731 39 40
     1089 18 31
     1099 17 18
     11017 18 23
     1119 19 31
     1129 13 19
     11313 19 31
     11413 21 31
     11521 31 43
     11631 40 43
     1179 12 13
     1189 10 12
     1199 10 17
     12012 13 21
     12112 21 22
     1225 12 22
     1233 5 12
     1242 3 5
     1253 10 12
     12620 21 22
     12720 21 41
     12821 41 43
     12941 42 43
     13023 32 33
     13132 33 44
     13240 42 43
     13338 40 42
     13438 39 40
  • 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.