<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><font class="Apple-style-span" face="Courier">Dear Prasun,<br></font><div><font class="Apple-style-span" face="Courier"><br class="Apple-interchange-newline"></font><blockquote type="cite"><div dir="ltr"><div><font class="Apple-style-span" face="Courier">My main program is in PERL and I am calling OPENBABEL by installing it on my PC and using the system command on UNIX. e.g. system("babel -i pdb input file -o cif output file");</font></div>
<div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">Same thing I wanted for cctbx. Since it does alot of other things along with unitcell generation, I wanted to have the&nbsp;relevant part of cctbx.</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">I wanted to make binary of that part, so that I can call it from the main program.</font></div></div></blockquote><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">I got it this time, sorry for being rather thick on that one!</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">The easiest is definitively to follow Graeme's excellent advice.&nbsp;</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">Let me spell it out with more details:</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">1. Grab a distro of the cctbx that works on the machine you target&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp;at <a href="http://cci.lbl.gov/cctbx_build">http://cci.lbl.gov/cctbx_build</a> and install it.</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp;Actually, since your main program is written in Perl, it would be rather&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp;</font><span class="Apple-style-span" style="font-family: Courier; ">easy</span>&nbsp;<font class="Apple-style-span" face="Courier">to figure out which OS it is running on,&nbsp;</font><font class="Apple-style-span" face="Courier">and then to deduce&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp;which&nbsp;</font><span class="Apple-style-span" style="font-family: Courier; ">installer to download,&nbsp;</span><span class="Apple-style-span" style="font-family: Courier; ">and finally to install the cctbx on-the-fly&nbsp;</span></div><div><span class="Apple-style-span" style="font-family: Courier; ">&nbsp; &nbsp;as the program launches for the first time. That way the same Perl code</span></div><div><span class="Apple-style-span" style="font-family: Courier; ">&nbsp; &nbsp;would run on a wide range of Linuxes and versions of MacOS, and even</span></div><div><span class="Apple-style-span" style="font-family: Courier; ">&nbsp; &nbsp;on Windows if you bundle Perl with your program (you would not need</span></div><div><span class="Apple-style-span" style="font-family: Courier; ">&nbsp; &nbsp;to bundle Python as the cctbx installer does that for you on Windows).</span></div><div><span class="Apple-style-span" style="font-family: Courier; "><br></span></div><div><font class="Apple-style-span" face="Courier">2. system "/path/to/cctbx_build/bin/cctbx.python", "script_of_yours.py";</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp;* cctbx_build is one of the directory created by the cctbx installer;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp;again rather easy to have your Perl program find it if it installed</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp;the cctbx in the first place!</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp;* script_of_yours.py would be a Python script you would devise&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp;to generate unit cells: you would be much more productive writing that&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp;in Python than&nbsp;</font><span class="Apple-style-span" style="font-family: Courier; ">targeting the cctbx C++ interface, as Graeme and I have</span></div><div><span class="Apple-style-span" style="font-family: Courier; ">&nbsp; &nbsp; &nbsp;already pointed out.</span></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">HtH,</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">Luc</font></div><div><br></div></body></html>