ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/FAS/src/frame.h
Revision: 88
Committed: Mon Aug 19 20:49:08 2002 UTC (22 years, 1 month ago) by tim
Content type: text/plain
File size: 3162 byte(s)
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 tim 81 /**********************************************************************
2     * Copyright (C) 2002-2003 by Gezelter's Group
3     *This program is free software; you can redistribute it and/or modify
4     *it under the terms of the GNU General Public License as published by
5     *the Free Software Foundation version 2 of the License.
6     *
7     *This program is distributed in the hope that it will be useful,
8     *but WITHOUT ANY WARRANTY; without even the implied warranty of
9     *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10     *GNU General Public License for more details.
11     *
12     ************************************************************************
13     *Author: Teng Lin Email: tlin@nd.edu
14     *Date: 08/13/2002 Version: 1.0
15     *
16     ************************************************************************
17     *Description:
18     *
19     ***********************************************************************/
20 tim 66 #include <iostream>
21     #include <vector>
22 tim 81 #include <map>
23 tim 83 #include <functional>
24     #include <algorithm>
25 tim 88 #include "extradata.h"
26 tim 66
27 tim 83
28    
29 tim 66 using namespace std;
30    
31 tim 88 class TFrame : public TExtraDataList
32 tim 66 {
33     protected:
34     int _numAtom;
35     int _numPseudo;
36 tim 81 float _boxLen[3];
37     float _alpha;
38     float _beta;
39     float _gamma;
40     float _dt;
41     int _timeSteps;
42 tim 66
43 tim 81 bool _initialized;
44    
45 tim 66 vector<float> _coor;
46     vector<float> _velo;
47    
48 tim 83 // TExtraDataList _extraDataList;
49 tim 81
50     void Clear();
51    
52 tim 66 public:
53 tim 81 TFrame();
54     TFrame(const TFrame &src);
55     ~TFrame();
56    
57 tim 66 int GetNumAtom() { return _numAtom;}
58 tim 81 int GetNumPseudo() { return _numPseudo;}
59     float GetDT() { return _dt;}
60     int GetTimeSteps() { return _timeSteps;}
61     vector<float> &GetCoor() { return _coor;}
62     vector<float> &GetVelo() { return _velo;}
63 tim 88 float GetCoor(int frameIndex);
64     float GetVelo(int frameIndex);
65 tim 81
66     float GetAlpha() { return _alpha;}
67     float GetBeta() { return _beta;}
68     float GetGamma() { return _gamma;}
69     float GetBoxLenX() { return _boxLen[0];}
70     float GetBoxLenY() { return _boxLen[1];}
71     float GetBoxLenZ() { return _boxLen[2];}
72     float *GetBoxLen() { return _boxLen;}
73    
74     void SetNumAtom(int numAtom) { _numAtom = numAtom;}
75     void SetNumPseudo(int numPseudo) { _numPseudo = numPseudo;}
76     void SetDT(float dt) { _dt = dt;}
77     void SetTimeSteps(int timeSteps) { _timeSteps = timeSteps;}
78     void SetCoor(const vector<float> &coor) { _coor = coor;}
79     void SetVelo(const vector<float> &velo) { _velo = velo;}
80    
81     void SetAlpha(int alpha) { _alpha = alpha;}
82     void SetBeta(int beta) { _beta = beta;}
83     void SetGamma(int gamma) { _gamma = gamma;}
84     void SetBoxLenX(float boxLenX) { _boxLen[0] = boxLenX;}
85     void SetBoxLenY(float boxLenY) { _boxLen[1] = boxLenY;}
86     void SetBoxLenZ(float boxLenZ) { _boxLen[2] = boxLenZ;}
87 tim 83 /*
88 tim 81 void AddExtraData(TExtraData *extraData);
89     void RemoveExtraData(TExtraData *extraData);
90     TExtraData *GetExtraData(int extraDataType);
91     TExtraData *GetExtraData(string attr);
92     vector<TExtraData *> &GetExraDataList() { return _extraDataList;}
93     void SetExraDataList(vector<TExtraData *> &extraDataList)
94     { _extraDataList = extraDataList;}
95 tim 83 */
96 tim 66 void Reserve(int numAtom);
97 tim 81
98     void Init();
99    
100 tim 66 };
101 tim 83
102