19 #ifndef _OBJCRYST_SCATTERER_H_
20 #define _OBJCRYST_SCATTERER_H_
22 #include "ObjCryst/CrystVector/CrystVector.h"
24 #include "ObjCryst/ObjCryst/General.h"
26 #include "ObjCryst/ObjCryst/ScatteringPower.h"
33 extern const RefParType *gpRefParTypeScatt;
34 extern const RefParType *gpRefParTypeScattTransl;
35 extern const RefParType *gpRefParTypeScattTranslX;
36 extern const RefParType *gpRefParTypeScattTranslY;
37 extern const RefParType *gpRefParTypeScattTranslZ;
38 extern const RefParType *gpRefParTypeScattOrient;
39 extern const RefParType *gpRefParTypeScattConform;
40 extern const RefParType *gpRefParTypeScattConformBondLength;
41 extern const RefParType *gpRefParTypeScattConformBondAngle;
42 extern const RefParType *gpRefParTypeScattConformDihedAngle;
43 extern const RefParType *gpRefParTypeScattConformX;
44 extern const RefParType *gpRefParTypeScattConformY;
45 extern const RefParType *gpRefParTypeScattConformZ;
46 extern const RefParType *gpRefParTypeScattOccup;
55 gpRefParTypeScattTransl=
new RefParType(gpRefParTypeScatt,
"Translation");
56 gpRefParTypeScattTranslX=
new RefParType(gpRefParTypeScattTransl,
"Translation along X");
57 gpRefParTypeScattTranslY=
new RefParType(gpRefParTypeScattTransl,
"Translation along Y");
58 gpRefParTypeScattTranslZ=
new RefParType(gpRefParTypeScattTransl,
"Translation along Z");
59 gpRefParTypeScattOrient=
new RefParType(gpRefParTypeScatt,
"Orientation");
60 gpRefParTypeScattConform=
new RefParType(gpRefParTypeScatt,
"Conformation");
61 gpRefParTypeScattConformBondLength=
new RefParType(gpRefParTypeScattConform,
"BondLengths");
62 gpRefParTypeScattConformBondAngle=
new RefParType(gpRefParTypeScattConform,
"Bond Angles");
63 gpRefParTypeScattConformDihedAngle=
new RefParType(gpRefParTypeScattConform,
"Dihedral Angles ");
64 gpRefParTypeScattConformX=
new RefParType(gpRefParTypeScattConform,
"Orth. X coordinates");
65 gpRefParTypeScattConformY=
new RefParType(gpRefParTypeScattConform,
"Orth. Y coordinates");
66 gpRefParTypeScattConformZ=
new RefParType(gpRefParTypeScattConform,
"Orth. Z coordinates");
67 gpRefParTypeScattOccup=
new RefParType(gpRefParTypeScatt,
"Occupancy");
74 delete gpRefParTypeScatt;
75 delete gpRefParTypeScattTransl;
76 delete gpRefParTypeScattTranslX;
77 delete gpRefParTypeScattTranslY;
78 delete gpRefParTypeScattTranslZ;
79 delete gpRefParTypeScattOrient;
80 delete gpRefParTypeScattConform;
81 delete gpRefParTypeScattConformBondLength;
82 delete gpRefParTypeScattConformBondAngle;
83 delete gpRefParTypeScattConformDihedAngle;
84 delete gpRefParTypeScattConformX;
85 delete gpRefParTypeScattConformY;
86 delete gpRefParTypeScattConformZ;
87 delete gpRefParTypeScattOccup;
89 gpRefParTypeScattTransl=0;
90 gpRefParTypeScattTranslX=0;
91 gpRefParTypeScattTranslY=0;
92 gpRefParTypeScattTranslZ=0;
93 gpRefParTypeScattOrient=0;
94 gpRefParTypeScattConform=0;
95 gpRefParTypeScattConformBondLength=0;
96 gpRefParTypeScattConformBondAngle=0;
97 gpRefParTypeScattConformDihedAngle=0;
98 gpRefParTypeScattConformX=0;
99 gpRefParTypeScattConformY=0;
100 gpRefParTypeScattConformZ=0;
101 gpRefParTypeScattOccup=0;
190 virtual void SetX(
const REAL x);
194 virtual void SetY(
const REAL y);
198 virtual void SetZ(
const REAL z);
212 operator string()
const;
214 virtual void Print()
const=0;
246 const REAL xMin=-.1,
const REAL xMax=1.1,
247 const REAL yMin=-.1,
const REAL yMax=1.1,
248 const REAL zMin=-.1,
const REAL zMax=1.1,
249 const bool displayEnantiomer=
false,
250 const bool displayNames=
false,
251 const bool hideHydrogens=
false)
const=0;
310 #include "ObjCryst/ObjCryst/Crystal.h"
312 #endif //_OBJCRYST_SCATTERER_H_
virtual void Print() const =0
Print some info about the scatterer (ideally this should be one line...).
const RefinableObjClock & GetClockScattCompList() const
Last time the ScatteringComponentList was generated.
string mColourName
Colour for this scatterer (from POVRay)
virtual ostream & POVRayDescription(ostream &os, const CrystalPOVRayOptions &options) const =0
const RefinableObjClock & GetClockScatterer() const
Last time anything in the scatterer was changed (atoms, positions, scattering power) ...
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...
CrystVector_REAL mXYZ
coordinates of the scatterer (or of its center..)
virtual Scatterer * CreateCopy() const =0
float mColourRGB[3]
Colour for this scatterer using RGB.
virtual const float * GetColourRGB() const
Colour associated to this scatterer, 3 RGB Coordinates.
virtual int GetNbComponent() const =0
Number of components in the scatterer (eg number of point scatterers)
Generic Refinable Object.
REAL GetZ() const
Z coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
REAL GetOccupancy() const
Get the occupancy of the scatterer (0.
Abstract base class for all objects in wxCryst.
Class to store POV-Ray output options.
virtual void SetY(const REAL y)
Y coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
RefinableObjClock mClockScattCompList
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 bool hideHydrogens=false) const =0
REAL GetX() const
X coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
virtual ~Scatterer()
Destructor.
REAL mOccupancy
Occupancy : 0 <= occ <= 1 For a multi-atom scatterer (polyhedron,..), this is the overall occupancy o...
virtual const string & GetColour() const
Colour associated to this scatterer (using POVRay names)
virtual void SetX(const REAL x)
X coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
void SetCrystal(Crystal &)
Set the crystal in which is included this Scatterer.
virtual string GetComponentName(const int i) const =0
Name for the i-th component of this scatterer.
const Crystal & GetCrystal() const
In which crystal is this Scatterer included ?
ObjRegistry< Scatterer > gScattererRegistry("Global Scatterer Registry")
Global registry for all Scatterer objects.
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
virtual const ScatteringComponentList & GetScatteringComponentList() const =0
Get the list of all scattering components for this scatterer.
Crystal class: Unit cell, spacegroup, scatterers.
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
REAL GetY() const
Y 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.
class of refinable parameter types.
list of scattering positions in a crystal, associated with the corresponding occupancy and a pointer ...
virtual void SetOccupancy(const REAL occupancy)
Change the occupancy of the scatterer (0.
virtual void InitRGBColour()
Get RGB Colour coordinates from Colour Name.
Generic type of scatterer: can be an atom, or a more complex assembly of atoms.
Crystal * mpCryst
The crystal in which the Scatterer is This is needed so that we can know which scattering powers are ...
virtual void InitRefParList()=0
const RefParType * gpRefParTypeObjCryst
Top RefParType for the ObjCryst++ library.
virtual void SetZ(const REAL z)
Z coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
base wxCryst class for Scatterers