Dear Prasun,
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");
Same thing I wanted for cctbx. Since it does alot of other things along with unitcell generation, I wanted to have the relevant part of cctbx.
I wanted to make binary of that part, so that I can call it from the main program.
I got it this time, sorry for being rather thick on that one!
The easiest is definitively to follow Graeme's excellent advice.
Let me spell it out with more details:
1. Grab a distro of the cctbx that works on the machine you target
Actually, since your main program is written in Perl, it would be rather
easy to figure out which OS it is running on, and then to deduce
which installer to download, and finally to install the cctbx on-the-fly
as the program launches for the first time. That way the same Perl code
would run on a wide range of Linuxes and versions of MacOS, and even
on Windows if you bundle Perl with your program (you would not need
to bundle Python as the cctbx installer does that for you on Windows).
2. system "/path/to/cctbx_build/bin/cctbx.python", "script_of_yours.py";
* cctbx_build is one of the directory created by the cctbx installer;
again rather easy to have your Perl program find it if it installed
the cctbx in the first place!
* script_of_yours.py would be a Python script you would devise
to generate unit cells: you would be much more productive writing that
in Python than targeting the cctbx C++ interface, as Graeme and I have
already pointed out.
HtH,
Luc