00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef ATOMREP_H
00023 #define ATOMREP_H
00024
00025
00026 #define DEFAULT_ATOMREP AtomRep::LINES
00027 #define MAX_ATOMREP_CMD 255
00028 #define MAX_ATOMREP_DATA 12
00029
00031 class AtomRep {
00032 public:
00033
00034
00035
00036 enum RepMethod { LINES, BONDS, DYNAMICBONDS, HBONDS,
00037 POINTS, VDW, CPK, LICORICE,
00038 #ifdef VMDPOLYHEDRA
00039 POLYHEDRA,
00040 #endif
00041 TRACE, TUBE, RIBBONS,
00042 NEWRIBBONS, STRUCTURE, NEWCARTOON,
00043 #ifdef VMDWITHCARBS
00044 RINGS_PAPERCHAIN, RINGS_TWISTER,
00045 #endif
00046 #ifdef VMDQUICKSURF
00047 QUICKSURF,
00048 #endif
00049 #ifdef VMDMSMS
00050 MSMS,
00051 #endif
00052 #ifdef VMDSURF
00053 SURF,
00054 #endif
00055 VOLSLICE, ISOSURFACE,
00056 FIELDLINES,
00057 ORBITAL,
00058 BEADS,
00059 DOTTED, SOLVENT,
00060 TOTAL };
00061
00062
00063 enum RepDataNames { SPHERERAD, BONDRAD, SPHERERES, BONDRES, LINETHICKNESS, ISOSTEPSIZE, ISOLINETHICKNESS, WAVEFNCTYPE, WAVEFNCSPIN, WAVEFNCEXCITATION, GRIDSPACING };
00064
00066 char cmdStr[MAX_ATOMREP_CMD + 1];
00067
00068 private:
00070 int repMethod;
00071 float repDataStorage[TOTAL][MAX_ATOMREP_DATA];
00072 float *repData;
00073
00075 int parse_cmd(const char *);
00076
00077 public:
00078 AtomRep(void);
00079 AtomRep(AtomRep &ar) { *this = ar; }
00080 ~AtomRep(void);
00081
00083 AtomRep& operator=(const AtomRep &);
00084
00086 int change(const char *newcmd) { return parse_cmd(newcmd); }
00087
00088
00089
00090
00091
00093 int method(void) { return repMethod; }
00094
00096 bool is_volumetric(void) {
00097 if (repMethod == VOLSLICE || repMethod == ISOSURFACE || repMethod == FIELDLINES)
00098 return true;
00099 return false;
00100 }
00101
00102 bool is_orbital(void) {
00103 if (repMethod == ORBITAL)
00104 return true;
00105 return false;
00106 }
00107
00109 float get_data(int n) { return repData[n]; }
00110 };
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00125 typedef struct {
00126 int index;
00127 float defValue;
00128 } AtomRepDataInfo;
00129
00131 typedef struct {
00132 const char *name;
00133 int numdata;
00134 AtomRepDataInfo repdata[MAX_ATOMREP_DATA];
00135 } AtomRepParamStruct;
00136
00137
00138
00139 extern const AtomRepParamStruct AtomRepInfo[AtomRep::TOTAL];
00140
00141
00142 #endif
00143