[cctbxbb] unexpected behaviour of unit_cell.fractionalize
rgildea at gmail.com
Wed Feb 13 11:15:32 PST 2013
This message from the cctbxbb archive demonstrates how you can map sites to
the asymmetric unit cell in Python. I think you should probably be able to
write the equivalent code in C++ if you need the speed, but I would have to
look into it more closely to be sure:
Regarding the sites_frac between 0 and 1, there is a standalone C++
function mod_positive() and a related function mod_short() in
cctbx/coordinates.h which act just on a site coordinate rather than on a
scatterer. If you have need to access this in Python you would need to
write a wrapper function that will act on a flex.vec3_double() from Python
and loop over this in C++. If this is what you want we can point you in the
write direction for how to accomplish this.
On 13 February 2013 10:20, Jan Marten Simons <marten at xtal.rwth-aachen.de>wrote:
> Am Mittwoch 13 Februar 2013 18:19:15 schrieb Pavel Afonine:
> > Hi Jan,
> > I see, yes, that's right.
> > Just to make sure I correctly understand.. So having *only* sites_cart
> > and unit_cell, you want to convert these sites_cart into fractional
> > basis such that resulting sites_frac are all between 0 and 1, correct?
> Yes you got that right.
> It would be even better to have the option to restrict all sites_frac to be
> inside the asymmetric unit of the (empty) cell as well, as all other sites
> be generated from symmetry operations later on, if one needs to have all of
> cctbxbb mailing list
> cctbxbb at phenix-online.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cctbxbb