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

ObjCryst::Atom Class Reference

The basic atom scatterer, in a crystal. This class records the position of the atom, and has a pointer to its ScatteringPowerAtom.
Note:
there can be 'Dummy' atoms, for which the used symbol is "X", and which have no scattering power (use with caution: dummy atoms are only supposed to be used within ZScatterer).
More...

#include <Atom.h>

Inheritance diagram for ObjCryst::Atom::

ObjCryst::Scatterer ObjCryst::RefinableObj List of all members.

Public Methods

 Atom ()
 Default constructor. The Atom must be initialized thereafter using Atom::Init().

 Atom (const double x, const double y, const double z, const string &name, const ScatteringPowerAtom *pow)
 Atom constructor. More...

 Atom (const double x, const double y, const double z, const string &name, const ScatteringPowerAtom *pow, const double popu)
 Atom constructor. More...

 Atom (const Atom &old)
 Copy constructor.

virtual Atom * CreateCopy () const
  so-called Virtual copy constructor, needed to make copies of arrays of Scatterers.

 ~Atom ()
 Destructor...

virtual const string GetClassName () const
 Name for this class ("RefinableObj", "Crystal",...). This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry.

virtual void operator= (const Atom &rhs)
void Init (const double x, const double y, const double z, const string &name, const ScatteringPowerAtom *pow, const double popu=1)
 initialize the atom (used for arrays of atoms). More...

virtual int GetNbComponent () const
 Number of components in the scatterer (eg number of point scatterers).

virtual const ScatteringComponentListGetScatteringComponentList () const
 Get the list of all scattering components for this scatterer. More...

virtual string GetComponentName (const int i) const
 Name for the i-th component of this scatterer. If the component is an Atom, Then the name is that of the atom. Else, it is the name of the scatterer plus the component number in the scatterer plus the name of the ScatteringPower.
Note:
It would be better to return a reference, but we don't want to keep a name for all components... Weeelll, needs some more thinking... see what performance hit results (if any).
More...


virtual void Print () const
 Print some info about the scatterer (ideally this should be one line...).

double GetMass () const
 Returns the molar mass of the atom. More...

double GetRadius () const
 Returns the radius (in Angstroems) of the atom. More...

virtual ostream & POVRayDescription (ostream &os, const bool onlyIndependentAtoms=false) const
 XMLOutput a description of the scatterer for POVRay.

virtual void GLInitDisplayList (const bool onlyIndependentAtoms=false, const double xMin=-.1, const double xMax=1.1, const double yMin=-.1, const double yMax=1.1, const double zMin=-.1, const double zMax=1.1) const
bool IsDummy () const
 Is this a dummy atom ? (ie no ScatteringPower) Dummy atoms should not exist !

virtual void XMLOutput (ostream &os, int indent=0) const
 Output to stream in well-formed XML. More...

virtual void XMLInput (istream &is, const XMLCrystTag &tag)
 Input From stream. More...

const ScatteringPowerAtomGetScatteringPower () const
 Get the ScatteringPowerAtom corresponding to this atom.


Private Methods

virtual void Update () const
 Update the scatterer's parameters (scattering positions, occupancy). More...

virtual void InitRefParList ()
 Prepare refinable parameters for the scatterer object.


Private Attributes

ScatteringComponentList mScattCompList
 The list of scattering components.

const ScatteringPowerAtommpScattPowAtom
 The ScatteringPowerAtom associated to that atom.


Detailed Description

The basic atom scatterer, in a crystal. This class records the position of the atom, and has a pointer to its ScatteringPowerAtom.
Note:
there can be 'Dummy' atoms, for which the used symbol is "X", and which have no scattering power (use with caution: dummy atoms are only supposed to be used within ZScatterer).


Constructor & Destructor Documentation

Atom const double    x,
const double    y,
const double    z,
const string &    name,
const ScatteringPowerAtom   pow
 

Atom constructor.

Parameters:
x,y,z  : fractional coordinates of the atom
pow  : the ScatteringPower associated to this atom. Must be allocated separately.
name  : name of the atom ('Ta1','Sm2', 'Tungsten_1'...). The name can have any format but spaces should be avoided.

Atom const double    x,
const double    y,
const double    z,
const string &    name,
const ScatteringPowerAtom   pow,
const double    popu
 

Atom constructor.

Parameters:
x,y,z  : fractional coordinates of the atom
popu  : the population of the atom (0.0->1.0) This should take into account the multiplicity of the atom. For an atom in group P2 and on the 2 axis, this should be set to 0.5, unless you are using the dynamical occupancy correction (recommended for global optimizations). See Crystal::CalcDynPopCorr() and Crystal::mUseDynPopCorr
pow  : the ScatteringPower associated to this atom. Must be allocated separatly.
name  : name of the atom ('Ta1','Sm2', 'Tungsten_1'...). The name can have any format but spaces should be avoided (just a precaution)


Member Function Documentation

virtual void GLInitDisplayList const bool    onlyIndependentAtoms = false,
const double    xMin = -.1,
const double    xMax = 1.1,
const double    yMin = -.1,
const double    yMax = 1.1,
const double    zMin = -.1,
const double    zMax = 1.1
const [virtual]
 

Create an OpenGL Display List of the scatterer. This should only be called by a Crystal object.

Parameters:
noSymmetrics:  if false (the default), then all symmetrics are shown in the 3D display, within the limits defined by the min/max parameters \ param xMin,xMax,yMin,yMax,zMin,zMax: in fractionnal coordinates, the region in which we want scaterrer to be displayed. The test is made on the center of the scatterer (eg a ZScatterer (molecule) will not be 'cut' on the border).

Reimplemented from ObjCryst::Scatterer.

virtual string GetComponentName const int    i const [virtual]
 

Name for the i-th component of this scatterer. If the component is an Atom, Then the name is that of the atom. Else, it is the name of the scatterer plus the component number in the scatterer plus the name of the ScatteringPower.

Note:
It would be better to return a reference, but we don't want to keep a name for all components... Weeelll, needs some more thinking... see what performance hit results (if any).

Bug:
does not take into account dummy atoms !!

Reimplemented from ObjCryst::Scatterer.

double GetMass   const
 

Returns the molar mass of the atom.

Values are extracted from the 'atominfo' package, which uses data from the CRC Handbook of Chemistry & Physics, 63rd & 70th editions The Mass is actually extracted from the ScatteringPowerAtom.

double GetRadius   const
 

Returns the radius (in Angstroems) of the atom.

Values are extracted from the 'atominfo' package, which uses data from the ICSD/CRYSTIN Manual The Radius is extracted from the ScatteringPowerAtom.

virtual const ScatteringComponentList& GetScatteringComponentList   const [virtual]
 

Get the list of all scattering components for this scatterer.

This is the most important function of this class, giving the list of scattering positions along with the associated ScatteringPower.

Reimplemented from ObjCryst::Scatterer.

void Init const double    x,
const double    y,
const double    z,
const string &    name,
const ScatteringPowerAtom   pow,
const double    popu = 1
 

initialize the atom (used for arrays of atoms).

Parameters:
x,y,z  : fractional coordinates of the atom
pow  : the ScatteringPower associated to this atom. Must be allocated separately.
name  : name of the atom ('Ta1','Sm2', 'Tungsten_1'...).

virtual void Update   const [private, virtual]
 

Update the scatterer's parameters (scattering positions, occupancy).

This is necessary for composite scatterers (eg not atoms), which include more than a single scattering center. The coordinates of all scattering points are updated from the scatterer's parameters.

This is automatically called each time GetScatteringComponentList() is used.

As always, update is only made if nessary (ie if one parameter determining the atom positions has changed).

Note:
This is not necessary in all Scatterer, so this could be removed from the base Scatterer class.

Reimplemented from ObjCryst::Scatterer.

virtual void XMLInput istream &    is,
const XMLCrystTag   tag
[virtual]
 

Input From stream.

Todo:
Add an bool XMLInputTag(is,tag) function to recognize all the tags from the stream. So that each inherited class can use the XMLInputTag function from its parent (ie take advantage of inheritance). The children class would first try to interpret the tag, then if unsuccessful would pass it to its parent (thus allowing overloading), etc...

Reimplemented from ObjCryst::RefinableObj.

virtual void XMLOutput ostream &    os,
int    indent = 0
const [virtual]
 

Output to stream in well-formed XML.

Todo:
Use inheritance.. as for XMLInputTag()...

Reimplemented from ObjCryst::RefinableObj.


The documentation for this class was generated from the following file:
Generated on Wed Nov 14 19:48:36 2001 for ObjCryst++ by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001