source: src/boundary.hpp@ 51695c

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 51695c was 450d63, checked in by Frederik Heber <heber@…>, 16 years ago

VolumeOfConvexEnvelope() has new parameter with tecplot ofstream and the file is stored there and not in Tesselation::Tesselation().

+ BUGFIX: As we shift the molecule to the center of gravity for the "projection onto axis planes" method to work, we forgot about shifting it back before storing nodes and triangles in the tecplot file. Now, we store the data to file in VolumeOfConvexEnvelope(), where the molecule has been shifted back already.
+ VolumeOfConvexEnvelope() now gets an additional parameter with the tecplot ofstream, so that the name of the tecplot file may be chosen on the command line (with checks whether the argument was given or not)

  • Property mode set to 100644
File size: 2.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
22template <typename T> void SetEndpointsOrdered(T endpoints[2], T endpoint1, T endpoint2)
23{
24 if (endpoint1->Nr < endpoint2->Nr) {
25 endpoints[0] = endpoint1;
26 endpoints[1] = endpoint2;
27 } else {
28 endpoints[0] = endpoint2;
29 endpoints[1] = endpoint1;
30 }
31};
32
33class BoundaryPointSet {
34 public:
35 BoundaryPointSet();
36 BoundaryPointSet(atom *Walker);
37 ~BoundaryPointSet();
38
39 void AddLine(class BoundaryLineSet *line);
40
41 LineMap lines;
42 int LinesCount;
43 atom *node;
44 int Nr;
45};
46
47class BoundaryLineSet {
48 public:
49 BoundaryLineSet();
50 BoundaryLineSet(class BoundaryPointSet *Point[2], int number);
51 ~BoundaryLineSet();
52
53 void AddTriangle(class BoundaryTriangleSet *triangle);
54
55 class BoundaryPointSet *endpoints[2];
56 TriangleMap triangles;
57 int TrianglesCount;
58 int Nr;
59};
60
61class BoundaryTriangleSet {
62 public:
63 BoundaryTriangleSet();
64 BoundaryTriangleSet(class BoundaryLineSet *line[3], int number);
65 ~BoundaryTriangleSet();
66
67 void GetNormalVector(Vector &NormalVector);
68
69 class BoundaryPointSet *endpoints[3];
70 class BoundaryLineSet *lines[3];
71 int Nr;
72};
73
74class Tesselation {
75 public:
76
77 Tesselation();
78 ~Tesselation();
79
80 void TesselateOnBoundary(ofstream *out, config *configuration, molecule *mol);
81 void GuessStartingTriangle(ofstream *out);
82 void AddPoint(atom * Walker);
83
84 PointMap PointsOnBoundary;
85 LineMap LinesOnBoundary;
86 TriangleMap TrianglesOnBoundary;
87 class BoundaryPointSet *BPS[2];
88 class BoundaryLineSet *BLS[3];
89 class BoundaryTriangleSet *BTS;
90 int PointsOnBoundaryCount;
91 int LinesOnBoundaryCount;
92 int TrianglesOnBoundaryCount;
93};
94
95
96ostream & operator << (ostream &ost, BoundaryPointSet &a);
97ostream & operator << (ostream &ost, BoundaryLineSet &a);
98ostream & operator << (ostream &ost, BoundaryTriangleSet &a);
99
100
101double VolumeOfConvexEnvelope(ofstream *out, ofstream *tecplot, config *configuration, Boundaries *BoundaryPoints, molecule *mol);
102double * GetDiametersOfCluster(ofstream *out, Boundaries *BoundaryPtr, molecule *mol, bool IsAngstroem);
103void PrepareClustersinWater(ofstream *out, config *configuration, molecule *mol, double ClusterVolume, double celldensity);
104
105
106#endif /*BOUNDARY_HPP_*/
Note: See TracBrowser for help on using the repository browser.