Am Samstag 11 Dezember 2010 14:16:37 schrieb Richard Gildea:
Hi Jan,
This should be fairly straightforward:
from cctbx import xray
xs = xray.structure.from_cif(file_path="my.cif")
From a gentoo-user pov a simple switch to the build system to use the bundled or system-wide boost/... would be very helpful here. That way gentoo developers could easily follow current cctbx releases without the need to
This looks very good. Sadly I could not yet test it here, as I'm on gentoo linux and the most recent version of cctbx there is 2010.03.29.2334 [1]. I've tried to adapt the ebuild to the most recent release, but as gentoo unbundles boost (by policy and for good reasons [2]), I'm stuck with outdated patches [3] to the SConsscripts of cctbx. patch all SConscript files. This would help Calculate linux [4] and other distributions as well, as quite a few base off from gentoo. [1] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sci-libs/cctbx/ [2] http://blog.flameeyes.eu/2009/03/23/bundling-libraries-the-curse-of-the- ancients [3] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sci- libs/cctbx/files/ [4] http://www.calculate-linux.org/packages/sci-libs/cctbx
This will return you an instance of xray.structure. If you have more than one data block in your cif, you can specify which structure you want to extract using the block_heading keyword (by default it just returns the first structure it can successfully extract from the cif). There is also similar functionality that can be used to extract miller arrays from fcf or hkl formats.
Please let me know if you have any further questions about this.
I was thinking that perhaps a user-driven wiki for examples and more detailed documentation/howtos might be a nice addition so that some practical use cases could be documented there. This might be beneficial for new users of cctbx, as at the moment the documentation seems to be very much tied to the source code, which is a rather developer oriented approach. With regards, Jan M. Simons Institute of Crystallography RWTH Aachen