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

ObjCryst::Scatterer Class Reference

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

Inheritance diagram for ObjCryst::Scatterer:

Inheritance graph
[legend]
Collaboration diagram for ObjCryst::Scatterer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Scatterer ()
 Constructor.

 Scatterer (const Scatterer &old)
 Copy Constructor.

virtual ~Scatterer ()
 Destructor.

virtual ScattererCreateCopy () const=0
virtual const string & GetClassName () const
 Name for this class ("RefinableObj", "Crystal",...).

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.

virtual string GetComponentName (const int i) const=0
 Name for the i-th component of this scatterer.

REAL 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.

REAL 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.

REAL 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.

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

virtual void SetX (const REAL 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 REAL 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 REAL 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 REAL occupancy)
 Change the occupancy of the scatterer (0. -> 1.0).

 operator string () const
 Conversion function.-> returns the scatt name.

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 CrystalPOVRayOptions &options) const=0
virtual void GLInitDisplayList (const bool noSymmetrics=false, const REAL xMin=-.1, const REAL xMax=1.1, const REAL yMin=-.1, const REAL yMax=1.1, const REAL zMin=-.1, const REAL zMax=1.1, const bool displayEnantiomer=false, const bool displayNames=false) const=0
const RefinableObjClockGetClockScatterer () const
 Last time anything in the scatterer was changed (atoms, positions, scattering power).

RefinableObjClockGetClockScatterer ()
 Last time anything in the scatterer was changed (atoms, positions, scattering power).

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

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

CrystalGetCrystal ()
 In which crystal is this Scatterer included ?


Protected Member Functions

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

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

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


Protected Attributes

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

REAL 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.

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.


Constructor & Destructor Documentation

ObjCryst::Scatterer::Scatterer  ) 
 

Constructor.

ObjCryst::Scatterer::Scatterer const Scatterer old  ) 
 

Copy Constructor.

virtual ObjCryst::Scatterer::~Scatterer  )  [virtual]
 

Destructor.


Member Function Documentation

virtual Scatterer* ObjCryst::Scatterer::CreateCopy  )  const [pure virtual]
 

For internal use only.

so-called Virtual copy constructor, needed to make copies of arrays of Scatterers

Implemented in ObjCryst::Atom, ObjCryst::Molecule, ObjCryst::ZScatterer, and ObjCryst::ZPolyhedron.

virtual const string& ObjCryst::Scatterer::GetClassName  )  const [virtual]
 

Name for this class ("RefinableObj", "Crystal",...).

This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry

Reimplemented from ObjCryst::RefinableObj.

Reimplemented in ObjCryst::Atom, ObjCryst::Molecule, and ObjCryst::ZScatterer.

const RefinableObjClock& ObjCryst::Scatterer::GetClockScattCompList  )  const [protected]
 

Last time the ScatteringComponentList was generated.

RefinableObjClock& ObjCryst::Scatterer::GetClockScatterer  ) 
 

Last time anything in the scatterer was changed (atoms, positions, scattering power).

const RefinableObjClock& ObjCryst::Scatterer::GetClockScatterer  )  const
 

Last time anything in the scatterer was changed (atoms, positions, scattering power).

virtual const string& ObjCryst::Scatterer::GetColour  )  const [virtual]
 

Colour associated to this scatterer (using POVRay names).

virtual const float* ObjCryst::Scatterer::GetColourRGB  )  const [virtual]
 

Colour associated to this scatterer, 3 RGB Coordinates.

virtual string ObjCryst::Scatterer::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 !!

Implemented in ObjCryst::Atom, ObjCryst::Molecule, and ObjCryst::ZScatterer.

Crystal& ObjCryst::Scatterer::GetCrystal  ) 
 

In which crystal is this Scatterer included ?

const Crystal& ObjCryst::Scatterer::GetCrystal  )  const
 

In which crystal is this Scatterer included ?

virtual int ObjCryst::Scatterer::GetNbComponent  )  const [pure virtual]
 

Number of components in the scatterer (eg number of point scatterers).

Implemented in ObjCryst::Atom, ObjCryst::Molecule, and ObjCryst::ZScatterer.

REAL ObjCryst::Scatterer::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& ObjCryst::Scatterer::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.

Implemented in ObjCryst::Atom, ObjCryst::Molecule, and ObjCryst::ZScatterer.

REAL ObjCryst::Scatterer::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.

REAL ObjCryst::Scatterer::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.

REAL ObjCryst::Scatterer::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.

virtual void ObjCryst::Scatterer::GLInitDisplayList const bool  noSymmetrics = false,
const REAL  xMin = -.1,
const REAL  xMax = 1.1,
const REAL  yMin = -.1,
const REAL  yMax = 1.1,
const REAL  zMin = -.1,
const REAL  zMax = 1.1,
const bool  displayEnantiomer = false,
const bool  displayNames = false
const [pure virtual]
 

For internal use only.

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).
displayNames: if true, only the names of the scatterers will be displayed, at the position of the scatterers (to actually see them, they will have to be translated with respect to the drawing of the scatterers).

Implemented in ObjCryst::Atom, ObjCryst::Molecule, and ObjCryst::ZScatterer.

virtual void ObjCryst::Scatterer::InitRefParList  )  [protected, pure virtual]
 

Prepare refinable parameters for the scatterer object.

Implemented in ObjCryst::Atom, ObjCryst::Molecule, and ObjCryst::ZScatterer.

virtual void ObjCryst::Scatterer::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

ObjCryst::Scatterer::operator string  )  const
 

Conversion function.-> returns the scatt name.

Warning:
EXPERIMENTAL. DO NOT USE, as this may be removed.

virtual ostream& ObjCryst::Scatterer::POVRayDescription ostream &  os,
const CrystalPOVRayOptions options
const [pure virtual]
 

For internal use only.

Output a description of the scatterer for POVRay. This should only be called by the Crystal Object to which belongs this scatterer.

Implemented in ObjCryst::Atom, ObjCryst::Molecule, and ObjCryst::ZScatterer.

virtual void ObjCryst::Scatterer::Print  )  const [pure virtual]
 

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

Reimplemented from ObjCryst::RefinableObj.

Implemented in ObjCryst::Atom, ObjCryst::Molecule, and ObjCryst::ZScatterer.

void ObjCryst::Scatterer::SetCrystal Crystal  ) 
 

Set the crystal in which is included this Scatterer.

virtual void ObjCryst::Scatterer::SetOccupancy const REAL  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 ObjCryst::Scatterer::SetX const REAL  x  )  [virtual]
 

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 ObjCryst::Scatterer::SetY const REAL  y  )  [virtual]
 

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 ObjCryst::Scatterer::SetZ const REAL  z  )  [virtual]
 

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.


Member Data Documentation

RefinableObjClock ObjCryst::Scatterer::mClockScattCompList [mutable, protected]
 

Last time the ScatteringComponentList was generated.

RefinableObjClock ObjCryst::Scatterer::mClockScatterer [protected]
 

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

string ObjCryst::Scatterer::mColourName [protected]
 

Colour for this scatterer (from POVRay).

float ObjCryst::Scatterer::mColourRGB[3] [protected]
 

Colour for this scatterer using RGB.

REAL ObjCryst::Scatterer::mOccupancy [protected]
 

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

Crystal* ObjCryst::Scatterer::mpCryst [protected]
 

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).

It cannot be const since some scatterers may want to modify the list of scattering powers of the crystal...

CrystVector_REAL ObjCryst::Scatterer::mXYZ [protected]
 

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


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 15:04:47 2006 for ObjCryst++ by doxygen 1.3.6