Hi, Just out of curiosity, sginfo website mentions that it has been superseeded by sgtbx. Is that a brand new implementation? I don't recognize sginfo code at all. Also, anyone can confirm that sgtbx is tightly embedded is cctbx and cannot be used standalone? Regards, Pascal
Hi Pascal,
Also, anyone can confirm that sgtbx is tightly embedded is cctbx and cannot be used standalone?
sgtbx can be used as a pure C++ library and as such it depends only on a few parts of cctbx (Miller indices, unit cell, and a few miscellaneous utilities: i.e. a very small fraction of the whole cctbx module), and on a few parts of scitbx (arrays, integer matrix row echelon reduction), and hashes from the Boost library. As a Python library, the dependencies are more numerous. If you could tell us what is your ultimate goal, we could provide more help. Best wishes, Luc
Le 15/10/2016 à 13:05, Luc Bourhis a écrit :
Hi Pascal,
Also, anyone can confirm that sgtbx is tightly embedded is cctbx and cannot be used standalone?
sgtbx can be used as a pure C++ library and as such it depends only on a few parts of cctbx (Miller indices, unit cell, and a few miscellaneous utilities: i.e. a very small fraction of the whole cctbx module), and on a few parts of scitbx (arrays, integer matrix row echelon reduction), and hashes from the Boost library. As a Python library, the dependencies are more numerous. It is still a fairly amount of dependencies.
If you could tell us what is your ultimate goal, we could provide more help.
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. Pascal
On 15 Oct 2016, at 15:05, Pascal
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
On 15/10/16 19:31, Luc Bourhis wrote:
On 15 Oct 2016, at 15:05, Pascal
mailto:[email protected]> 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?
No, that should be it. More complicated objects could be flatten as a C struct and then pass to fortran.
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…
Ok, if it just libcctbx and maybe an other one it's not too bad. Thanks, Pascal
Hi Pascal, There is also SgLite (https://github.com/rwgk/sglite), which historically is between SgInfo and sgtbx. It's in C and has no dependencies. If it still works and does what you need after 16 years, I wouldn't worry too much that it's not maintained. Marcin
As an example, Phil Evans uses sgtbx and some other symmetry related tools from the cctbx inside his C++ programs aimless and pointless, e.g.: ftp://ftp.ccp4.ac.uk/ccp4/7.0/ccp4-7.0-src/checkout/aimless/pointgroup.cpp Cheers, Richard Dr Richard Gildea Data Analysis Scientist Tel: +441235 77 8078 Diamond Light Source Ltd. Diamond House Harwell Science & Innovation Campus Didcot Oxfordshire OX11 0DE ________________________________ From: [email protected] [[email protected]] on behalf of Luc Bourhis [[email protected]] Sent: 15 October 2016 13:05 To: cctbx mailing list Subject: Re: [cctbxbb] sginfo and sgtbx Hi Pascal, Also, anyone can confirm that sgtbx is tightly embedded is cctbx and cannot be used standalone? sgtbx can be used as a pure C++ library and as such it depends only on a few parts of cctbx (Miller indices, unit cell, and a few miscellaneous utilities: i.e. a very small fraction of the whole cctbx module), and on a few parts of scitbx (arrays, integer matrix row echelon reduction), and hashes from the Boost library. As a Python library, the dependencies are more numerous. If you could tell us what is your ultimate goal, we could provide more help. Best wishes, Luc -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
participants (4)
-
Luc Bourhis
-
Marcin Wojdyr
-
Pascal
-
richard.gildea@diamond.ac.uk