source: src/vector.hpp@ 68cb0f

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 68cb0f was 110ceb, checked in by Frederik Heber <heber@…>, 17 years ago

VolumeOfConvexEnvelope: Works!

VolumeOfConvexEnvelope has been analysed into various smaller functions and approach is working.
two new files: boundary.?pp
various new functions:
class Tesselation with AddPoint(), TesselateOnBoundary() and GuessStartingTriangle() does the actual tesselation
CreateClustersinWater() will create the repetition of the cluster with correct spacing (unfinished).
GetDiametersOfCluster() calculate the greatest diameter in projection per axis
GetBoundaryPoints() gets the boundary on the convex envelope by projection for a molecular cluster
GetCommonEndpoint() finds the endpoint two lines are sharing

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[342f33f]1#ifndef VECTOR_HPP_
2#define VECTOR_HPP_
3
4/** Single vector.
5 * basically, just a x[3] but with helpful functions
6 */
7class vector {
8 public:
9 double x[NDIM];
10
11 vector();
[498a9f]12 vector(double x1, double x2, double x3);
[342f33f]13 ~vector();
14
15 double Distance(const vector *y) const;
16 double PeriodicDistance(const vector *y, const double *cell_size) const;
17 double ScalarProduct(const vector *y) const;
18 double Projection(const vector *y) const;
19 double Norm() const ;
20 double Angle(vector *y) const;
21
22 void AddVector(const vector *y);
23 void SubtractVector(const vector *y);
24 void CopyVector(const vector *y);
25 void RotateVector(const vector *y, const double alpha);
[498a9f]26 void ProjectOntoPlane(const vector *y);
[3dfad8]27 void Zero();
[498a9f]28 void One(double one);
29 void Init(double x1, double x2, double x3);
[342f33f]30 void Normalize();
31 void Translate(const vector *x);
32 void Mirror(const vector *x);
33 void Scale(double **factor);
34 void Scale(double *factor);
35 void Scale(double factor);
36 void MatrixMultiplication(double *M);
37 void InverseMatrixMultiplication(double *M);
38 void KeepPeriodic(ofstream *out, double *matrix);
39 void LinearCombinationOfVectors(const vector *x1, const vector *x2, const vector *x3, double *factors);
40
[110ceb]41 double CutsPlaneAt(vector *A, vector *B, vector *C);
[342f33f]42 bool GetOneNormalVector(const vector *x1);
43 bool MakeNormalVector(const vector *y1);
44 bool MakeNormalVector(const vector *y1, const vector *y2);
45 bool MakeNormalVector(const vector *x1, const vector *x2, const vector *x3);
46 bool SolveSystem(vector *x1, vector *x2, vector *y, double alpha, double beta, double c);
47 bool LSQdistance(vector **vectors, int dim);
48
49 void AskPosition(double *cell_size, bool check);
50 bool Output(ofstream *out) const;
51};
52
53ofstream& operator<<(ofstream& ost, vector& m);
54vector& operator+=(vector& a, const vector& b);
55vector& operator*=(vector& a, const double m);
56vector& operator*(const vector& a, const double m);
57vector& operator+(const vector& a, const vector& b);
58
59#endif /*VECTOR_HPP_*/
Note: See TracBrowser for help on using the repository browser.