(please cc the list) When I said the command prompt, I meant the Windows command prompt. PYTHONPATH is an environment variable.
You really should contact the author of the plugin at this point - he can easily tell you how to do it. - Noel On 14 July 2016 at 17:59, Thomas Ryckmans <thomas.ryckm...@gmail.com> wrote: > Hi Noel, > > I ran the sys.path.append... when I type pymol in the command line I get > >>>> Pymol > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > NameError: name 'Pymol' is not defined > > Yet I have installed pymol (from a .msi: EduPyMOL-v1.7.4.5-Win64) > > If I run pymol (I use the "C:\Program Files\PyMOL\PyMOL\PymolWin.exe" -J), I > can use the python command line... > > is there another installer that would give me a pymol.py file?? > > many thanks > > Thomas > > On 14 July 2016 at 07:55, Noel O'Boyle <baoille...@gmail.com> wrote: >> >> Just try setting the PYTHONPATH at the command line before running Pymol >> at the same command line. >> >> On 13 Jul 2016 9:54 p.m., "Thomas Ryckmans" <thomas.ryckm...@gmail.com> >> wrote: >>> >>> Hi Noel, >>> >>> thank you so much for your comment - I am a newbie and very much stuck. >>> I tried both >>> >>> import sys >>> >>> sys.path.append("C:\Users\Thomas\Anaconda2\Lib\site-packages\openbabel\data") >>> print sys.path >>> >>> import sys >>> sys.path.append("C:\Users\Thomas\Anaconda2\Lib\site-packages\openbabel") >>> print sys.path >>> >>> but I still get an error message: >>> >>> Error: 1 >>> <type 'exceptions.NameError'> Exception in Tk callback >>> Function: <function set_conf_search at 0x00000000031FA2E8> (type: <type >>> 'function'>) >>> Args: () >>> Traceback (innermost last): >>> File "C:\Program >>> Files\PyMOL\\PyMOL/modules\Pmw\Pmw_1_2\lib\PmwBase.py", line 1747, in >>> __call__ >>> return apply(self.func, args) >>> File "C:\Users\Thomas\AppData\Roaming\pymol\startup\optimize.py", line >>> 52, in set_conf_search >>> conf_search(selection, forcefield, conf_method, nsteps1, conformers, >>> lowest_conf) >>> File "C:\Users\Thomas\AppData\Roaming\pymol\startup\optimize.py", line >>> 266, in conf_search >>> obconversion = ob.OBConversion() >>> <type 'exceptions.NameError'>: global name 'ob' is not defined >>> >>> any ideas of what I should do next?? >>> >>> Thomas >>> >>> On 13 July 2016 at 21:28, Noel O'Boyle <baoille...@gmail.com> wrote: >>>> >>>> You should ask the Pymol devs. Have you tried setting PYTHONPATH before >>>> running Pymol? >>>> >>>> On 13 Jul 2016 5:55 p.m., "Thomas Ryckmans" <thomas.ryckm...@gmail.com> >>>> wrote: >>>>> >>>>> Dear all, >>>>> >>>>> I am trying to install openbabel to run the Optimize plugin in Pymol >>>>> (http://www.pymolwiki.org/index.php/Optimize). >>>>> I installed the OpenBabelGUI 2.3.2 >>>>> I am using python 2.7 (Anaconda) with a 64 bit computer, so I I >>>>> installed openbabel-1.8.4-cp27-none-win_amd64.whl, and the python >>>>> bindings. >>>>> >>>>> It seems to work: I can follow the command lines here: >>>>> and it works - e.g. these >>>>> >>>>> >>> import pybel >>>>> >>> mol = pybel.readstring("smi", "CC(=O)Br") >>>>> >>> mol.make3D() >>>>> >>> print(mol.write("sdf")) >>>>> >>>>> give the expected output. >>>>> >>>>> >>>>> However when I run pymol and try to use Optimize, I get the following >>>>> error message: >>>>> --------------------------------------------------------------- >>>>> Error: 1 >>>>> <type 'exceptions.NameError'> Exception in Tk callback >>>>> Function: <function set_conf_search at 0x0000000009CB02E8> (type: >>>>> <type 'function'>) >>>>> Args: () >>>>> Traceback (innermost last): >>>>> File "C:\Program >>>>> Files\PyMOL\\PyMOL/modules\Pmw\Pmw_1_2\lib\PmwBase.py", line 1747, in >>>>> __call__ >>>>> return apply(self.func, args) >>>>> File "C:\Users\Thomas\AppData\Roaming\pymol\startup\optimize.py", >>>>> line 52, in set_conf_search >>>>> conf_search(selection, forcefield, conf_method, nsteps1, >>>>> conformers, lowest_conf) >>>>> File "C:\Users\Thomas\AppData\Roaming\pymol\startup\optimize.py", >>>>> line 266, in conf_search >>>>> obconversion = ob.OBConversion() >>>>> <type 'exceptions.NameError'>: global name 'ob' is not defined >>>>> ---------------------------------------------------------------- >>>>> I am assuming (...) that this is because pymol does not know where to >>>>> find openbabel. How can I change that?? >>>>> >>>>> In the openbabel directory, there is a file called babelconfig.h; >>>>> containing these two lines: >>>>> /* Where the data files are located */ >>>>> #define BABEL_DATADIR "C:/Program Files/openbabel/share/openbabel" >>>>> >>>>> while the data folder is actually elsewhere: >>>>> C:\Users\Thomas\Anaconda2\Lib\site-packages\openbabel >>>>> >>>>> if I try to change the babelconfig.h file to >>>>> /* Where the data files are located */ >>>>> #define BABEL_DATADIR >>>>> "C:\Users\Thomas\Anaconda2\Lib\site-packages\openbabel"... >>>>> nothing changes... >>>>> >>>>> many thanks for your help! >>>>> >>>>> Thomas >>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> What NetFlow Analyzer can do for you? Monitors network bandwidth and >>>>> traffic >>>>> patterns at an interface-level. Reveals which users, apps, and >>>>> protocols are >>>>> consuming the most bandwidth. Provides multi-vendor support for >>>>> NetFlow, >>>>> J-Flow, sFlow and other flows. Make informed decisions using capacity >>>>> planning >>>>> reports.http://sdm.link/zohodev2dev >>>>> _______________________________________________ >>>>> OpenBabel-discuss mailing list >>>>> OpenBabel-discuss@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss >>>>> >>> > ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss