00001 #ifndef MoleculeInfoH
00002 #define MoleculeInfoH
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00039
00040
00041 #include "CoreMainHeader.h"
00042 #include "Point.h"
00043 #include "ExtObject.h"
00044
00045
00046
00047 class CJob;
00048 class CCalculation;
00049 class CXMLElement;
00050 class CMolecule;
00051 class CExtUUID;
00052 class CPluginObjectInfo;
00053 class CAtom;
00054
00055
00056
00058
00061 enum EMoleculeInfoType{
00062 MIT_LOAD = 0,
00063 MIT_COORDS = 1,
00064 MIT_COORDS_BONDS = 2,
00065 MIT_COORDS_VELOCITIES = 3,
00066 MIT_FULL = 4,
00067 };
00068
00069
00070
00072
00075 class NEMESIS_CORE_PACKAGE CMoleculeInfo : public CExtObject {
00076 public:
00077 __fastcall CMoleculeInfo(CCalculation* p_cal,EMoleculeInfoType type=MIT_LOAD);
00078 __fastcall CMoleculeInfo(CCalculation* p_cal,CJob* p_job,int local_id,EMoleculeInfoType type=MIT_LOAD);
00079 void __fastcall RemoveFromBaseList(void);
00080
00081
00082 bool __fastcall ChangeName(const CSmallString& name);
00083
00084 CSmallString __fastcall GetFullCaption(CJob* p_forjob);
00085
00086
00087 inline int __fastcall GetNumOfAtoms(void);
00088 int __fastcall GetAtomicNumber(int index);
00089 const CPoint& __fastcall GetCoord(int index);
00090 const CPoint& __fastcall GetAtomPos(CAtom* p_atom);
00091 void __fastcall SetCoord(int index,const CPoint& pos);
00092
00093
00094 bool __fastcall MustItSave(void);
00095
00096 bool __fastcall Load(CXMLElement* p_ele);
00097 bool __fastcall Save(CXMLElement* p_ele);
00098
00099 bool __fastcall LoadData(void);
00100 bool __fastcall LoadData(const CSmallString& name);
00101 bool __fastcall SaveData(void);
00102
00103
00104 bool __fastcall LoadFromMolecule(CMolecule* p_mol);
00105 bool __fastcall SaveToMolecule(CMolecule* p_mol);
00106
00107
00108 inline CJob* __fastcall GetOwnerJob(void);
00109 inline int __fastcall GetLocalIndex(void);
00110 bool __fastcall ConnectWithJob(void);
00111 bool __fastcall NeedData(void);
00112
00113 bool __fastcall RegisterJob(CJob* p_job);
00114 bool __fastcall UnregisterJob(CJob* p_job);
00115
00116
00117 private:
00118 CCalculation* FCalculation;
00119 int NumOfAtoms;
00120 EMoleculeInfoType Type;
00121 CJob* Job;
00122 int JobIndex;
00123 int LocalIndex;
00124 bool Loaded;
00125 bool Changed;
00126
00127 CPoint* Coords;
00128 CPoint* Velocities;
00129
00130 void __fastcall InitVectors(void);
00131
00132 public:
00133 __fastcall ~CMoleculeInfo(void);
00134 };
00135
00136
00137
00138 extern CExtUUID ID_MoleculeInfo;
00139 extern CPluginObjectInfo MoleculeInfoObjectInfo;
00140
00141
00142
00143 inline int __fastcall CMoleculeInfo::GetNumOfAtoms(void)
00144 {
00145 return(NumOfAtoms);
00146 }
00147
00148
00149
00150 inline CJob* __fastcall CMoleculeInfo::GetOwnerJob(void)
00151 {
00152 return(Job);
00153 }
00154
00155
00156
00157 inline int __fastcall CMoleculeInfo::GetLocalIndex(void)
00158 {
00159 return(LocalIndex);
00160 }
00161
00162
00163
00164 #endif