Re: [Open Babel] OpenBabel for Python 3?
I thought I had, but apparently not, because after I installed it everything worked. Thanks for the help, John On 08/09/2016 01:05 PM, David Hall wrote: do you have python3-dev installed? On Aug 9, 2016, at 12:57 PM, John> wrote: PYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 -- 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
Re: [Open Babel] OpenBabel for Python 3?
do you have python3-dev installed? > On Aug 9, 2016, at 12:57 PM, Johnwrote: > > PYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 -- 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
Re: [Open Babel] OpenBabel for Python 3?
If you use the version of openbabel from git (which I would recommend over for the 2.3.2 release), then you can just specify PYTHON_EXECUTABLE as the python3 and it should find everything correctly. $ git clone https://github.com/openbabel/openbabel.git $ cd openbabel $ mkdir build $ cd build $ cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_BINDINGS=ON -DRUN_SWIG=ON ... -- Found PythonInterp: /usr/bin/python3 (found version "3.5.1") -- Found PythonLibs: /usr/lib64/libpython3.5m.so (found version "3.5.1") ... $ grep '^PYTHON' CMakeCache.txt ... PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 PYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m PYTHON_LIBRARY:FILEPATH=/usr/lib64/libpython3.5m.so ... -David On Tue, Aug 9, 2016 at 10:00 AM, Geoffrey Hutchison < geoff.hutchi...@gmail.com> wrote: > Please don't reply to me directly. Many other people on the mailing list > can answer your question. > > Your problem is clear from the WARNING. You want something like > -DPYTHON_LIBRARY=/usr/lib/python3.4/libpython.so > > You need to link to a *file* not a directory where the file is found. > > Hope that helps, > -Geoff > > > On Aug 9, 2016, at 9:51 AM, Johnwrote: > > > > Geoff, > > > > > > I downloaded the source and installed all the prerequisites. I can't > figure out how to get it to link to the Python 3 bindings, however. > > > > $ cmake ../openbabel-2.3.2 -DPYTHON_BINDINGS=ON > -DPYTHON_LIBRARY=/usr/lib/python3.4 -DEIGEN3_INCLUDE_DIR=/home/ > john/eigen/eigen-eigen-dc6cfdf9bcec > > > > > > > > -- Found PythonInterp: /usr/bin/python (found version "2.7.6") > > -- Found PythonLibs: /usr/lib/python3.4 (found version "2.7.6") > > -- Python bindings will be compiled > > -- Configuring done > > WARNING: Target "bindings_python" requests linking to directory > "/usr/lib/python3.4". Targets may link only to libraries. CMake is > dropping the item. > > -- Generating done > > -- Build files have been written to: /home/john/openbabel/build > > > > As you can see, the configuration has linked to the Python 2 > installation, not Python 3. What is the correct setting to get it to link > to Python 3 instead? > > > > > > Thanks, > > > > John Todd > > > > > > P.S. A few of the tests seem to have failed, but several Google pages > make it sound like it's no big deal. Should I worry about: > > > > -- Looking for conio.h - not found > > > > -- Performing Test SCANDIR_NEEDS_CONST - Failed > > CMake Warning (dev) at test/CMakeLists.txt:171 (include): > > Syntax Warning in cmake code at > > > > /home/john/openbabel/openbabel-2.3.2/cmake/modules/ > UsePythonTest.cmake:54:14 > > > > Argument not separated from preceding token by whitespace. > > This warning is for project developers. Use -Wno-dev to suppress it. > > > > CMake Warning (dev) at test/CMakeLists.txt:171 (include): > > Syntax Warning in cmake code at > > > > /home/john/openbabel/openbabel-2.3.2/cmake/modules/ > UsePythonTest.cmake:54:31 > > > > Argument not separated from preceding token by whitespace. > > This warning is for project developers. Use -Wno-dev to suppress it. > > > > CMake Warning (dev) at test/CMakeLists.txt:171 (include): > > Syntax Warning in cmake code at > > > > /home/john/openbabel/openbabel-2.3.2/cmake/modules/ > UsePythonTest.cmake:57:25 > > > > Argument not separated from preceding token by whitespace. > > This warning is for project developers. Use -Wno-dev to suppress it. > > > > CMake Warning (dev) at test/CMakeLists.txt:171 (include): > > Syntax Warning in cmake code at > > > > /home/john/openbabel/openbabel-2.3.2/cmake/modules/ > UsePythonTest.cmake:57:39 > > > > Argument not separated from preceding token by whitespace. > > This warning is for project developers. Use -Wno-dev to suppress it. > > > > > > On 08/08/2016 01:27 PM, Geoffrey Hutchison wrote: > >>> I am fairly new at Python, and am trying to stick to the latest > version. > >>> Is it possible to install the Open Babel bindings for Python 3? > >> Yes. I don't know about the pip packages (or Mint ones) but you can do > this from source, e.g.: > >> https://open-babel.readthedocs.io/en/latest/Installation/install.html# > compile-bindings > >> > >> Hope that helps, > >> -Geoff > > > > > > -- > 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
Re: [Open Babel] OpenBabel for Python 3?
Please don't reply to me directly. Many other people on the mailing list can answer your question. Your problem is clear from the WARNING. You want something like -DPYTHON_LIBRARY=/usr/lib/python3.4/libpython.so You need to link to a *file* not a directory where the file is found. Hope that helps, -Geoff > On Aug 9, 2016, at 9:51 AM, Johnwrote: > > Geoff, > > > I downloaded the source and installed all the prerequisites. I can't figure > out how to get it to link to the Python 3 bindings, however. > > $ cmake ../openbabel-2.3.2 -DPYTHON_BINDINGS=ON > -DPYTHON_LIBRARY=/usr/lib/python3.4 > -DEIGEN3_INCLUDE_DIR=/home/john/eigen/eigen-eigen-dc6cfdf9bcec > > > > -- Found PythonInterp: /usr/bin/python (found version "2.7.6") > -- Found PythonLibs: /usr/lib/python3.4 (found version "2.7.6") > -- Python bindings will be compiled > -- Configuring done > WARNING: Target "bindings_python" requests linking to directory > "/usr/lib/python3.4". Targets may link only to libraries. CMake is dropping > the item. > -- Generating done > -- Build files have been written to: /home/john/openbabel/build > > As you can see, the configuration has linked to the Python 2 installation, > not Python 3. What is the correct setting to get it to link to Python 3 > instead? > > > Thanks, > > John Todd > > > P.S. A few of the tests seem to have failed, but several Google pages make it > sound like it's no big deal. Should I worry about: > > -- Looking for conio.h - not found > > -- Performing Test SCANDIR_NEEDS_CONST - Failed > CMake Warning (dev) at test/CMakeLists.txt:171 (include): > Syntax Warning in cmake code at > > /home/john/openbabel/openbabel-2.3.2/cmake/modules/UsePythonTest.cmake:54:14 > > Argument not separated from preceding token by whitespace. > This warning is for project developers. Use -Wno-dev to suppress it. > > CMake Warning (dev) at test/CMakeLists.txt:171 (include): > Syntax Warning in cmake code at > > /home/john/openbabel/openbabel-2.3.2/cmake/modules/UsePythonTest.cmake:54:31 > > Argument not separated from preceding token by whitespace. > This warning is for project developers. Use -Wno-dev to suppress it. > > CMake Warning (dev) at test/CMakeLists.txt:171 (include): > Syntax Warning in cmake code at > > /home/john/openbabel/openbabel-2.3.2/cmake/modules/UsePythonTest.cmake:57:25 > > Argument not separated from preceding token by whitespace. > This warning is for project developers. Use -Wno-dev to suppress it. > > CMake Warning (dev) at test/CMakeLists.txt:171 (include): > Syntax Warning in cmake code at > > /home/john/openbabel/openbabel-2.3.2/cmake/modules/UsePythonTest.cmake:57:39 > > Argument not separated from preceding token by whitespace. > This warning is for project developers. Use -Wno-dev to suppress it. > > > On 08/08/2016 01:27 PM, Geoffrey Hutchison wrote: >>> I am fairly new at Python, and am trying to stick to the latest version. >>> Is it possible to install the Open Babel bindings for Python 3? >> Yes. I don't know about the pip packages (or Mint ones) but you can do this >> from source, e.g.: >> https://open-babel.readthedocs.io/en/latest/Installation/install.html#compile-bindings >> >> Hope that helps, >> -Geoff > -- 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
Re: [Open Babel] Atomic charge changed during conversion from pdb to mol2
Are you perhaps thinking of the pdbqt format? On 6 Aug 2016 5:20 p.m., "Stefano Forli"wrote: > Hi, > the PDB format doesn't support partial charges, so I suspect the one you > write is not a standard one and will not be recognized by the OpenBabel > parser. > Therefore, when generating the Mol2 file, the default charges (Gasteiger, > I believe) will be assigned. > > My advice would be to convert directly the MOPAC output (which is > supported) into Mol2, and see if the proper charges are kept. > > S > > > -- > > Stefano Forli, PhD > > Assistant Professor of Integrative > Structural and Computational Biology, > Molecular Graphics Laboratory > > Dept. of Integrative Structural > and Computational Biology, MB-112F > The Scripps Research Institute > 10550 North Torrey Pines Road > La Jolla, CA 92037-1000, USA. > > tel: +1 (858)784-2055 > fax: +1 (858)784-2860 > email: fo...@scripps.edu > http://www.scripps.edu/~forli/ > > From: samdani [samdani1...@gmail.com] > Sent: Saturday, August 06, 2016 1:07 AM > To: openbabel-discuss@lists.sourceforge.net > Subject: [Open Babel] Atomic charge changed during conversion from pdb to > mol2 > > Dear open babel community > > I used MOPAC to minimize the ligand and obtain the output in PDB format > with > atomic charges. When I converted the PDB file to mol2 using babel the > atomic > charges were found to be modified. Can anyone help me to preserve the > charges during conversion or any other mode of way to obtain the ligand > output with atomic charges preserved? Below am pasting the PDB file and > mol2 > file for reference. > > The PDB file > ATOM 1 O LIG A 1 -2.264 -1.020 0.122 1.00 -0.39 > PROT O > ATOM 2 O LIG A 1 2.796 0.538 -0.113 1.00 -0.39 > PROT > O > ATOM 3 C LIG A 1 -1.114 -0.659 0.066 1.00 0.41 > PROT C > ATOM 4 C LIG A 1 -0.751 0.792 -0.005 1.00 0.00 > PROT C > ATOM 5 C LIG A 1 0.001 -1.641 0.066 1.00 -0.22 > PROT C > ATOM 6 C LIG A 1 0.532 1.171 -0.065 1.00 -0.28 > PROT C > ATOM 7 C LIG A 1 1.275 -1.250 0.008 1.00 -0.20 > PROT C > ATOM 8 C LIG A 1 1.640 0.192 -0.062 1.00 0.43 > PROT C > ATOM 9 C LIG A 1 -1.893 1.734 -0.003 1.00 -0.45 > PROT C > ATOM 10 H LIG A 1 -0.305 -2.687 0.117 1.00 0.18 > PROT H > ATOM 11 H LIG A 1 0.839 2.216 -0.119 1.00 0.19 > PROT H > ATOM 12 H LIG A 1 2.118 -1.944 0.006 1.00 0.18 > PROT H > ATOM 13 H LIG A 1 -2.493 1.632 0.919 1.00 0.18 > PROT H > ATOM 14 H LIG A 1 -1.591 2.787 -0.085 1.00 0.16 > PROT H > ATOM 15 H LIG A 1 -2.589 1.523 -0.834 1.00 0.18 > PROT H > END > > Converted mol2 file using babel > @MOLECULE > A_lig1.pdb > 15 15 0 0 0 > SMALL > GASTEIGER > > @ATOM > 1 O -2.2640 -1.02000.1220 O.2 1 LIG1 > -0.2876 > 2 O 2.79600.5380 -0.1130 O.2 1 LIG1 > -0.2879 > 3 C -1.1140 -0.65900.0660 C.2 1 LIG1 > 0.1821 > 4 C -0.75100.7920 -0.0050 C.2 1 LIG1 > -0.0002 > 5 C 0.0010 -1.64100.0660 C.2 1 LIG1 > -0.0111 > 6 C 0.53201.1710 -0.0650 C.2 1 LIG1 > -0.0084 > 7 C 1.2750 -1.25000.0080 C.2 1 LIG1 > -0.0113 > 8 C 1.64000.1920 -0.0620 C.2 1 LIG1 > 0.1795 > 9 C -1.89301.7340 -0.0030 C.3 1 LIG1 > -0.0360 > 10 H -0.3050 -2.68700.1170 H 1 LIG1 > 0.0657 > 11 H 0.83902.2160 -0.1190 H 1 LIG1 > 0.0659 > 12 H 2.1180 -1.94400.0060 H 1 LIG1 > 0.0657 > 13 H -2.49301.63200.9190 H 1 LIG1 > 0.0279 > 14 H -1.59102.7870 -0.0850 H 1 LIG1 > 0.0279 > 15 H -2.58901.5230 -0.8340 H 1 LIG1 > 0.0279 > @BOND > 115 91 > 211 61 > 3 2 82 > 414 91 > 5 6 81 > 6 6 42 > 7 8 71 > 8 4 91 > 9 4 31 > 10 9131 > 1112 71 > 12 7 52 > 13 3 51 > 14 3 12 > 15 5101 > > > > -- > View this message in context: http://forums.openbabel.org/At > omic-charge-changed-during-conversion-from-pdb-to-mol2-tp4659430.html > Sent from the General discussion mailing list archive at Nabble.com. > > > -- > ___ > OpenBabel-discuss