Related Topics:
- Openbabel 3
- How To Download Open Babel Mac Download
- How To Download Open Babel Mac Version
- How To Download Open Babel Mac Os
- How To Download Open Babel Machine Learning
Install Open Babel Binary Package on macOS
How to Install Open Babel binary package on macOS computers? The easiest option to install Open Babel on macOS computers is to install the Open Babel pre-compiled binary package as shown in this tutorial. 1. Go to Open Babel download Website at SourceForge.net. 2. Click to open 'Files > openb... 2020-05-24, 208đź‘Ť, 0đź’¬
- I am trying to install openbabel with pip on a linux computer without root access and also using a virtual environment. I run the following command pip install openbabel -user -log LOG and then.
- Open Babel is written entirely in the C programming language. It’s a true cross-platform software that supports GNU/Linux, BSD, Solaris, SGI, Microsoft Windows and Mac OS X operating systems. Both 32-bit and 64-bit computers are officially supported at the time of writing this.
Open Babel File Location on macOS
Where are Open Babel files located on my macOS computers? If you install Open Babel 2.3.1 with the pre-compiled binary package on a macOS computer, you can find its program file location with the 'which' command: fyicenter$ which babel /usr/local/bin/babel fyicenter$ ls -l /usr/local/bin/babel -rwxr... 2020-05-24, 195đź‘Ť, 0đź’¬
Open Babel Command Files on macOS
What are Open Babel commands and files installed by the macOS binary package? If you install Open Babel 2.3.1 with the pre-compiled binary package on a macOS computer, you will get a number of Open Babel commands. All Open Babel command files are located in the /usr/local/bin directory: fyicenter$ l... 2020-05-24, 191đź‘Ť, 0đź’¬
Dear OpenBabel Thank you offer this kind of amazing tool for people to use, I was very exciting when I saw this toolkit. However, I tried many times compiling it on my Mac through Cmake though, it always failed. Could you please help me out, thanks.
Running Open Babel on macOS
Where to find FAQ (Frequently Asked Questions) on running Open Babel on macOS? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team on running Open Babel on macOS. Open Babel Installation Options on macOS Install Open Babel Binary Package on macOS Open... 2020-09-15, 161đź‘Ť, 0đź’¬
Open Babel Installation Options on macOS
What are the options for installing Open Babel on macOS computers? There are a number of options for installing Open Babel on macOS computers: 1. Install Open Babel with a pre-compiled binary package. Open Babel 2.3.1 macOS binary package is available. This is the easiest option to install Open Babe... 2020-09-15, 156đź‘Ť, 0đź’¬
Requirements¶
All required dependencies should be automatically taken care of if youinstall pymatgen using easy_install or pip. Otherwise, these packages shouldbe available on PyPI.
Optional dependencies¶
Optional libraries that are required if you need certain features.
sympy: For defect generation and analysis.
VTK with Python bindings 5.8+ (http://www.vtk.org/): For visualization ofcrystal structures using the pymatgen.vis package. Note that the VTKpackage is incompatible with Python 3.x at the moment.
Atomistic Simulation Environment or ASE 3.6+: Required for the usage of theadapters in pymatgen.io.aseio between pymatgen’s core Structure object andthe Atoms object used by ASE. Get it at https://wiki.fysik.dtu.dk/ase/.Note that the ASE package is compatible with Python 3.5+ at the moment.
OpenBabel with Python bindings (http://openbabel.org): Required for theusage of the adapters in pymatgen.io.babelio between pymatgen’s Moleculeand OpenBabel’s OBMol. Opens up input and output support for the very largenumber of input and output formats supported by OpenBabel.
networkx: For graph analysis associated with critic2 topological analysisof electron charge densities, pygraphviz is also required for visualization.
pytest - For unittesting. Not optional for developers.
Optional non-Python programs¶
Optional non-python libraries (because no good python alternative exists atthe moment) required only for certain features:
ffmpeg: For generation of movies in structure_vtk.py. The executable ffmpegmust be in the path. Get it at http://www.ffmpeg.org.
enum: For the use of
pymatgen.transformations.advanced_transformations.EnumerateStructureTransformation
andpymatgen.command_line.enumlib_caller
module. This library by GusHart provides a robust way to enumerate derivative structures. It can beused to completely enumerate all symmetrically distinct ordered structuresof disordered structures via EnumerateStructureTransformation. Many otheradvanced transformations (e.g., MagOrderingTransformation) useEnumerateStructureTransformation. The enum.x and makestr.xexecutables must be in the path. Get it at http://github.com/msg-byu/enumlib andfollow the instructions to compile enum.x and makestr.x.bader: For use with
pymatgen.command_line.bader_caller.BaderAnalysis
.This library by Henkelmann et al. provides a robust way to calculate theBader analysis from a CHGCAR. The bader executable must be in the path.Get it at http://theory.cm.utexas.edu/bader.gulp: For use with
pymatgen.command_line.gulp_caller
,which is in turn used extensively bypymatgen.analysis.defects
tocompute empirical defect energies.aconvasp: For use with the
pymatgen.command_line.aconvasp_caller
.Zeo++ (http://zeoplusplus.org): For defect structuregeneration. This is required in addition to installing the zeo Pythonpackage.
critic2 (https://github.com/aoterodelaroza/critic2): For topologicalanalysis of critical points from electronic charge density. Providesmore detailed information compared to bader. For use with
pymatgen.command_line.critic2_caller.Critic2Caller
.graphviz (http://graphviz.org): For visualization of graphs generatedusing critic2.
Conda-based install¶
For these instructions, we will assume the 64-bit versions of all OSes.For OSX and Linux, both latest Python 3.x adn 2.7 are supported. For Windows,only latest Python 3.x is supported. Most common functionality should workout of the box on Windows, but some specialized analyses relying on externalprograms may require you to compile those programs from source.
Step 1: Install conda¶
Download and install the version of conda for your operating system fromhttp://conda.pydata.org/miniconda.html. For Windows, make sure it is theMiniconda3 installer, and simply double-click the exe file. For Linux or Mac,run:
Openbabel 3
Note that you may need to create a new terminal after this step in order forthe environmental variables added by conda to be loaded.
Step 2b: (Optional) Create a conda environment¶
If you are working with many python packages, it is generally recommended youcreate a separate environment for each of your packages. For example:
Step 3: Install pymatgen¶
You can install pymatgen via conda as well via the conda-forge channel onAnaconda cloud:
If the above fails, try using conda to install some critical dependencies andthen do pip install:
Step 4: (Optional) Install enumlib and bader (only for OSX and Linux)¶
If you would like to use the enumeration capabilities powered by Gus Hart’senumlib or perform Bader charge analysis powered by the Bader analysis codeof the Henkelmann group, please try installing these from source using the pmgcommand line tool as follows:
Then put these in your PATH somewhere. You can also download the source ofthese from the official repos and follow the compile instructions.
POTCAR Setup¶
For the code to generate POTCAR files, it needs to know where the VASPpseudopotential files are. We are not allowed to distribute these under theVASP license. The good news is that the pmg command line utility includes aconfig functionality.
After installation, do:
In the above, <EXTRACTED_VASP_POTCAR> is the location of the directory thatyou extracted the downloaded VASP pseudopotential files. Typically, it hasthe following format:
or:
and follow the instructions. If you have done it correctly, you should get aresources directory with the following directory structure:
After generating the resources directory, you should add a VASP_PSP_DIR configvariable pointing to the generated directory and you should then beable to generate POTCARs:
If you are using newer sets of pseudopotential files from VASP, the directorynames may be different, e.g., POT_GGA_PAW_PBE_52. For such cases, please alsoadd a default functional specification as follows:
You can also use this to specify whatever functional you would like to use bydefault in pymatgen, e.g., LDA_52, PW91, etc. Type:
to see full list of choices.
Note
The Materials Project currently uses older versions of the VASP pseudopotentialsfor maximum compatibility with historical data, rather than the current 52/54pseudopotentials. This setting can be overriden by the user if desired.As such, current versions of pymatgen will check the hashes of your pseudopotentialswhen constructing input sets to ensure the correct, compatible pseudopotential sets areused, so that total energies can be compared to those in the Materials Project database.If you use any functional other than PBE, note that you should not be combining resultsfrom these other functionals with Materials Project data. For up-to-date informationon this, please consult the Materials Project documentation.
PyPy Support¶
PyPy is an alternative Python interpreter for running Python codeand comes with significant speed improvements for common applications. However, historically,fewer packages offer PyPy support.
It is possible to install and use pymatgen with the PyPy interpreterbut it comes with some important caveats:
While it is usable, PyPy is not officially supported by pymatgen. We do not run ourfull test suite on PyPy and it’s possible some parts of pymatgen will be broken.
All of pymatgen’s dependencies now support PyPy including numpy, scipy, and pandas,however matplotlib is difficult to install. If trying PyPy, the current adviceis to remove the matplotlib dependency, however this means any modules using matplotlibwill not be importable. The easiest way to install dependencies is using thePyPy builds on conda-forge. For spglib,cloning the repository and running
pythonsetup.pyinstall
manually is advised.Performance improvements are unpredictible. Since pymatgen makes heavy use of numpyand custom extensions where appropriate, many code hot spots have already been optimized.
We welcome any developers interested in expanding our PyPy support.
Setup for Developers (using GitHub)¶
Step 1: Preparing your system¶
Windows¶
Download Microsoft Visual Studio 2015 (the free Community Edition) is fine.
Install Visual Studio 2015, but make sure that you select More Options ->Programming Languages -> Visual C++ during the installation process. Bydefault, Visual Studio does not install Visual C++, which is needed.
Mac OSX¶
Download and install Xcode. Afterwards, install the XCode command linetools by typing the following in a terminal:
(Optional) Install gfortran. Get an installer athttp://gcc.gnu.org/wiki/GFortranBinaries#MacOS.
Linux¶
Usually no preparation is needed as most of the standard compilers shouldalready be available.
Step 2: Install pymatgen in developmental mode¶
Make sure you have git and git-lfs installed.Clone the repo at https://github.com/materialsproject/pymatgen.
Run git lfs install in the cloned repo first.
In your root pymatgen repo directory, type (you may need to do this with rootprivileges):
Install any missing python libraries that are necessary.
I recommend that you start by reading some of the unittests in the testssubdirectory for each package. The unittests demonstrate the expected behaviorand functionality of the code.
Please read up on pymatgen’s coding guidelines beforeyou start coding. It will make integration much easier.
Installation tips for optional libraries¶
This section provides a guide for installing various optional libraries used inpymatgen. Some of the python libraries are rather tricky to build in certainoperating systems, especially for users unfamiliar with building C/C++ code.Please feel free to send in suggestions to update the instructions based onyour experiences. In all the instructions, it is assumed that you have standardgcc and other compilers (e.g., Xcode on Macs) already installed.
VTK on Mac OS X (tested on v7.0)¶
The easiest is to install cmake fromhttp://cmake.org/cmake/resources/software.html.
Type the following:
Press “t” to toggle advanced mode. Then press “c” to do an initialconfiguration. After the list of parameters come out, ensure that thePYTHON_VERSION is set to 3, the VTK_WRAP_PYTHON is set to ON, andBUILD_SHARED_LIBS is set to ON. You may also need to modify the pythonpaths and library paths if they are in non-standard locations. For example, ifyou have installed the official version of Python instead of using theMac-provided version, you will probably need to edit the CMakeCache Pythonlinks. Example configuration for Python 3.5 installed using conda is givenbelow (only variables that need to be modified/checked are shown):
Then press “c” again to configure and finally “g” to generate the requiredmake files After the CMakeCache.txt file is generated, type:
With any luck, you should have vtk with the necessary python wrappersinstalled. You can test this by going into a python terminal and trying:
OpenBabel Mac OS X (tested on v2.3.2)¶
How To Download Open Babel Mac Download
Anaconda install
If you are using anaconda (and have pymatgen installed in your anaconda environment), you should beable to install openbabel with a single command:
How To Download Open Babel Mac Version
Manual install
Openbabel must be compiled with python bindings for integration with pymatgen.Here are the steps that I took to make it work:
Install cmake from http://cmake.org/cmake/resources/software.html.
Install pcre-8.33 fromftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.gz.
Install pkg-config-0.28 using MacPorts or fromhttp://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz.
Install SWIG fromhttp://prdownloads.sourceforge.net/swig/swig-2.0.10.tar.gz.
Download openbabel 2.3.2 source code fromhttps://sourceforge.net/projects/openbabel/files/openbabel/2.3.2/.
Download Eigen version 3.1.2 fromhttp://bitbucket.org/eigen/eigen/get/3.1.2.tar.gz.
Extract your Eigen and openbabel source distributions:
Now you should have two directories. Assuming that your openbabel src is ina directory called “openbabel-2.3.2” and your eigen source is in a directorycalled “eigen3”, do the following steps:
Edit ob-src/scripts/CMakeLists.txt, jump to line 70, change “eigen2_define”to “eigen_define”.
Let’s create a build directory:
Before proceeding further, similar to the VTK installation process in theprevious section, you may also need to modify the CMakeCache.txtfile by hand if your python paths and library paths if they are innon-standard locations. For example, if you have installed the officialversion of Python instead of using the Mac-provided version,you will probably need to edit the CMakeCache Python links. Exampleconfiguration for Python 2.7 is given below (only variables that need tobe modified are shown):
If you are using Mavericks (OSX 10.9) and encounter errors relating to <tr1/memory>, you might also need to includethe following flag in your CMakeCache.txt:
Run make and install as follows:
With any luck, you should have openbabel with python bindings installed.You can test your installation by trying to import openbabel from thepython command line. Please note that despite best efforts,openbabel seems to install the python bindings into /usr/local/lib evenif your Python is not the standard Mac version. In that case,you may need to add the following into your .bash_profile:
Zeo++¶
If you use the defects analysis package, you will need to installZeo++/Voro++.Here are the steps you need to follow (thanks to Bharat)
How To Download Open Babel Mac Os
Download and install Voro++:
Add -fPIC to the CFLAGS variable in config.mk, and then:
Download and install Zeo++:
Create python bindings with Cython:
How To Download Open Babel Machine Learning
To test that the installation worked, here is an example series of things youcan do using pymatgen:
Comments are closed.