19 #ifndef _OBJCRYST_ZSCATTERER_H_ 
   20 #define _OBJCRYST_ZSCATTERER_H_ 
   22 #include "ObjCryst/CrystVector/CrystVector.h" 
   24 #include "ObjCryst/ObjCryst/General.h" 
   26 #include "ObjCryst/ObjCryst/ScatteringPower.h" 
   27 #include "ObjCryst/ObjCryst/Scatterer.h" 
   28 #include "ObjCryst/RefinableObj/GlobalOptimObj.h" 
   62                                                      const int spgSymPosIndex=0) 
const;
 
   65                                                           const int spgSymPosIndex=0) 
const;
 
   67                                                           const int spgSymPosIndex=0) 
const;
 
   69                                                           const int spgSymPosIndex=0) 
const;
 
   72       virtual void InitRefParList();
 
   90             const long atomBond=0, 
const REAL bondLength=1,
 
   91             const long atomAngle=0, 
const REAL bondAngle=M_PI,
 
   92             const long atomDihedral=0, 
const REAL dihedralAngle=M_PI,
 
   93             const REAL popu=1., 
const string &name=
"");
 
   95       const string& GetClassName()
const;
 
   96       const string& GetName()
const;
 
   97       void SetName(
const string&);
 
  134       void XMLOutput(ostream &os,
int indent=0)
const;
 
  156       void WXNotifyDelete();
 
  174       void RecordConformation();
 
  175       void SetZAtomWeight(
const CrystVector_REAL weight);
 
  176       void MinimizeChange(
long nbTrial=10000);
 
  180       CrystVector_REAL mXCoord0,mYCoord0,mZCoord0;
 
  181       CrystVector_REAL mAtomWeight;
 
  202                  const REAL x=0.,
const REAL y=0.,
const REAL z=0.,
 
  203                  const REAL phi=0.,
const REAL chi=0., 
const REAL psi=0.);
 
  217                    const long atomBond, 
const REAL bondLength,
 
  218                    const long atomAngle, 
const REAL bondAngle,
 
  219                    const long atomDihedral, 
const REAL dihedralAngle,
 
  279                                      const REAL xMin=-.1,
const REAL xMax=1.1,
 
  280                                      const REAL yMin=-.1,
const REAL yMax=1.1,
 
  281                                      const REAL zMin=-.1,
const REAL zMax=1.1,
 
  282                                      const bool displayEnantiomer=
false,
 
  283                                      const bool displayNames=
false,
 
  284                                      const bool hideHydrogens=
false)
const;
 
  295       virtual void XMLOutput(ostream &os,
int indent=0)
const;
 
  299                                 CrystVector_uint & groupIndex,
 
  300                                 unsigned int &firstGroup) 
const;
 
  304       const CrystVector_REAL& 
GetXCoord() 
const;
 
  306       const CrystVector_REAL& 
GetYCoord() 
const;
 
  308       const CrystVector_REAL& 
GetZCoord() 
const;
 
  441       mutable CrystVector_REAL 
mXCoord,mYCoord,mZCoord;
 
  458 enum RegularPolyhedraType { TETRAHEDRON, OCTAHEDRON, SQUARE_PLANE, CUBE, ANTIPRISM_TETRAGONAL,
 
  459                             PRISM_TETRAGONAL_MONOCAP, PRISM_TETRAGONAL_DICAP,
 
  460                             PRISM_TRIGONAL,PRISM_TRIGONAL_TRICAPPED,
 
  461                             ICOSAHEDRON, TRIANGLE_PLANE};
 
  493             const REAL x, 
const REAL y, 
const REAL z,
 
  496             const REAL ligandPopu=1,
 
  497             const REAL phi=0., 
const REAL chi=0., 
const REAL psi=0.);
 
  514       RegularPolyhedraType mPolyhedraType;
 
  518 #include "ObjCryst/ObjCryst/Crystal.h" 
  520 #endif //_OBJCRYST_ZSCATTERER_H_ 
const CrystVector_REAL & GetZCoord() const 
Get the list of all ZAtom cartesian x coordinates. 
CrystVector_int mComponentIndex
Index of atoms in the ScatteringComponentList. 
const REAL & GetZBondLength() const 
Const access to bondlength parameter. 
const CrystVector_REAL & GetYCoord() const 
Get the list of all ZAtom cartesian x coordinates. 
void SetScatteringPower(const ScatteringPower *)
Set the ScatteringPower. 
unsigned int GetCenterAtomIndex() const 
Get the index of the central atom (around which the rotation is made) 
ZScatterer(const string &name, Crystal &cryst, const REAL x=0., const REAL y=0., const REAL z=0., const REAL phi=0., const REAL chi=0., const REAL psi=0.)
ZScatterer constructor. 
void UpdateCoordinates() const 
Update the atom coordinates (in real units, in Angstroems). 
void AddAtom(const string &name, const ScatteringPower *pow, const long atomBond, const REAL bondLength, const long atomAngle, const REAL bondAngle, const long atomDihedral, const REAL dihedralAngle, const REAL popu=1.)
Add an atom to the Zscatterer. 
REAL GetZAtomY(const int i) const 
Get the Y fractionnal coordinate of atom i. 
virtual REAL GetForwardScatteringFactor(const RadiationType) const 
Get the scattering factor at (0,0,0). 
CrystMatrix_REAL mPhiChiPsiMatrix
Rotation matrix for the orientation of the scatterer. 
virtual CrystVector_REAL GetTemperatureFactor(const ScatteringData &data, const int spgSymPosIndex=0) const 
Get the temperature factor for all reflections of a given ScatteringData object. 
void SetZAngle(const int i, const REAL)
Access to the angle parameter, for the i-th row in the Z-Matrix. 
REAL GetZAtomZ(const int i) const 
Get the Z fractionnal coordinate of atom i. 
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...
virtual void XMLOutput(ostream &os, int indent=0) const 
Output to stream in well-formed XML. 
const CrystVector_REAL & GetXCoord() const 
Get the list of all ZAtom cartesian x coordinates. 
void SetZBondLength(const int i, const REAL)
Access to bondlength parameter, for the i-th row in the Z-Matrix. 
ZScatterer * mpScatt
the ZScatterer in which this atom is included. 
ScatteringComponentList mScattCompList
The list of scattering components. 
virtual void InitRefParList()
Prepare refinable parameters for the scatterer object. 
wxCryst class for ZScatterer objects 
RefinableObjClock mClockCoord
Last time the cartesian coordinates were computed. 
void SetChi(const REAL)
Access to chi parameter (overall orientation of the scatterer) 
virtual void XMLInput(istream &is, const XMLCrystTag &tag)
Input From stream. 
virtual string GetComponentName(const int i) const 
Name for the i-th component of this scatterer. 
Class to minimize conformation changes for random moves. 
virtual REAL GetLogLikelihood() const 
Get -log(likelihood) of the current configuration for the object. 
const REAL & GetZAngle() const 
Const access to the angle parameter. 
void Print() const 
Print a single line of information about this scatterer. 
long mCenterAtomIndex
Index of the atom used as a pivot (the scatterer is rotated around this atom). 
Class to compute structure factors for a set of reflections and a Crystal. 
ZScatterer * mpZScatterer
a copy of the ZScatterer associated to this object 
void SetOccupancy(const REAL)
Access to the dihedral angle parameter. 
virtual CrystMatrix_REAL GetResonantScattFactReal(const ScatteringData &data, const int spgSymPosIndex=0) const 
Get the real part of the resonant scattering factor. 
long GetZBondAtom() const 
Index of the 1st atom used to define the atom in the Z-Matrix (the one from which the bondlength is c...
long GetZDihedralAngleAtom() const 
Index of the 3rd atom used to define the atom in the Z-Matrix (the one from which the dihedral angle ...
virtual int GetNbComponent() const 
Number of components in the scatterer (eg number of point scatterers) 
Generic Refinable Object. 
REAL GetZBondLength(const int i) const 
Const access to bondlength parameter, for the i-th row in the Z-Matrix. 
void SetZDihedralAngle(const int i, const REAL)
Access to the dihedral angle parameter, for the i-th row in the Z-Matrix. 
CrystVector_REAL mXCoord
Storage for Cartesian coordinates. 
long mNbDummyAtom
Number of "dummy" atoms in the structure. 
void SetPhi(const REAL)
Access to phi parameter (overall orientation of the scatterer) 
Abstract base class for all objects in wxCryst. 
virtual CrystVector_REAL GetScatteringFactor(const ScatteringData &data, const int spgSymPosIndex=0) const 
Get the Scattering factor for all reflections of a given ScatteringData object. 
Base object for Monte-Carlo Global Optimization methods. 
const REAL & GetOccupancy() const 
Const access to the ocupancy parameter. 
const ZScatterer & GetZScatterer() const 
Get the ZScatterer associated to this ZAtom. 
void ExportFenskeHallZMatrix(ostream &os)
Export to Fenske-Hall ZMatrix file. 
ObjRegistry< ZAtom > mZAtomRegistry
Registry for ZAtoms in this Scatterer. 
virtual ZPolyhedron * CreateCopy() const 
const ScatteringPower * mpScattPow
The ScatteringPower corresponding to this atom. 
REAL mPhi
Angles giving the orientation of the ZScatterer (stored in radian) 
void SetZAngle(const REAL)
Access to the angle parameter. 
string mName
Name for this atom. 
Class to store POV-Ray output options. 
Class for individual atoms in a ZScatterer Object. 
virtual void SetUseGlobalScatteringPower(const bool useIt)
use a Global scattering power for this scatterer ? 
long mAtomBond
The index (in the ZScatterer) of the atoms which are used to define the position of this atom...
void UpdateScattCompList() const 
Update the scattering component list, ie compute all atom positions from the bonds/angles/dihedral an...
void ImportFenskeHallZMatrix(istream &is, bool named=false)
Import "Fenske-Hall" ZMatrix file (fhz in the babel program http://www.eyesopen.com/babel.html\ example: use "./babel -ipdb foo.pdb -ofhz foo.fhz -d", to convert a pdb file to a Z-Matrix file (the -d removes hydrogen atoms) 
CrystMatrix_long m3DDisplayIndex
For 3D display of the structure, bonds, triangular and quadric faces can be displayed. 
virtual CrystMatrix_REAL GetResonantScattFactImag(const ScatteringData &data, const int spgSymPosIndex=0) const 
Get the imaginary part of the resonant scattering factor. 
virtual void GLInitDisplayList(const bool onlyIndependentAtoms=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 
bool mUseGlobalScattPow
Does the ZScatterer use a global scattering power ? 
virtual void EndOptimization()
This should be called by any optimization class at the end of an optimization. 
virtual const ScatteringComponentList & GetScatteringComponentList() const 
Get the list of all scattering components for this scatterer. 
long mNbAtom
Total number of atoms in the structure. 
long GetZAngleAtom() const 
Index of the 2nd atom used to define the atom in the Z-Matrix (the one from which the angle is calcul...
REAL GetPhi() const 
Access to phi parameter (overall orientation of the scatterer) 
virtual const string & GetClassName() const 
Name for this class ("RefinableObj", "Crystal",...). 
void SetZDihedralAngle(const REAL)
Access to the dihedral angle parameter. 
long GetZBondAtom(const int i) const 
Index of the 1st atom used to define the i-th atom in the Z-Matrix (the one from which the bondlength...
ZScatterer: the basic type of complex scatterers, where atom positions are defined using a standard "...
virtual void GetGeneGroup(const RefinableObj &obj, CrystVector_uint &groupIndex, unsigned int &firstGroup) const 
Get the gene group assigned to each parameter. 
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++. 
void SetCenterAtomIndex(const unsigned int)
Set the index of the central atom (around which the rotation is made) 
const REAL & GetZDihedralAngle() const 
Const access to the dihedral angle parameter. 
REAL GetChi() const 
Access to chi parameter (overall orientation of the scatterer) 
REAL mBondLength
Bond length, angle and dihedral angle. 
virtual REAL GetRadius() const 
Return the physical radius of this type of scatterer (for 3D display purposes). 
REAL GetZAngle(const int i) const 
Const access to the angle parameter, for the i-th row in the Z-Matrix. 
RadiationType
Type of radiation used. 
Crystal class: Unit cell, spacegroup, scatterers. 
void SetPsi(const REAL)
Access to psi parameter (overall orientation of the scatterer) 
void Init()
Initialization of the object, used by all constructors, and operator=. 
class to input or output a well-formatted xml beginning or ending tag. 
const ObjRegistry< ZAtom > & GetZAtomRegistry() const 
Access to the registry of ZAtoms. 
REAL GetPsi() const 
Access to psi parameter (overall orientation of the scatterer) 
REAL GetZDihedralAngle(const int i) const 
Const access to the dihedral angle parameter, for the i-th row in the Z-Matrix. 
class of refinable parameter types. 
list of scattering positions in a crystal, associated with the corresponding occupancy and a pointer ...
virtual ostream & POVRayDescription(ostream &os, const CrystalPOVRayOptions &options) const 
ZPolyhedron(const RegularPolyhedraType type, Crystal &cryst, const REAL x, const REAL y, const REAL z, const string &name, const ScatteringPower *centralAtomPow, const ScatteringPower *periphAtomPow, const REAL centralPeriphDist, const REAL ligandPopu=1, const REAL phi=0., const REAL chi=0., const REAL psi=0.)
ZPolyhedron constructor. 
GlobalScatteringPower * mpGlobalScattPow
the global scattering power used, if mUseGlobalScattPow=true 
virtual void GlobalOptRandomMove(const REAL mutationAmplitude, const RefParType *type=gpRefParTypeObjCryst)
Make a random move of the current configuration. 
Generic type of scatterer: can be an atom, or a more complex assembly of atoms. 
long GetZDihedralAngleAtom(const int i) const 
Index of the 3rd atom used to define the i-th atom in the Z-Matrix (the one from which the dihedral a...
REAL GetZAtomX(const int i) const 
Get the X fractionnal coordinate of atom i. 
ZPolyhedron: a Scatterer to describe polyhedras such as octahedron, tetrahedron, square plane...
virtual ZScatterer * CreateCopy() const 
const RefParType * gpRefParTypeObjCryst
Top RefParType for the ObjCryst++ library. 
void SetZBondLength(const REAL)
Access to bondlength parameter. 
const ScatteringPower * GetScatteringPower() const 
ScatteringPower for this atom. 
long GetZAngleAtom(const int i) const 
Index of the 2nd atom used to define the i-th atom in the Z-Matrix (the one from which the angle is c...
Abstract Base Class to describe the scattering power of any Scatterer component in a crystal...