1 #ifndef _OBJCRYST_CIF_H
2 #define _OBJCRYST_CIF_H
12 #include "ObjCryst/Quirks/ci_string.h"
17 #include "ObjCryst/ObjCryst/PowderPattern.h"
18 #include "ObjCryst/ObjCryst/DiffractionDataSingleCrystal.h"
19 #include "ObjCryst/ObjCryst/Crystal.h"
20 #include "ObjCryst/ObjCryst/General.h"
26 REAL CIFNumeric2REAL(
const std::string &s);
29 int CIFNumeric2Int(
const std::string &s);
96 void f2c(REAL &x,REAL &y, REAL &z);
99 void c2f(REAL &x,REAL &y, REAL &z);
108 std::map<std::set<ci_string>,std::map<ci_string,std::vector<std::string> > >
mvLoop;
156 CrystVector_long
mH,mK,mL;
175 CIF(std::istream &in,
const bool interpret=
true,
const bool verbose=
false);
179 void Parse(std::stringstream &in);
214 Crystal*
CreateCrystalFromCIF(
CIF &cif,
const bool verbose,
const bool checkSymAsXYZ,
const bool oneScatteringPowerPerElement,
const bool connectAtoms);
std::map< std::set< ci_string >, std::map< ci_string, std::vector< std::string > > > mvLoop
CIF Loop data.
void ExtractAtomicPositions(const bool verbose=false)
Extract all atomic positions.
The CIFData class holds all the information from a single data_ block from a cif file.
Crystal * CreateCrystalFromCIF(CIF &cif, bool verbose, bool checkSymAsXYZ)
Extract Crystal object(s) from a CIF, if possible.
std::vector< REAL > mBeta
ADP tensor.
void ExtractAll(const bool verbose=false)
Extract lattice parameters, spacegroup (symbol or number), atomic positions, chemical name and formul...
void Cartesian2FractionalCoord()
Generate fractional coordinates from cartesian ones for all atoms CIFData::CalcMatrices() must be cal...
std::string mFormula
Formula. Or empty string if none is available.
REAL mOrthMatrixInvert[3][3]
Cartesian2Fractionnal matrix.
CrystVector_REAL mIobs
Single crystal data.
std::map< ci_string, std::string > mvItem
Individual CIF items.
CIF(std::istream &in, const bool interpret=true, const bool verbose=false)
Creates the CIF object from a stream.
std::string mSymbol
Symbol of the atom, or empty string (_atom_type_symbol or _atom_site_type_symbol).
PowderPattern * CreatePowderPatternFromCIF(CIF &cif)
Create PowderPattern object(s) from a CIF, if possible.
std::vector< REAL > mCoordFrac
Fractionnal coordinates (atom_site_fract{x,y,z}) or empty vector.
void ExtractSpacegroup(const bool verbose=false)
Extract spacegroup number or symbol.
std::string mSpacegroupSymbolHall
Spacegroup Hall symbol (or empty string) (_space_group_name_Hall)
REAL mOccupancy
Site occupancy, or -1.
WavelengthType mDataType
Is this X-Ray 2theta, time-of-flight ?
std::vector< CIFAtom > mvAtom
Atoms, if any are found.
void ExtractSingleCrystalData(const bool verbose=false)
Extract single crystal data, with Iobs, sigma(Iobs) and h,k,l.
std::vector< REAL > mPowderPatternObs
Powder pattern data.
void CalcMatrices(const bool verbose=false)
Calculate real space transformation matrices requires unit cell parameters.
std::string mSpacegroupHermannMauguin
Spacegroup Hermann-Mauguin symbol (or empty string) (_space_group_name_H-M_alt)
void f2c(REAL &x, REAL &y, REAL &z)
Convert from fractional to cartesian coordinates CIFData::CalcMatrices() must be called first...
DiffractionData object for Single Crystal analysis.
std::list< std::string > mvComment
Global comments, outside and data block.
WavelengthType
Incident beam characteristics : monochromatic, X-Ray tube with Alpha1 and alpha2, MAD (a few waveleng...
Powder pattern class, with an observed pattern and several calculated components to modelize the patt...
void ExtractPowderPattern(const bool verbose=false)
Extract Powder Diffraction data, with Iobs, sigma(Iobs) and either 2theta or time-of-flight position...
REAL mOrthMatrix[3][3]
Fractionnal2Cartesian matrix.
void Parse(std::stringstream &in)
Separate the file in data blocks and parse them to sort tags, loops and comments. ...
Main CIF class - parses the stream and separates data blocks, comments, items, loops.
void Fractional2CartesianCoord()
Generate cartesian coordinates from fractional ones for all atoms CIFData::CalcMatrices() must be cal...
std::string mName
Crystal name. Or empty string if none is available.
void ExtractName(const bool verbose=false)
Extract name & formula for the crystal.
DiffractionDataSingleCrystal * CreateSingleCrystalDataFromCIF(CIF &cif, Crystal *pcryst)
Create DiffractionDataSingleCrystal object(s) from a CIF, if possible.
std::map< std::string, CIFData > mvData
The data blocks, after parsing. The key is the name of the data block.
void ExtractAnisotropicADPs(const bool verbose=false)
Extract anisotropic atomic displacement parameters. Isotropic ADPs.
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
std::vector< REAL > mvLatticePar
Lattice parameters, in ansgtroem and degrees - vector size is 0 if no parameters have been obtained y...
std::string mLabel
Label of the atom, or empty string (_atom_site_label).
REAL mWavelength
Wavelength.
Crystal class: Unit cell, spacegroup, scatterers.
void ExtractUnitCell(const bool verbose=false)
Extract unit cell.
void c2f(REAL &x, REAL &y, REAL &z)
Convert from cartesia to fractional coordinates CIFData::CalcMatrices() must be called first...
std::set< string > mvSymmetry_equiv_pos_as_xyz
Map of _symmetry_equiv_pos_as_xyz strings.
CrystVector_long mH
Single crystal data.
std::vector< REAL > mCoordCart
Cartesian coordinates in Angstroem (atom_site_Cartn{x,y,z}) or empty vector.
std::string mSpacegroupNumberIT
Spacegroup number from International Tables (_space_group_IT_number), or -1.
std::list< std::string > mvComment
Comments from CIF file, in the order they were read.