27 #include "ObjCryst/ObjCryst/Crystal.h"
28 #include "ObjCryst/ObjCryst/Scatterer.h"
30 #include "ObjCryst/Quirks/VFNStreamFormat.h"
32 #include "ObjCryst/Quirks/VFNDebug.h"
35 #include "ObjCryst/wxCryst/wxScatterer.h"
38 #include "ObjCryst/ObjCryst/Colours.h"
46 const RefParType *gpRefParTypeScatt=0;
47 const RefParType *gpRefParTypeScattTransl=0;
48 const RefParType *gpRefParTypeScattTranslX=0;
49 const RefParType *gpRefParTypeScattTranslY=0;
50 const RefParType *gpRefParTypeScattTranslZ=0;
51 const RefParType *gpRefParTypeScattOrient=0;
52 const RefParType *gpRefParTypeScattConform=0;
53 const RefParType *gpRefParTypeScattConformBondLength=0;
54 const RefParType *gpRefParTypeScattConformBondAngle=0;
55 const RefParType *gpRefParTypeScattConformDihedAngle=0;
56 const RefParType *gpRefParTypeScattConformX=0;
57 const RefParType *gpRefParTypeScattConformY=0;
58 const RefParType *gpRefParTypeScattConformZ=0;
59 const RefParType *gpRefParTypeScattOccup=0;
60 long NiftyStaticGlobalObjectsInitializer_Scatterer::mCount=0;
71 VFN_DEBUG_MESSAGE(
"Scatterer::Scatterer()",5)
81 mOccupancy(old.mOccupancy),
82 mColourName(old.mColourName),mpCryst(old.mpCryst)
84 VFN_DEBUG_MESSAGE(
"Scatterer::Scatterer(&old)",5)
93 VFN_DEBUG_MESSAGE(
"Scatterer::~Scatterer():("<<
mName<<
")",5)
99 const static string className=
"Scatterer";
118 Scatterer::operator string()
const {
return this->GetName();}
143 VFN_DEBUG_MESSAGE(
"Scatterer::InitRGBColour()",2)
154 if(strncmp(gPOVRayColours[i].
mName,
"",3 )==0)
156 cout <<
"Could not find colour:"<<
mColourName<<
" for scaterrer "<<
mName<<endl;
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
ObjRegistry< Scatterer > gScattererRegistry("Global Scatterer Registry")
Global registry for all Scatterer objects.
Crystal class: Unit cell, spacegroup, scatterers.
Generic type of scatterer: can be an atom, or a more complex assembly of atoms.
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
string mColourName
Colour for this scatterer (from POVRay)
Crystal * mpCryst
The crystal in which the Scatterer is This is needed so that we can know which scattering powers are ...
virtual void InitRGBColour()
Get RGB Colour coordinates from Colour Name.
virtual ~Scatterer()
Destructor.
virtual void SetZ(const REAL z)
Z coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
virtual void SetY(const REAL y)
Y coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
virtual const float * GetColourRGB() const
Colour associated to this scatterer, 3 RGB Coordinates.
REAL GetOccupancy() const
Get the occupancy of the scatterer (0.
const Crystal & GetCrystal() const
In which crystal is this Scatterer included ?
CrystVector_REAL mXYZ
coordinates of the scatterer (or of its center..)
REAL GetX() const
X coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
const RefinableObjClock & GetClockScatterer() const
Last time anything in the scatterer was changed (atoms, positions, scattering power)
float mColourRGB[3]
Colour for this scatterer using RGB.
virtual const string & GetColour() const
Colour associated to this scatterer (using POVRay names)
REAL GetZ() const
Z coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
RefinableObjClock mClockScatterer
Last time anything (number of atoms, positions, scattering power) was changed.
void SetCrystal(Crystal &)
Set the crystal in which is included this Scatterer.
REAL mOccupancy
Occupancy : 0 <= occ <= 1 For a multi-atom scatterer (polyhedron,..), this is the overall occupancy o...
REAL GetY() const
Y coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
virtual void SetOccupancy(const REAL occupancy)
Change the occupancy of the scatterer (0.
virtual void SetX(const REAL x)
X coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...
void AddChild(const RefinableObjClock &)
Add a 'child' clock.
void Click()
Record an event for this clock (generally, the 'time' an object has been modified,...
void MutateTo(const REAL newValue)
Change the current value to the given one.
RefinablePar & GetPar(const long i)
Access all parameters in the order they were inputted.
virtual const string & GetName() const
Name of the object.
RefinableObjClock mClockMaster
Master clock, which is changed whenever the object has been altered.
string mName
Name for this RefinableObject. Should be unique, at least in the same scope.+.
Abstract base class for all objects in wxCryst.
base wxCryst class for Scatterers