[cctbxbb] unexpected behaviour of unit_cell.fractionalize

Jan Marten Simons marten at xtal.rwth-aachen.de
Thu Feb 14 05:18:55 PST 2013

On 13 Februar 2013 20:15:32 Richard Gildea wrote:
> Hi Jan,
> 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:
> http://phenix-online.org/pipermail/cctbxbb/2010-February/000142.html

I think it would be nice to get the same result in a more straight forward 
way, but for now restricting the sites via this method should work for me.

> 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.

That would be quite helpful.

Also, I think I must be blind, but so far I have not found a method that 
returns the basis *vectors* of a unit cell via python. Do you know any?

Thanks in advance,

More information about the cctbxbb mailing list