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;
251 virtual void GLInitDisplayList(
const bool noSymmetrics=
false,
252 const REAL xMin=-.1,
const REAL xMax=1.1,
253 const REAL yMin=-.1,
const REAL yMax=1.1,
254 const REAL zMin=-.1,
const REAL zMax=1.1,
255 const bool displayEnantiomer=
false,
256 const bool displayNames=
false,
257 const bool hideHydrogens=
false,
258 const REAL fadeDistance=0,
259 const bool fullMoleculeInLimits=
false)
const=0;
320 #include "ObjCryst/ObjCryst/Crystal.h"
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
ObjRegistry< Scatterer > gScattererRegistry("Global Scatterer Registry")
Global registry for all Scatterer objects.
const RefParType * gpRefParTypeObjCryst
Top RefParType for the ObjCryst++ library.
Crystal class: Unit cell, spacegroup, scatterers.
Class to store POV-Ray output options.
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",...).
virtual void Print() const =0
Print some info about the scatterer (ideally this should be one line...).
virtual int GetNbComponent() const =0
Number of components in the scatterer (eg number of point scatterers)
string mColourName
Colour for this scatterer (from POVRay)
const RefinableObjClock & GetClockScattCompList() const
Last time the ScatteringComponentList was generated.
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 string GetComponentName(const int i) const =0
Name for the i-th component of this scatterer.
virtual void InitRefParList()=0
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 Scatterer * CreateCopy() const =0
virtual const float * GetColourRGB() const
Colour associated to this scatterer, 3 RGB Coordinates.
REAL GetOccupancy() const
Get the occupancy of the scatterer (0.
virtual ostream & POVRayDescription(ostream &os, const CrystalPOVRayOptions &options) const =0
const Crystal & GetCrystal() const
In which crystal is this Scatterer included ?
RefinableObjClock mClockScattCompList
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...
virtual const ScatteringComponentList & GetScatteringComponentList() const =0
Get the list of all scattering components for this scatterer.
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...
list of scattering positions in a crystal, associated with the corresponding occupancy and a pointer ...
class of refinable parameter types.
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...
Generic Refinable Object.
Abstract base class for all objects in wxCryst.
base wxCryst class for Scatterers