Re: [cctbxbb] cctbxbb Digest, Vol 92, Issue 17
Message: 3 Date: Mon, 21 Nov 2016 13:38:21 +0000 From: Gabor Bunkoczi
To: cctbx mailing list Subject: Re: [cctbxbb] convert an arbitrary point to one inside the asymmetric unit Message-ID: Content-Type: text/plain; charset="utf-8" On second thought, the simplest solution is to use the direct_space_asu object. This is available for all space groups:
from cctbx import sgtbx sgi = sgtbx.space_group_info( "P2" ) asu = sgi.direct_space_asu() asu.is_inside( ( 0, 0, 0 ) ) True asu.is_inside( (0, 0, 0.51 ) ) False
BW, Gabor
Thanks for your quick reply, Gabor. Unfortunately, it does not solve my question. For the example you give above, the second point is not inside the asu, and my question is how i can the corresponding point inside the asu, For a simple space group as P2 the answer is easily figured out by hand. For a space group such as I m -3 m, it becomes complicated. I would like to have a (computationally efficient) method for finding the point inside the asu given an arbitrary point which works for every space group. Any “third” thoughts? kindest regards, bert
Hi Bert, actually, my "first" thought solves this problem. If you turn all your points into an xray_structure, and get the asu_mappings, this gives you the coordinates of the equivalent site in the asu (returned by the "mapped_site" method). However, it won't make a list of equivalent sites unique, i.e. if you have site1 = ( 0.1, 0.1, 0.1 ) and site2 = ( 1.1, 0.1, 0.1 ) (in fractional coordinates), you get a mapping for the same site twice, so perhaps the most efficient method is just to transform your scalar field into the unit cell, and then discard points that are outside the asu. If the grid is not congruent with the unit cell, you are probably better off using asu_mappings, since you will be able to interpolate on a finer grid. BW, Gabor On Mon, Nov 21, 2016 at 2:02 PM, Tijskens Engelbert < [email protected]> wrote:
Message: 3 Date: Mon, 21 Nov 2016 13:38:21 +0000 From: Gabor Bunkoczi
To: cctbx mailing list Subject: Re: [cctbxbb] convert an arbitrary point to one inside the asymmetric unit Message-ID: Content-Type: text/plain; charset="utf-8" On second thought, the simplest solution is to use the direct_space_asu object. This is available for all space groups:
from cctbx import sgtbx sgi = sgtbx.space_group_info( "P2" ) asu = sgi.direct_space_asu() asu.is_inside( ( 0, 0, 0 ) ) True asu.is_inside( (0, 0, 0.51 ) ) False
BW, Gabor
Thanks for your quick reply, Gabor. Unfortunately, it does not solve my question. For the example you give above, the second point is not inside the asu, and my question is how i can the corresponding point inside the asu, For a simple space group as P2 the answer is easily figured out by hand. For a space group such as I m -3 m, it becomes complicated. I would like to have a (computationally efficient) method for finding the point inside the asu given an arbitrary point which works for every space group. Any “third” thoughts?
kindest regards, bert
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
participants (2)
-
Gabor Bunkoczi
-
Tijskens Engelbert