cctbx and symmetry: source code
Dear all I am developing a software for which I needed to use the unit cell generation module of the cctbx. The software will be working for small molecule as well as macromolecule. It will be a great help, if some body can suggest me the part of the program to be used as I am getting confused while selecting the .cpp and .h files. Thanx alot in advance Prasun Kumar PRASUN (ASHOKA) Desire + stability = Resolution Resolution + Hard work = Success
Hi Prasun,
the .cpp and .h files are related to the C++ part of the code. If you are
interested in dealing with it, other in the mail list will answer better
than me. But if what you want is to use the python functions and
interfaces, the package dealing with unit cell is uctbx (
http://cctbx.sourceforge.net/current/python/cctbx.uctbx.html) .
best regards,
Claudia Millán ([email protected])
Institut de Biologia Molecular de Barcelona (IBMB-CSIC)
Barcelona, Spain
2013/3/19 prasun kumar
Dear all
I am developing a software for which I needed to use the unit cell generation module of the cctbx. The software will be working for small molecule as well as macromolecule.
It will be a great help, if some body can suggest me the part of the program to be used as I am getting confused while selecting the .cpp and .h files. Thanx alot in advance
Prasun Kumar
PRASUN (ASHOKA) Desire + stability = Resolution Resolution + Hard work = Success
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
Hi prasun,
It will be a great help, if some body can suggest me the part of the program to be used as I am getting confused while selecting the .cpp and .h files.
The header is cctbx/uctbx.h and the implementation is in cctbx/uctbx/uctbx.cpp. If you develop with C++, you need to pass -I/path/to/cctbx_sources where cctbx_sources is the directory that contains all the sources (i.e. cctbx, mmtbx, scitbx, etc are direct subdirectories of it). Having hopefully answered your question, a word of advice: the cctbx is designed to be used from Python. Only the very basic features are available in C++. And many features are much easier to use from Python than from C++. It all depends on what you wish to achieve of course but since you are at the beginning of your project, I thought it would be the right time to think about the programming language. Best wishes, Luc Bourhis
Dear all
Thanx alot for the useful advice.
I have written my code in PERL and was using OPENBABEL for unit cell
generation. Some how I am not able to get the desired result.
I thought of shifting from OPENBABEL to cctbx.
For this purpose, I wanted to have set of codes that can generate unit cell
for me for the small molecules mainly.
Is it possible for me. I am asking this question because I am completely
new to the python.
In PERL, you can make executable (lets say on any unix OS 64 bit comp) and
it will work on any 64 bit computer with any type or version of LINUX/UNIX.
I was more interested in the binary form, so that I can directly call it
from my main program.
thanx alot
Prasun Kumar
PRASUN (ASHOKA)
Desire + stability = Resolution
Resolution + Hard work = Success
On Tue, Mar 19, 2013 at 2:53 PM, Luc Bourhis
Hi prasun,
It will be a great help, if some body can suggest me the part of the program to be used as I am getting confused while selecting the .cpp and .h files.
The header is cctbx/uctbx.h and the implementation is in cctbx/uctbx/uctbx.cpp. If you develop with C++, you need to pass -I/path/to/cctbx_sources where cctbx_sources is the directory that contains all the sources (i.e. cctbx, mmtbx, scitbx, etc are direct subdirectories of it).
Having hopefully answered your question, a word of advice: the cctbx is designed to be used from Python. Only the very basic features are available in C++. And many features are much easier to use from Python than from C++. It all depends on what you wish to achieve of course but since you are at the beginning of your project, I thought it would be the right time to think about the programming language.
Best wishes,
Luc Bourhis
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
On 19 Mar 2013, at 11:09, prasun kumar wrote:
[...]
Is it possible for me. I am asking this question because I am completely new to the python. In PERL, you can make executable (lets say on any unix OS 64 bit comp) and it will work on any 64 bit computer with any type or version of LINUX/UNIX.
I was more interested in the binary form, so that I can directly call it from my main program.
Just to make sure we are on the same page, I have got two questions. Is your main program written in C? If so, were you embedding a Perl interpreter in that program, so as to have access to OpenBabel? Best wishes, Luc
Dear Luc
I think I have confused you by not mentioning in the very first mail.
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.
Thanx alot
Prasun Kumar
PRASUN (ASHOKA)
Desire + stability = Resolution
Resolution + Hard work = Success
On Tue, Mar 19, 2013 at 8:12 PM, Luc Bourhis
On 19 Mar 2013, at 11:09, prasun kumar wrote:
[...]
Is it possible for me. I am asking this question because I am completely new to the python. In PERL, you can make executable (lets say on any unix OS 64 bit comp) and it will work on any 64 bit computer with any type or version of LINUX/UNIX.
I was more interested in the binary form, so that I can directly call it from my main program.
Just to make sure we are on the same page, I have got two questions. Is your main program written in C? If so, were you embedding a Perl interpreter in that program, so as to have access to OpenBabel?
Best wishes,
Luc
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
Hello there,
I think your problem is perhaps much easier than you think if you are already making system calls: you could just use cctbx Python code to do what you want, and then call
system("cctbx.python cell_whatever.py")
to do what you want: to the Perl program this is no different to writing a compiled application. Provided of course you have cctbx installed and have the setup file sourced.
Personally I find the Python interface to cctbx rather easier to use than the C++, but that is probably mostly familiarity.
Best wishes,
Graeme
From: [email protected] [mailto:[email protected]] On Behalf Of prasun kumar
Sent: 19 March 2013 15:13
To: cctbx mailing list
Subject: Re: [cctbxbb] cctbx and symmetry: source code
Dear Luc
I think I have confused you by not mentioning in the very first mail.
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.
Thanx alot
Prasun Kumar
PRASUN (ASHOKA)
Desire + stability = Resolution
Resolution + Hard work = Success
On Tue, Mar 19, 2013 at 8:12 PM, Luc Bourhis
[...]
Is it possible for me. I am asking this question because I am completely new to the python. In PERL, you can make executable (lets say on any unix OS 64 bit comp) and it will work on any 64 bit computer with any type or version of LINUX/UNIX.
I was more interested in the binary form, so that I can directly call it from my main program. Just to make sure we are on the same page, I have got two questions. Is your main program written in C? If so, were you embedding a Perl interpreter in that program, so as to have access to OpenBabel?
Best wishes, Luc _______________________________________________ cctbxbb mailing list [email protected]mailto:[email protected] http://phenix-online.org/mailman/listinfo/cctbxbb -- 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
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 at http://cci.lbl.gov/cctbx_build and install it. 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
Dear Luc and Graeme
I have followed, what you all have suggested. I have downloaded and
installed on my PC which is having DEBIAN OS.
Everything is working fine.
Now I am searching for the code which can give me the filled unit cell or
matrix (3X3X3) of unit cell.
I have checked the codes available for the pymol and cctbx working together
(http://pymolwiki.org/index.php/Supercell) or (
http://pymolwiki.org/index.php/SuperSym).
It will be better, if I can get the code which does not use Pymol.
Especially I am concentrating on SuperSym, but when I ran using command
line, it gives segmentation fault (I think I need to remove everything
which is for displaying in Pymol window, not sure though).
Thanx in advance
Prasun Kumar
PRASUN (ASHOKA)
Desire + stability = Resolution
Resolution + Hard work = Success
On Wed, Mar 20, 2013 at 2:44 AM, Luc Bourhis
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 at http://cci.lbl.gov/cctbx_build and install it. 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
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
Hi Prasun, sorry for answering with a bit of a delay.
Now I am searching for the code which can give me the filled unit cell or matrix (3X3X3) of unit cell.
Could you elaborate on what you want to do in more details? The two PyMol modules you mention provide many features and I am not sure exactly which one you are interested in. Best wishes, Luc
Dear Luc
Basically My idea is to use cctbx for generating the unit cell for the
small molecule or macromolecule.
The two codes I mentioned in my earlier mail, can give us unit cell or
3X3X3 matrix or arrangement of unit cell, but I need to use Pymol and then
connect it with the CCTBX.
So I wanted some modification in the code itself so that I can pass the
required information (file name and CRYST1 record) and I can get the
generated Unit Cell.
Thanx alot for your timely help and suggestions.
Regards
Prasun Kumar
PRASUN (ASHOKA)
Desire + stability = Resolution
Resolution + Hard work = Success
On Thu, Mar 21, 2013 at 3:09 PM, Luc Bourhis
Hi Prasun,
sorry for answering with a bit of a delay.
Now I am searching for the code which can give me the filled unit cell or matrix (3X3X3) of unit cell.
Could you elaborate on what you want to do in more details? The two PyMol modules you mention provide many features and I am not sure exactly which one you are interested in.
Best wishes,
Luc
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
participants (4)
-
Claudia Millán Nebot
-
Graeme.Winter@diamond.ac.uk
-
Luc Bourhis
-
prasun kumar