00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _OBJCRYST_ATOM_H_
00014 #define _OBJCRYST_ATOM_H_
00015
00016 #include "CrystVector/CrystVector.h"
00017
00018 #include "ObjCryst/General.h"
00019
00020 #include "ObjCryst/ScatteringPower.h"
00021 #include "ObjCryst/Scatterer.h"
00022
00023
00024 #include <string>
00025
00026
00027
00028
00029
00030
00031
00032 namespace ObjCryst
00033 {
00034
00035
00036
00045
00046
00047 class Atom: public Scatterer
00048 {
00049 public:
00052 Atom();
00059 Atom( const double x, const double y, const double z,
00060 const string &name, const ScatteringPowerAtom *pow);
00074 Atom( const double x, const double y, const double z,const string &name,
00075 const ScatteringPowerAtom *pow, const double popu);
00077 Atom(const Atom &old);
00078 virtual Atom* CreateCopy() const;
00080 ~Atom();
00081 virtual const string GetClassName() const;
00083 virtual void operator=(const Atom & rhs);
00084
00090 void Init(const double x, const double y, const double z,
00091 const string &name, const ScatteringPowerAtom *pow,
00092 const double popu=1);
00093
00094 virtual int GetNbComponent() const;
00095 virtual const ScatteringComponentList& GetScatteringComponentList() const;
00096 virtual string GetComponentName(const int i) const;
00097
00098 virtual void Print() const;
00099
00106 double GetMass() const;
00113 double GetRadius() const;
00117 virtual ostream& POVRayDescription(ostream &os,
00118 const bool onlyIndependentAtoms=false)const;
00119 virtual void GLInitDisplayList(const bool onlyIndependentAtoms=false,
00120 const double xMin=-.1,const double xMax=1.1,
00121 const double yMin=-.1,const double yMax=1.1,
00122 const double zMin=-.1,const double zMax=1.1)const;
00123
00126 bool IsDummy()const;
00127
00128 virtual void XMLOutput(ostream &os,int indent=0)const;
00129 virtual void XMLInput(istream &is,const XMLCrystTag &tag);
00130
00132
00133 protected:
00134 private:
00135 virtual void Update() const;
00137 virtual void InitRefParList();
00138
00140 mutable ScatteringComponentList mScattCompList;
00142 const ScatteringPowerAtom *mpScattPowAtom;
00143 #ifdef __WX__CRYST__
00144 public:
00145 virtual WXCrystObjBasic* WXCreate(wxWindow*);
00146 friend class WXAtom;
00147 #endif
00148 };
00149
00150 }
00151
00152
00153 #include "ObjCryst/Crystal.h"
00154
00155 #endif //_OBJCRYST_ATOM_H_