From: Noel O'B. <bao...@gm...> - 2007-11-28 17:50:56
|
On 28/11/2007, Jean-Didier Mar=E9chal <jea...@ua...> wrote: > Hello, > > I have been stuck with the installation of cclib on unbuntu 7.10 for few > days now, and I wonder what I am doing wrong. Initially, I had problems > with python and in particular with the numeric module. Being solved > this, I am stuck once again. > > Basically, when I run the - python setup.py build - command, I > systematically receive the following answer: > > 'import site' failed; use -v for traceback > Traceback (most recent call last): > File "setup.py", line 56, in ? > setup_cclib() > File "setup.py", line 29, in setup_cclib > from distutils.core import setup > ImportError: No module named distutils.core Very strange. If you installed Python using your package manager, then there would be no problem finding "distutils.core" which a central part of the Python installation on Ubuntu 7.10. As you can see from the following search for "core.py", it's included in the "python2.4" package: http://packages.ubuntu.com/cgi-bin/search_contents.pl?word=3Dcore.py&search= mode=3Dsearchfiles&case=3Dinsensitive&version=3Dgutsy&arch=3Di386 You should not have had any problems with numeric either. We have switched to numpy, which is available in the Ubuntu distribution also. Hope this helps. Our installation instructions are at the following address= : http://cclib.sourceforge.net/wiki/index.php/Install Noel > What do I miss? > > Cheers > JD > > > -- > Dr. Jean-Didier Mar=E9chal > Assistant Professor > Computational Bioorganic and Bioinorganic Chemistry @Transmet > Unitat de Qu=EDmica F=EDsica > Departament de Qu=EDmica > Universitat Aut=F2noma de Barcelona > 08193 Bellaterra, Spain > Tel: +34.(0)1935814936 > Fax: +34.(0)1935812920 > e-mail:jea...@ua... > > > |
From: Jean-Didier <jea...@ua...> - 2007-11-28 18:27:44
|
Hi, I found the problem. As you mention in your e-mail, things should have been setup correctly. So, I began to scratch on permissions and python variables. I found that my user does not have the PYTHONPATH variable defined at all and that without this python was not even able to import the os module! (I guess this problem comes from the recent creation of a root user on my ubuntu box; I am sure that I did not have any problem with python before that) Anyway, after generating the correct PYTHONPATH I managed to have cclib working! Thanks for the e-mail, JD On Wed, 2007-11-28 at 19:50 +0200, Noel O'Boyle wrote: > On 28/11/2007, Jean-Didier Maréchal <jea...@ua...> wrote: > > Hello, > > > > I have been stuck with the installation of cclib on unbuntu 7.10 for few > > days now, and I wonder what I am doing wrong. Initially, I had problems > > with python and in particular with the numeric module. Being solved > > this, I am stuck once again. > > > > Basically, when I run the - python setup.py build - command, I > > systematically receive the following answer: > > > > 'import site' failed; use -v for traceback > > Traceback (most recent call last): > > File "setup.py", line 56, in ? > > setup_cclib() > > File "setup.py", line 29, in setup_cclib > > from distutils.core import setup > > ImportError: No module named distutils.core > > Very strange. If you installed Python using your package manager, then > there would be no problem finding "distutils.core" which a central > part of the Python installation on Ubuntu 7.10. As you can see from > the following search for "core.py", it's included in the "python2.4" > package: > http://packages.ubuntu.com/cgi-bin/search_contents.pl?word=core.py&searchmode=searchfiles&case=insensitive&version=gutsy&arch=i386 > > You should not have had any problems with numeric either. We have > switched to numpy, which is available in the Ubuntu distribution also. > > Hope this helps. Our installation instructions are at the following address: > http://cclib.sourceforge.net/wiki/index.php/Install > > Noel > > > What do I miss? > > > > Cheers > > JD > > > > > > -- > > Dr. Jean-Didier Maréchal > > Assistant Professor > > Computational Bioorganic and Bioinorganic Chemistry @Transmet > > Unitat de Química Física > > Departament de Química > > Universitat Autònoma de Barcelona > > 08193 Bellaterra, Spain > > Tel: +34.(0)1935814936 > > Fax: +34.(0)1935812920 > > e-mail:jea...@ua... > > > > > > |
From: Noel O'B. <bao...@gm...> - 2007-11-28 18:50:27
|
On 28/11/2007, Jean-Didier Mar=E9chal <jea...@ua...> wrote: > Hi, > > I found the problem. As you mention in your e-mail, things should have > been setup correctly. So, I began to scratch on permissions and python > variables. > > I found that my user does not have the PYTHONPATH variable defined at > all and that without this python was not even able to import the os > module! (I guess this problem comes from the recent creation of a root > user on my ubuntu box; I am sure that I did not have any problem with > python before that) As I understand, Ubuntu does not need a root user. Just prepend "sudo" to the command you wish to run as root, and when prompted for the password use "root". > Anyway, after generating the correct PYTHONPATH I managed to have cclib > working! Glad to hear. Let us know if you have any problems; also, we are interested to know what you are using cclib for... > Thanks for the e-mail, > > JD > > On Wed, 2007-11-28 at 19:50 +0200, Noel O'Boyle wrote: > > On 28/11/2007, Jean-Didier Mar=E9chal <jea...@ua...> wrot= e: > > > Hello, > > > > > > I have been stuck with the installation of cclib on unbuntu 7.10 for = few > > > days now, and I wonder what I am doing wrong. Initially, I had proble= ms > > > with python and in particular with the numeric module. Being solved > > > this, I am stuck once again. > > > > > > Basically, when I run the - python setup.py build - command, I > > > systematically receive the following answer: > > > > > > 'import site' failed; use -v for traceback > > > Traceback (most recent call last): > > > File "setup.py", line 56, in ? > > > setup_cclib() > > > File "setup.py", line 29, in setup_cclib > > > from distutils.core import setup > > > ImportError: No module named distutils.core > > > > Very strange. If you installed Python using your package manager, then > > there would be no problem finding "distutils.core" which a central > > part of the Python installation on Ubuntu 7.10. As you can see from > > the following search for "core.py", it's included in the "python2.4" > > package: > > http://packages.ubuntu.com/cgi-bin/search_contents.pl?word=3Dcore.py&se= archmode=3Dsearchfiles&case=3Dinsensitive&version=3Dgutsy&arch=3Di386 > > > > You should not have had any problems with numeric either. We have > > switched to numpy, which is available in the Ubuntu distribution also. > > > > Hope this helps. Our installation instructions are at the following add= ress: > > http://cclib.sourceforge.net/wiki/index.php/Install > > > > Noel > > > > > What do I miss? > > > > > > Cheers > > > JD > > > > > > > > > -- > > > Dr. Jean-Didier Mar=E9chal > > > Assistant Professor > > > Computational Bioorganic and Bioinorganic Chemistry @Transmet > > > Unitat de Qu=EDmica F=EDsica > > > Departament de Qu=EDmica > > > Universitat Aut=F2noma de Barcelona > > > 08193 Bellaterra, Spain > > > Tel: +34.(0)1935814936 > > > Fax: +34.(0)1935812920 > > > e-mail:jea...@ua... > > > > > > > > > > > |
From: Noel O'B. <bao...@gm...> - 2007-11-30 10:08:26
|
On 29/11/2007, Jean-Didier Mar=E9chal <jea...@ua...> wrote: > > Glad to hear. Let us know if you have any problems; also, we are > > interested to know what you are using cclib for... > > I have different projects I hope cclib to help me with (Well, once I'll > have understood how to use it (:-)). To get use to your module, the > first thing I want to do is to generate gaussian inputs extracting the > optimized geometry from a previous gaussian output. I know that sounds > ruin but truth is that I work on systems with a lot of conformations and > which size oblige me to optimize in gas phase. So, I want to perform > post calculations separately afterward. Scripting the generation of this > inputs will be of great help for me. > > Thanks a lot, > > JD Although cclib can help you with this, our functionality overlaps a little bit with another Python library, OpenBabel. Here is an example of reading the output file with cclib, and creating a Gaussian input file with OpenBabel: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D import pybel from cclib.parser import ccopen from cclib.bridge import makeopenbabel t =3D ccopen("dvb_gopt.out") d =3D t.parse() obmol =3D makeopenbabel(d.atomcoords[-1], d.atomnos, d.charge, d.mult) mol =3D pybel.Molecule(obmol) print mol.write("gau") =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D However, OpenBabel can also read Gaussian output files, so in this case it's easier just to do: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D import pybel mol =3D pybel.readfile("g03", "dvb_gopt.out").next() print mol.write("gau") =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D cclib has the advantage of giving you access to lots of other information, it can read output files from more computational chemistry packages, and it provides implementations of several computational chemistry algorithms. OpenBabel can read and write a very large number of molecular file formats, and provides access to several algorithms for manipulating chemical structures. It's easy to interconvert data from one to the other, so you can easily use them both. Noel |
From: Noel O'B. <bao...@gm...> - 2007-11-30 13:53:12
|
On 30/11/2007, Jean-Didier Mar=E9chal <jea...@ua...> wrote: > Well, I see that I could have done in four lines what I managed with > twice more. > > One question though, is there any possibility to collect the root from > the gaussian output? I'm afraid not. This seems to be true for both cclib and openbabel. > I'd like to generate an input file recovering the optimized geometry and > the keywords. > > All the best, > JD > > > On Fri, 2007-11-30 at 10:08 +0000, Noel O'Boyle wrote: > > On 29/11/2007, Jean-Didier Mar=E9chal <jea...@ua...> wrot= e: > > > > Glad to hear. Let us know if you have any problems; also, we are > > > > interested to know what you are using cclib for... > > > > > > I have different projects I hope cclib to help me with (Well, once I'll > > > have understood how to use it (:-)). To get use to your module, the > > > first thing I want to do is to generate gaussian inputs extracting th= e > > > optimized geometry from a previous gaussian output. I know that sound= s > > > ruin but truth is that I work on systems with a lot of conformations and > > > which size oblige me to optimize in gas phase. So, I want to perform > > > post calculations separately afterward. Scripting the generation of this > > > inputs will be of great help for me. > > > > > > Thanks a lot, > > > > > > JD > > > > Although cclib can help you with this, our functionality overlaps a > > little bit with another Python library, OpenBabel. > > > > Here is an example of reading the output file with cclib, and creating > > a Gaussian input file with OpenBabel: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > import pybel > > > > from cclib.parser import ccopen > > from cclib.bridge import makeopenbabel > > > > t =3D ccopen("dvb_gopt.out") > > d =3D t.parse() > > > > obmol =3D makeopenbabel(d.atomcoords[-1], d.atomnos, d.charge, d.mult) > > mol =3D pybel.Molecule(obmol) > > print mol.write("gau") > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > However, OpenBabel can also read Gaussian output files, so in this > > case it's easier just to do: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > import pybel > > > > mol =3D pybel.readfile("g03", "dvb_gopt.out").next() > > print mol.write("gau") > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > cclib has the advantage of giving you access to lots of other > > information, it can read output files from more computational > > chemistry packages, and it provides implementations of several > > computational chemistry algorithms. OpenBabel can read and write a > > very large number of molecular file formats, and provides access to > > several algorithms for manipulating chemical structures. > > > > It's easy to interconvert data from one to the other, so you can > > easily use them both. > > > > Noel > > |
From: Karol L. <kar...@kn...> - 2007-12-10 22:18:24
|
On Friday 30 November 2007 14:53, Noel O'Boyle wrote: > On 30/11/2007, Jean-Didier Mar=C3=A9chal <jea...@ua...> wro= te: > > Well, I see that I could have done in four lines what I managed with > > twice more. > > > > One question though, is there any possibility to collect the root from > > the gaussian output? > > I'm afraid not. This seems to be true for both cclib and openbabel. Hi jean and Noel. I think I'm missing part of the discussion here. What do = yo=20 mean by 'root'? Cheer, Karol =2D-=20 written by Karol Langner pon, 10 gru 2007, 23:17:20 CET |
From: Noel O'B. <bao...@gm...> - 2007-12-11 07:58:01
|
On 11/12/2007, Karol Langner <kar...@kn...> wrote: > On Friday 30 November 2007 14:53, Noel O'Boyle wrote: > > On 30/11/2007, Jean-Didier Mar=E9chal <jea...@ua...> wrot= e: > > > Well, I see that I could have done in four lines what I managed with > > > twice more. > > > > > > One question though, is there any possibility to collect the root fro= m > > > the gaussian output? > > > > I'm afraid not. This seems to be true for both cclib and openbabel. > > Hi jean and Noel. I think I'm missing part of the discussion here. What d= o yo > mean by 'root'? It's just a typo: it should be "route", what Gaussian calls the section at the start with the keywords. > Cheer, > Karol > > -- > written by Karol Langner > pon, 10 gru 2007, 23:17:20 CET > |
From: Jean-Didier <jea...@ua...> - 2007-12-11 11:22:18
|
Hi, Just a mistake: root = route:-) Cheers, JD On Mon, 2007-12-10 at 23:18 +0100, Karol Langner wrote: > On Friday 30 November 2007 14:53, Noel O'Boyle wrote: > > On 30/11/2007, Jean-Didier Maréchal <jea...@ua...> wrote: > > > Well, I see that I could have done in four lines what I managed with > > > twice more. > > > > > > One question though, is there any possibility to collect the root from > > > the gaussian output? > > > > I'm afraid not. This seems to be true for both cclib and openbabel. > > Hi jean and Noel. I think I'm missing part of the discussion here. What do yo > mean by 'root'? > > Cheer, > Karol > |
From: Karol L. <kar...@kn...> - 2007-12-11 18:16:07
|
On Tuesday 11 December 2007 12:14, Jean-Didier Mar=C3=A9chal wrote: > Hi, > > Just a mistake: root =3D route:-) > > Cheers, > JD I see :) =2D-=20 written by Karol Langner wto, 11 gru 2007, 19:15:26 CET |