source: src/boundary.hpp@ 1b62f3

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
Last change on this file since 1b62f3 was edb650, checked in by Frederik Heber <heber@…>, 17 years ago

some mor changes to fine-tune the cluster generation.

Sadly, VolumeOfConvexEnvelope() is not robust/stable, with Ratio1.4-1/1800K/compundH.*.xyz no usable convex envelope was found but points were connected right through the cluster.

  • Property mode set to 100644
File size: 3.5 KB
Line 
1#ifndef BOUNDARY_HPP_
2#define BOUNDARY_HPP_
3
4class BoundaryPointSet;
5class BoundaryLineSet;
6class BoundaryTriangleSet;
7
8// include config.h
9#ifdef HAVE_CONFIG_H
10#include <config.h>
11#endif
12
13// STL headers
14#include <map>
15#include <set>
16#include <deque>
17
18#include <gsl/gsl_poly.h>
19
20#include "molecules.hpp"
21
22#define DistanceNrPair pair < double, atom* >
23#define DistanceMap multimap < double, atom* >
24#define DistanceTestPair pair < DistanceMap::iterator, bool>
25
26#define Boundaries map <double, DistanceNrPair >
27#define BoundariesPair pair<double, DistanceNrPair >
28#define BoundariesTestPair pair< Boundaries::iterator, bool>
29
30#define PointMap map < int, class BoundaryPointSet * >
31#define PointPair pair < int, class BoundaryPointSet * >
32#define PointTestPair pair < PointMap::iterator, bool >
33
34#define LineMap map < int, class BoundaryLineSet * >
35#define LinePair pair < int, class BoundaryLineSet * >
36#define LineTestPair pair < LinePair::iterator, bool >
37
38#define TriangleMap map < int, class BoundaryTriangleSet * >
39#define TrianglePair pair < int, class BoundaryTriangleSet * >
40#define TriangleTestPair pair < TrianglePair::iterator, bool >
41
42#define DistanceMultiMap multimap <double, pair < PointMap::iterator, PointMap::iterator> >
43#define DistanceMultiMapPair pair <double, pair < PointMap::iterator, PointMap::iterator> >
44
45template <typename T> void SetEndpointsOrdered(T endpoints[2], T endpoint1, T endpoint2)
46{
47 if (endpoint1->Nr < endpoint2->Nr) {
48 endpoints[0] = endpoint1;
49 endpoints[1] = endpoint2;
50 } else {
51 endpoints[0] = endpoint2;
52 endpoints[1] = endpoint1;
53 }
54};
55
56class BoundaryPointSet {
57 public:
58 BoundaryPointSet();
59 BoundaryPointSet(atom *Walker);
60 ~BoundaryPointSet();
61
62 void AddLine(class BoundaryLineSet *line);
63
64 LineMap lines;
65 int LinesCount;
66 atom *node;
67 int Nr;
68};
69
70class BoundaryLineSet {
71 public:
72 BoundaryLineSet();
73 BoundaryLineSet(class BoundaryPointSet *Point[2], int number);
74 ~BoundaryLineSet();
75
76 void AddTriangle(class BoundaryTriangleSet *triangle);
77
78 class BoundaryPointSet *endpoints[2];
79 TriangleMap triangles;
80 int TrianglesCount;
81 int Nr;
82};
83
84class BoundaryTriangleSet {
85 public:
86 BoundaryTriangleSet();
87 BoundaryTriangleSet(class BoundaryLineSet *line[3], int number);
88 ~BoundaryTriangleSet();
89
90 void GetNormalVector(vector &NormalVector);
91
92 class BoundaryPointSet *endpoints[3];
93 class BoundaryLineSet *lines[3];
94 int Nr;
95};
96
97class Tesselation {
98 public:
99
100 Tesselation();
101 ~Tesselation();
102
103 void TesselateOnBoundary(ofstream *out, config *configuration, molecule *mol);
104 void GuessStartingTriangle(ofstream *out);
105 void AddPoint(atom * Walker);
106
107 PointMap PointsOnBoundary;
108 LineMap LinesOnBoundary;
109 TriangleMap TrianglesOnBoundary;
110 class BoundaryPointSet *BPS[2];
111 class BoundaryLineSet *BLS[3];
112 class BoundaryTriangleSet *BTS;
113 int PointsOnBoundaryCount;
114 int LinesOnBoundaryCount;
115 int TrianglesOnBoundaryCount;
116};
117
118
119ostream & operator << (ostream &ost, BoundaryPointSet &a);
120ostream & operator << (ostream &ost, BoundaryLineSet &a);
121ostream & operator << (ostream &ost, BoundaryTriangleSet &a);
122
123
124double VolumeOfConvexEnvelope(ofstream *out, config *configuration, Boundaries *BoundaryPoints, molecule *mol);
125double * GetDiametersOfCluster(ofstream *out, Boundaries *BoundaryPtr, molecule *mol, bool IsAngstroem);
126void PrepareClustersinWater(ofstream *out, config *configuration, molecule *mol, double ClusterVolume, double celldensity);
127
128
129#endif /*BOUNDARY_HPP_*/
Note: See TracBrowser for help on using the repository browser.