[cctbxbb] sginfo and sgtbx

Luc Bourhis luc_j_bourhis at mac.com
Sat Oct 15 11:31:17 PDT 2016


> On 15 Oct 2016, at 15:05, Pascal <pascal22p at parois.net> wrote:
> 
> Crystals is lacking the capability to get the Hall symbol and space group from symmetry operators. sginfo works fine but no longer maintained and I am wondering if a better solution exists.
> 
> Another concern when looking at cctbx is it is written in C++. It  is really a hassle as I would need to write C wrapper that I could access in Fortran.

Writing a C function taking mere strings and returning a mere strings, and whose body creates cctbx C++ objects and calls their methods, that is not that difficult to write, is it? Or am I missing something? 

What I would try to do would be to compile the cctbx with its native build system. Then compile your C function, something like 
	g++ -I path/to/cctbx_project ...
on Linux so that it finds the sgtbx headers, where path/to/cctbx_project is the path to the root of the cctbx source code. Then copy the cctbx shared library to your build directory, you will find it at cctbx_build/lib/libcctbx.so, and then link your object against libcctbx.so. You would then ship libcctbx.so within Crystals. If you prefer, you can configure the cctbx build system to produce static libraries if you don’t want to ship shared libraries with Crystals. Mmhmmm… I have the feeling I am forgetting another library to also copy from cctbx_build/lib…

Assuming you know the basics of configuring a cctbx build, you just need to use the command-line option —static_libraries with libtbx/configure.py.

Best wishes,

Luc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20161015/39e7039d/attachment.htm>


More information about the cctbxbb mailing list