[cctbxbb] Fail to extend space-group with centring translations
Peter Zwart
PHZwart at lbl.gov
Fri Dec 8 13:13:28 PST 2006
Hi Luc,
> with the latest cctbx release, the following Python snippet fails
>
> from cctbx.sgtbx import *
> info = space_group_info("P2/a")
> g = info.group()
> g.expand_ltr(tr_vec((1,1,1),2))
If you do it like this:
from cctbx import sgtbx
info = sgtbx.space_group_info("P2/a")
g = info.group()
t = sgtbx.tr_vec( (1,1,1), 2 )
t = t.new_denominator( g.t_den() )
g.expand_ltr( t )
print sgtbx.space_group_info(group=g)
The trick lies in obtaining the translational denominator from the group
it self and setting that value in your t vector. The same issue is there
when multiplying in an extra rotation operator. In that case you need
the g.r_den().
> from cctbx import sgtbx
> s = sgtbx.space_group_symbols("P21/c")
> g = sgtbx.space_group(s)
> g.expand_ltr(sgtbx.tr_vec((1,0,1),3))
> g.expand_ltr(sgtbx.tr_vec((2,0,2),3))
from cctbx import sgtbx
info = sgtbx.space_group_info("P2/a")
g = info.group()
g.expand_ltr(sgtbx.tr_vec((1,0,1),3).new_denominator( g.t_den() ) )
g.expand_ltr(sgtbx.tr_vec((2,0,2),3).new_denominator( g.t_den() ) )
print sgtbx.space_group_info( group=g )
works.
> It seems like it is a deeply rooted limitation and that brings me to
> the bigger picture. I am currently working on an EPSRC grant to write
> the next generation of small molecule crystallographic software, a
> joint collaboration between Judith Howard in Durham and David Watkin
> in Oxford (all in UK, just in case…!). The CCTBX is obviously a
> seducing foundation for such a project. Thus we have tried to push it
> into corners which do actually matter to a significant minority of
> small molecule crystallographers.
>
> So I would like to know how difficult it would be to lift the
> limitation at hand. Would it trigger a cascade of changes throughout
> the sgtbx?
>
The r_den, t_den thing is confusing and using an approach with rational
numbers would make sense.
time time ...
Cheers
Peter
More information about the cctbxbb
mailing list