Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Atom.h

00001 /* 
00002 * ObjCryst++ : a Crystallographic computing library in C++
00003 *        http://objcryst.sourceforge.net
00004 *        http://www.ccp14.ac.uk/ccp/web-mirrors/objcryst/
00005 *
00006 *  (c) 2000-2001 Vincent FAVRE-NICOLIN vincefn@users.sourceforge.net
00007 *
00008 */
00009 /*   Atom.h
00010 *  header file for the Atom scatterer
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 //#include <stdlib.h>
00024 #include <string>
00025 //#include <iomanip>
00026 //#include <cmath>
00027 //#include <typeinfo>
00028 //#include <fstream>
00029 //#include <ctime>
00030 //using namespace std;
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       //virtual void XMLInputOld(istream &is,const IOCrystTag &tag);
00132       const ScatteringPowerAtom& GetScatteringPower()const;
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 }//namespace Objcryst
00151 
00152 // do we need this ?
00153 #include "ObjCryst/Crystal.h"
00154 
00155 #endif //_OBJCRYST_ATOM_H_

Generated on Wed Nov 14 19:48:35 2001 for ObjCryst++ by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001