Changeset 725869 for molecuilder/src/molecules.hpp
- Timestamp:
- May 21, 2008, 9:24:54 AM (17 years ago)
- Children:
- 33c05d
- Parents:
- e9c14d
- File:
-
- 1 edited
-
molecuilder/src/molecules.hpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/molecules.hpp
re9c14d r725869 22 22 #include "helpers.hpp" 23 23 #include "stackclass.hpp" 24 #include "vector.hpp" 24 25 25 26 class atom; … … 119 120 #define RDET2(a0,a1,a2,a3) ((a0)*(a3)-(a1)*(a2)) //!< hard-coded determinant of a 2x2 matrix 120 121 121 /** Single vector.122 * basically, just a x[3] but with helpful functions123 */124 class vector {125 public:126 double x[NDIM];127 128 vector();129 ~vector();130 131 double Distance(const vector *y) const;132 double PeriodicDistance(const vector *y, const double *cell_size) const;133 double ScalarProduct(const vector *y) const;134 double Projection(const vector *y) const;135 double Norm() const ;136 double Angle(vector *y) const;137 138 void AddVector(const vector *y);139 void SubtractVector(const vector *y);140 void CopyVector(const vector *y);141 void RotateVector(const vector *y, const double alpha);142 void Zero();143 void Normalize();144 void Translate(const vector *x);145 void Mirror(const vector *x);146 void Scale(double **factor);147 void Scale(double *factor);148 void Scale(double factor);149 void MatrixMultiplication(double *M);150 void InverseMatrixMultiplication(double *M);151 void KeepPeriodic(ofstream *out, double *matrix);152 void LinearCombinationOfVectors(const vector *x1, const vector *x2, const vector *x3, double *factors);153 154 bool GetOneNormalVector(const vector *x1);155 bool MakeNormalVector(const vector *y1);156 bool MakeNormalVector(const vector *y1, const vector *y2);157 bool MakeNormalVector(const vector *x1, const vector *x2, const vector *x3);158 bool SolveSystem(vector *x1, vector *x2, vector *y, double alpha, double beta, double c);159 bool LSQdistance(vector **vectors, int dim);160 161 void AskPosition(double *cell_size, bool check);162 bool Output(ofstream *out) const;163 };164 165 ofstream& operator<<(ofstream& ost, vector& m);166 122 167 123 /** Parameter structure for least square minimsation. … … 300 256 /// Find atoms. 301 257 atom * FindAtom(int Nr) const; 302 atom * AskAtom( char *text);258 atom * AskAtom(string text); 303 259 304 260 /// Count and change present atoms' coordination. … … 306 262 void CountElements(); 307 263 void CalculateOrbitals(class config &configuration); 264 bool CenterInBox(ofstream *out, vector *BoxLengths); 308 265 void CenterEdge(ofstream *out, vector *max); 309 266 void CenterOrigin(ofstream *out, vector *max); … … 335 292 void ResetAllAtomNumbers(); 336 293 int CountCyclicBonds(ofstream *out); 337 char *GetColor(enum Shading color);294 string GetColor(enum Shading color); 338 295 339 296 molecule *CopyMolecule(); … … 500 457 void Load(char *filename, periodentafel *periode, molecule *mol); 501 458 void LoadOld(char *filename, periodentafel *periode, molecule *mol); 502 void RetrieveConfigPathAndName(char * filename);459 void RetrieveConfigPathAndName(char * filename); 503 460 bool Save(ofstream *file, periodentafel *periode, molecule *mol) const; 504 461 void Edit(molecule *mol); 505 462 bool GetIsAngstroem() const; 506 463 char *GetDefaultPath() const; 507 void config::SetDefaultPath(const char *path);464 void SetDefaultPath(const char *path); 508 465 }; 509 466
Note:
See TracChangeset
for help on using the changeset viewer.
