<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Flavio,<br><div><br class="Apple-interchange-newline"><blockquote type="cite">
<div bgcolor="#ffffff" text="#000000">I would like to use cctbx with C++. To start with I would like to do
    something basic, like:<br>
    <br>
    <pre>&gt;<i> from cctbx import xray
</i>&gt;<i> 
</i>&gt;<i> xs = xray.structure.from_cif(file_path="my.cif")
</i></pre>
    <br>
    I looked into the cctbx functions/class list, but I could not find
    something similar for C++. <br>
    Can someone help me?</div></blockquote><br></div><div>I am afraid that this is Python-only and that it will stay so. Indeed the philosophy of the cctbx is to write as little C++ as possible. Only the most numerically intensive code is written in that language. Conversely very little of the I/O is usable from C++ if any at all.</div><div><br></div><div>If you absolutely need to write your program in C++, your only choice is to embed a Python interpreter inside that program and call into the cctbx Python layer. The Olex 2 program uses that idea intensively and with great success.</div><div><br></div><div>The alternative, and the one I would recommend if you have just started your project, would be to write your program in Python, with perhaps the seldom offloading of cpu- or memory-intensive task to some C++ code of yours. This is the way of the Phenix macromolecular suites and it works great too.</div><div><br></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; ">Luc Bourhis</span></div>
<br></body></html>