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

ObjCryst::Scatterer Class Reference

Generic type of scatterer: can be an atom, or a more complex assembly of atoms. More...

#include <Scatterer.h>

Inheritance diagram for ObjCryst::Scatterer::

ObjCryst::RefinableObj ObjCryst::Atom ObjCryst::ZScatterer ObjCryst::ZPolyhedron List of all members.

Public Methods

 Scatterer ()
 Constructor.

 Scatterer (const Scatterer &old)
 Copy Constructor.

virtual ~Scatterer ()
 Destructor.

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

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 int GetNbComponent () const=0
 Number of components in the scatterer (eg number of point scatterers).

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

virtual string GetComponentName (const int i) const=0
 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...


double GetX () const
 X coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position of one atom of the Scatterer, ideally it should be near the center of the Scatterer.

double GetY () const
 Y coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position of one atom of the Scatterer, ideally it should be near the center of the Scatterer.

double GetZ () const
 Z coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position of one atom of the Scatterer, ideally it should be near the center of the Scatterer.

double GetOccupancy () const
 Get the occupancy of the scatterer (0. -> 1.0). More...

virtual void SetX (const double x)
 X coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position of one atom of the Scatterer, ideally it should be near the center of the Scatterer.

virtual void SetY (const double y)
 Y coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position of one atom of the Scatterer, ideally it should be near the center of the Scatterer.

virtual void SetZ (const double z)
 Z coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position of one atom of the Scatterer, ideally it should be near the center of the Scatterer.

virtual void SetOccupancy (const double occupancy)
 Change the occupancy of the scatterer (0. -> 1.0). More...

 operator string () const
 Conversion function.-> returns the scatt name
Warning:
EXPERIMENTAL. DO NOT USE, as this may be removed.


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

virtual const string & GetColour () const
 Colour associated to this scatterer (using POVRay names).

virtual const float * GetColourRGB () const
 Colour associated to this scatterer, 3 RGB Coordinates.

virtual ostream & POVRayDescription (ostream &os, const bool noSymmetrics=false) const=0
  Output a description of the scatterer for POVRay. This should only be called by the Crystal Object to which belongs this scatterer.

virtual void GLInitDisplayList (const bool noSymmetrics=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=0
const RefinableObjClockGetClockScatterer () const
 Last time anything in the scatterer was changed (atoms, positions, scattering power).

void SetCrystal (const Crystal &)
 Set the crystal in which is included this Scatterer.

const CrystalGetCrystal () const
 In which crystal is this Scatterer included ?


Protected Methods

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

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

virtual void InitRGBColour ()
 Get RGB Colour coordinates from Colour Name. More...

const RefinableObjClockGetClockScattCompList () const
 Last time the ScatteringComponentList was generated.


Protected Attributes

CrystVector_double mXYZ
 coordinates of the scatterer (or of its center..).

double mOccupancy
 Occupancy : 0 <= occ <= 1 For a multi-atom scatterer (polyhedron,..), this is the overall occupancy of the scatterer (affects all components of the scatterer).

string mColourName
 Colour for this scatterer (from POVRay).

float mColourRGB [3]
 Colour for this scatterer using RGB.

RefinableObjClock mClockScatterer
 Last time anything (number of atoms, positions, scattering power) was changed.

RefinableObjClock mClockScattCompList
  Last time the ScatteringComponentList was generated.

const CrystalmpCryst
 The crystal in which the Scatterer is This is needed so that we can know which scattering powers are available in the crystal, and also to convert fractionnal to orthonormal coordinates (for some scatterers only).


Detailed Description

Generic type of scatterer: can be an atom, or a more complex assembly of atoms.

A Scatterer is able to give its position (in fractionnal coordinates) in the unit cell, and more generally the position of all point scattering centers (ScatteringComponent), along with the ScatteringPower associated with each position.

For simple atoms, there is only one scattering position with the associated scattering power (scattering factor, anomalous, thermic). For complex scatterers (molecules: ZScatterer) there are as many positions as atoms.

A scatterer also has a few functions to display itself in 3D

This is an abstract base class.


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 [pure 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 in ObjCryst::Atom, and ObjCryst::ZScatterer.

virtual string GetComponentName const int    i const [pure 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 in ObjCryst::Atom, and ObjCryst::ZScatterer.

double GetOccupancy   const
 

Get the occupancy of the scatterer (0. -> 1.0).

The occupancy is given in %, and must take into account the 'special position' character of atoms (ie an atom on a 2fold axis should have at most a .5 population, etc...). For a multi-atom scatterer (polyhedra), this is the overall occupancy of the scatterer, affecting all atoms.

virtual const ScatteringComponentList& GetScatteringComponentList   const [pure 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 in ObjCryst::Atom, and ObjCryst::ZScatterer.

virtual void InitRGBColour   [protected, virtual]
 

Get RGB Colour coordinates from Colour Name.

Note that the colour used for display is usually that of the ScatteringPower, not that of the Scatterer

virtual void SetOccupancy const double    occupancy [virtual]
 

Change the occupancy of the scatterer (0. -> 1.0).

The occupancy is given in %, and must take into account the 'special position' character of atoms (ie an atom on a 2fold axis should have at most a .5 population, etc...). For a multi-atom scatterer (polyhedra), this is the overall occupancy of the scatterer, affecting all atoms.

virtual void Update   const [protected, pure 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 in ObjCryst::Atom, and ObjCryst::ZScatterer.


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