def _init_kwargs(self, **kwargs): """Create a new instance of BondCalculator. Keyword arguments can be used to configure calculator properties, for example: bdc = BondCalculator(rmin=1.5, rmax=2.5) Raise ValueError for invalid keyword argument. """ BondCalculator.__boostpython__init(self) setattrFromKeywordArguments(self, **kwargs) return
def _call_kwargs(self, structure=None, **kwargs): """Return sorted bond distances in the specified structure. structure -- structure to be evaluated, an instance of diffpy Structure or pyobjcryst Crystal. Reuse the last structure when None. kwargs -- optional parameter settings for this calculator Return a sorted numpy array. """ setattrFromKeywordArguments(self, **kwargs) self.eval(structure) return self.distances
def _init_kwargs(self, **kwargs): '''Create a new instance of OverlapCalculator. Keyword arguments can be used to configure calculator properties, for example: olc = OverlapCalculator(rmax=2.5) Raise ValueError for invalid keyword argument. ''' OverlapCalculator.__boostpython__init(self) setattrFromKeywordArguments(self, **kwargs) return
def _call_kwargs(self, structure=None, **kwargs): '''Return siteSquareOverlaps per each site of the structure. structure -- structure to be evaluated, an instance of diffpy Structure or pyobjcryst Crystal. Reuse the last structure when None. kwargs -- optional parameter settings for this calculator Return a numpy array. ''' setattrFromKeywordArguments(self, **kwargs) self.eval(structure) return self.sitesquareoverlaps
def _init_kwargs1(self, **kwargs): '''Create a new instance of PDFCalculator. Keyword arguments can be used to configure the calculator properties, for example: pc = PDFCalculator(qmax=20, rmin=7, rmax=15) Raise ValueError for invalid keyword argument. ''' PDFCalculator.__boostpython__init(self) setattrFromKeywordArguments(self, **kwargs) return
def _call_kwargs(self, structure=None, **kwargs): '''Return sorted bond distances in the specified structure. structure -- structure to be evaluated, an instance of diffpy Structure or pyobjcryst Crystal. Reuse the last structure when None. kwargs -- optional parameter settings for this calculator Return a sorted numpy array. ''' setattrFromKeywordArguments(self, **kwargs) self.eval(structure) return self.distances
def _init_kwargs(self, **kwargs): '''Create a new instance of BVSCalculator. Keyword arguments can be used to configure the calculator properties, for example: bvscalc = BVSCalculator(valenceprecision=0.001) Raise ValueError for invalid keyword argument. ''' BVSCalculator.__boostpython__init(self) setattrFromKeywordArguments(self, **kwargs) return
def _call_kwargs(self, structure=None, **kwargs): '''Return bond valence sums at each atom site in the structure. structure -- structure to be evaluated, an instance of diffpy Structure or pyobjcryst Crystal. Reuse the last structure when None. kwargs -- optional parameter settings for this calculator Return an array of calculated valence sums. See valences for the expected values. ''' setattrFromKeywordArguments(self, **kwargs) rv = self.eval(structure) return rv
def _call_kwargs(self, structure=None, **kwargs): '''Calculate PDF for the given structure as an (r, G) tuple. Keyword arguments can be used to configure calculator attributes, these override any properties that may be passed from the structure, such as spdiameter. structure -- a structure object to be evaluated. Reuse the last structure when None. kwargs -- optional parameter settings for this calculator Example: pdfcalc(structure, qmax=20, spdiameter=15) Return a tuple of (r, G) numpy arrays. ''' setattrFromKeywordArguments(self, **kwargs) self.eval(structure) # apply kwargs again if structure contained any attribute # that may affect the result. setattrFromKeywordArguments(self, **kwargs) rv = (self.rgrid, self.pdf) return rv