pyobjcryst package#
Python wrapping of ObjCryst++.
Objects are wrapped according to their header file in the ObjCryst source.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
Modules
atom – Wrapping of Atom.h crystal – Wrapping of Crystal.h general – Wrapping of General.h globaloptim – Wrapping of GlobalOptimObj.h io – Wrapping of IO.h lsq – Wrapping of LSQNumObj.h molecule – Wrapping of Molecule.h polyhedron – Wrapping of Polyhedron.h refinableobj – Wrapping of RefinableObj.h scatterer – Wrapping of Scatterer.h scatteringpower – Wrapping of ScatteringPower.h scatteringpowersphere – Wrapping of ScatteringPowerSphere.h spacegroup – Wrapping of SpaceGroup.h unitcell – Wrapping of UnitCell.h zscatterer – Wrapping of ZScatterer.h
General Changes
C++ methods that can return const or non-const objects return non-const objects in python.
Classes with a Print() method have the output of this method exposed in the __str__ python method. Thus, obj.Print() == print obj.
CrystVector and CrystMatrix are converted to numpy arrays.
Indexing methods raise IndexError when index is out of bounds.
See the modules’ documentation for specific changes.
- pyobjcryst.loadCrystal(filename)[source]#
Load pyobjcryst Crystal object from a CIF file.
- Parameters:
filename – CIF file to be loaded.
- Returns:
a new Crystal object.
- ..deprecated:: 2.2.4
Use pyobjcryst.crystal.create_crystal_from_cif() instead, which has more options when importing a CIF, including using an URL instead of a file.
Submodules#
pyobjcryst.atom module#
Python wrapping of Atom.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
Changes from ObjCryst::Atom
The default constructor has been disabled. When not followed-up by Init, it will cause segmentation faults, even if it is printed.
- class pyobjcryst.atom.Atom(*args, **kwargs)#
Bases:
Scatterer- GetMass(self) float#
- GetName(self) str#
- GetRadius(self) float#
- GetScatteringPower(self) object#
- Init(self, x: float, y: float, z: float, name: str, pow: object | None, popu: float = 1.0) None#
- IsDummy(self) bool#
- SetName(self, arg: str, /) None#
pyobjcryst.crystal module#
Python wrapping of Crystal.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
Changes from ObjCryst::Crystal
CIFOutput accepts a python file-like object
CalcDynPopCorr is not enabled, as the API states that this is for internal use only.
Other Changes
CreateCrystalFromCIF is placed here instead of in a separate CIF module. This method accepts a python file or a filename rather than a CIF object.
- class pyobjcryst.crystal.BumpMergePar#
Bases:
object- property mCanOverlap#
(self) -> bool
- property mDist2#
(self) -> float
- pyobjcryst.crystal.CreateCrystalFromCIF(file, oneScatteringPowerPerElement=False, connectAtoms=False, multiple=False)#
Create a crystal object from a CIF file or URL.
Example
create_crystal_from_cif(’http://www.crystallography.net/cod/2201530.cif’)
- Parameters:
file – the filename/URL or python file object (need to open with mode=’rb’) If the string begins by ‘http’ it is assumed that it is an URL instead, e.g. from the crystallography open database
oneScatteringPowerPerElement – if False (the default), then there will be as many ScatteringPowerAtom created as there are different elements. If True, only one will be created per element.
connectAtoms – if True, call Crystal::ConnectAtoms to try to create as many Molecules as possible from the list of imported atoms.
multiple – if True, all structures from the CIF will be imported, but the returned Crystal object and those created in the global registry will not have been created in python, and so will miss the derived functions for display & widget.
- Returns:
the imported Crystal structure
- Raises:
ObjCrystException - if no Crystal object can be imported
- class pyobjcryst.crystal.Crystal(*args, **kwargs)[source]#
Bases:
Crystal- CIFOutput(file, mindist=0)[source]#
Save the crystal structure to a CIF file.
- Parameters:
file – either a filename, or a python file object opened in write mode
- display_3d(xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=1, enantiomer=False, full_molecule_opacity=0.5, extra_dist=2, extra_opacity=0.5)[source]#
This will return a 3D view of the Crystal structure which can be displayed in a notebook. This cannot be automatically updated, but will remain in the notebook as a static javascript object, so it can still be useful.
- Parameters:
zmax (xmin, xmax, ymin, ymax, zmin,) – the view limits in
fractional coordinates. :param enantiomer: if True, will mirror the structure along the
x axis
- Parameters:
full_molecule_opacity – if >0, a Molecule (or Scatterer) which has at least one atom inside the view limits is entirely shown, with the given opacity (0-1)
extra_dist – extra distance (in Angstroms) beyond the view limits, where atoms & bonds are still displayed semi- transparently
extra_opacity – the opacity (0-1) to display the atoms within the extra distance.
- widget_3d(xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=1, enantiomer=False, full_molecule_opacity=0.5, extra_dist=2, extra_opacity=0.5, width=640, height=480)[source]#
This will return a 3D view of the Crystal structure which can be displayed in a notebook, along with controls for the display. This can be live-updated.
- Parameters:
zmax (xmin, xmax, ymin, ymax, zmin,) – the view limits in
fractional coordinates. :param enantiomer: if True, will mirror the structure along the
x axis
- Parameters:
full_molecule_opacity – if >0, a Molecule (or Scatterer) which has at least one atom inside the view limits is entirely shown, with the given opacity (0-1)
extra_dist – extra distance (in Angstroms) beyond the view limits, where atoms & bonds are still displayed semi- transparently
extra_opacity – the opacity (0-1) to display the atoms within the extra distance. :param width, height: the width and height of the 3D view
- pyobjcryst.crystal.create_crystal_from_cif(file, oneScatteringPowerPerElement=False, connectAtoms=False, multiple=False)[source]#
Create a crystal object from a CIF file or URL.
Example
create_crystal_from_cif(’http://www.crystallography.net/cod/2201530.cif’)
- Parameters:
file – the filename/URL or python file object (need to open with mode=’rb’) If the string begins by ‘http’ it is assumed that it is an URL instead, e.g. from the crystallography open database
oneScatteringPowerPerElement – if False (the default), then there will be as many ScatteringPowerAtom created as there are different elements. If True, only one will be created per element.
connectAtoms – if True, call Crystal::ConnectAtoms to try to create as many Molecules as possible from the list of imported atoms.
multiple – if True, all structures from the CIF will be imported, but the returned Crystal object and those created in the global registry will not have been created in python, and so will miss the derived functions for display & widget.
- Returns:
the imported Crystal structure
- Raises:
ObjCrystException - if no Crystal object can be imported
pyobjcryst.diffractiondatasinglecrystal module#
Python wrapping of DiffractionDataSingleCrystal.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
- Changes from ObjCryst::DiffractionDataSingleCrystal::
In development !
- class pyobjcryst.diffractiondatasinglecrystal.DiffractionDataSingleCrystal(*args, **kwargs)#
Bases:
ScatteringData- FitScaleFactorForR(self) None#
- FitScaleFactorForRw(self) None#
- GetChi2(self) float#
- GetIcalc(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetIobs(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLogLikelihood(self) float#
- GetR(self) float#
- GetRw(self) float#
- GetSigma(self) numpy.ndarray[dtype=float64, shape=(*)]#
- ImportCIF(self, arg: str, /) None#
- ImportHklIobs(self, fileName: str, nbRefl: int, skipLines: int = 0) None#
- ImportHklIobsSigma(self, fileName: str, nbRefl: int, skipLines: int = 0) None#
- ImportShelxHKLF4(self, arg: str, /) None#
- PrintObsCalcData(self) None#
- PrintObsData(self) None#
- SaveHKLIobsIcalc(self, arg: str, /) None#
- SetEnergy(self, nrj_kev: float) None#
- SetHklIobs(self, h: object, k: object, l: object, iobs: object, sigma: object) None#
- SetIobs(self, iobs: object) None#
- SetIobsToIcalc(self) None#
- SetSigma(self, sigma: object) None#
- SetUseOnlyLowAngleData(self, arg0: bool, arg1: float, /) None#
- SetWavelength(self, wavelength: float) None#
- SetWavelength(self, XRayTubeElementName: str, alpha2Alpha2ratio: float = 0.5) None
- pyobjcryst.diffractiondatasinglecrystal.create_singlecrystaldata_from_cif(file, crystal)[source]#
Create a DiffractionDataSingleCrystal object from a CIF file.
Note that this will use the last created Crystal as a reference structure. Example using the COD to load both crystal and data:
c=create_crystal_from_cif(’http://www.crystallography.net/cod/2201530.cif’) d=create_singlecrystaldata_from_cif(’http://www.crystallography.net/cod/2201530.hkl’, c)
- param file: the filename/URL or python file object (need to open with mode=’rb’).
If the string begins by ‘http’ it is assumed that it is an URL instead, e.g. from the crystallography open database
param crystal: the Crystal object which will be used for this single crystal data. :return: the imported DiffractionDataSingleCrystal :raises: ObjCrystException - if no DiffractionDataSingleCrystal object can be created
pyobjcryst.fourier module#
- pyobjcryst.fourier.calc_fourier_map(data: ScatteringData, map_type='obs', sharpen=True, resolution=0.3)[source]#
Compute a 3D Fourier map given a ScatteringData object :param data: a ScatteringData object with observed data, either q DiffractionDataSingleCrystal or PowderPatternDiffraction after extraction of intensities (profile fitting) :param map_type: either “obs” (the default), “diff” (difference) or “calc” :param sharpen: if True, normalise the structure factor Fourier coefficients by the average atomic scattering factor to sharpen the Fourier maps.
- Parameters:
resolution – approximate desired resolution for the map, in Angstroems
- Returns:
the 3D Fourier map, computed over one unit cell, with a resolution dictated by the largest HKL values. The map’s origin is at the corner of the unit cell.
pyobjcryst.general module#
Python wrapping of things from General.h.
See the online ObjCryst++ documentation ( https://objcryst.readthedocs.io).
- exception pyobjcryst.general.ObjCrystException#
Bases:
Exception
pyobjcryst.globaloptim module#
Python wrapping of GlobalOptimObj.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
- Changes from ObjCryst::MonteCarloObj::
In development !
- class pyobjcryst.globaloptim.AnnealingSchedule(*values)#
Bases:
Enum- BOLTZMANN = 1#
- CAUCHY = 2#
- CONSTANT = 0#
- EXPONENTIAL = 3#
- GAMMA = 5#
- SMART = 4#
- class pyobjcryst.globaloptim.GlobalOptimType(*values)#
Bases:
Enum- PARALLEL_TEMPERING = 1#
- PARALLEL_TEMPERING_MULTI = 4#
- RANDOM_LSQ = 2#
- SIMULATED_ANNEALING = 0#
- SIMULATED_ANNEALING_MULTI = 3#
- class pyobjcryst.globaloptim.MonteCarlo(*args, **kwargs)[source]#
Bases:
MonteCarlo- MultiRunOptimize(self, nbCycle: int, nbSteps: int, silent: bool = False, finalcost: float = 0.0, maxTime: float = -1.0) None[source]#
- Optimize(self, nbSteps: int, silent: bool = False, finalcost: float = 0.0, maxTime: float = -1.0) None[source]#
- RunParallelTempering(self, nbSteps: int, silent: bool = False, finalcost: float = 0.0, maxTime: float = -1.0) None[source]#
pyobjcryst.globals module#
Global objects are exposed here.
These are the main objects registries, which are tweaked to wrap pure C++ objects with the python methods.
pyobjcryst.indexing module#
Python wrapping of UnitCell.h.
See the online ObjCryst++ documentation ( https://objcryst.readthedocs.io).
- class pyobjcryst.indexing.CellExplorer(*args, **kwargs)#
Bases:
RefinableObj- DicVol(self, minScore: float = 10.0, minDepth: int = 10, stopOnScore: float = 50.0, stopOnDepth: int = 6, verbose: bool = True) None#
- GetBestScore(self) float#
- GetSolutions(self) list#
- Print(self) None#
- ReduceSolutions(self, updateReportThreshold: bool = False) None#
- SetAngleMinMax(self, arg0: float, arg1: float, /) None#
- SetCrystalCentering(self, arg: pyobjcryst._pyobjcryst.CrystalCentering, /) None#
- SetCrystalSystem(self, arg: pyobjcryst._pyobjcryst.CrystalSystem, /) None#
- SetD2Error(self, arg: float, /) None#
- SetLengthMinMax(self, arg0: float, arg1: float, /) None#
- SetMinMaxZeroShift(self, arg0: float, arg1: float, /) None#
- SetNbSpurious(self, arg: int, /) None#
- SetVolumeMinMax(self, arg0: float, arg1: float, /) None#
- class pyobjcryst.indexing.CrystalCentering(*values)#
Bases:
Enum- LATTICE_A = 2#
- LATTICE_B = 3#
- LATTICE_C = 4#
- LATTICE_F = 5#
- LATTICE_I = 1#
- LATTICE_P = 0#
- class pyobjcryst.indexing.CrystalSystem(*values)#
Bases:
Enum- CUBIC = 6#
- HEXAGONAL = 3#
- MONOCLINIC = 1#
- ORTHORHOMBIC = 2#
- ORTHOROMBIC = 2#
- RHOMBOEDRAL = 4#
- TETRAGONAL = 5#
- TRICLINIC = 0#
- class pyobjcryst.indexing.PeakList(*args, **kwargs)#
Bases:
_PeakListBase- ExportDhklDSigmaIntensity(self, file: object) None#
- GetPeakList(self) list#
- Import2ThetaIntensity(self, file: object, wavelength: float) None#
- ImportDhkl(self, file: object) None#
- ImportDhklDSigmaIntensity(self, file: object, defaultsigma: float = 0.0010000000474974513) None#
- ImportDhklIntensity(self, file: object) None#
- Simulate(self, zero: float, a: float, b: float, c: float, alpha: float, beta: float, gamma: float, deg: bool, nb: int = 20, nbspurious: int = 0, sigma: float = 0.0, percentMissing: float = 0.0, verbose: bool = False, merge: bool = False) float#
- clear(self) None#
- resize(self, nb: int = 20) None#
- set_dobs_list(self, dobs: list) None#
- class pyobjcryst.indexing.PeakList_hkl(*args, **kwargs)#
Bases:
object- property d2calc#
(self) -> float
- property d2diff#
(self) -> float
- property d2obs#
(self) -> float
- property d2obsmax#
(self) -> float
- property d2obsmin#
(self) -> float
- property dobs#
(self) -> float
- property dobssigma#
(self) -> float
- property h#
(self) -> int
- property iobs#
(self) -> float
- property iobssigma#
(self) -> float
- property isIndexed#
(self) -> bool
- property isSpurious#
(self) -> bool
- property k#
(self) -> int
- property l#
(self) -> int
- property stats#
(self) -> int
- property vDicVolHKL#
(self) -> list
- class pyobjcryst.indexing.PeakList_hkl0(*args, **kwargs)#
Bases:
object- property h#
(self) -> int
- property k#
(self) -> int
- property l#
(self) -> int
- class pyobjcryst.indexing.RecUnitCell(*args, **kwargs)#
Bases:
object- DirectUnitCell(self, equiv: bool = False, degrees: bool = False) tuple#
- property centering#
(self) -> pyobjcryst._pyobjcryst.CrystalCentering
- hkl2d(self, h: float, k: float, l: float, derivpar: object | None = None, derivhkl: int = 0) float#
- property lattice#
(self) -> pyobjcryst._pyobjcryst.CrystalSystem
- property mCentering#
(self) -> pyobjcryst._pyobjcryst.CrystalCentering
- property mNbSpurious#
(self) -> int
- property mlattice#
(self) -> pyobjcryst._pyobjcryst.CrystalSystem
- property nb_spurious#
(self) -> int
pyobjcryst.io module#
Python wrapping of IO.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
Changes from ObjCryst::XMLCrystTag - The istream constructor of XMLCrystTag is not wrapped.
Changes from IO functions: - use lower case for xml_cryst_file_load_all_object and xml_cryst_file_save_global - both functions accept either a file object or a filename, and can handle compressed
files (‘.xmlgz)
- class pyobjcryst.io.XMLCrystTag(*args, **kwargs)#
Bases:
object- AddAttribute(self, attName: str, attValue: str) None#
- GetAttribute(self, attNum: int, attName: str, attValue: str) None#
- GetAttributeName(self, arg: int, /) str#
- GetAttributeValue(self, arg: int, /) str#
- GetClassName(self) str#
- GetName(self) str#
- GetNbAttribute(self) int#
- IsEmptyTag(self) bool#
- IsEndTag(self) bool#
- Print(self) None#
- SetIsEmptyTag(self, arg: bool, /) None#
- SetIsEndTag(self, arg: bool, /) None#
- pyobjcryst.io.xml_cryst_file_load_all_object(file, verbose=False)[source]#
Load all objects from an ObjCryst-formatted .xml or .xmlgz file :param file: the filename or python file object (need to open with mode=’rb’) :param verbose: if True, some information about the loaded objects is printed :return: a list of the imported top-level objects (Crystal,
DiffractionDataSingleCrystal, PowderPattern)
- pyobjcryst.io.xml_cryst_file_save_global(file)[source]#
Save all top-level objects to an ObjCryst-formatted .xml or .xmlgz file :param file: the filename or python file object (need to open with mode=’rb’).
If a filename is given and the extension is ‘xmlgz’, the file will be compressed by gzip
- Returns:
nothing
pyobjcryst.lsq module#
Python wrapping of LSQNumObj.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
- Changes from ObjCryst::LSQNumObj::
In development !
- class pyobjcryst.lsq.LSQ(*args, **kwargs)#
Bases:
object- BeginOptimization(self, allowApproximations: bool = False, enableRestraints: bool = False) None#
- ChiSquare(self) float#
- EndOptimization(self) None#
- GetCompiledRefinedObj(self) pyobjcryst._pyobjcryst.RefinableObj#
- GetLSQCalc(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQDeriv(self, par: pyobjcryst._pyobjcryst._RefinablePar) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQObs(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQWeight(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetRwHistory(self) list[float]#
Return the per-cycle Rw history from the last Refine() call (as a list of fractions).
- GetVarianceCovarianceMap(self) dict#
Return the variance-covariance matrix as a dict keyed by (param_name, param_name) tuples.
- PrepareRefParList(self, copy_param: bool = False, verbose: bool = False) None#
Prepare the compiled parameter list. Set verbose=True to show warnings emitted while resolving duplicate names.
- PrintRefResults(self) None#
- Refine(self, nbCycle: int = 1, useLevenbergMarquardt: bool = False, silent: bool = False, callBeginEndOptimization: bool = True, minChi2var: float = 0.009999999776482582, minRwpVar: float = -1.0) None#
- Rfactor(self) float#
- RwFactor(self) float#
- SafeRefine(self, maxChi2factor: float = 1.01, nbCycle: int = 1, useLevenbergMarquardt: bool = False, silent: bool = False, callBeginEndOptimization: bool = True, minChi2var: float = 0.009999999776482582, minRwpVar: float = -1.0) bool#
- SetParIsFixed(self, parName: str, fix: bool) None#
- SetParIsFixed(self, type: pyobjcryst._pyobjcryst.RefParType, fix: bool) None
- SetParIsFixed(self, par: pyobjcryst._pyobjcryst._RefinablePar, fix: bool) None
- SetRefinedObj(self, obj: object, LSQFuncIndex: int = 0, init: bool = True, recursive: bool = False) None#
- UnFixAllPar(self) None#
pyobjcryst.molecule module#
Python wrapping of Molecule.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
Changes from ObjCryst::Molecule
The public data are not wrapped.
Added __getitem__ access for MolAtoms.
AddAtom returns the added MolAtom
AddBond returns the added MolBond
AddBondAngle returns the added MolBondAngle
AddDihedralAngle returns the added MolDihedralAngle
RemoveAtom returns None, has an indexed version
RemoveBond returns None, has an indexed version
RemoveBondAngle returns None, has an indexed version
RemoveDihedralAngle returns None, has an indexed version
RemoveRigidGroup returns None
Added GetNbAtoms
Added GetNbBonds
Added GetNbBondAngles
Added GetNbDihedralAngles
Added GetNbRigidGroups
Added GetBond
Added GetBondAngle
Added GetDihedralAngle
Added GetRigidGroup
FindBond returns the bond if found, None otherwise
FindBondAngle returns the bond angle if found, None otherwise
FindDihedralAngle returns the dihedral angle if found, None otherwise
FindAtom is identical to GetAtom.
FlipAtomGroup is not wrapped.
FlipGroup, RotorGroup and StretchModeGroup are not wrapped.
StretchMode getters are not wrapped
Quaternion ordinates Q0, Q1, Q2 and Q3 wrapped as properties.
Changes from ObjCryst::MolAtom
Wrapped as a to-python converter only (no constructor)
File IO is disabled
X, Y and Z are wrapped as properties rather than methods.
Changes from ObjCryst::MolBondAngle
Wrapped as a to-python converter only (no constructor)
Added __getitem__ access for MolAtoms.
File IO is disabled
GetDeriv and CalcGradient are not wrapped.
Angle0, AngleDelta and AngleSigma are wrapped as properties rather than methods.
IsFlexible and SetFlexible are not wrapped, as they are not implemented in the library.
Changes from ObjCryst::MolDihedralAngle
Wrapped as a to-python converter only (no constructor)
Added __getitem__ access for MolAtoms.
Changes from ObjCryst::Quaternion
IO is not wrapped
Q0, Q1, Q2 and Q3 are wrapped as properties, rather than functions.
RotateVector overloaded to return tuple of the mutated arguments.
Changes from ObjCryst::RigidGroup
RigidGroup is wrapped to have python-set methods rather than stl::set methods.
- pyobjcryst.molecule.ImportFenskeHallZMatrix(cryst, src, named=False)[source]#
Create a Molecule from a Fenske-Hall z-matrix.
This is cleaner than importing the Z-matrix into a ZScatterer object and then using ZScatterer2Molecule, as it takes care of keeping only the created Molecule inside the Crystal.
- Parameters:
cryst – a Crystal object to which will belong the created Molecule
src – either a python filed (opened in ‘rb’ mode), or a filename, or an url (”http://…”) to a text file with the z-matrix
named – if True, allows to read a named Z-matrix - the formatting is similar to a Fenske-Hall z-matrix but only relies on spaces between the different fields instead of a strict number of characters.
- class pyobjcryst.molecule.MolAtom(*args, **kwargs)#
Bases:
object- GetMolecule(self) pyobjcryst._pyobjcryst.Molecule#
- GetName(self) str#
- GetOccupancy(self) float#
- GetScatteringPower(self) object#
- GetX(self) float#
- GetY(self) float#
- GetZ(self) float#
- IsDummy(self) bool#
- IsInRing(self) bool#
- property Occupancy#
(self) -> float
- SetIsInRing(self, arg: bool, /) None#
- SetName(self, arg: str, /) None#
- SetOccupancy(self, arg: float, /) None#
- SetX(self, arg: float, /) None#
- SetY(self, arg: float, /) None#
- SetZ(self, arg: float, /) None#
- property X#
(self) -> float
- property Y#
(self) -> float
- property Z#
(self) -> float
- int_ptr(self) int#
- property occ#
(self) -> float
- property x#
(self) -> float
- property y#
(self) -> float
- property z#
(self) -> float
- class pyobjcryst.molecule.MolBond#
Bases:
Restraint- property BondOrder#
(self) -> float
- GetAtom1(self) pyobjcryst._pyobjcryst.MolAtom#
- GetAtom2(self) pyobjcryst._pyobjcryst.MolAtom#
- GetBondOrder(self) float#
- GetLength(self) float#
- GetLength0(self) float#
- GetLengthDelta(self) float#
- GetLengthSigma(self) float#
- GetLogLikelihood(self) float#
- GetLogLikelihood(self, arg0: bool, arg1: bool, /) float
- GetMolecule(self) pyobjcryst._pyobjcryst.Molecule#
- GetName(self) str#
- IsFreeTorsion(self) bool#
- property Length#
(self) -> float
- property Length0#
(self) -> float
- property LengthDelta#
(self) -> float
- property LengthSigma#
(self) -> float
- SetAtom1(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- SetAtom2(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- SetBondOrder(self, arg: float, /) None#
- SetFreeTorsion(self, arg: bool, /) None#
- SetLength0(self, arg: float, /) None#
- SetLengthDelta(self, arg: float, /) None#
- SetLengthSigma(self, arg: float, /) None#
- int_ptr(self) int#
- class pyobjcryst.molecule.MolBondAngle#
Bases:
Restraint- property Angle#
(self) -> float
- property Angle0#
(self) -> float
- property AngleDelta#
(self) -> float
- property AngleSigma#
(self) -> float
- GetAngle(self) float#
- GetAngle0(self) float#
- GetAngleDelta(self) float#
- GetAngleSigma(self) float#
- GetAtom1(self) pyobjcryst._pyobjcryst.MolAtom#
- GetAtom2(self) pyobjcryst._pyobjcryst.MolAtom#
- GetAtom3(self) pyobjcryst._pyobjcryst.MolAtom#
- GetLogLikelihood(self) float#
- GetLogLikelihood(self, arg0: bool, arg1: bool, /) float
- GetMolecule(self) pyobjcryst._pyobjcryst.Molecule#
- GetName(self) str#
- SetAngle0(self, arg: float, /) None#
- SetAngleDelta(self, arg: float, /) None#
- SetAngleSigma(self, arg: float, /) None#
- SetAtom1(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- SetAtom2(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- SetAtom3(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- int_ptr(self) int#
- class pyobjcryst.molecule.MolDihedralAngle#
Bases:
Restraint- property Angle#
(self) -> float
- property Angle0#
(self) -> float
- property AngleDelta#
(self) -> float
- property AngleSigma#
(self) -> float
- GetAngle(self) float#
- GetAngle0(self) float#
- GetAngleDelta(self) float#
- GetAngleSigma(self) float#
- GetAtom1(self) pyobjcryst._pyobjcryst.MolAtom#
- GetAtom2(self) pyobjcryst._pyobjcryst.MolAtom#
- GetAtom3(self) pyobjcryst._pyobjcryst.MolAtom#
- GetAtom4(self) pyobjcryst._pyobjcryst.MolAtom#
- GetLogLikelihood(self) float#
- GetLogLikelihood(self, arg0: bool, arg1: bool, /) float
- GetMolecule(self) pyobjcryst._pyobjcryst.Molecule#
- GetName(self) str#
- SetAngle0(self, arg: float, /) None#
- SetAngleDelta(self, arg: float, /) None#
- SetAngleSigma(self, arg: float, /) None#
- SetAtom1(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- SetAtom2(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- SetAtom3(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- SetAtom4(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- int_ptr(self) int#
- class pyobjcryst.molecule.Molecule(*args, **kwargs)#
Bases:
Scatterer- AddAtom(self, x: float, y: float, z: float, pPow: object | None, name: str, updateDisplay: bool = True) pyobjcryst._pyobjcryst.MolAtom#
- AddBond(self, atom1: pyobjcryst._pyobjcryst.MolAtom, atom2: pyobjcryst._pyobjcryst.MolAtom, length: float, sigma: float, delta: float, bondOrder: float = 1.0, updateDisplay: bool = True) pyobjcryst._pyobjcryst.MolBond#
- AddBondAngle(self, atom1: pyobjcryst._pyobjcryst.MolAtom, atom2: pyobjcryst._pyobjcryst.MolAtom, atom3: pyobjcryst._pyobjcryst.MolAtom, angle: float, sigma: float, delta: float, updateDisplay: bool = True) pyobjcryst._pyobjcryst.MolBondAngle#
- AddDihedralAngle(self, atom1: pyobjcryst._pyobjcryst.MolAtom, atom2: pyobjcryst._pyobjcryst.MolAtom, atom3: pyobjcryst._pyobjcryst.MolAtom, atom4: pyobjcryst._pyobjcryst.MolAtom, angle: float, sigma: float, delta: float, updateDisplay: bool = True) pyobjcryst._pyobjcryst.MolDihedralAngle#
- AddPar(self, par: pyobjcryst._pyobjcryst._RefinablePar) None#
- AddPar(self, newRefParList: object, copyParam: bool = False) None
- AddRigidGroup(self, group: pyobjcryst._pyobjcryst.RigidGroup, updateDisplay: bool = True) pyobjcryst._pyobjcryst.RigidGroup#
- AddRigidGroup(self, group: object, updateDisplay: bool = True) pyobjcryst._pyobjcryst.RigidGroup
- AsZMatrix(self, keeporder: bool) list#
- BondAngleRandomChange(self, mode: pyobjcryst._pyobjcryst.StretchModeBondAngle, amplitude: float, respectRestraint: bool = True) float#
- BondLengthRandomChange(self, mode: pyobjcryst._pyobjcryst.StretchModeBondLength, amplitude: float, respectRestraint: bool = True) float#
- BuildConnectivityTable(self) None#
- BuildFlipGroup(self) None#
- BuildRingList(self) None#
- BuildRotorGroup(self) None#
- BuildStretchModeBondAngle(self) None#
- BuildStretchModeBondLength(self) None#
- BuildStretchModeGroups(self) None#
- BuildStretchModeTorsion(self) None#
- BuildStretchModeTwist(self) None#
- DihedralAngleRandomChange(self, mode: pyobjcryst._pyobjcryst.StretchModeTorsion, amplitude: float, respectRestraint: bool = True) float#
- FindAtom(self, arg: str, /) pyobjcryst._pyobjcryst.MolAtom#
- FindBond(self, arg0: pyobjcryst._pyobjcryst.MolAtom, arg1: pyobjcryst._pyobjcryst.MolAtom, /) object#
- FindBondAngle(self, arg0: pyobjcryst._pyobjcryst.MolAtom, arg1: pyobjcryst._pyobjcryst.MolAtom, arg2: pyobjcryst._pyobjcryst.MolAtom, /) object#
- FindDihedralAngle(self, arg0: pyobjcryst._pyobjcryst.MolAtom, arg1: pyobjcryst._pyobjcryst.MolAtom, arg2: pyobjcryst._pyobjcryst.MolAtom, arg3: pyobjcryst._pyobjcryst.MolAtom, /) object#
- GetAtom(self, arg: int, /) pyobjcryst._pyobjcryst.MolAtom#
- GetAtom(self, arg: str, /) pyobjcryst._pyobjcryst.MolAtom
- GetAtomList(self) list#
- GetAtomPositionClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetBond(self, arg: int, /) pyobjcryst._pyobjcryst.MolBond#
- GetBondAngle(self, arg: int, /) pyobjcryst._pyobjcryst.MolBondAngle#
- GetBondAngleList(self) list#
- GetBondList(self) list#
- GetBondListClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetCenterAtom(self) pyobjcryst._pyobjcryst.MolAtom#
- GetConnectivityTable(self) dict#
- GetDihedralAngle(self, arg: int, /) pyobjcryst._pyobjcryst.MolDihedralAngle#
- GetDihedralAngleList(self) list#
- GetFormula(self) str#
- GetLogLikelihood(self) float#
- GetNbAtoms(self) int#
- GetNbBondAngles(self) int#
- GetNbBonds(self) int#
- GetNbDihedralAngles(self) int#
- GetNbRigidGroups(self) int#
- GetRigidGroupClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetRigidGroupList(self) list#
- GetStretchModeBondAngleList(self) list#
- GetStretchModeBondLengthList(self) list#
- GetStretchModeTorsionList(self) list#
- InitOptions(self) None#
- IterAtom(self) collections.abc.Iterator[pyobjcryst._pyobjcryst.MolAtom]#
- IterBond(self) collections.abc.Iterator[pyobjcryst._pyobjcryst.MolBond]#
- IterBondAngle(self) collections.abc.Iterator[pyobjcryst._pyobjcryst.MolBondAngle]#
- IterDihedralAngle(self) collections.abc.Iterator[pyobjcryst._pyobjcryst.MolDihedralAngle]#
- OptimizeConformation(self, nbTrial: int = 10000, stopCost: float = 0.0) None#
- OptimizeConformationSteepestDescent(self, maxStep: float = 0.1, nbSteps: int = 1) None#
- property Q0#
(self) -> float
- property Q1#
(self) -> float
- property Q2#
(self) -> float
- property Q3#
(self) -> float
- RemoveAtom(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- RemoveAtom(self, arg: int, /) None
- RemoveBond(self, arg: pyobjcryst._pyobjcryst.MolBond, /) None#
- RemoveBond(self, arg: int, /) None
- RemoveBondAngle(self, arg: pyobjcryst._pyobjcryst.MolBondAngle, /) None#
- RemoveBondAngle(self, arg: int, /) None
- RemoveDihedralAngle(self, arg: pyobjcryst._pyobjcryst.MolDihedralAngle, /) None#
- RemoveDihedralAngle(self, arg: int, /) None
- RemoveRigidGroup(self, group: pyobjcryst._pyobjcryst.RigidGroup, updateDisplay: bool = True) None#
- RigidifyWithDihedralAngles(self) None#
- RotateAtomGroup(self, at1: pyobjcryst._pyobjcryst.MolAtom, at2: pyobjcryst._pyobjcryst.MolAtom, atoms: object, angle: float, keepCenter: bool = True) None#
- RotateAtomGroup(self, at1: pyobjcryst._pyobjcryst.MolAtom, vx: float, vy: float, vz: float, atoms: object, angle: float, keepCenter: bool = True) None
- RotateAtomGroup(self, v1: object, v2: object, atoms: object, angle: float, keepCenter: bool = True) None
- SetCenterAtom(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- TranslateAtomGroup(self, atoms: object, dx: float, dy: float, dz: float, keepCenter: bool = True) None#
- TuneGlobalOptimRotationAmplitude(self) None#
- UpdateScattCompList(self) None#
- xml(self) str#
- class pyobjcryst.molecule.Quaternion(*args, **kwargs)#
Bases:
object- GetConjugate(self) pyobjcryst._pyobjcryst.Quaternion#
- GetNorm(self) float#
- Normalize(self) None#
- property Q0#
(self) -> float
- property Q1#
(self) -> float
- property Q2#
(self) -> float
- property Q3#
(self) -> float
- RotateVector(self, v1: float, v2: float, v3: float) tuple#
- RotationQuaternion = <nanobind.nb_func object>#
- class pyobjcryst.molecule.RigidGroup(*args, **kwargs)#
Bases:
object- GetName(self) str#
- add(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- clear(self) None#
- discard(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- int_ptr(self) int#
- remove(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- update(self, arg: object, /) None#
- class pyobjcryst.molecule.StretchMode#
Bases:
object- CalcDeriv(self, derivllk: bool = True) None#
- RandomStretch(self, amplitude: float, keepCenter: bool = True) None#
- Stretch(self, amplitude: float, keepCenter: bool = True) None#
- class pyobjcryst.molecule.StretchModeBondAngle(*args, **kwargs)#
Bases:
StretchMode- AddAtom(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- AddAtoms(self, arg: object, /) None#
- GetAtoms(self) list#
- property mpAtom0#
(self) -> pyobjcryst._pyobjcryst.MolAtom
- property mpAtom1#
(self) -> pyobjcryst._pyobjcryst.MolAtom
- property mpAtom2#
(self) -> pyobjcryst._pyobjcryst.MolAtom
- class pyobjcryst.molecule.StretchModeBondLength(*args, **kwargs)#
Bases:
StretchMode- AddAtom(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- AddAtoms(self, arg: object, /) None#
- GetAtoms(self) list#
- property mpAtom0#
(self) -> pyobjcryst._pyobjcryst.MolAtom
- property mpAtom1#
(self) -> pyobjcryst._pyobjcryst.MolAtom
- class pyobjcryst.molecule.StretchModeTorsion(*args, **kwargs)#
Bases:
StretchMode- AddAtom(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- AddAtoms(self, arg: object, /) None#
- GetAtoms(self) list#
- property mpAtom1#
(self) -> pyobjcryst._pyobjcryst.MolAtom
- property mpAtom2#
(self) -> pyobjcryst._pyobjcryst.MolAtom
- class pyobjcryst.molecule.StretchModeTwist(*args, **kwargs)#
Bases:
StretchMode- AddAtom(self, arg: pyobjcryst._pyobjcryst.MolAtom, /) None#
- AddAtoms(self, arg: object, /) None#
- GetAtoms(self) list#
- property mpAtom1#
(self) -> pyobjcryst._pyobjcryst.MolAtom
- property mpAtom2#
(self) -> pyobjcryst._pyobjcryst.MolAtom
pyobjcryst.polyhedron module#
Python wrapping of Polyhedron.h.
See the online ObjCryst++ documentation ( https://objcryst.readthedocs.io).
pyobjcryst.powderpattern module#
Python wrapping of PowderPattern.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io/en/latest/).
- Changes from ObjCryst::PowderPattern::
Additional functions for plotting, basic QPA and profile fitting.
- pyobjcryst.powderpattern.CreatePowderPatternFromCIF(file)#
Create a crystal object from a CIF file or URL Example from Acta Cryst. (2012). B68, 407-411 (https://doi.org/10.1107/S0108768112019994), data hosted at CCDC:
c=create_crystal_from_cif(’https://doi.org/10.1107/S0108768112019994/ps5016sup1.cif’) p=create_powderpattern_from_cif(’https://doi.org/10.1107/S0108768112019994/ps5016Isup3.rtv’)
- Parameters:
file – the filename/URL or python file object (need to open with mode=’rb’) If the string begins by ‘http’ it is assumed that it is an URL instead, e.g. from the crystallography open database
- Returns:
the imported PowderPattern
- Raises:
ObjCrystException - if no PowderPattern object can be imported
- class pyobjcryst.powderpattern.PowderPattern[source]#
Bases:
PowderPattern- property figure#
the figure used for plotting, or None.
Note that if you want to display it in a notebook using ipympl (aka ‘matplotlib widget’), you should ‘figure.canvas’ to display also the toolbar (zoom, etc…).
- Type:
Return
- get_background()[source]#
Access the background component.
- Returns:
the PowderPatternBackground for this powder pattern, or None
- get_crystalline_components()[source]#
Get the crystalline phase for this powder pattern :return: a list of the PowderPatternDiffraction components.
- plot(diff=None, hkl=None, figsize=(9, 4), fontsize_hkl=6, reset=False, **kwargs)[source]#
Show the powder pattern in a plot using matplotlib :param diff: if True, also show the difference plot :param hkl: if True, print the hkl values :param figsize: the figure size passed to matplotlib :param fontsize_hkl: fontsize for hkl coordinates :param reset: if True, will reset the x and y limits, and remove the flags to plot the difference and hkl unless the options are set at the same time.
- Parameters:
kwargs – additional keyword arguments: fig=None will force creating a new figure fig=fig1 will plot in the given matplotlib figure
- qpa(verbose=False)[source]#
Get the quantitative phase analysis for the current powder pattern, when multiple crystalline phases are present.
- Parameters:
verbose – if True, print the Crystal names and their weight percentage.
- Returns:
a dictionary with the PowderPatternDiffraction object as key, and the weight percentages as value.
- class pyobjcryst.powderpattern.PowderPatternBackground#
Bases:
PowderPatternComponent- FixParametersBeyondMaxresolution(self, obj: pyobjcryst._pyobjcryst.RefinableObj) None#
- GetInterpPointsX(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetInterpPointsY(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetPowderPatternCalc(self) numpy.ndarray[dtype=float64, shape=(*)]#
- ImportUserBackground(self, filename: str) None#
- OptimizeBayesianBackground(self, verbose: bool = False) None#
- SetInterpPoints(self, tth: object, backgd: object) None#
- class pyobjcryst.powderpattern.PowderPatternComponent#
Bases:
object- AddPar(self, par: pyobjcryst._pyobjcryst._RefinablePar) None#
- AddPar(self, newRefParList: object, copyParam: bool = False) None
- AddRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) None#
- BeginGlobalOptRandomMove(self) None#
- BeginOptimization(self, allowApproximations: bool = False, enableRestraints: bool = False) None#
- ClearParamSet(self, arg: int, /) None#
- CreateParamSet(self, name: str = '') int#
- DeRegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- EndOptimization(self) None#
- EraseAllParamSet(self) None#
- FixAllPar(self) None#
- FixAllPar(self) None
- GetClassName(self) str#
- GetClassName(self) str
- GetClientRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetClockMaster(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetGeneGroup(self, arg0: pyobjcryst._pyobjcryst.RefinableObj, arg1: CrystVector<unsigned int>, arg2: int, /) None#
- GetLSQCalc(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQDeriv(self, idx: int, par: pyobjcryst._pyobjcryst._RefinablePar) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQObs(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQWeight(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLogLikelihood(self) float#
- GetName(self) str#
- GetName(self) str
- GetNbLSQFunction(self) int#
- GetNbOption(self) int#
- GetNbPar(self) int#
- GetNbParNotFixed(self) int#
- GetOption(self, arg: int, /) pyobjcryst._pyobjcryst.RefObjOpt#
- GetOptionList(self) pyobjcryst._pyobjcryst.RefObjOptRegistry#
- GetPar(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetPar(self, arg: str, /) pyobjcryst._pyobjcryst._RefinablePar
- GetParNotFixed(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetParamSet(self, arg: int, /) numpy.ndarray[dtype=float64, shape=(*)]#
- GetParamSetName(self, arg: int, /) str#
- GetParamSet_ParNotFixedHumanValue(self, arg0: int, arg1: int, /) float#
- GetParentPowderPattern(self) pyobjcryst._pyobjcryst.PowderPattern#
- GetRefParListClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetRestraintCost(self) float#
- GetSubObjRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GlobalOptRandomMove(self, mutationAmplitude: float, type: pyobjcryst._pyobjcryst.RefParType = <pyobjcryst._pyobjcryst.RefParType object at 0x73854f9290b0>) None#
- IsBeingRefined(self) bool#
- PrepareForRefinement(self) None#
- Print(self) None#
- RandomizeConfiguration(self) None#
- RegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- RemovePar(self, arg: pyobjcryst._pyobjcryst._RefinablePar, /) None#
- RemoveRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) __gnu_cxx::__normal_iterator<ObjCryst::Restraint**, std::vector<ObjCryst::Restraint*, std::allocator<ObjCryst::Restraint*> > >#
- ResetParList(self) None#
- RestoreParamSet(self, arg: int, /) None#
- SaveParamSet(self, arg: int, /) None#
- SetGlobalOptimStep(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, /) None#
- SetLimitsAbsolute(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsAbsolute(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsProportional(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsProportional(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsRelative(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsRelative(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetName(self, arg: str, /) None#
- SetName(self, arg: str, /) None
- SetParIsFixed(self, arg0: int, arg1: bool, /) None#
- SetParIsFixed(self, arg0: str, arg1: bool, /) None
- SetParIsFixed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- SetParIsUsed(self, arg0: str, arg1: bool, /) None#
- SetParIsUsed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- TagNewBestConfig(self) None#
- UnFixAllPar(self) None#
- UnFixAllPar(self) None
- UpdateDisplay(self) None#
- XMLInput(self, file: object, tag: pyobjcryst._pyobjcryst.XMLCrystTag) None#
- XMLInput(self, xml: str) None
- XMLOutput(self, file: object, indent: int = 0) None#
- int_ptr(self) int#
- xml(self) str#
- class pyobjcryst.powderpattern.PowderPatternDiffraction#
Bases:
ScatteringData- ExtractLeBail(self, nbcycle: int = 1) None#
- FixAllPar(self) None#
- GetClassName(self) str#
- GetExtractionMode(self) bool#
- GetFhklObsSq(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetName(self) str#
- GetNbReflBelowMaxSinThetaOvLambda(self) int#
- GetParentPowderPattern(self) pyobjcryst._pyobjcryst.PowderPattern#
- GetPowderPatternCalc(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetProfile(self) pyobjcryst._pyobjcryst.ReflectionProfile#
- GetTextureMarchDollase(self) pyobjcryst._pyobjcryst.TextureMarchDollase#
Return the March-Dollase preferred-orientation correction.
- SetCrystal(self, crystal: pyobjcryst._pyobjcryst.Crystal) None#
- SetExtractionMode(self, extract: bool = True, init: bool = False) None#
- SetName(self, arg: str, /) None#
- SetProfile(self, profile: pyobjcryst._pyobjcryst.ReflectionProfile) None#
Install an independent copy of the given profile.
- SetReflectionProfilePar(self, type: pyobjcryst._pyobjcryst.ReflectionProfileType = ReflectionProfileType.PROFILE_PSEUDO_VOIGT, fwhmCagliotiW: float = 1e-06, fwhmCagliotiU: float = 0, fwhmCagliotiV: float = 0, eta0: float = 0.5, eta1: float = 0) None#
- UnFixAllPar(self) None#
- X2XCorrPhase(self, arg: float, /) float#
Apply the flat-detector displacement correction for this phase’s offset.
- class pyobjcryst.powderpattern.SpaceGroupExplorer(*args, **kwargs)#
Bases:
object- GetScores(self) list#
- Run(self, spg: str, fitprofile: bool = False, verbose: bool = False, restore_orig: bool = False, update_display: bool = False, relative_length_tolerance: float = 0.01, absolute_angle_tolerance_degree: float = 0.5) pyobjcryst._pyobjcryst.SPGScore#
- RunAll(self, fitprofile_all: bool = False, verbose: bool = True, keep_best: bool = True, update_display: bool = True, fitprofile_p1: bool = True, relative_length_tolerance: float = 0.01, absolute_angle_tolerance_degree: float = 1) None#
- class pyobjcryst.powderpattern.TextureMarchDollase#
Bases:
object- AddPar(self, par: pyobjcryst._pyobjcryst._RefinablePar) None#
- AddPar(self, newRefParList: object, copyParam: bool = False) None
- AddPhase(self, fraction: float, coeffMarch: float, h: float, k: float, l: float) None#
- AddRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) None#
- BeginGlobalOptRandomMove(self) None#
- BeginOptimization(self, allowApproximations: bool = False, enableRestraints: bool = False) None#
- ClearParamSet(self, arg: int, /) None#
- CreateParamSet(self, name: str = '') int#
- DeRegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- DeletePhase(self, i: int) None#
- EndOptimization(self) None#
- EraseAllParamSet(self) None#
- FixAllPar(self) None#
- GetClassName(self) str#
- GetClientRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetClockMaster(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetFraction(self, i: int) float#
- GetGeneGroup(self, arg0: pyobjcryst._pyobjcryst.RefinableObj, arg1: CrystVector<unsigned int>, arg2: int, /) None#
- GetLSQCalc(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQDeriv(self, idx: int, par: pyobjcryst._pyobjcryst._RefinablePar) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQObs(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQWeight(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLogLikelihood(self) float#
- GetMarchCoeff(self, i: int) float#
- GetName(self) str#
- GetNbLSQFunction(self) int#
- GetNbOption(self) int#
- GetNbPar(self) int#
- GetNbParNotFixed(self) int#
- GetNbPhase(self) int#
- GetOption(self, arg: int, /) pyobjcryst._pyobjcryst.RefObjOpt#
- GetOptionList(self) pyobjcryst._pyobjcryst.RefObjOptRegistry#
- GetPar(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetPar(self, arg: str, /) pyobjcryst._pyobjcryst._RefinablePar
- GetParNotFixed(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetParamSet(self, arg: int, /) numpy.ndarray[dtype=float64, shape=(*)]#
- GetParamSetName(self, arg: int, /) str#
- GetParamSet_ParNotFixedHumanValue(self, arg0: int, arg1: int, /) float#
- GetPhaseH(self, i: int) float#
- GetPhaseK(self, i: int) float#
- GetPhaseL(self, i: int) float#
- GetRefParListClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetRestraintCost(self) float#
- GetSubObjRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GlobalOptRandomMove(self, mutationAmplitude: float, type: pyobjcryst._pyobjcryst.RefParType = <pyobjcryst._pyobjcryst.RefParType object at 0x73854f9290b0>) None#
- IsBeingRefined(self) bool#
- PrepareForRefinement(self) None#
- Print(self) None#
- RandomizeConfiguration(self) None#
- RegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- RemovePar(self, arg: pyobjcryst._pyobjcryst._RefinablePar, /) None#
- RemoveRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) __gnu_cxx::__normal_iterator<ObjCryst::Restraint**, std::vector<ObjCryst::Restraint*, std::allocator<ObjCryst::Restraint*> > >#
- ResetParList(self) None#
- RestoreParamSet(self, arg: int, /) None#
- SaveParamSet(self, arg: int, /) None#
- SetGlobalOptimStep(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, /) None#
- SetLimitsAbsolute(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsAbsolute(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsProportional(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsProportional(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsRelative(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsRelative(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetName(self, arg: str, /) None#
- SetParIsFixed(self, arg0: int, arg1: bool, /) None#
- SetParIsFixed(self, arg0: str, arg1: bool, /) None
- SetParIsFixed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- SetParIsUsed(self, arg0: str, arg1: bool, /) None#
- SetParIsUsed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- SetPhasePar(self, i: int, fraction: float, coeffMarch: float, h: float, k: float, l: float) None#
- TagNewBestConfig(self) None#
- UnFixAllPar(self) None#
- UpdateDisplay(self) None#
- XMLInput(self, file: object, tag: pyobjcryst._pyobjcryst.XMLCrystTag) None#
- XMLInput(self, xml: str) None
- XMLOutput(self, file: object, indent: int = 0) None#
- int_ptr(self) int#
- xml(self) str#
pyobjcryst.pyobjcryst_app module#
pyobjcryst.radiation module#
Python wrapping of Radiation from ScatteringData.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
- Changes from ObjCryst::Radiation::
In development !
- class pyobjcryst.radiation.Radiation(*args, **kwargs)#
Bases:
RefinableObj- GetClockLinearPolarRate(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetClockRadiation(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetClockWavelength(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetLinearPolarRate(self) float#
- GetRadiationType(self) pyobjcryst._pyobjcryst.RadiationType#
- GetWavelength(self) float#
- GetWavelengthType(self) pyobjcryst._pyobjcryst.WavelengthType#
- GetXRayTubeAlpha2Alpha1Ratio(self) float#
- GetXRayTubeDeltaLambda(self) float#
- SetLinearPolarRate(self, arg: float, /) None#
- SetRadiationType(self, arg: pyobjcryst._pyobjcryst.RadiationType, /) None#
- SetWavelength(self, arg: float, /) None#
- SetWavelength(self, XRayTubeElementName: str, alpha2Alpha2ratio: float = 0.5) None
- SetWavelengthType(self, arg: pyobjcryst._pyobjcryst.WavelengthType, /) None#
pyobjcryst.refineableobj module#
pyobjcryst.reflectionprofile module#
Python wrapping of ReflectionProfile.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
A ReflectionProfile describes the shape of a single Bragg
reflection (pseudo-Voigt by default) and is owned by a
PowderPatternDiffraction. The Python bindings expose the
public methods GetProfile, GetFullProfileWidth,
XMLOutput / XMLInput and CreateCopy. GetProfile
accepts a Python sequence or numpy array for x.
Concrete empirical isotropic, TCH isotropic, and anisotropic pseudo-Voigt
profiles can be installed with PowderPatternDiffraction.SetProfile. The
diffraction component stores an independent copy, so one configured profile
can be reused as a template for multiple phases:
from pyobjcryst.reflectionprofile import (
ReflectionProfilePseudoVoigt,
ReflectionProfilePseudoVoigtTCH,
ReflectionProfilePseudoVoigtAnisotropic,
)
iso = ReflectionProfilePseudoVoigt()
iso.SetProfilePar(fwhmCagliotiW=1e-4, eta0=0.5)
ppd.SetProfile(iso)
tch = ReflectionProfilePseudoVoigtTCH()
tch.SetProfilePar(fwhmCagliotiW=1e-4, fwhmLorentzZ=2e-4)
ppd2.SetProfile(tch)
aniso = ReflectionProfilePseudoVoigtAnisotropic()
aniso.SetProfilePar(fwhmCagliotiW=1e-4)
ppd3.SetProfile(aniso)
For time-of-flight neutron data, use the double-exponential pseudo-Voigt
profile ReflectionProfileDoubleExponentialPseudoVoigt. It needs the
unit cell to compute d_hkl, which PowderPatternDiffraction.SetProfile
sets from the component’s crystal.
Example
Sample the profile of a single (h, k, l) reflection from an
existing PowderPatternDiffraction and broaden it by tweaking
the W Caglioti parameter:
import numpy as np
from pyobjcryst.powderpattern import PowderPattern
pp = PowderPattern()
pp.SetWavelength(0.7)
x = np.deg2rad(np.linspace(0, 40, 1000))
pp.SetPowderPatternX(x)
pp.SetPowderPatternObs(np.ones_like(x))
ppd = pp.AddPowderPatternDiffraction(crystal) # crystal: pyobjcryst.Crystal
profile = ppd.GetProfile()
window = x[100:200]
xcenter = float(window[len(window) // 2])
y = profile.GetProfile(window, xcenter, 1, 0, 0)
fwhm = profile.GetFullProfileWidth(0.5, xcenter, 1, 0, 0)
profile.GetPar("W").SetValue(0.05)
y_broader = profile.GetProfile(window, xcenter, 1, 0, 0)
- class pyobjcryst.reflectionprofile.ReflectionProfile#
Bases:
RefinableObj- CreateCopy(self) pyobjcryst._pyobjcryst.ReflectionProfile#
- GetFullProfileWidth(self, relativeIntensity: float, xcenter: float, h: float, k: float, l: float) float#
- GetProfile(self, x: object, xcenter: float, h: float, k: float, l: float) numpy.ndarray[dtype=float64, shape=(*)]#
- IsAnisotropic(self) bool#
Return whether the profile depends on the reflection indices.
- XMLInput(self, file: object, tag: pyobjcryst._pyobjcryst.XMLCrystTag) None#
- XMLOutput(self, file: object, indent: int = 0) None#
- class pyobjcryst.reflectionprofile.ReflectionProfileDoubleExponentialPseudoVoigt(*args, **kwargs)#
Bases:
ReflectionProfile- CreateCopy(self) pyobjcryst._pyobjcryst.ReflectionProfileDoubleExponentialPseudoVoigt#
Return an independent copy of this profile.
- SetProfilePar(self, instrumentAlpha0: float, instrumentAlpha1: float, instrumentBeta0: float, instrumentBeta1: float, gaussianSigma0: float, gaussianSigma1: float, gaussianSigma2: float, lorentzianGamma0: float, lorentzianGamma1: float, lorentzianGamma2: float) None#
Set the double-exponential pseudo-Voigt TOF profile parameters.
- SetUnitCell(self, cell: pyobjcryst._pyobjcryst.UnitCell) None#
Set the unit cell used to compute d_hkl for reflections.
- class pyobjcryst.reflectionprofile.ReflectionProfilePseudoVoigt(*args, **kwargs)#
Bases:
ReflectionProfile- CreateCopy(self) pyobjcryst._pyobjcryst.ReflectionProfilePseudoVoigt#
Return an independent copy of this profile.
- SetProfilePar(self, fwhmCagliotiW: float, fwhmCagliotiU: float = 0.0, fwhmCagliotiV: float = 0.0, eta0: float = 0.5, eta1: float = 0.0) None#
Set the isotropic pseudo-Voigt profile parameters.
- class pyobjcryst.reflectionprofile.ReflectionProfilePseudoVoigtAnisotropic(*args, **kwargs)#
Bases:
ReflectionProfile- CreateCopy(self) pyobjcryst._pyobjcryst.ReflectionProfilePseudoVoigtAnisotropic#
Return an independent copy of this profile.
- SetProfilePar(self, fwhmCagliotiW: float, fwhmCagliotiU: float = 0.0, fwhmCagliotiV: float = 0.0, fwhmGaussP: float = 0.0, fwhmLorentzX: float = 0.0, fwhmLorentzY: float = 0.0, fwhmLorentzGammaHH: float = 0.0, fwhmLorentzGammaKK: float = 0.0, fwhmLorentzGammaLL: float = 0.0, fwhmLorentzGammaHK: float = 0.0, fwhmLorentzGammaHL: float = 0.0, fwhmLorentzGammaKL: float = 0.0, pseudoVoigtEta0: float = 0.0, pseudoVoigtEta1: float = 0.0, asymA0: float = 1.0, asymA1: float = 0.0, asymA2: float = 0.0) None#
Set the anisotropic pseudo-Voigt profile parameters.
- class pyobjcryst.reflectionprofile.ReflectionProfilePseudoVoigtTCH(*args, **kwargs)#
Bases:
ReflectionProfile- CreateCopy(self) pyobjcryst._pyobjcryst.ReflectionProfilePseudoVoigtTCH#
Return an independent copy of this profile.
- SetProfilePar(self, fwhmCagliotiW: float, fwhmCagliotiU: float = 0.0, fwhmCagliotiV: float = 0.0, fwhmLorentzX: float = 0.0, fwhmLorentzY: float = 0.0, fwhmLorentzZ: float = 0.0, fwhmScherrerP: float = 0.0, scherrerLGmix: float = 1.0) None#
Set the TCH pseudo-Voigt U, V, W, X, Y, Z, P and LGmix parameters.
pyobjcryst.scatterer module#
Python wrapping of Scatterer.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
Changes from ObjCryst::Scatterer
C++ methods that can return const or non-const objects return non-const objects in python.
Operator string() is not exposed.
Internal use only methods have not been exposed.
InitRefParList is not exposed, as it is not used inside of Scatterer.
GetClockScattCompList is exposed using a workaround, because it is not implemented in the library.
Methods related to visualization are not exposed.
- class pyobjcryst.scatterer.Scatterer#
Bases:
object- AddPar(self, par: pyobjcryst._pyobjcryst._RefinablePar) None#
- AddPar(self, newRefParList: object, copyParam: bool = False) None
- AddRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) None#
- BeginGlobalOptRandomMove(self) None#
- BeginOptimization(self, allowApproximations: bool = False, enableRestraints: bool = False) None#
- ClearParamSet(self, arg: int, /) None#
- CreateParamSet(self, name: str = '') int#
- DeRegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- EndOptimization(self) None#
- EraseAllParamSet(self) None#
- FixAllPar(self) None#
- GetClassName(self) str#
- GetClassName(self) str
- GetClientRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetClockMaster(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetClockScattCompList(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetClockScatterer(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetComponentName(self, arg: int, /) str#
- GetCrystal(self) pyobjcryst._pyobjcryst.Crystal#
- GetGeneGroup(self, arg0: pyobjcryst._pyobjcryst.RefinableObj, arg1: CrystVector<unsigned int>, arg2: int, /) None#
- GetLSQCalc(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQDeriv(self, idx: int, par: pyobjcryst._pyobjcryst._RefinablePar) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQObs(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQWeight(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLogLikelihood(self) float#
- GetName(self) str#
- GetName(self) str
- GetNbComponent(self) int#
- GetNbLSQFunction(self) int#
- GetNbOption(self) int#
- GetNbPar(self) int#
- GetNbPar(self) int
- GetNbParNotFixed(self) int#
- GetOccupancy(self) float#
- GetOption(self, arg: int, /) pyobjcryst._pyobjcryst.RefObjOpt#
- GetOptionList(self) pyobjcryst._pyobjcryst.RefObjOptRegistry#
- GetPar(self, arg: str, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetPar(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar
- GetPar(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar
- GetPar(self, arg: str, /) pyobjcryst._pyobjcryst._RefinablePar
- GetParNotFixed(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetParamSet(self, arg: int, /) numpy.ndarray[dtype=float64, shape=(*)]#
- GetParamSetName(self, arg: int, /) str#
- GetParamSet_ParNotFixedHumanValue(self, arg0: int, arg1: int, /) float#
- GetRefParListClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetRestraintCost(self) float#
- GetScatteringComponentList(self) list#
- GetSubObjRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetX(self) float#
- GetY(self) float#
- GetZ(self) float#
- GlobalOptRandomMove(self, mutationAmplitude: float, type: pyobjcryst._pyobjcryst.RefParType = <pyobjcryst._pyobjcryst.RefParType object at 0x73854f9290b0>) None#
- IsBeingRefined(self) bool#
- property Occupancy#
(self) -> float
- PrepareForRefinement(self) None#
- Print(self) None#
- Print(self) None
- RandomizeConfiguration(self) None#
- RegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- RemovePar(self, arg: pyobjcryst._pyobjcryst._RefinablePar, /) None#
- RemoveRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) __gnu_cxx::__normal_iterator<ObjCryst::Restraint**, std::vector<ObjCryst::Restraint*, std::allocator<ObjCryst::Restraint*> > >#
- ResetParList(self) None#
- RestoreParamSet(self, arg: int, /) None#
- SaveParamSet(self, arg: int, /) None#
- SetCrystal(self, arg: pyobjcryst._pyobjcryst.Crystal, /) None#
- SetGlobalOptimStep(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, /) None#
- SetLimitsAbsolute(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsAbsolute(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsProportional(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsProportional(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsRelative(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsRelative(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetName(self, arg: str, /) None#
- SetName(self, arg: str, /) None
- SetOccupancy(self, arg: float, /) None#
- SetParIsFixed(self, arg0: int, arg1: bool, /) None#
- SetParIsFixed(self, arg0: str, arg1: bool, /) None
- SetParIsFixed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- SetParIsUsed(self, arg0: str, arg1: bool, /) None#
- SetParIsUsed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- SetX(self, arg: float, /) None#
- SetY(self, arg: float, /) None#
- SetZ(self, arg: float, /) None#
- TagNewBestConfig(self) None#
- UnFixAllPar(self) None#
- UpdateDisplay(self) None#
- property X#
(self) -> float
- XMLInput(self, file: object, tag: pyobjcryst._pyobjcryst.XMLCrystTag) None#
- XMLInput(self, xml: str) None
- XMLOutput(self, file: object, indent: int = 0) None#
- property Y#
(self) -> float
- property Z#
(self) -> float
- int_ptr(self) int#
- xml(self) str#
pyobjcryst.scatteringdata module#
Python wrapping of ScatteringData class.
See the online ObjCryst++ documentation ( https://objcryst.readthedocs.io).
- class pyobjcryst.scatteringdata.ScatteringData#
Bases:
object- AddPar(self, par: pyobjcryst._pyobjcryst._RefinablePar) None#
- AddPar(self, newRefParList: object, copyParam: bool = False) None
- AddRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) None#
- BeginGlobalOptRandomMove(self) None#
- BeginOptimization(self, allowApproximations: bool = False, enableRestraints: bool = False) None#
- ClearParamSet(self, arg: int, /) None#
- CreateParamSet(self, name: str = '') int#
- DeRegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- EndOptimization(self) None#
- EraseAllParamSet(self) None#
- FixAllPar(self) None#
- GenHKLFullSpace(self, maxtheta: float, unique: bool = False) None#
- GenHKLFullSpace2(self, maxsithsl: float, unique: bool = False) None#
- GetClassName(self) str#
- GetClientRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetClockMaster(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetClockNbReflBelowMaxSinThetaOvLambda(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetClockTheta(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetCrystal(self) pyobjcryst._pyobjcryst.Crystal#
- GetFhklCalcImag(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetFhklCalcReal(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetFhklCalcSq(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetFhklObsSq(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetGeneGroup(self, arg0: pyobjcryst._pyobjcryst.RefinableObj, arg1: CrystVector<unsigned int>, arg2: int, /) None#
- GetH(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetH2Pi(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetK(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetK2Pi(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetL(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetL2Pi(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQCalc(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQDeriv(self, idx: int, par: pyobjcryst._pyobjcryst._RefinablePar) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQObs(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQWeight(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLogLikelihood(self) float#
- GetMaxSinThetaOvLambda(self) float#
- GetName(self) str#
- GetNbLSQFunction(self) int#
- GetNbOption(self) int#
- GetNbPar(self) int#
- GetNbParNotFixed(self) int#
- GetNbRefl(self) int#
- GetNbReflBelowMaxSinThetaOvLambda(self) int#
- GetOption(self, arg: int, /) pyobjcryst._pyobjcryst.RefObjOpt#
- GetOptionList(self) pyobjcryst._pyobjcryst.RefObjOptRegistry#
- GetPar(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetPar(self, arg: str, /) pyobjcryst._pyobjcryst._RefinablePar
- GetParNotFixed(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetParamSet(self, arg: int, /) numpy.ndarray[dtype=float64, shape=(*)]#
- GetParamSetName(self, arg: int, /) str#
- GetParamSet_ParNotFixedHumanValue(self, arg0: int, arg1: int, /) float#
- GetRadiation(self) pyobjcryst._pyobjcryst.Radiation#
- GetRadiationType(self) pyobjcryst._pyobjcryst.RadiationType#
- GetRefParListClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetReflX(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetReflY(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetReflZ(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetRestraintCost(self) float#
- GetScatteringFactor(self) dict#
- GetSinThetaOverLambda(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetSubObjRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetTheta(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetWavelength(self) float#
- GlobalOptRandomMove(self, mutationAmplitude: float, type: pyobjcryst._pyobjcryst.RefParType = <pyobjcryst._pyobjcryst.RefParType object at 0x73854f9290b0>) None#
- HasCrystal(self) bool#
- IsBeingRefined(self) bool#
- IsIgnoringImagScattFact(self) bool#
- PrepareForRefinement(self) None#
- Print(self) None#
- PrintFhklCalc(self) None#
- PrintFhklCalcDetail(self) None#
- RandomizeConfiguration(self) None#
- RegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- RemovePar(self, arg: pyobjcryst._pyobjcryst._RefinablePar, /) None#
- RemoveRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) __gnu_cxx::__normal_iterator<ObjCryst::Restraint**, std::vector<ObjCryst::Restraint*, std::allocator<ObjCryst::Restraint*> > >#
- ResetParList(self) None#
- RestoreParamSet(self, arg: int, /) None#
- SaveParamSet(self, arg: int, /) None#
- SetCrystal(self, arg: pyobjcryst._pyobjcryst.Crystal, /) None#
- SetGlobalOptimStep(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, /) None#
- SetIsIgnoringImagScattFact(self, arg: bool, /) None#
- SetLimitsAbsolute(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsAbsolute(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsProportional(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsProportional(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsRelative(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsRelative(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetMaxSinThetaOvLambda(self, arg: float, /) None#
- SetName(self, arg: str, /) None#
- SetParIsFixed(self, arg0: int, arg1: bool, /) None#
- SetParIsFixed(self, arg0: str, arg1: bool, /) None
- SetParIsFixed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- SetParIsUsed(self, arg0: str, arg1: bool, /) None#
- SetParIsUsed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- TagNewBestConfig(self) None#
- UnFixAllPar(self) None#
- UpdateDisplay(self) None#
- XMLInput(self, file: object, tag: pyobjcryst._pyobjcryst.XMLCrystTag) None#
- XMLInput(self, xml: str) None
- XMLOutput(self, file: object, indent: int = 0) None#
- int_ptr(self) int#
- xml(self) str#
pyobjcryst.scatteringpower module#
Python wrapping of ScatteringPower.h.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
Changes from ObjCryst::ScatteringComponent - Added attributes X, Y, Z, Occupancy to conform to MolAtom.
Changes from ObjCryst::ScatteringComponentList - Wrapped as a to-python converter only (no constructor)
- class pyobjcryst.scatteringpower.ScatteringComponent(*args, **kwargs)#
Bases:
object- property Occupancy#
(self) -> float
- Print(self) None#
- property X#
(self) -> float
- property Y#
(self) -> float
- property Z#
(self) -> float
- property mDynPopCorr#
(self) -> float
- property mOccupancy#
(self) -> float
- property mX#
(self) -> float
- property mY#
(self) -> float
- property mZ#
(self) -> float
- property mpScattPow#
(self) -> object
- class pyobjcryst.scatteringpower.ScatteringComponentList#
Bases:
object- GetNbComponent(self) int#
- Print(self) None#
- Reset(self) None#
- class pyobjcryst.scatteringpower.ScatteringPower#
Bases:
object- AddPar(self, par: pyobjcryst._pyobjcryst._RefinablePar) None#
- AddPar(self, newRefParList: object, copyParam: bool = False) None
- AddRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) None#
- property B11#
(self) -> float
- property B12#
(self) -> float
- property B13#
(self) -> float
- property B22#
(self) -> float
- property B23#
(self) -> float
- property B33#
(self) -> float
- BeginGlobalOptRandomMove(self) None#
- BeginOptimization(self, allowApproximations: bool = False, enableRestraints: bool = False) None#
- property Biso#
(self) -> float
- ClearParamSet(self, arg: int, /) None#
- CreateParamSet(self, name: str = '') int#
- DeRegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- EndOptimization(self) None#
- EraseAllParamSet(self) None#
- FixAllPar(self) None#
- GetBij(self, arg0: int, arg1: int, /) float#
- GetBiso(self) float#
- GetClassName(self) str#
- GetClassName(self) str
- GetClientRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetClockMaster(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetClockMaster(self) pyobjcryst._pyobjcryst.RefinableObjClock
- GetColour(self) tuple#
- GetColourRGB(self) tuple#
- GetDynPopCorrIndex(self) int#
- GetFormalCharge(self) float#
- GetForwardScatteringFactor(self, arg: pyobjcryst._pyobjcryst.RadiationType, /) float#
- GetGeneGroup(self, arg0: pyobjcryst._pyobjcryst.RefinableObj, arg1: CrystVector<unsigned int>, arg2: int, /) None#
- GetLSQCalc(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQDeriv(self, idx: int, par: pyobjcryst._pyobjcryst._RefinablePar) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQObs(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQWeight(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLastChangeClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetLogLikelihood(self) float#
- GetMaximumLikelihoodNbGhostAtom(self) float#
- GetMaximumLikelihoodParClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetMaximumLikelihoodPositionError(self) float#
- GetName(self) str#
- GetName(self) str
- GetNbLSQFunction(self) int#
- GetNbOption(self) int#
- GetNbPar(self) int#
- GetNbPar(self) int
- GetNbParNotFixed(self) int#
- GetNbScatteringPower(self) int#
- GetOption(self, arg: int, /) pyobjcryst._pyobjcryst.RefObjOpt#
- GetOptionList(self) pyobjcryst._pyobjcryst.RefObjOptRegistry#
- GetPar(self, arg: str, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetPar(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar
- GetPar(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar
- GetPar(self, arg: str, /) pyobjcryst._pyobjcryst._RefinablePar
- GetParNotFixed(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetParamSet(self, arg: int, /) numpy.ndarray[dtype=float64, shape=(*)]#
- GetParamSetName(self, arg: int, /) str#
- GetParamSet_ParNotFixedHumanValue(self, arg0: int, arg1: int, /) float#
- GetRadius(self) float#
- GetRefParListClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetResonantScattFactImag(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*, *)]#
- GetResonantScattFactReal(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*, *)]#
- GetRestraintCost(self) float#
- GetScatteringFactor(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*)]#
- GetSubObjRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetSymbol(self) str#
- GetTemperatureFactor(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*)]#
- GlobalOptRandomMove(self, mutationAmplitude: float, type: pyobjcryst._pyobjcryst.RefParType = <pyobjcryst._pyobjcryst.RefParType object at 0x73854f9290b0>) None#
- IsBeingRefined(self) bool#
- IsIsotropic(self) bool#
- IsResonantScatteringAnisotropic(self) bool#
- IsScatteringFactorAnisotropic(self) bool#
- IsTemperatureFactorAnisotropic(self) bool#
- PrepareForRefinement(self) None#
- Print(self) None#
- Print(self) None
- RandomizeConfiguration(self) None#
- RegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- RemovePar(self, arg: pyobjcryst._pyobjcryst._RefinablePar, /) None#
- RemoveRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) __gnu_cxx::__normal_iterator<ObjCryst::Restraint**, std::vector<ObjCryst::Restraint*, std::allocator<ObjCryst::Restraint*> > >#
- ResetParList(self) None#
- RestoreParamSet(self, arg: int, /) None#
- SaveParamSet(self, arg: int, /) None#
- SetBij(self, arg0: int, arg1: int, arg2: float, /) None#
- SetBiso(self, arg: float, /) None#
- SetColour(self, r: float, g: float, b: float) None#
- SetFormalCharge(self, arg: float, /) None#
- SetGlobalOptimStep(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, /) None#
- SetLimitsAbsolute(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsAbsolute(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsProportional(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsProportional(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsRelative(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsRelative(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetMaximumLikelihoodNbGhostAtom(self, arg: float, /) None#
- SetMaximumLikelihoodPositionError(self, arg: float, /) None#
- SetName(self, arg: str, /) None#
- SetName(self, arg: str, /) None
- SetParIsFixed(self, arg0: int, arg1: bool, /) None#
- SetParIsFixed(self, arg0: str, arg1: bool, /) None
- SetParIsFixed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- SetParIsUsed(self, arg0: str, arg1: bool, /) None#
- SetParIsUsed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- TagNewBestConfig(self) None#
- UnFixAllPar(self) None#
- UpdateDisplay(self) None#
- XMLInput(self, file: object, tag: pyobjcryst._pyobjcryst.XMLCrystTag) None#
- XMLInput(self, xml: str) None
- XMLOutput(self, file: object, indent: int = 0) None#
- int_ptr(self) int#
- xml(self) str#
- class pyobjcryst.scatteringpower.ScatteringPowerAtom(*args, **kwargs)#
Bases:
object- AddPar(self, par: pyobjcryst._pyobjcryst._RefinablePar) None#
- AddPar(self, newRefParList: object, copyParam: bool = False) None
- AddRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) None#
- property B11#
(self) -> float
- property B12#
(self) -> float
- property B13#
(self) -> float
- property B22#
(self) -> float
- property B23#
(self) -> float
- property B33#
(self) -> float
- BeginGlobalOptRandomMove(self) None#
- BeginOptimization(self, allowApproximations: bool = False, enableRestraints: bool = False) None#
- property Biso#
(self) -> float
- ClearParamSet(self, arg: int, /) None#
- CreateParamSet(self, name: str = '') int#
- DeRegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- EndOptimization(self) None#
- EraseAllParamSet(self) None#
- FixAllPar(self) None#
- GetAtomicNumber(self) int#
- GetAtomicWeight(self) float#
- GetBij(self, arg0: int, arg1: int, /) float#
- GetBiso(self) float#
- GetBiso(self) float
- GetClassName(self) str#
- GetClassName(self) str
- GetClientRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetClockMaster(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetColour(self) tuple#
- GetColourRGB(self) tuple#
- GetDynPopCorrIndex(self) int#
- GetElementName(self) str#
- GetFormalCharge(self) float#
- GetFormalCharge(self) float
- GetForwardScatteringFactor(self, arg: pyobjcryst._pyobjcryst.RadiationType, /) float#
- GetForwardScatteringFactor(self, arg: pyobjcryst._pyobjcryst.RadiationType, /) float
- GetGeneGroup(self, arg0: pyobjcryst._pyobjcryst.RefinableObj, arg1: CrystVector<unsigned int>, arg2: int, /) None#
- GetLSQCalc(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQDeriv(self, idx: int, par: pyobjcryst._pyobjcryst._RefinablePar) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQObs(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQWeight(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLastChangeClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetLogLikelihood(self) float#
- GetMaximumLikelihoodNbGhostAtom(self) float#
- GetMaximumLikelihoodNbGhostAtom(self) float
- GetMaximumLikelihoodParClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetMaximumLikelihoodPositionError(self) float#
- GetMaximumLikelihoodPositionError(self) float
- GetName(self) str#
- GetName(self) str
- GetNbLSQFunction(self) int#
- GetNbOption(self) int#
- GetNbPar(self) int#
- GetNbPar(self) int
- GetNbParNotFixed(self) int#
- GetNbScatteringPower(self) int#
- GetOption(self, arg: int, /) pyobjcryst._pyobjcryst.RefObjOpt#
- GetOptionList(self) pyobjcryst._pyobjcryst.RefObjOptRegistry#
- GetPar(self, arg: str, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetPar(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar
- GetPar(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar
- GetPar(self, arg: str, /) pyobjcryst._pyobjcryst._RefinablePar
- GetParNotFixed(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetParamSet(self, arg: int, /) numpy.ndarray[dtype=float64, shape=(*)]#
- GetParamSetName(self, arg: int, /) str#
- GetParamSet_ParNotFixedHumanValue(self, arg0: int, arg1: int, /) float#
- GetRadius(self) float#
- GetRadius(self) float
- GetRefParListClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetResonantScattFactImag(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*, *)]#
- GetResonantScattFactReal(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*, *)]#
- GetRestraintCost(self) float#
- GetScatteringFactor(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*)]#
- GetSubObjRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetSymbol(self) str#
- GetSymbol(self) str
- GetTemperatureFactor(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*)]#
- GlobalOptRandomMove(self, mutationAmplitude: float, type: pyobjcryst._pyobjcryst.RefParType = <pyobjcryst._pyobjcryst.RefParType object at 0x73854f9290b0>) None#
- Init(self, name: str, symbol: str, biso: float = 1.0) None#
- IsBeingRefined(self) bool#
- IsIsotropic(self) bool#
- IsIsotropic(self) bool
- IsResonantScatteringAnisotropic(self) bool#
- IsScatteringFactorAnisotropic(self) bool#
- IsScatteringFactorAnisotropic(self) bool
- IsTemperatureFactorAnisotropic(self) bool#
- IsTemperatureFactorAnisotropic(self) bool
- PrepareForRefinement(self) None#
- Print(self) None#
- Print(self) None
- RandomizeConfiguration(self) None#
- RegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- RemovePar(self, arg: pyobjcryst._pyobjcryst._RefinablePar, /) None#
- RemoveRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) __gnu_cxx::__normal_iterator<ObjCryst::Restraint**, std::vector<ObjCryst::Restraint*, std::allocator<ObjCryst::Restraint*> > >#
- ResetParList(self) None#
- RestoreParamSet(self, arg: int, /) None#
- SaveParamSet(self, arg: int, /) None#
- SetBij(self, arg0: int, arg1: int, arg2: float, /) None#
- SetBiso(self, arg: float, /) None#
- SetBiso(self, arg: float, /) None
- SetColour(self, r: float, g: float, b: float) None#
- SetFormalCharge(self, arg: float, /) None#
- SetFormalCharge(self, arg: float, /) None
- SetGlobalOptimStep(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, /) None#
- SetLimitsAbsolute(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsAbsolute(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsProportional(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsProportional(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsRelative(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsRelative(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetMaximumLikelihoodNbGhostAtom(self, arg: float, /) None#
- SetMaximumLikelihoodNbGhostAtom(self, arg: float, /) None
- SetMaximumLikelihoodPositionError(self, arg: float, /) None#
- SetMaximumLikelihoodPositionError(self, arg: float, /) None
- SetName(self, arg: str, /) None#
- SetName(self, arg: str, /) None
- SetParIsFixed(self, arg0: int, arg1: bool, /) None#
- SetParIsFixed(self, arg0: str, arg1: bool, /) None
- SetParIsFixed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- SetParIsUsed(self, arg0: str, arg1: bool, /) None#
- SetParIsUsed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- SetSymbol(self, arg: str, /) None#
- TagNewBestConfig(self) None#
- UnFixAllPar(self) None#
- UpdateDisplay(self) None#
- XMLInput(self, file: object, tag: pyobjcryst._pyobjcryst.XMLCrystTag) None#
- XMLInput(self, xml: str) None
- XMLOutput(self, file: object, indent: int = 0) None#
- int_ptr(self) int#
- xml(self) str#
pyobjcryst.scatteringpowersphere module#
Python wrapping of ScatteringPowerSphere.h.
See the online ObjCryst++ documentation ( https://objcryst.readthedocs.io).
- class pyobjcryst.scatteringpowersphere.ScatteringPowerSphere(*args, **kwargs)#
Bases:
ScatteringPower- GetRadius(self) float#
- Init(self, name: str, radius: float, biso: float = 1.0) None#
pyobjcryst.spacegroup module#
Python wrapping of SpaceGroup.h.
See the online ObjCryst++ documentation ( https://objcryst.readthedocs.io).
- class pyobjcryst.spacegroup.AsymmetricUnit(*args, **kwargs)#
Bases:
object- IsInAsymmetricUnit(self, x: float, y: float, z: float) bool#
- SetSpaceGroup(self, spg: pyobjcryst._pyobjcryst.SpaceGroup) None#
- Xmax(self) float#
- Xmin(self) float#
- Ymax(self) float#
- Ymin(self) float#
- Zmax(self) float#
- Zmin(self) float#
- class pyobjcryst.spacegroup.SpaceGroup(*args, **kwargs)#
Bases:
object- ChangeSpaceGroup(self, arg: str, /) None#
- ChangeToAsymmetricUnit(self, arg0: float, arg1: float, arg2: float, /) None#
- GetAllEquivRefl(self, h: float, k: float, l: float, excludeFriedelMate: bool = False, forceFriedelLaw: bool = False) numpy.ndarray[dtype=float64, shape=(*, *)]#
- GetAllSymmetrics(self, x: float, y: float, z: float, noCenter: bool = False, noTransl: bool = False, noIdentical: bool = False) numpy.ndarray[dtype=float64, shape=(*, *)]#
- GetAsymUnit(self) pyobjcryst._pyobjcryst.AsymmetricUnit#
- GetClockSpaceGroup(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetExpectedIntensityFactor(self, arg0: float, arg1: float, arg2: float, /) int#
- GetExtension(self) str#
- GetInversionCenter(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetName(self) str#
- GetNbSymmetrics(self, noCenter: bool = False, noTransl: bool = False) int#
- GetNbTranslationVectors(self) int#
- GetSpaceGroupNumber(self) int#
- GetSymmetryOperations(self) list#
- GetTranslationVectors(self) list#
- GetUniqueAxis(self) int#
- HasInversionCenter(self) bool#
- IsCentrosymmetric(self) bool#
- IsInAsymmetricUnit(self, arg0: float, arg1: float, arg2: float, /) bool#
- IsInversionCenterAtOrigin(self) bool#
- IsReflCentric(self, arg0: float, arg1: float, arg2: float, /) bool#
- IsReflSystematicAbsent(self, arg0: float, arg1: float, arg2: float, /) bool#
- Print(self) None#
pyobjcryst.unitcell module#
Python wrapping of UnitCell.h.
See the online ObjCryst++ documentation ( https://objcryst.readthedocs.io).
- class pyobjcryst.unitcell.UnitCell(*args, **kwargs)#
Bases:
RefinableObj- ChangeSpaceGroup(self, arg: str, /) None#
- FractionalToOrthonormalCoords(self, arg0: float, arg1: float, arg2: float, /) tuple#
- GetBMatrix(self) numpy.ndarray[dtype=float64, shape=(*, *)]#
- GetClockLatticePar(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetClockMetricMatrix(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetLatticePar(self) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLatticePar(self, arg: int, /) float
- GetOrthMatrix(self) numpy.ndarray[dtype=float64, shape=(*, *)]#
- GetOrthonormalCoords(self, arg0: float, arg1: float, arg2: float, /) numpy.ndarray[dtype=float64, shape=(*)]#
- GetSpaceGroup(self) pyobjcryst._pyobjcryst.SpaceGroup#
- GetVolume(self) float#
- MillerToOrthonormalCoords(self, arg0: float, arg1: float, arg2: float, /) tuple#
- OrthonormalToFractionalCoords(self, arg0: float, arg1: float, arg2: float, /) tuple#
- OrthonormalToMillerCoords(self, arg0: float, arg1: float, arg2: float, /) tuple#
- property a#
(self) -> float
- property alpha#
(self) -> float
- property b#
(self) -> float
- property beta#
(self) -> float
- property c#
(self) -> float
- property gamma#
(self) -> float
pyobjcryst.utils module#
Utilities for crystals.
- pyobjcryst.utils.putAtomsInMolecule(crystal, alist=None, name=None)[source]#
Place atoms from a crystal into a molecule inside the crystal.
Selected atoms are put into a new Molecule object, which is then placed inside of the Crystal. The atoms are then removed from the crystal. The molecule is placed at the center of mass of the moved atoms.
crystal – The crystal containing the atoms. alist – A list of indices or names identifying the atoms. If alist is
None (default), all atoms from the crystal are placed into a molecule.
- name – A name for the molecule. If name is None (default), the name
m_cname will be given, where cname is substituted for the crystal’s name.
Raises TypeError if idxlist identifies a non-atom.
pyobjcryst.version module#
Definition of __version__.
pyobjcryst.zscatterer module#
Python wrapping of Zscatterer.
See the online ObjCryst++ documentation (https://objcryst.readthedocs.io).
Changes from ObjCryst::ZAtom - XMLOutput and Input are not wrapped.
Changes from ObjCryst++ - XMLOutput and Input are not wrapped.
- class pyobjcryst.zscatterer.GlobalScatteringPower(*args, **kwargs)#
Bases:
object- AddPar(self, par: pyobjcryst._pyobjcryst._RefinablePar) None#
- AddPar(self, newRefParList: object, copyParam: bool = False) None
- AddRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) None#
- property B11#
(self) -> float
- property B12#
(self) -> float
- property B13#
(self) -> float
- property B22#
(self) -> float
- property B23#
(self) -> float
- property B33#
(self) -> float
- BeginGlobalOptRandomMove(self) None#
- BeginOptimization(self, allowApproximations: bool = False, enableRestraints: bool = False) None#
- property Biso#
(self) -> float
- ClearParamSet(self, arg: int, /) None#
- CreateParamSet(self, name: str = '') int#
- DeRegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- EndOptimization(self) None#
- EraseAllParamSet(self) None#
- FixAllPar(self) None#
- GetBij(self, arg0: int, arg1: int, /) float#
- GetBiso(self) float#
- GetClassName(self) str#
- GetClientRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetClockMaster(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetColour(self) tuple#
- GetColourRGB(self) tuple#
- GetDynPopCorrIndex(self) int#
- GetFormalCharge(self) float#
- GetForwardScatteringFactor(self, arg: pyobjcryst._pyobjcryst.RadiationType, /) float#
- GetGeneGroup(self, arg0: pyobjcryst._pyobjcryst.RefinableObj, arg1: CrystVector<unsigned int>, arg2: int, /) None#
- GetLSQCalc(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQDeriv(self, idx: int, par: pyobjcryst._pyobjcryst._RefinablePar) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQObs(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLSQWeight(self, idx: int) numpy.ndarray[dtype=float64, shape=(*)]#
- GetLastChangeClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetLogLikelihood(self) float#
- GetMaximumLikelihoodNbGhostAtom(self) float#
- GetMaximumLikelihoodParClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetMaximumLikelihoodPositionError(self) float#
- GetName(self) str#
- GetNbLSQFunction(self) int#
- GetNbOption(self) int#
- GetNbPar(self) int#
- GetNbParNotFixed(self) int#
- GetNbScatteringPower(self) int#
- GetOption(self, arg: int, /) pyobjcryst._pyobjcryst.RefObjOpt#
- GetOptionList(self) pyobjcryst._pyobjcryst.RefObjOptRegistry#
- GetPar(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetPar(self, arg: str, /) pyobjcryst._pyobjcryst._RefinablePar
- GetParNotFixed(self, arg: int, /) pyobjcryst._pyobjcryst._RefinablePar#
- GetParamSet(self, arg: int, /) numpy.ndarray[dtype=float64, shape=(*)]#
- GetParamSetName(self, arg: int, /) str#
- GetParamSet_ParNotFixedHumanValue(self, arg0: int, arg1: int, /) float#
- GetRadius(self) float#
- GetRadius(self) float
- GetRefParListClock(self) pyobjcryst._pyobjcryst.RefinableObjClock#
- GetResonantScattFactImag(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*, *)]#
- GetResonantScattFactReal(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*, *)]#
- GetRestraintCost(self) float#
- GetScatteringFactor(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*)]#
- GetSubObjRegistry(self) pyobjcryst._pyobjcryst.RefinableObjRegistry#
- GetSymbol(self) str#
- GetTemperatureFactor(self, data: pyobjcryst._pyobjcryst.ScatteringData, spgSymPosIndex: int = -1) numpy.ndarray[dtype=float64, shape=(*)]#
- GlobalOptRandomMove(self, mutationAmplitude: float, type: pyobjcryst._pyobjcryst.RefParType = <pyobjcryst._pyobjcryst.RefParType object at 0x73854f9290b0>) None#
- Init(self, arg: pyobjcryst._pyobjcryst.ZScatterer, /) None#
- IsBeingRefined(self) bool#
- IsIsotropic(self) bool#
- IsResonantScatteringAnisotropic(self) bool#
- IsScatteringFactorAnisotropic(self) bool#
- IsTemperatureFactorAnisotropic(self) bool#
- PrepareForRefinement(self) None#
- Print(self) None#
- RandomizeConfiguration(self) None#
- RegisterClient(self, arg: pyobjcryst._pyobjcryst.RefinableObj, /) None#
- RemovePar(self, arg: pyobjcryst._pyobjcryst._RefinablePar, /) None#
- RemoveRestraint(self, arg: pyobjcryst._pyobjcryst.Restraint, /) __gnu_cxx::__normal_iterator<ObjCryst::Restraint**, std::vector<ObjCryst::Restraint*, std::allocator<ObjCryst::Restraint*> > >#
- ResetParList(self) None#
- RestoreParamSet(self, arg: int, /) None#
- SaveParamSet(self, arg: int, /) None#
- SetBij(self, arg0: int, arg1: int, arg2: float, /) None#
- SetBiso(self, arg: float, /) None#
- SetColour(self, r: float, g: float, b: float) None#
- SetFormalCharge(self, arg: float, /) None#
- SetGlobalOptimStep(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, /) None#
- SetLimitsAbsolute(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsAbsolute(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsProportional(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsProportional(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetLimitsRelative(self, arg0: str, arg1: float, arg2: float, /) None#
- SetLimitsRelative(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: float, arg2: float, /) None
- SetMaximumLikelihoodNbGhostAtom(self, arg: float, /) None#
- SetMaximumLikelihoodPositionError(self, arg: float, /) None#
- SetName(self, arg: str, /) None#
- SetParIsFixed(self, arg0: int, arg1: bool, /) None#
- SetParIsFixed(self, arg0: str, arg1: bool, /) None
- SetParIsFixed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- SetParIsUsed(self, arg0: str, arg1: bool, /) None#
- SetParIsUsed(self, arg0: pyobjcryst._pyobjcryst.RefParType, arg1: bool, /) None
- TagNewBestConfig(self) None#
- UnFixAllPar(self) None#
- UpdateDisplay(self) None#
- XMLInput(self, file: object, tag: pyobjcryst._pyobjcryst.XMLCrystTag) None#
- XMLInput(self, xml: str) None
- XMLOutput(self, file: object, indent: int = 0) None#
- int_ptr(self) int#
- xml(self) str#
- class pyobjcryst.zscatterer.RegularPolyhedraType(*values)#
Bases:
Enum- ANTIPRISM_TETRAGONAL = 4#
- CUBE = 3#
- ICOSAHEDRON = 9#
- OCTAHEDRON = 1#
- PRISM_TETRAGONAL_DICAP = 6#
- PRISM_TETRAGONAL_MONOCAP = 5#
- PRISM_TRIGONAL = 7#
- PRISM_TRIGONAL_TRICAPPED = 8#
- SQUARE_PLANE = 2#
- TETRAHEDRON = 0#
- TRIANGLE_PLANE = 10#
- class pyobjcryst.zscatterer.ZAtom#
Bases:
object- GetClassName(self) str#
- GetName(self) str#
- GetOccupancy(self) float#
- GetScatteringPower(self) pyobjcryst._pyobjcryst.ScatteringPower#
- GetZAngle(self) float#
- GetZAngleAtom(self) int#
- GetZBondAtom(self) int#
- GetZBondLength(self) float#
- GetZDihedralAngle(self) float#
- GetZDihedralAngleAtom(self) int#
- GetZScatterer(self) pyobjcryst._pyobjcryst.ZScatterer#
- SetName(self, arg: str, /) None#
- SetOccupancy(self, arg: float, /) None#
- SetScatteringPower(self, arg: pyobjcryst._pyobjcryst.ScatteringPower, /) None#
- SetZAngle(self, arg: float, /) None#
- SetZBondLength(self, arg: float, /) None#
- SetZDihedralAngle(self, arg: float, /) None#
- class pyobjcryst.zscatterer.ZPolyhedron(*args, **kwargs)#
Bases:
ZScatterer
- class pyobjcryst.zscatterer.ZScatterer(*args, **kwargs)[source]#
Bases:
ZScatterer- ImportFenskeHallZMatrix(src, named=False)[source]#
Import atoms from a Fenske-Hall z-matrix :param src: either a python filed (opened in ‘rb’ mode), or.
a filename, or an url (”http://…”) to a text file with the z-matrix
- Parameters:
named – if True, allows to read a named Z-matrix - the formatting is similar to a Fenske-Hall z-matrix but only relies on spaces between the different fields instead of a strict number of characters.